United States Patent im
US005687392A  Patent Number:  Date of Patent:
 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
 Inventor: Ron Radko, Bellevue, Wash.
 Assignee: Microsoft Corporation, Redmond, Wash.
 Appl. No.: 241,609
 Filed: May 11,1994
 Lit CI.6 G06F 15/02
 U.S. CI 395/842
 Field of Search 395/821, 842,
395/843. 823. 824, 840, 846. 800. 822-825.
 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. .
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
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