Mechanism for storing system level attributes in a...

Electrical computers and digital processing systems: memory – Storage accessing and control – Hierarchical memories

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C711S145000, C711S207000

Reexamination Certificate

active

06189074

ABSTRACT:

FIELD OF THE INVENTION
The present invention relates to a method and apparatus for improving the efficiency of memory accesses in computer systems, and more specifically, to a method and apparatus for providing cacheability information during linear to physical address translation.
BACKGROUND OF THE INVENTION
A cache memory is a high speed memory unit interposed in the memory hierarchy of a computer system between a slower system memory and a processor to improve effective memory transfer rates and accordingly improve overall system performance. The cache memory unit is essentially hidden and appears transparent to the user, who is aware of only a larger system memory. The cache is usually implemented in static random access memory (SRAM) which has speeds comparable to that of the processor, while the system memory is implemented in less expensive, slower random access memory (RAM).
The cache concept anticipates the likely re-use by the microprocessor of selected data in system memory by storing a copy of the selected data in the cache memory. As such, not all memory regions are desired to be cacheable. For example, memory that is not likely to be re-used need not be cached. Accordingly, computer systems typically provide a region register on board the processor that contains system level attributes assigned to addresses within the region. For example, the cacheability of the region may be defined. The region register can also include information such as whether a given page is write-through or protected, etc.
For processors having an on-chip region register, processing the cacheability information typically proceeds as shown in FIG.
1
. When an instruction requests the contents of a memory location, the instruction refers to the location not by an actual hardware or physical memory address, but by a “virtual” or “logical” address. The logical address is merely a name for a memory location which must then be translated into the appropriate physical memory location. The segmentation unit in the processor's memory management unit (MMU) translates the logical address into a linear address. If paging is not enabled, the linear address then becomes the physical address that is actually output from the processor to access the requested memory location, as shown. If paging is enabled, the paging mechanism further translates the linear address into a physical address which is then used to access the requested memory location. Prior to being used for accessing the memory, however, the physical address is compared to the cacheability ranges stored in the region register. This is a relatively slow serial process which degrades system performance. Accordingly, there is a need for a system and method for improving the cacheability determination so as to enhance system performance.
A more detailed discussion of the address translation process is deemed appropriate. Referring now to
FIG. 2
, in protected mode, each block or segment of memory is described by a structure called a segment descriptor. Segment descriptors reside in a set of system tables called descriptor tables. The segment and offset registers hold values referred to as a selector and offset, respectively, which are used to access one or more addresses in a desired memory segment. In essence, the selector is a 16 bit value that serves as the virtual name for a memory segment, and the MMU uses the selector to index in the descriptor tables to the respective segment descriptor corresponding to the desired memory segment.
As shown in
FIG. 3
, a descriptor is a small block of memory that describes the characteristics of a much larger memory block or memory segment. The descriptor includes information regarding the segment's base address, its length or limit, its type, its privilege level and various status information. The segment's base address is the starting point in the segment's linear address space. As shown in
FIG. 2
, the logical address is added to the base address to generate the linear address of the desired memory segment. The limit field is a 20 bit field that determines the last addressable unit of the memory segment. The segment type field is a 3 bit field which indicates the type of segment being defined, for example, a code, data, or stack segment. The privilege level field is a two bit field which indicates the level of privilege associated with the memory segment defined by the descriptor. Among the status bits, a bit referred as the Accessed bit is automatically set by the CPU whenever a memory reference is made to the segment defined by the respective descriptor.
The Intel X
86
family of processors also include segment descriptor cache registers for each of its segment registers. Whenever a segment register's contents are changed, the 8-byte descriptor associated with that selector is automatically loaded (cached) on the chip. This is referred to as a segment descriptor reload. Once loaded, all references to that segment use the cached descriptor information instead of reaccessing the descriptor from main memory.
Referring again to
FIG. 2
, once the segmentation unit has translated the logical address into a linear address, if paging is enabled, the linear address is provided to the paging mechanism to be translated into a physical address. Referring now to
FIG. 4
, the CPU uses a directory and a page table to translate the linear address (from the segmentation unit) into a physical address. The CPU also includes an internal register referred to as control register
3
(CR
3
) which also contains the physical starting address of the page directory. The lower 12 bits of CR3 are always zero to ensure that the page directory is always page aligned. As shown in
FIG. 4
, the linear address produced by the segmentation unit includes a directory field which stores an index to the page directory. As shown, the directory value in the linear address is combined with the page directory base address in CR3 to index to the desired entry in the page directory.
The page directory is four Kbytes long and allows up to 1024 page directory entries. The contents of a Page Directory Entry are shown in FIG.
5
. Each Page Directory Entry contains the base address of a respective page table as well as information about the respective page table. As shown in
FIG. 4
, the page table base address stored in the respective Page Directory Entry is combined with a page table index value stored in bits
12
-
21
of the linear address. The page table index value is used to select one of the 1024 page table entries.
Each page table is four Kbytes and holds up to 1024 page table entries. As shown in
FIG. 6
, a Page Table Entry contains the starting or base address of the page frame being accessed as well as statistical information about the page. As shown in
FIG. 4
, the frame base address in the Page Table Entry is concatenated with the lower 12 bits of the linear address, referred to as the offset, to form the physical address. The physical address is output from the pins of the CPU to access the desired memory location.
Referring again to
FIGS. 5 and 6
, the lower 12 bits of each Page Table Entry and Page Directory Entry contain statistical information about pages and page tables respectively. The P or Present bit, bit
0
, indicates if a Page Directory or Page Table Entry can be used in address translation. The A or Accessed bit, bit
5
, is set by the processor for both types of entries before a read or write access occurs to an address covered by an entry. For a Page Table Entry, the D or Dirty bit, bit
6
, is set to 1 before a write to an address covered by that Page Table Entry occurs. The D bit is undefined for Page Directory Entries. When the P, A and D bits are updated by the microprocessor, the processor generates a Read-Modify-Write cycle which locks the bus and prevents conflicts with other processors or peripherals. The 3 bits marked “OS Reserved” in
FIGS. 5 and 6
(bits
9
-
11
) are software definable. Users are free to use these bits for any desired purpose they wish. An example use of t

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Mechanism for storing system level attributes in a... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Mechanism for storing system level attributes in a..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Mechanism for storing system level attributes in a... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2565641

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.