Abstract:
An information processing system includes a central processing unit, a main storage, a main storage controller for controlling the main storage, a cache memory having a content of at least one part of addresses stored in the main storage, at least one DMA controller which is capable of referring to the main storage and a DMA address translation unit for translating a logical address outputted from the DMA controller into a physical address for referring to the main storage. The DMA address translation unit has a flag representing whether or not the cache memory is referred to on DMA. The main storage controller performs either of reference to the cache memory or direct reference to the main storage based upon the flag on DMA.

Description:
This is a continuation of application Ser. No. 07/728,589, filed Jul. 11, 1991, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     The present invention relates to a DMA control method in an information processing system. 
     Many information processing systems have address translation for translating logical addresses which are dealt by programs into main storage addresses, that is, physical addresses to implement a virtual storage system. 
     The address translation usually adopts a page system in which a logical address space is divided into spaces each having a predetermined size, that is, page units, and translation from logical to physical addresses is performed in units of pages. 
     Although the utilization efficiency of a main storage is enhanced by address translation relying upon the page system, a plurality of pages having sequential logical addresses correspond to pages having diverse physical addresses in main storage. 
     Accordingly, a control which enables data of a plurality of pages continuous on logical addresses to be transferred is necessary for performing a direct memory access (hereafter referred to as DMA) from an input/output control to a main storage. 
     In one prior art approach, there is a system in which an address translation table for DMA is provided. This is disclosed in JP-A-1-193961. 
     The DMA address translation table has page addresses for generating physical addresses from logical addresses outputted from an input/output control. 
     By the above-mentioned system, the input/output control can be implemented with a relatively simple hardware. DMA transfer to a continuous area on the logical addresses can thus be achieved. 
     For ensuring an agreement between the content of a cache memory and the content in a main storage on DMA, a facility for referring to the cache memory on DMA has generally been provided. 
     Since the cache memory is occupied for DMA while DMA is performed in the prior art, access from a CPU to the cache memory cannot be made during DMA. 
     Therefore, there has been a problem that the processing performance of the CPU is lowered during DMA operation. 
     SUMMARY OF THE INVENTION 
     The present invention enhances the processing performance of a CPU by enabling access from the CPU to a cache memory during DMA. 
     The present invention provides, an information processing system including a central processing unit, a main storage, a main storage controller for controlling said main storage, a cache memory having a content of at least one part of addresses stored in said main storage, at least one DMA controller which is capable of referring to the main storage and DMA address translator for translating a logical address outputted from the DMA controller into a physical address for referring to said main storage, characterized in that said DMA address translator has a flag representative of whether or not said cache memory is referred to on DMA and said main storage controller performs either a reference to said cache memory or a direct reference to said main storage based upon said flag. 
     The central processing unit presets address translation information before the central processing unit instructs the DMA controller to start DMA transfer. At this time the central processing unit determines whether or not reference to the cache memory is required for presetting a value of the flag (cache memory reference control flag). 
     After the starting of a DMA by the central processing unit, the main storage controller for controlling the main storage determines a main storage address to be accessed by the DMA address translator in accordance with an address provided as an output from the DMA controller. 
     If the value of the cache memory reference control flag in the DMA address translator represents that reference to the cache memory is necessary, the cache memory is referred to. 
     If the value of the reference control flag of the cache memory represents that reference to the cache memory is not necessary, the cache memory is not referred to and the main storage is directly accessed. 
     Therefore, if the cache memory is not referred to even during DMA, access from the CPU to the cache memory becomes possible so that an otherwise negative effect of DMA on CPU processing performance can be suppressed. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram showing structure of a first embodiment of the present invention. 
     FIG. 2 is an explanatory view showing an accessing method by a DMA address translation table. 
     FIG. 3 is an explanatory view showing an address map of the main storage. 
     FIG. 4 is a block diagram showing the structure of a second embodiment of the present invention. 
     FIG. 5 is an explanatory view showing an accessing method to a DMA address translation table in the second embodiment of the present invention. 
    
    
     DETAILED DESCRIPTION 
     Now, preferred embodiments of the present invention will be described with reference to the drawings. 
     FIG. 1 is a block diagram showing the structure of a first embodiment of an information processing system of the present invention. 
     The first embodiment comprises a CPU 101 which is a central processing unit, an address translator 102, a cache memory 103, a CPU bus 104, a main storage control 105 which is main storage controller for controlling the main storage, a main storage 106, a DMA address translation control 107 and a DMA address translation table 108 which together constitute a DMA address translator or translation means, a system bus 109, and first to n-th input/output controls 110a to 110b which are DMA control elements. 
     One or more input/output devices (not shown) are connected to each of the input/output controls. 
     Now, operation will be described. 
     If a program of data stored in the main storage is referred to by the CPU 101, a logical address is translated into an address of the main storage (physical address) by the address translator 102 and access to the cache memory 103 or to the main storage 106 is made through the CPU bus 104. 
     If a relevant address content exists in the cache memory 103, data transfer between the main storage 106 and the cache memory is not made and program or data transfer is made between the CPU 101 and the cache memory 103 through the CPU bus 104. 
     On DMA, an input/output control output address, a logical address which is outputted from any one of the first to n-th input/output controls 110a to 110b is inputted to the DMA address translation control 107 through the system bus 109. 
     Then, the input/output control output address 201 is translated into a main storage address (physical address) 202 by the DMA address translation control 107 using the DMA address translation table 108. 
     The translated main storage address 202 is inputted to the main storage controller 105 so that the main storage 106 is referred to. 
     Now, address translation on DMA will be described in detail with reference to FIG. 2. 
     The input/output control output address 201 is divided into an address tag 203 and an offset 204. The content in the DMA address translation table 108 is read out in accordance with the value of the address tag 203 representative of the reference destination (entry) in the DMA address translation table. 
     Each entry in the DMA address translation table 108 has a page number 206, a V bit 207, and an S bit 208. 
     The page number 206 is added with the offset 204 of the input/output control output address 201 to become a main storage address 202. 
     The V bit 207 is a flag representative of whether or not the page number in the entry in interest of the DMA address translation table 108 is valid. 
     The S bit 208 is a flag representative of whether or not reference to the cache memory is necessary in association with the DMA in interest. If S=1, it represents that reference to the cache memory is necessary. If S=0, it represents that reference to the cache memory is not necessary. 
     The value of the read-out S bit 208 is inputted to the main storage control 105 together with the main storage address 202. If S=1, the main storage control performs bus arbitration with the CPU 101 and acquires a bus priority of the CPU bus 104 to refer to the cache memory 103. 
     If S=1 and the content of the address of interest exists in the cache memory 103, the content is read out or updated according to needs. 
     Even if S=1, if the content of the address of interest does not exist in the cache memory, the main storage 106 is referred to. 
     If S=0, the cache memory 103 is not referred to and the main storage 106 is directly referred to. 
     Now, presetting of the content in the DMA address translation table will be described. 
     The content in the DMA address translation table 108 is controlled by the CPU. 
     The page number 206 which is address translation information is preset based upon the correspondence between the logical address 201 and the main storage address 202. 
     Presetting of the value of the S bit 208 will be described with reference to an address map of the main storage 106 shown in FIG. 3. 
     The value of the S bit is determined depending upon whether or not there is the possibility that the area of the main storage 106 which is an object of the DMA transfer exists in the cache memory. 
     That is, the main storage 106 is divided into program data areas 301a and 301b in which usual programs and data are stored, respectively and a DMA buffer area 302. The DMA buffer area 302 is not used as an object of the cache memory on access from the CPU. 
     When the DMA buffer area 302 is registered in the DMA address translation table 108, the S bit of the DMA address translation table is set to zero. When the usual program and data areas are registered in the DMA address translation table 108, S is set to 1. 
     In the first instance where S=0, direct access to the main storage is made without interrupting the transfer between the CPU and the cache memory when DMA transfer to an area in which cache memory reference is not necessary. Therefore, this reduces the likelihood of lowering the CPU processing performance due to DMA access. 
     Since determination as to whether or not reference to the cache memory on DMA transfer is necessary is made based upon whether or not the object area of the DMA transfer is the usage object area of the cache memory, the usage object area of the cache memory is also referred to on DMA transfer and the area of the cache memory which is not the usage object is not referred to on DMA transfer. Accordingly, disagreement between the contents of the cache memory and of the main storage due to DMA transfer will not occur. 
     Information as to whether or not the cache memory is referred to is not limited to presetting of the flag in the DMA address translation table. A sole device for holding information representing whether or not reference is made may be provided. 
     Further, the DMA control means may be provided with a table having this information therein. 
     A second embodiment of the present invention will be described. 
     FIG. 4 is a block diagram showing the structure of the second embodiment. FIG. 5 is a view showing a method of access to a DMA address translation table in the second embodiment. 
     The structure of the second embodiment is characterized in that the DMA address translation control 107 which is DMA address translation means is provided with a pointer for storing a lead address of the DMA address translation table and that DMA address translation table 402 is provided in the main storage 106. 
     The second embodiment comprises a CPU 101 which is a central processing unit, an address translator 102, a cache memory 103, a CPU bus 104, a main storage control 105 which is main storage controller for controlling the main storage, a main storage 106, a DMA address translation control 107 and a DMA address translation table 108 which together constitute a DMA address translator or translation means, a system bus 109, and first to n-th input/output controls 110a to 110b which are DMA control means. 
     One or more input/output devices (not shown) are connected to each of the input/output controls. 
     Now, operation of this second embodiment will now be described. 
     If a program or data stored in the main storage is referred to by the CPU 101, a logical address is translated into an address of the main storage (physical address) by the address translator 102 and access to the cache memory 103 or to the main storage 106 is made through the CPU bus 104. 
     If a relevant address content exists in the cache memory 103, data transfer between the main storage 106 and the cache memory is not be made and program or data transfer is made between the CPU 101 and the cache memory 103 through the CPU bus 104. 
     On DMA access, the content of the DMA address translation table 402 in the main storage 106 is read by using the address tag 203 of the input/output control output address 201 outputted from any one of the first to n-th input/output controls 110a to 110b and the pointer 401 and is translated into the main storage address 202. 
     The structure of each entry in the DMA address translation table 402 and the details of operation of address translation on DMA are identical with those of the first embodiment. In accordance with the second embodiment, there is provided an effect that the DMA address translation table 108 can be commonly used with the main storage 105 so that the amount of hardware can be reduced in addition to obtaining the beneficial effects of the first embodiment.