United States Patent im
Radko
US005687392A [11] Patent Number: [45] Date of Patent:
[54] SYSTEM FOR ALLOCATING BUFFER TO TRANSFER DATA WHEN USER BUFFER IS MAPPED TO PHYSICAL REGION THAT DOES NOT CONFORM TO PHYSICAL ADDRESSING LIMITATIONS OF CONTROLLER
[75] Inventor: Ron Radko, Bellevue, Wash.
[73] Assignee: Microsoft Corporation, Redmond, Wash.
[21] Appl. No.: 241,609
[22] Filed: May 11,1994
[51] Lit CI.6 G06F 15/02
[52] U.S. CI 395/842
[58] Field of Search 395/821, 842,
395/843. 823. 824, 840, 846. 800. 822-825.
250
[56] References Cited
U.S. PATENT DOCUMENTS
4,722,051 1/1988 Chattopadhya 395/842
5,146,580 9/1992 Naidu et al 395/402
5,161,215 11/1992 Kouda et al 395/250
5,404,511 4/1995 Notarianni 395/601
5,497,476 3/1996 Oldfield et al 395/439
FOREIGN PATENT DOCUMENTS
23266 2/1981 European Pat. Off. .
OTHER PUBLICATIONS
IBM Technical Reference, Personal Computer AT System BIOS 5, ROM BIOS Code Listing for Floppy Controller, IBM. 1985, pp. 97-115.
"DMA revealed", by Hazzah. Karen, Apr., 1992, Windows-DOS Developer's Journal, v3, n4, p5(14).
"DMA Controller programming in C", by Watson, Robert. Nov.. 1993 C users Journal, vll. nil. p35(15). "implementing direct memory access (DMA) in C". by Bradley. Don. May, 1992, C Users Journal. vlO. n5. p53 (18).
Primary Examiner—Moustafa M. Meky
Attorney, Agent, or Firm—Seee and Berry LLP
[57] ABSTRACT
The present invention is a method and apparatus for efficiently transferring data between an input/output device and a main memory area of a computer system. More specifically, the invention transfers a requested amount of data using direct memory access and either a single transfer buffer or a dynamically allocated transfer buffer. The invention receives input/output requests that specify an amount of data to be transferred between the input/output device and a logical user buffer contained within the main memory area. By evaluating physical memory locations that correspond to the logical user buffer, the invention determines whether the physical memory locations conform to addressing limitations of a direct memory access transfer buffer. When the physical memory locations conform to the addressing limitations of a direct memory transfer buffer, the invention transfers the requested data directly between the input/ output device and the physical memory locations of the logical user buffer. On the other hand, when the evaluated physical memory locations do not conform to the physical requirements of a direct memory access transfer buffer, the invention dynamically allocates a conforming direct memory access transfer buffer. Subsequently, the invention transfers the requested data between the input/output device and the conforming buffer. After transferring the data between the conforming buffer and the input/output device, the invention releases the allocated buffer to reduce the amount of memory overhead in the computer system.
15 Claims, 7 Drawing Sheets
![[merged small][merged small][merged small][merged small][merged small][table][merged small][merged small][merged small][merged small][merged small][merged small][graphic]](http://www.google.com/patents?id=ygccAAAAEBAJ&ie=ISO-8859-1&output=text&pg=PA1&img=1&zoom=3&hl=en&q=mezick&cds=1&sig=ACfU3U1DGLF3Ils5Mneij5erEK5jk936yA&edge=0&edge=stretch&ci=343,896,290,440)