WO2002099653A1 - Computer system having virtual addressing and method for determining a physical address from a virtual address - Google Patents

Computer system having virtual addressing and method for determining a physical address from a virtual address Download PDF

Info

Publication number
WO2002099653A1
WO2002099653A1 PCT/EP2002/006146 EP0206146W WO02099653A1 WO 2002099653 A1 WO2002099653 A1 WO 2002099653A1 EP 0206146 W EP0206146 W EP 0206146W WO 02099653 A1 WO02099653 A1 WO 02099653A1
Authority
WO
WIPO (PCT)
Prior art keywords
list
address
node
virtual
physical
Prior art date
Application number
PCT/EP2002/006146
Other languages
German (de)
French (fr)
Inventor
Berndt Gammel
Oliver Kniffler
Ralph Ledwa
Holger Sedlak
Original Assignee
Infineon Technologies Ag
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Infineon Technologies Ag filed Critical Infineon Technologies Ag
Publication of WO2002099653A1 publication Critical patent/WO2002099653A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1009Address translation using page tables, e.g. page table structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/0292User address space allocation, e.g. contiguous or non contiguous base addressing using tables or multilevel address translation means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1027Address translation using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • G06F12/1416Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights
    • G06F12/145Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights the protection being virtual, e.g. for virtual blocks or segments before a translation mechanism

Definitions

  • the present invention relates to computer systems and in particular to computer systems with virtual addressing.
  • Virtual addressing has long been known in the field of workstations. Using a specific mapping rule, virtual addresses are mapped to physical addresses.
  • the physical addresses address memory cells of a physical memory, such as. As the main memory, a hard drive, a tape storage, etc. Virtual addresses, however, do not refer directly to physical memory cells, but only indirectly, via the mapping rule.
  • the advantage of this type of addressing is that the programmer of an application does not have to worry about the various physical memories available in a computer system.
  • the programmer has a virtual address space available, which he can use for his program as required.
  • the mapping to the physical address space made available by a special computer system is created separately from the program code, so that a program programmed with virtual addresses can run on different computer systems by providing different mapping rules.
  • mapping rules for the two virtual address spaces onto the only available physical address space can ensure that the two processes do not interfere or that the two processes share a physical memory area in a controlled manner, for example in order to use certain routines together, so that these routines only must be saved once in the memory of the chip card, or in order to achieve a secure data exchange between the processes.
  • an application therefore runs in the so-called virtual address space.
  • Each address of the virtual memory at which the application can read / write data or executable code is mapped to an address in the physical memory at which this data or code is actually stored.
  • the virtual address (VA) and the physical address (PA) assigned via the mapping rule need not have any relation to each other.
  • the virtual address space can also be significantly larger than the physical address space.
  • Virtual addresses where there is no readable / writable data or executable code are usually not mapped to a physical memory. This image is completely transparent for the application being executed.
  • the virtual address space is divided into equally large, overlap-free memory areas.
  • a page in the virtual address space is assigned a page in the physical address space via the mapping rule, the page in the physical address space also being referred to as a page frame.
  • the useful data memory of a page frame of the physical address space is just as large as that of a page of the virtual address space.
  • TLB Translation Look Aside Buffer
  • TLB miss TLB failure
  • the mapping rule between virtual address space and physical address space is implemented, for example, as a single page table can be kept in volatile memory.
  • a workstation starts in real addressing mode.
  • the operating system of the workstation causes the CPU of the workstation to gradually build up a page table in the real, ie physical addressing mode, in the volatile working memory of the workstation. Only when a page table is constructed can the workstation switch to virtual addressing mode. If the CPU then asks for data at a virtual address, the associated physical address is determined in the volatile main memory of the CPU so that the data can be called up from the memory.
  • Usual workstations are characterized in that they start up in a real addressing mode and then switch to the virtual addressing mode when the mapping rule is set up from the virtual address space to the physical address space in the volatile memory.
  • a disadvantage of this concept is the fact that a relatively large working memory area is required to save a page table. This disadvantage is not of the utmost importance for workstations, since they have very large amounts of memory available. For other applications, such as B. for security-relevant computer systems, such as those implemented in chip card ICs, the memory resources are limited due to the small amount of space available. Providing a large amount of volatile working memory to store a page table means that the applications running on the chip card may have insufficient working memory and thus experience a loss in performance.
  • a further disadvantage of the known concept is that a substantial administrative burden is necessary next to supply, when booting the computer system to construct the Page Table, ie from stored information according to calculate "and after the address mappings and store.
  • corresponding programs must also be provided on a chip card in order to take the precautions required for the virtual addressing mode.
  • Even such programs require memory space, which is a rare commodity, particularly for chip cards or other security ICs.
  • a further disadvantage of the described concept of initializing in the physical addressing mode and the subsequent switchover to the virtual addressing mode is that the advantages of the virtual addressing mode, that is to say the separation of two applications to be separated from one another, are not obtained from the beginning, but rather only when the CPU has ended the real mode and switched to the virtual addressing mode.
  • a physical addressing mode or a “real” addressing mode represents a security weakness, particularly in the case of security controllers, which is also referred to as a “single point of attack”. If an attacker succeeds in penetrating the operating system of the chip card IC while it is in the physical addressing mode, the attacker can access the physical memory cells without barriers and read out or even manipulate sensitive data. The security features of the virtual addressing mode are thus not achieved from the beginning, but only when the computer system has switched to the virtual addressing mode.
  • the object of the present invention is to create a safe and simple computer system.
  • a mapping rule is stored in a non-volatile memory of the computer system, by means of which a physical address can be determined from a virtual address.
  • the mapping specification is stored in the non-volatile memory, so that it is available immediately when the computer system is started up and does not have to be generated in a real mode and stored in the volatile memory, as in the prior art. This also eliminates the entire administrative effort and the programs required to generate a mapping rule, for example in the form of a hash table, since the mapping rule is already available in the non-volatile memory.
  • a hardware state machine which can access the non-volatile memory and is designed to use the virtual address and the mapping rule to determine the physical address assigned to the virtual address.
  • the hardware state machine automatically executes a predetermined algorithm, the algorithm which the hardware state machine executes receives input data from the non-volatile memory on the one hand and the virtual address as input data on the other hand, to output the physical address as output data.
  • the simplest way, but not the most optimal way, is to create a complete page table in the non- to store volatile memory.
  • the hardware state machine would be activated if the CPU of the computer system wanted data at a virtual address.
  • the hardware state machine will read in the virtual address, access the non-volatile memory, extract the physical address assigned to the virtual address from the page table and then output it.
  • mapping rule in the form of a hierarchical tree with a root node for a root level, at least one intermediate node for at least one intermediate level and an end node for an end level, so that the hardware state machine, controlled by the performs a so-called page table walk ("page table walk") in order to output the physical address which corresponds to the entered virtual address after passing through the tree.
  • page table walk page table walk
  • the lists for nodes of the hierarchical tree are compressed to save space in non-volatile memory.
  • mapping rule between the virtual and physical address
  • suitable list entries in virtual mode it is then possible to save the required data from the physical memory in the volatile working memory generate the remaining part of the mapping rule and use it for further address translations from virtual to physical.
  • the hardware state machine can therefore also access data programmed in the volatile memory at runtime after the system has been started up in virtual mode.
  • page-by-page addressing is also preferred. To avoid memory fragmentation, as many combined lists as possible are stored in one and the same physical page.
  • An advantage of the present invention is that the computer system can only carry out virtual addressing and no physical addressing, and the security weakness is no longer present.
  • Another advantage of the present invention is that no programs or no administrative effort are required to set up a page table in the volatile memory, since the page table or the hierarchical tree is persistently stored in the non-volatile memory.
  • Another advantage of the present invention is that in the case of the mapping rule as a hierarchical tree structure, by implementing access rights at the node of the tree, a differentiated access rights assignment can be achieved with an adjustable granularity.
  • mapping rule for example the page Table or the hierarchical structure of node lists can be created. However, this can be carried out "off-line” to a certain extent outside of the operation of the computer system, or "off-card” in the case of a chip card.
  • the creation of the mapping rule and the storage of the mapping rule in the non-volatile memory thus does not take up any valuable on-line resource of memory or CPU, but can, if there is enough time, for example in the manufacture of the chip card or in the case of a dynamic Mo.
  • mapping is then made when the computer system is not currently carrying out any security-relevant application. According to the invention, processing steps can therefore be shifted out of on-line operation in order to save valuable online resources, such as. B. Free computer power, storage space, energy consumption etc., or save.
  • FIG. 1 shows a computer system according to the invention with virtual addressing
  • FIG. 2 shows a schematic illustration of a mapping of a virtual address space into a physical address space for a computer system on a chip card
  • 4a shows a schematic representation of an address translation using a mapping rule in the form of a hierarchical tree structure
  • Fig. 4b is a table showing the node levels and the address areas addressed by a node according to a preferred embodiment of the present invention
  • mapping rule in the form of a hierarchical tree structure in which intermediate nodes can be skipped
  • FIG. 6 shows a table for representing node sizes at different levels for the example of FIG. 4a
  • FIG. 7 shows an example of a mapping rule in the form of an n-tree with the same sizes for additional nodes of a level
  • FIG. 8 is a schematic illustration of a compression method for node lists in order to improve the ratio of entries used to the total number of entries in a list;
  • Fig. 10 is a compressed representation of the tree of Fig. 7;
  • FIG. 11 shows a storage space-optimized storage of the tree from FIG. 10.
  • 12 is a representation of a virtual address modified to refer to a physical address at which a node list is stored.
  • the computer system can also have a volatile memory 16, which in FIG. is drawn, and possibly other peripheral components such.
  • B. include a coprocessor, an input / output interface, a random number generator, etc.
  • the computer system also has a memory management unit (MMU) 18 and a cache 20, wherein the cache 20 can be divided into an instruction cache and a data cache if the computer system is constructed in accordance with the Harvard architecture ,
  • the CPU is connected to the memory management unit 18 via a virtual address bus 22.
  • the memory management unit 18 comprises a hardware state machine 18a and preferably a translation look-aside buffer (TLB) 18b in order to determine a physical address from a virtual address supplied by the CPU 10 via the bus 22, in order to assign that to a virtual address Addressing data from a memory 12, 14, 16 and loading it into the cache 20 via a data / command bus 24, from which the CPU 10 receives the data assigned to a virtual address via a further command / data bus 26.
  • TLB translation look-aside buffer
  • the hardware state machine 18a of the memory management unit 18 can access a non-volatile memory in the form of the ROM 12 or the NVM 14 via an access bus 26 in order to implement the mapping rule which is used to calculate the physical address from the virtual address is required to load from the non-volatile memory.
  • the hardware state machine 18a can thus access the non-volatile memory via the access bus 26 in order to determine the physical address assigned to the virtual address using a virtual address and the mapping rule stored in the non-volatile memory.
  • the CPU 10 preferably addresses exclusively via the virtual address bus 22, in particular the hardware state machine 18a address.
  • the computer system according to the invention does not require a physical addressing mode, but rather can start up in virtual addressing mode, so that there is no point of attack in the form of an operating system of the computer system according to the invention running in physical addressing mode.
  • a protective mechanism for multitasking computer systems is that separate processes or applications are assigned separate virtual address spaces, so that multitasking operation with different applications is possible, but these applications must be completely separated from one another for security reasons.
  • a virtual address space of 4 gigabytes is provided, as can be seen in FIG. 2.
  • the address space is divided into virtual memory pages 30, a memory page having a size of 64 bytes, that is 512 bits.
  • the memory pages of the virtual address space can be addressed using a 32-bit wide virtual address.
  • the virtual address space is mapped into physical memory addresses using a mapping rule 32, which is symbolized by the arrows shown in FIG. 2.
  • the physical address space is fixed at 4 MB, although it is pointed out that a conventional chip card does not have as much memory by far.
  • Typical memory sizes for the E 2 PROM 14 from 1 are 64 kbytes.
  • the RAM 16 of FIG. 1 is typically 8 Kbytes, while the ROM 12 of FIG. 1 is typically 168 Kbytes.
  • a virtual address space of 4 GB is mapped to approximately 240 kByte memory cells, it can be seen that a large amount of virtual addresses does not first have to be mapped into physical memory addresses, and that, in addition, a large number of physical memory addresses do not refer to actually existing physical addresses Show memory cells.
  • the overdimensioning of the virtual address space compared to the physical address space and the overdimensioning of the physical address space with respect to the memory cells actually present allow simple modifications in such a way that additional memories can be easily added subsequently or that the physical address space can be expanded as necessary can.
  • mapping rule 32 is not built up by the CPU in the RAM 16, but rather is developed, for example, during the manufacture of the chip card and programmed in the ROM 12 in the form of a correspondingly designed ROM mask before the computer system according to the invention in Is put into operation. In operation, apart from the state machine, the computer system therefore does not require any resources to generate the mapping rule 32. The steps required for this have already been carried out off-line in order not to have to use up valuable online capacities of the computer system for this purpose.
  • a virtual address is converted into a corresponding physical address e.g. B. translated using a translation table commonly referred to as a page table.
  • the page table can be organized in the form of a single table which has entries, each entry comprising a virtual address and the physical address assigned to it.
  • a mapping rule organized in this way has the advantage of greater flexibility for managing access rights. It is also more suitable for handling small page sizes, which is important when the computer system is used as a security IC in a chip card. Small page sizes, e.g. B. less than or equal to 256 bytes, also serve to avoid page table fragmentation.
  • a memory page therefore has, as has been explained with reference to FIG. B. a size of 64 bytes, ie 512 bits. This means that the page offset must be 6 bits long in order to be able to address the 64 bytes starting from the start address for the page.
  • Fig. 3 shows a schematic representation of an address translation using a page table.
  • a virtual address 30, an AMO field 32 and a TID field 34 are used as input.
  • the AMO field 32 denotes the access mode that is set by the current state of the CPU and the intended access type (read, write, execute, etc.).
  • the TID field 34 is required for multitasking operation and provides a task identifier (Task Identifier) which indicates which task the virtual address 30 is assigned to in order to be able to differentiate between different virtual address spaces of different applications.
  • the so-called extended virtual address is obtained from the virtual address 30 and the TID field 34, which has the start address for the virtual page (VP 36) and an offset value (DP 38).
  • the assignment rule in the form of a page table 40 comprises various entries, each entry having a column 42 for the start address of the virtual page and a column 44 for the start address of the physical page, which " is assigned to the virtual page in column 42. has.
  • a virtual page is exactly the same size as a physical page, and the offset of the virtual address (DP 38) and the offset 52 of the physical address are the same, so that no offset values are stored in the page table or special processing of offset values is necessary.
  • the memory processing unit 18 preferably comprises a TLB in order to achieve faster addressing.
  • the page table described with reference to FIG. 3 is kept in the TLB, the TLB optionally being present in addition to the hardware state machine 18a.
  • the TLB is designed in the form of the cache table shown in FIG. 3 and comprises one List of virtual addresses with corresponding physical addresses for quick access.
  • the TLB is filled with the last used address pairs and can be updated either randomly or according to time.
  • One possibility, for example, is that as soon as the TLB is filled up and a new entry is to be added, the oldest entry is deleted in order to make room for a new entry.
  • the size of the TLB is a hardware factor and can therefore be selected specifically depending on the design.
  • the hardware resources are limited due to the chip space required, the TLB will not be too large and the hardware state machine will be activated more often, while in other cases where the TLB can be kept very large, the hardware - State machine is only active at the beginning when the TLB, which is a volatile buffer, is still empty to gradually fill up the TLB.
  • a page error is output, which indicates that the virtual address was damaged or that at an error occurred in the address translation.
  • the hardware state machine 18a of FIG. 1 is activated in accordance with the present invention in order to convert a virtual address which was not found in the TLB into a physical address in order to load the physical address together with its virtual address into the TLB.
  • the hardware state machine will access the non-volatile memory (e.g. 12 or 14 of FIG. 1) to determine the physical address using the mapping rule stored there.
  • a hierarchical tree structure with physically addressed nodes is preferred as the image.
  • Such a hierarchical tree structure which can also be called a multilevel page table mapping rule, has the advantage that it is not necessary to keep a large page table in the non-volatile memory, but that instead of one large table, several levels or levels with smaller lists can be used. This allows more efficient management, especially with small physical memory pages.
  • the hardware state machine 18a is then able to traverse the hierarchical tree structure from node to node to finally determine a physical address for a given virtual address. This process is called "page table walking”.
  • FIG. 4a shows a virtual address 400 which has different sections 402 to 310.
  • Section 410 is assigned to a root level, ie the highest level.
  • Section 408 is assigned to the next higher level, in the example level 4.
  • Section 406 of virtual address 400 is assigned in accordance with level 3.
  • Section 404 is assigned to level 2, while section 402 is assigned to Level 1, ie the end node, is assigned.
  • the last section of the physical address, which can also be referred to as a section for level 0, contains the page offset, which is identified in FIG. 3 by the reference symbol 38.
  • the virtual address also includes a so-called package address 412, which addresses a memory package.
  • the virtual address space is divided into 256 packages of equal size, so that each package has an address space of 16 MB. This makes it possible, for example, to assign different access rights for different storage packages in the virtual address space.
  • the section 410 of the virtual address 400 which comprises only 1 bit in a preferred exemplary embodiment, is assigned to a root node of the hierarchical tree structure.
  • the list for the root node can be stored in the non-volatile or in registers of the memory management unit. Alternatively, the list for the root node can also be stored at a fixed location in the physical memory.
  • the list for the root node is referred to as package descriptor buffer 414 and, due to the fact that section 410 of virtual address 400 has only one bit, comprises only two list entries.
  • An entry in the root list 414 includes an index indexed by the bit of section 410 of the virtual address. If the bit in section 410 has a value of one, as in the case of
  • the first entry in list 414 is selected.
  • the entry further includes a pointer 416 to the physical address of the page in non-volatile memory, on which a list 418 for the first intermediate node to which section 408 of virtual address 400 is assigned is stored. If the bit in "the portion 410 of the virtual address, however, a zero, is the second entry of the list 414 is selected, which comprises a pointer 420 to the physical address of a memory page in the non-volatile memory, in which a further list 422 for the first intermediate node to which the section 408 of the virtual address 400 is assigned is stored.
  • lists 418 and 422 each have 16 entries for the first intermediate node. Each entry has a length of 32 bits, so that in the exemplary embodiment shown in FIG. 4a, each list takes up exactly one memory page in the non-volatile memory.
  • the hardware state machine After the hardware state machine has determined the upper entry of the root list 414 based on the section 410 of the virtual address 400, the hardware state machine can use the pointer 416 to access the physical memory page in which the list 418 for the first intermediate node is stored. The hardware state machine then reads the section 408 of the virtual address 400 and, based on the fact that the section has the value "1100", selects the thirteenth entry in the list 418.
  • the thirteenth entry again comprises a pointer 424 to a list 426 for a further intermediate node to which the section 406 of the virtual address 400 is assigned.
  • the hardware state machine then reads in the section and selects the first entry in the list 426 since the section 406 has the value “0000”.
  • the first entry in the list 426 in turn contains a pointer 428 to a list 430 which is assigned to a further intermediate node with a lower hierarchy.
  • the hardware state machine now reads the section 404 of the virtual address 400 and selects the eighth entry in this list, since the value of the section 404 is “Olli”.
  • the selected entry of the list 430 in turn contains a pointer 432 to a physical address of the physical page in the non-volatile memory, in which a list 434 for an end node which is assigned to the section 402 of the virtual address 400 is stored.
  • the hardware state machine now reads the section 402 of the virtual address and selects the twentieth entry of the list 434 from the list 434 due to the fact that the value of the section 402 is "10011".
  • the selected entry of the list 434 for the end node contains a pointer 436 to the physical address of the physical page which corresponds to the virtual start address of the virtual page, to the physical address to which the pointer 436 points now only the page offset has to be added, as is symbolically represented by a dashed arrow 438 in FIG. 4a, in order to obtain the physical address 440 which is assigned to the virtual address 400.
  • FIG. 4a It should be pointed out that the concept described in FIG. 4a can also be used if no page-by-page memory organization is used, but a direct addressing of memory cells without a page address and
  • the virtual address space is significantly larger than the physical address space.
  • the virtual address 400 is divided into six parts or sections. Each section is assigned a level in the address translation process performed by the hardware state machine. The highest level, i.e. H. Level 5, as was done, indexes one of two entries in list 414. Of course, list 414 could also contain multiple entries. In this case, section 410 of virtual address 40 would have to have more bits accordingly.
  • H. Level 5 the highest level
  • list 414 could also contain multiple entries.
  • section 410 of virtual address 40 would have to have more bits accordingly.
  • Bits might already have four entries in list 414.
  • each level 4b shows the address area that can be addressed to a certain extent by each level.
  • the entire 16 megabytes of the virtual address space can be addressed by the root list 414 (last line of the table in FIG. 4b), the upper pointer 416 selecting the upper eight megabytes, while the lower pointer 420 selecting the lower eight megabytes , Therefore, the list 418 or, analogously, the list 422 can address a physical address space of eight megabytes, with each entry in the list 418, i. H. each arrow pointing out of list 418 can address 512 kilobytes.
  • Each pointer from list 418 points to a list 426 of the third level (third
  • each pointer from a third level list such as. B. the pointer 428, again address an address range of 32 kilobytes.
  • the 32 kilobyte address range is the address range spanned by the second level list 430, and an entry in this list can in turn address an address range of two kilobytes.
  • FIG. 5 shows a section of the hierarchical page table structure from FIG. 4a, but with a different virtual address, which in sections 408 and 406 has loud ones for the fourth level and for the third level. In contrast to the mapping rule shown in FIG.
  • the mapping rule in the form of the hierarchical tree which begins with the root list 414 and ends with the physical address 440 allows skipping at least one level.
  • the skipping of a level is signaled in the virtual address by a certain section, for example by the fact that there are all ones in one section, as is the case in FIG. 5.
  • any other predetermined code could also be reserved for skipping a level.
  • the pointer which starts from the root list 414 and is labeled 500 in FIG. 5 no longer points to a list of the fourth level or the third level, but immediately to the list 430 of the second level. It is possible to skip any number of levels or nodes.
  • the bits in the virtual address that correspond to these levels must have the predetermined code to signal the level machine to skip levels.
  • This optimization requires additional information for the pointer 500, and this additional information is stored in the entries in the root list 414.
  • this additional information is stored in the entries in the root list 414.
  • level 3 could be skipped, while the level 4 node may not be skipped.
  • the additional information should be available in an entry in a list for the level 4 node.
  • FIG. 6 shows a table corresponding to FIGS. 4a and 5 for the meaning of the bits of the virtual address and the relationship between the node size, ie the maximum number of entries in the node list.
  • each row of the table in FIG. 6 represents a section of the leftmost one in FIG 6 represents the level of the virtual address.
  • section 410 has only one bit, namely in which preferred embodiment of the present invention, bit 23 of the virtual address.
  • One bit can be used to index two different entries in the root list so that the node size of the root node is 2.
  • the fourth level comprises bits 19-22. Four bits can be used to index 16 different entries in a list for the fourth level, so that the node size, that is to say the size of a list in the fourth level, is 16.
  • the number of lists in the fourth level is 2 because the root list has two entries.
  • the section 402 for the first level comprises five bits, so that through this section 32 entries of a list can be indexed, as is also clear from the list 434 for the first level of Fig. 4a, it has 32 lines while a list the second level has only 16 lines.
  • FIG. 7 As in FIGS. 5 and 4a, entries used in a list are shown in bold, while zero entries are shown as a blank rectangle. From the mapping rule shown in Ffg ".” 7 It is clear that very many zero Entries exist, and just a few used entries. This is because the virtual address space is significantly larger than the physical address space. In the preferred embodiment of the present invention, the virtual address space is 4 gigabytes, while the physical address space is only 4 megabytes. However, if a page-by-page memory organization is used, a page of memory must still be provided for each list shown in FIG. In the example of a mapping rule shown in FIG. 7, 10 memory pages must therefore be used in order to manage only 4 physical pages in which code or data are present. In applications where there is a sufficient amount of non-volatile memory to store the lists for the levels, this does not matter.
  • n-node means that all lists of a node of a level have the same number of entries, namely n entries
  • q-node means that the node list is compressed and that the number of entries into one List for one and the same level can vary from list to list.
  • Partially filled node lists are compressed and, as is particularly explained with reference to FIG. 11, several compressed nodes can be stored on one page of the physical memory area.
  • the compressed nodes are called q nodes, and the hierarchical tree structure with compressed nodes is referred to as the q tree.
  • the theory behind a q-node is that all entries in a list, ie all non-zero pointers, can be placed in a n-node in a structure (the q-node) that is smaller than the original one - before n node is. This is accomplished by dividing the n-node into smaller sections, taking the smallest section containing all non-zero pointers for maximum compression.
  • an offset value for the q-node pointer is required. This offset value is also referred to as a virtual offset.
  • FIG. 8 in order to illustrate a possible type of compression of a list 800 of an n-node.
  • List 800 includes two non-zero entries that can be binary indexed by 1100 and 1110. Possible q nodes are shown next to list 800.
  • three different "compressed" lists, ie q-nodes, 802, 804 and 806 can be generated in the described section-wise compression.
  • the list 802 corresponds to the list 800. This is the trivial form of compression, the q-node -List 802 is exactly the same size as list 800 and no offset bit is required, whereas list 804 is already compressed to half the storage space and contains two entries that can be indexed with 110 and 100.
  • the virtual offset bit corresponds to the most significant bit (msb) of both entries in the list 800. Compression is therefore possible if the msbs of the non-zero entries in list 800 are the same, since the most significant bits of the entries in the compressed list 804 are also the same achieve higher compression, as shown by the compressed list 806.
  • the two non-zero entries of list 806 have most significant bits ⁇ ⁇ are not equal, so that no further compression is possible is.
  • two offset bits are required, namely the two most significant bits of the entries in the list 800, which are the same for both non-zero entries in the list.
  • the virtual offset value is 0, 1 bit or 2
  • the entry 426 of the next higher list would also specify the size of the list in addition to the physical address at which the list 430 is stored would be, for example, a compression by half, only 8 entries large, although the section 404 of the virtual address, which corresponds to level 2, has 4 bits and actually indexes a 16 entry list.
  • the section 404 of the virtual address would then be designed such that a bit of the same, typically the most significant bit, is interpreted as a virtual offset bit.
  • the hardware state machine will compare the most significant bit of section 404 to the size bit in the non-zero entry of list 426 and continue address translation if matched, while if the bits do not match, a page fault is issued because then at least either the mapping rule or the virtual address is incorrect.
  • FIG. 9 is discussed in order to show further examples of how n-nodes can be reduced to their minimum q-nodes if the compression method described with reference to FIG. 8 is used.
  • the list 900 in Fig. 9 only includes a non-zero entry indexed by the bit combination "1100".
  • the minimum q-node comprises only a single entry and, accordingly, 4 virtual offset bits "1100".
  • a list 900 with only a single non-zero entry can thus be reduced in a simple manner with respect to its storage space requirement by 1/16 times.
  • List 902 includes two non-zero entries that can be indexed with "0001" and "0011". The two entries have two equal most significant bits, so that two virtual offset bits 00 are created and the list can be reduced by a quarter.
  • List 904 includes two non-zero entries, the "most significant bits of which are not equal, however, so this one selected compression algorithm no compression is achievable.
  • the q-node is therefore exactly the same size as the n-node.
  • the sample list 906 includes two entries with "0100" and
  • the sample list 908 includes four non-zero entries between "1010” and "1101". All four entries have the same most significant bit, so that a compression by ⁇ times can be achieved, which leads to a virtual offset bit of "1".
  • level 1 (FIG. 4a) play a special role. Since their entries do not point to other q nodes, but directly to the physical memory pages, no additional information, such as B. a size value of a hierarchically low q-list can be stored together with the pointers. As a result, an entry in a level 1 list is used to store two pointers. Therefore, section 402 of the virtual address associated with level 1 comprises five virtual address bits. The additional bit specifies which of the pointers to use in the selected q-node entry. It should be noted that one of the two pointers can also be 0. After an entry in a level 1 list stores two pointers, the list length of a list, such as The list 434 of Fig. 4a, twice the length of a higher level list, such as. B. level 430.
  • FIG. 10 illustrate how the compressed q nodes can be used to minimize the memory usage.
  • the mini paint q-nodes of a hierarchical mapping rule identified. This results in a mapping rule as shown in FIG. 10.
  • the filled rectangles indicate used entries, while the empty rectangles indicate zero entries.
  • Each q-node is surrounded by a thick line. It can be seen that in the selected example of the mapping rule, all lists except a list 1000 could be compressed. The list 1000 could not be compressed with the compression method chosen, since the two non-zero entries it contains are not listed in the same half of the list.
  • mapping rule shown in FIG. 10 all, including the compressed, lists are each stored on their own physical memory pages or “page frames”, so that the page frames are occupied very loosely, but the number of page frames has not yet been reduced
  • the unoccupied words in the page frames can, however, already be occupied by other data, so that a list for the mapping rule and additional data can be stored in a physical memory page
  • mapping rule shown in FIG. 11 Since most q-nodes are small, in the mapping rule shown in FIG. 11, all node lists except a node list 1100 can be packed into the same physical memory page 1102. As a result, the mapping rule or the page assignment structure is reduced from 10 to 2 memory pages. In this way, the q-tree structure provides considerable optimization in terms of equal to the option shown in FIG. 4a, in which no list compression has been carried out.
  • a node addressing mode is provided in order to be able to modify the mapping rule in the non-volatile memory.
  • the format for a virtual address 1200 shown in FIG. 12 is used for this.
  • the virtual address is as in Fig. A in divided several sections, the sections 1210 to 1202 basically corresponding to the sections 410 to 402 of FIG. 4a.
  • the last section 1212, which had designated the offset value in FIG. 4a, is however used at the virtual address 1200 to signal the q-node level, the list of which is to be modified in the NAM mode.
  • the NAM mode is used to manipulate virtual addresses, since for security reasons only a virtual addressing mode is to be used so that the CPU has no direct access to physical pages.
  • the NAM mode is used to manipulate virtual addresses, since for security reasons only a virtual addressing mode is to be used so that the CPU has no direct access to physical pages.
  • each packet descriptor included in the root list 414 i.e. H. the package descriptor buffer
  • a NAM bit is stored which, when set, allows access to the q-node lists for this special memory package.
  • privileged layers i.e. H. privileged modes of the operating system that can manipulate the NAM bit.
  • the NAM bit is set, the last section 1212 of the virtual address is no longer interpreted as a page offset value, but is used to signal the hardware state machine whether the q-node at level 4, level 3, is at E. - Level 2 or level 1 should be addressed to access the list or entries in the corresponding list.
  • the virtual address is thus interpreted differently by the hardware state machine than in the case described in FIG. 4a.
  • the hardware state machine now only performs an address translation until the q node of the stop level defined by section 1212 is recovered. Then a final bus cycle is generated on the physical side, which is indicated by the pointer of an entry in the list for the defined stop level.
  • the requested list data is then accessed and is preferably stored in the data cache 20 (FIG. 1). It should be noted that this address translation is not stored in the TLB 18b (FIG. 1), since it is the mapping rule itself and not an assignment of a virtual address to a physical address.

Abstract

The invention relates to a computer system having virtual addressing, comprising a non-volatile memory (12, 14) for storing a representation specification, by which means a virtual address is clearly associated with a physical address. Said computer system also comprises a machine for determining the state of the hardware, which can access (26) the non-volatile memory (12, 14) and is embodied in such a way that it can determine the physical address corresponding to the virtual address, on the basis of the virtual address and the representation specification. Given that the representation specification is stored in the non-volatile memory (12, 14) and the machine for determining the state of the hardware (18a) can access said non-volatile memory (12, 14) by means of a bus (26), the computer system can be initialised as soon as it is in the virtual addressing mode in such a way that it does not operate in the physical addressing mode. The point of attack which usually represents the physical addressing mode is thus overcome.

Description

Beschreibungdescription
Rechnersystem mit virtueller Adressierung und Verfahren zum Ermitteln einer physikalischen Adresse aus einer virtuellen AdresseComputer system with virtual addressing and method for determining a physical address from a virtual address
Die vorliegenden Erfindung bezieht sich auf Rechnersysteme und insbesondere auf Rechnersysteme mit virtueller Adressierung.The present invention relates to computer systems and in particular to computer systems with virtual addressing.
Die virtuelle Adressierung ist seit längerem aus dem Bereich der Workstations bekannt. Unter Verwendung einer bestimmten Abbildungsvorschrift werden virtuelle Adressen auf physikalische Adressen abgebildet. Die physikalischen Adressen adres- sieren Speicherzellen eines physikalischen Speichers, wie z. B. des Arbeitsspeichers, einer Festplatte, eines Bandspeichers etc.. Virtuelle Adressen verweisen dagegen nicht direkt auf physikalische Speicherzellen, sondern lediglich indirekt, über die Abbildungsvorschrift. Der Vorteil dieser Adressie- rungsart besteht darin, daß sich der Programmierer einer Anwendung nicht um die in einem Rechnersystem vorhandenen diversen physikalischen Speicher kümmern muß. Der Programmierer hat einen virtuellen Adressraum zur Verfügung, den er für sein Programm je nach Bedarf nützen kann. Die Abbildung auf den physikalischen Adressraum, den ein spezielles Rechnersystem zur Verfügung stellt, wird getrennt vom Programmcode erstellt, so daß durch Bereitstellen verschiedener Abbildungsvorschriften ein mit virtuellen Adressen programmiertes Programm auf verschiedenen Rechnersystemen laufen kann.Virtual addressing has long been known in the field of workstations. Using a specific mapping rule, virtual addresses are mapped to physical addresses. The physical addresses address memory cells of a physical memory, such as. As the main memory, a hard drive, a tape storage, etc. Virtual addresses, however, do not refer directly to physical memory cells, but only indirectly, via the mapping rule. The advantage of this type of addressing is that the programmer of an application does not have to worry about the various physical memories available in a computer system. The programmer has a virtual address space available, which he can use for his program as required. The mapping to the physical address space made available by a special computer system is created separately from the program code, so that a program programmed with virtual addresses can run on different computer systems by providing different mapping rules.
In der Fachveröffentlichung „Protected Virtual Memory - 32- Bit-Power ohne angezogene Handbremse", Stephan Ondrusch, 10. GMD-SmartCard-Workshop, Darmstadt, 9. Feb. 2000, werden die Vorteile einer virtuellen Adressierung für Chipkarten be- schrieben. In Chipkarten, auf denen verschiedene Anwendungen laufen sollen, die aus Sicherheitsgründen voneinander-~ge- trennt sein sollen, wird jedem Prozeß bzw. jeder Task ein ei- gener virtueller Adressraum zur Verfügung gestellt, der beim Erstellen des Programmcodes für den Prozeß definiert und vom Betriebssystem zur Laufzeit eingerichtet wird. Unter der Kontrolle des Betriebssystems der Chipkarte werden Zugriffsrech- te auf weitere Chipressourcen, z. B. gemeinsam genutzte Speicherbereiche, eingetragen und ständig per Hardware überwacht. Damit ist es möglich, die Programmcodes für zwei Prozesse auf einer Chipkarte unabhängig voneinander zu erstellen, indem zwei voneinander getrennte virtuelle Adressräume zur Verfü- gung gestellt werden. Durch die Abbildungsvorschriften für die beiden virtuellen Adressräume auf den einzigen vorhandenen physikalischen Adressraum kann sichergestellt werden, daß die beiden Prozesse nicht interferieren bzw. daß die beiden Prozesse kontrolliert einen physikalischen Speicherbereich gemeinsam nutzen, um beispielsweise bestimmte Routinen gemeinsam zu verwenden, so daß diese Routinen nur ein einziges Mal in dem Speicher der Chipkarte abgespeichert werden müssen, oder um einen sicheren Datenaustausch zwischen den Prozessen zu erreichen.The advantages of virtual addressing for chip cards are described in the specialist publication "Protected Virtual Memory - 32-bit power without handbrake on", Stephan Ondrusch, 10th GMD SmartCard Workshop, Darmstadt, 9 February 2000 Chip cards, on which various applications are to run, which should be separated from each other for security reasons, each process or task is assigned a separate Gener virtual address space is provided, which is defined when creating the program code for the process and set up by the operating system at runtime. Under the control of the operating system of the chip card, access rights to other chip resources, e.g. B. shared memory areas, registered and constantly monitored by hardware. This makes it possible to create the program codes for two processes on a chip card independently of one another by making two separate virtual address spaces available. The mapping rules for the two virtual address spaces onto the only available physical address space can ensure that the two processes do not interfere or that the two processes share a physical memory area in a controlled manner, for example in order to use certain routines together, so that these routines only must be saved once in the memory of the chip card, or in order to achieve a secure data exchange between the processes.
In einem Prozessor mit einem virtuellen Speichersystem läuft eine Applikation somit im sogenannten virtuellen Adressraum ab. Jede Adresse des virtuellen Speichers, an der sich von der Applikation les/schreibbare Daten oder ausführbarer Code befinden, ist auf eine Adresse im physikalischen Speicher abgebildet, an der diese Daten bzw. dieser Code tatsächlich gespeichert sind. Die virtuelle Adresse (VA) und die über die Abbildungsvorschrift zugeordnete physikalische Adresse (PA) müssen keinerlei Bezug zueinander haben. Der virtuelle Ad- ressraum kann ferner wesentlich größer als der physikalische Adressraum sein.In a processor with a virtual memory system, an application therefore runs in the so-called virtual address space. Each address of the virtual memory at which the application can read / write data or executable code is mapped to an address in the physical memory at which this data or code is actually stored. The virtual address (VA) and the physical address (PA) assigned via the mapping rule need not have any relation to each other. The virtual address space can also be significantly larger than the physical address space.
Virtuelle Adressen, an denen sich keine les/schreibbaren Daten oder ausführbarer Code befinden, werden in der Regel nicht auf einen physikalischen Speicher abgebildet. Für die ausgeführte Applikation ist diese Abbildung völlig transparent. Bei einer Organisation des Speichers in Pages bzw. Seiten ist der virtuelle Adressraum in gleich große, überlappungsfreie Speicherbereich unterteilt. Einer Seite im virtuellen Adress- räum ist eine Seite im physikalischen Adressraum über die Abbildungsvorschrift zugeordnet, wobei die Seite im physikalischen Adressraum auch als Page Frame bezeichnet wird.Virtual addresses where there is no readable / writable data or executable code are usually not mapped to a physical memory. This image is completely transparent for the application being executed. When the memory is organized in pages, the virtual address space is divided into equally large, overlap-free memory areas. A page in the virtual address space is assigned a page in the physical address space via the mapping rule, the page in the physical address space also being referred to as a page frame.
Der Nutzdatenspeicher eines Page Frames des physikalischen Adressraums ist genauso groß wie der einer Page des virtuellen Adressraums.The useful data memory of a page frame of the physical address space is just as large as that of a page of the virtual address space.
Die Zuordnung einer virtuellen Seite zu einer physikalischen Seite wird üblicherweise über die sogenannte Seitentabelle oder Page Table erreicht, welche Adresspaare von jeweiligenThe assignment of a virtual page to a physical page is usually achieved via the so-called page table or page table, which address pairs of each
Startadressen der virtuellen Seiten und der zugeordneten physikalischen Seiten enthält.Contains start addresses of the virtual pages and the assigned physical pages.
Bei Workstations befindet sich ein Teil der Page Table in ei- nem Cache, der auch als „Translation Look Aside Buffer (TLB) bezeichnet wird. Befindet sich das Startadresspaar für eine virtuelle Seite und die zugeordnete physikalische Seite in dem TLB, so erfolgt die Berechnung der Adressabbildung in den virtuellen Speicherbereich beschleunigt, da lediglich ein Zugriff auf eine Tabelle erforderlich ist, um die einer virtuellen Adresse zugeordnete physikalische Adresse zu erhalten.In the case of workstations, part of the page table is in a cache, which is also referred to as the “Translation Look Aside Buffer (TLB). If the start address pair for a virtual page and the assigned physical page are in the TLB, the calculation of the address mapping into the virtual memory area is accelerated since only access to a table is required in order to obtain the physical address assigned to a virtual address.
Befindet sich das Startadresspaar, d. h. die virtuelle Adres- se und die zugeordnete physikalische Adresse, nicht im TLB, so findet ein TLB-Miss (TLB-Fehlschlag) statt, was üblicherweise zu einem Trap an das Betriebssystem führt, welches das Adressen-Tupel in den TLB nachtragen muß.Is the start address pair, i. H. the virtual address and the assigned physical address, not in the TLB, a TLB miss (TLB failure) takes place, which usually leads to a trap to the operating system, which has to add the address tuple to the TLB.
Im Bereich der Workstations wird die Abbildungsvorschrift zwischen virtuellem Adressraum und physikalischem Adressraum, die beispielsweise als eine einzige Page Table implementiert sein kann, im flüchtigen Arbeitsspeicher gehalten. Wenn eine Workstation hochgefahren wird, so startet sie zunächst im reellen Adressierungsmodus. Dies bedeutet, daß das Betriebssystem der Workstation die CPU der Workstation veranlasst, im reellen, d. h. physikalischen Adressierungsmodus, in dem flüchtigen Arbeitsspeicher der Workstation eine Page Table nach und nach aufzubauen. Erst wenn eine Page Table konstruiert ist, kann die Workstation in den virtuellen Adressierungsmodus umschalten. Fragt dann die CPU nach Daten an einer virtuellen Adresse, so wird im flüchtigen Arbeitsspeicher der CPU die dazu gehörige physikalische Adresse ermittelt, um die Daten von dem Speicher abrufen zu können. Übliche Workstations zeichnen sich also dadurch aus, daß sie in einem realen Adressierungsmodus hochfahren und dann, wenn die Abbildungsvorschrift von dem virtuellen Adressraum zu dem physikalischen Adressraum im flüchtigen Speicher aufgebaut ist, in den virtuellen Adressierungsmodus umschalten.In the area of workstations, the mapping rule between virtual address space and physical address space is implemented, for example, as a single page table can be kept in volatile memory. When a workstation is started up, it starts in real addressing mode. This means that the operating system of the workstation causes the CPU of the workstation to gradually build up a page table in the real, ie physical addressing mode, in the volatile working memory of the workstation. Only when a page table is constructed can the workstation switch to virtual addressing mode. If the CPU then asks for data at a virtual address, the associated physical address is determined in the volatile main memory of the CPU so that the data can be called up from the memory. Usual workstations are characterized in that they start up in a real addressing mode and then switch to the virtual addressing mode when the mapping rule is set up from the virtual address space to the physical address space in the volatile memory.
Nachteilig an diesem Konzept ist zum einen die Tatsache, daß ein relativ großer Arbeitsspeicherbereich benötigt wird, um eine Page Table zu speichern. Dieser Nachteil ist für Workstations nicht von größter Bedeutung, da sie sehr große Mengen an Arbeitsspeicher zur Verfügung haben. Für andere Anwendungen, wie z. B. für sicherheitsrelevante Rechnersysteme, wie sie beispielsweise in Chipkarten-ICs implementiert sind, sind die Speicherressourcen aufgrund des geringen zur Verfügung stehenden Platzes begrenzt. Eine Bereitstellung einer Menge an flüchtigem Arbeitsspeicher, um eine Page Table zu speichern, führt dazu, daß die auf der Chipkarte ausgeführten Applikationen unter Umständen zu wenig Arbeitsspeicher haben und damit Leistungseinbußen erfahren.A disadvantage of this concept is the fact that a relatively large working memory area is required to save a page table. This disadvantage is not of the utmost importance for workstations, since they have very large amounts of memory available. For other applications, such as B. for security-relevant computer systems, such as those implemented in chip card ICs, the memory resources are limited due to the small amount of space available. Providing a large amount of volatile working memory to store a page table means that the applications running on the chip card may have insufficient working memory and thus experience a loss in performance.
Ein weiterer Nachteil des bekannten Konzepts besteht darin, daß ein wesentlicher Verwaltungsaufwand nötig ist, um zu- nächst, beim Hochfahren des Rechnersystems, die Page Table aufzubauen, d. h. aus gespeicherten Informationen nach" und nach die Adressenzuordnungen zu berechnen und abzuspeichern. Neben der Tatsache, daß dafür Rechnerressourcen erforderlich sind, müssen auch entsprechende Programme auf einer Chipkarte bereitgestellt werden, um die für den virtuellen Adressierungsmodus erforderlichen Vorkehrungen zu treffen. Auch sol- ehe Programme benötigen Speicherplatz, der aus Platzgründen insbesondere bei Chipkarten oder anderen Sicherheits-ICs ein rares Gut ist.A further disadvantage of the known concept is that a substantial administrative burden is necessary next to supply, when booting the computer system to construct the Page Table, ie from stored information according to calculate "and after the address mappings and store. In addition to the fact that computer resources are required for this purpose, corresponding programs must also be provided on a chip card in order to take the precautions required for the virtual addressing mode. Even such programs require memory space, which is a rare commodity, particularly for chip cards or other security ICs.
Ein weiterer Nachteil des beschriebenen Konzepts des Initia- lisierens im physikalischen Adressierungsmodus und des darauf folgenden Umschaltens in den virtuellen Adressierungsmodus besteht darin, daß die Vorteile des virtuellen Adressierungsmodus, also des Trennens zweier voneinander zu trennenden Applikationen, nicht von Anfang an erhalten werden, sondern erst dann, wenn die CPU den realen Modus beendet hat und in den virtuellen Adressierungsmodus umgeschaltet hat. Ein physikalischer Adressierungsmodus bzw. ein „realer" Adressierungsmodus stellt insbesondere bei Sicherheits-Controllern eine Sicherheitsschwäche dar, die auch als „Single Point of Attack" bezeichnet wird. Gelingt es einem Angreifer, in das Betriebssystem des Chipkarten-IC einzudringen, während sich dasselbe im physikalischen Adressierungsmodus befindet, so kann der Angreifer ohne Barrieren auf die physikalischen Speicherzellen zugreifen und sensible Daten auslesen oder so- gar manipulieren. Die Sicherheitsmerkmale des virtuellen Adressierungsmodus werden somit nicht von Anfang an erreicht, sondern erst dann, wenn das Rechnersystem in den virtuellen Adressierungsmodus umgeschaltet hat.A further disadvantage of the described concept of initializing in the physical addressing mode and the subsequent switchover to the virtual addressing mode is that the advantages of the virtual addressing mode, that is to say the separation of two applications to be separated from one another, are not obtained from the beginning, but rather only when the CPU has ended the real mode and switched to the virtual addressing mode. A physical addressing mode or a “real” addressing mode represents a security weakness, particularly in the case of security controllers, which is also referred to as a “single point of attack”. If an attacker succeeds in penetrating the operating system of the chip card IC while it is in the physical addressing mode, the attacker can access the physical memory cells without barriers and read out or even manipulate sensitive data. The security features of the virtual addressing mode are thus not achieved from the beginning, but only when the computer system has switched to the virtual addressing mode.
Die Aufgabe der vorliegenden Erfindung besteht darin, ein sicheres und einfaches Rechnersystem zu schaffen.The object of the present invention is to create a safe and simple computer system.
Diese Aufgabe wird durch ein Rechnersystem mit virtueller Adressierung nach Patentanspruch 1 und durch ein Verfahren zum Ermitteln einer physikalischen Adresse aus einer virtuellen Adresse nach Patentanspruch 17 gelöst. Der vorliegenden Erfindung liegt die Erkenntnis zugrunde, dass die Sicherheit eines Rechnersystems mit virtueller Adressierung dadurch verbessert werden kann, daß das Rechnersystem keinen physikalischen Adressierungsmodus verwendet, sondern von vorneherein im virtuellen Adressierungsmodus arbeitet. Um dies zu erreichen, wird in einem nicht-flüchtigen Speicher des Rechnersystems eine Abbildungsvorschrift abgespeichert, mittels der aus einer virtuellen Adresse eine physikalische Adresse ermittelt werden kann. Die Abbildungsvor- schrift wird im nicht-flüchtigen Speicher gespeichert, so daß dieselbe unmittelbar beim Hochfahren des Rechnersystems vorhanden ist und nicht erst, wie im Stand der Technik, in einem realen Modus erzeugt und im flüchtigen Speicher abgespeichert werden muß. Damit wird auch der komplette Verwaltungsaufwand und die dafür erforderlichen Programme, um eine Abbildungsvorschrift beispielsweise in Form einer Hash-Tabelle zu erzeugen, hinfällig, da die Abbildungsvorschrift bereits im nicht-flüchtigen Speicher fertig verfügbar ist.This object is achieved by a computer system with virtual addressing according to claim 1 and by a method for determining a physical address from a virtual address according to claim 17. The present invention is based on the finding that the security of a computer system with virtual addressing can be improved in that the computer system does not use a physical addressing mode, but instead works in the virtual addressing mode from the outset. To achieve this, a mapping rule is stored in a non-volatile memory of the computer system, by means of which a physical address can be determined from a virtual address. The mapping specification is stored in the non-volatile memory, so that it is available immediately when the computer system is started up and does not have to be generated in a real mode and stored in the volatile memory, as in the prior art. This also eliminates the entire administrative effort and the programs required to generate a mapping rule, for example in the form of a hash table, since the mapping rule is already available in the non-volatile memory.
Damit das Rechnersystem bereits im virtuellen Adressierungsmodus hochfahren kann, wird erfindungsgemäß neben dem nichtflüchtigen Speicher, in dem die Abbildungsvorschrift gespeichert ist, eine Hardware-Zustandsmaschine vorgesehen, die auf den nicht-flüchtigen Speicher zugreifen kann und ausgebildet ist, um unter Verwendung der virtuellen Adresse und der Abbildungsvorschrift die der virtuellen Adresse zugeordnete physikalische Adresse zu ermitteln. Die Hardware- Zustandsmaschine führt, wie es bei Zustandsmaschinen üblich ist, einen fest vorgegebenen Algorithmus selbsttätig aus, wo- bei der Algorithmus, den die Hardware-Zustandsmaschine ausführt, einerseits Eingangsdaten von dem nicht-flüchtigen Speicher erhält und andererseits die virtuelle Adresse als Eingangsdaten, um als Ausgangsdaten die physikalische Adresse auszugeben.So that the computer system can start up in the virtual addressing mode, according to the invention, in addition to the non-volatile memory in which the mapping rule is stored, a hardware state machine is provided which can access the non-volatile memory and is designed to use the virtual address and the mapping rule to determine the physical address assigned to the virtual address. As is customary in state machines, the hardware state machine automatically executes a predetermined algorithm, the algorithm which the hardware state machine executes receives input data from the non-volatile memory on the one hand and the virtual address as input data on the other hand, to output the physical address as output data.
Die einfachste Art und Weise, jedoch nicht die optimalste Art und Weise besteht darin, eine komplette Page Table im nicht- flüchtigen Speicher zu speichern. In diesem Fall würde die Hardware-Zustandsmaschine aktiviert werden, wenn die CPU des Rechnersystems Daten bei einer virtuellen Adresse wünscht. Die Hardware-Zustandsmaschine wird in diesem Fall die virtu- eilen Adresse einlesen, auf den nicht-flüchtigen Speicher zugreifen, die physikalische Adresse, die der virtuellen Adresse zugeordnet ist, aus der Page Table extrahieren und dann ausgeben.The simplest way, but not the most optimal way, is to create a complete page table in the non- to store volatile memory. In this case, the hardware state machine would be activated if the CPU of the computer system wanted data at a virtual address. In this case, the hardware state machine will read in the virtual address, access the non-volatile memory, extract the physical address assigned to the virtual address from the page table and then output it.
Aus Effizienz- und Speicherplatzgründen wird es jedoch bevorzugt, die Abbildungsvorschrift in Form eines hierarchischen Baums mit einem Wurzelknoten für eine Wurzelebene, zumindest einem Zwischenknoten für zumindest eine Zwischenebene und einem Endknoten für eine Endebene zu speichern, so daß die Hardware-Zustandsmaschine, gesteuert von der virtuellen Adresse und von in dem nicht-flüchtigen Speicher abgespeicherten Listen für die einzelnen Knoten einen sogenannten Page Table Walk („Seitentabellenspaziergang" ) durchführt, um nach Durchlaufen des Baumes die physikalische Adresse auszugeben, die der eingegebenen virtuellen Adresse entspricht. Bei einem bevorzugten Ausführungsbeispiel der vorliegenden Erfindung, bei dem der virtuellen Adressraum wesentlich größer als der physikalischen Adressraum ist, und somit Listen für Knoten relativ wenige benutzte Einträge und dagegen relativ viele Null-Einträge aufweisen, werden die Listen für Knoten des hierarchischen Baums komprimiert, um Speicherplatz im nichtflüchtigen Speicher zu sparen.For reasons of efficiency and storage space, however, it is preferred to store the mapping rule in the form of a hierarchical tree with a root node for a root level, at least one intermediate node for at least one intermediate level and an end node for an end level, so that the hardware state machine, controlled by the performs a so-called page table walk ("page table walk") in order to output the physical address which corresponds to the entered virtual address after passing through the tree. In a preferred exemplary embodiment, the In the present invention, in which the virtual address space is significantly larger than the physical address space, and thus lists for nodes have relatively few entries used and, on the other hand, have relatively many zero entries, the lists for nodes of the hierarchical tree are compressed to save space in non-volatile memory.
Im Falle einer solchen hierarchisch organisierten Abbildungs- Vorschrift zwischen virtueller und physikalischer Adresse muß nicht die ganze Abbildungsvorschrift im nicht flüchtigen Speicher gespeichert werden, sondern wenigstens der Teil der Abbildungsvorschrift, durch den es möglich ist, einen Hochfahrvorgang des Systems im virtuellen Modus zu beginnen. Bei geeigneten Listeneinträgen im virtuellen Modus ist es dann möglich, bereits beim Wiedergewinnen der benötigten Daten aus dem physikalischen Speicher im flüchtigen Arbeitsspeicher den restlichen Teil der Abbildungsvorschrift zu erzeugen und für weitere Adressübersetzungen von virtuell zu physikalisch zu verwenden. Die Hardware-Zustandsmachine kann daher nach dem Hochfahren des Systems im virtuellen Modus durchaus auch auf zur Laufzeit im flüchtigen Speicher programmierte Daten zugreifen.In the case of such a hierarchically organized mapping rule between the virtual and physical address, it is not necessary to store the entire mapping rule in the non-volatile memory, but at least the part of the mapping rule by which it is possible to start the system startup process in virtual mode. With suitable list entries in virtual mode, it is then possible to save the required data from the physical memory in the volatile working memory generate the remaining part of the mapping rule and use it for further address translations from virtual to physical. The hardware state machine can therefore also access data programmed in the volatile memory at runtime after the system has been started up in virtual mode.
Bei einem bevorzugten Ausführungsbeispiel der vorliegenden Erfindung wird ferner eine seitenweise Adressierung bevor- zugt. Um eine Speicherfragmentierung zu vermeiden, werden in diesem Fall so viel als möglich kombinierte Listen in ein und derselben physikalischen Seite abgespeichert.In a preferred embodiment of the present invention, page-by-page addressing is also preferred. To avoid memory fragmentation, as many combined lists as possible are stored in one and the same physical page.
Ein Vorteil der vorliegenden Erfindung besteht darin, daß das Rechnersystem lediglich eine virtuellen Adressierung und keine physikalische Adressierung durchführen kann, und die Sicherheitsschwäche nicht mehr vorhanden ist.An advantage of the present invention is that the computer system can only carry out virtual addressing and no physical addressing, and the security weakness is no longer present.
Ein weiterer Vorteil der vorliegenden Erfindung besteht darin, daß keine Programme bzw. kein Verwaltungsaufwand erforderlich ist, um in dem flüchtigen Speicher eine Page Table aufzubauen, da die Page Table bzw. der hierarchische Baum in dem nicht-flüchtigen Speicher persistent gespeichert ist.Another advantage of the present invention is that no programs or no administrative effort are required to set up a page table in the volatile memory, since the page table or the hierarchical tree is persistently stored in the non-volatile memory.
Ein weiterer Vorteil der vorliegenden Erfindung besteht darin, daß im Falle der Abbildungsvorschrift als hierarchische Baumstruktur durch Implementieren von Zugriffsrechten an dem Knoten des Baumes eine differenzierte Zugriffsrechtevergabe mit einer einstellbaren Granularität erreicht werden kann.Another advantage of the present invention is that in the case of the mapping rule as a hierarchical tree structure, by implementing access rights at the node of the tree, a differentiated access rights assignment can be achieved with an adjustable granularity.
Ein weiterer Vorteil der vorliegenden Erfindung besteht darin, daß durch Abspeichern der Abbildungsvorschrift im nichtflüchtigen Speicher, und zwar in einer Form, wie sie von der Hardware-Zustandsmaschine ohne Einschaltung der CPU verwendet werden kann, CPU-Ressourcen gespart werden. Selbstverständlich muß die Abbildungsvorschrift, beispielsweise die Page Table oder die hierarchische Struktur von Knotenlisten erstellt werden. Dies kann jedoch außerhalb des Betriebs des Rechnersystems gewissermaßen „Off-Line" bzw. im Falle einer Chipkarte „Off-Card" durchgeführt werden. Das Erstellen der Abbildungsvorschrift und das Abspeichern der Abbildungsvorschrift im nicht-flüchtigen Speicher nimmt somit keine wertvolle On-Line-Ressource an Speicher oder CPU in Anspruch, sondern kann, wenn genügend Zeit ist, beispielsweise bei der Herstellung der Chipkarte oder im Falle einer dynamischen Mo- difikation der Abbildungsvorschrift dann vorgenommen werden, wenn das Rechnersystem gerade keine sicherheitsrelevante Anwendung durchführt. Erfindungsgemäß können daher Bearbeitungsschritte aus dem On-Line-Betrieb heraus verlagert werden, um wertvolle Online-Ressourcen, wie z. B. Rechnerleis- tung, Speicherplatz, Energieverbrauch etc., frei zu machen bzw. einzusparen.Another advantage of the present invention is that saving the mapping instruction in non-volatile memory in a form that can be used by the hardware state machine without the CPU being turned on saves CPU resources. Of course, the mapping rule, for example the page Table or the hierarchical structure of node lists can be created. However, this can be carried out "off-line" to a certain extent outside of the operation of the computer system, or "off-card" in the case of a chip card. The creation of the mapping rule and the storage of the mapping rule in the non-volatile memory thus does not take up any valuable on-line resource of memory or CPU, but can, if there is enough time, for example in the manufacture of the chip card or in the case of a dynamic Mo. - The specification of the mapping is then made when the computer system is not currently carrying out any security-relevant application. According to the invention, processing steps can therefore be shifted out of on-line operation in order to save valuable online resources, such as. B. Free computer power, storage space, energy consumption etc., or save.
Bevorzugte Ausführungsbeispiele der vorliegenden Erfindung werden nachfolgend bezugnehmend auf die beiliegenden Zeich- nungen detailliert erläutert. Es zeigen:Preferred exemplary embodiments of the present invention are explained in detail below with reference to the accompanying drawings. Show it:
Fig. 1 ein erfindungsgemäßes Rechnersystem mit virtueller Adressierung;1 shows a computer system according to the invention with virtual addressing;
Fig. 2 eine schematische Darstellung einer Abbildung eines virtuellen Adressraums in einen physikalischen Adressraum für ein Rechnersystem auf einer Chipkarte;2 shows a schematic illustration of a mapping of a virtual address space into a physical address space for a computer system on a chip card;
Fig. 3 eine Übersichtsdarstellung einer Adressübersetzung unter Verwendung einer Page Table;3 shows an overview of an address translation using a page table;
Fig. 4a eine schematische Darstellung einer Adressübersetzung unter Verwendung einer Abbildungsvorschrift in Form einer hierarchischen Baumstruktur;4a shows a schematic representation of an address translation using a mapping rule in the form of a hierarchical tree structure;
Fig. 4b eine Tabelle zur Darstellung der Knotenebenen und der durch einen Knoten adressierten Adressbereiche gemäß einem bevorzugten Ausführungsbeispiel der vorliegenden Erfindung;Fig. 4b is a table showing the node levels and the address areas addressed by a node according to a preferred embodiment of the present invention;
Fig. 5 ein Beispiel für eine Abbildungsvorschrift in Form einer hierarchischen Baumstruktur, bei der Zwischenknoten übersprungen werden können;5 shows an example of a mapping rule in the form of a hierarchical tree structure in which intermediate nodes can be skipped;
Fig. 6 eine Tabelle zur Darstellung von Knotengrößen auf verschiedenen Ebenen für das Beispiel von Fig. 4a;FIG. 6 shows a table for representing node sizes at different levels for the example of FIG. 4a;
Fig. 7 ein Beispiel für eine Abbildungsvorschrift in Form eines n-Baums mit gleichen Größen für zusätzliche Knoten einer Ebene;7 shows an example of a mapping rule in the form of an n-tree with the same sizes for additional nodes of a level;
Fig. 8 eine schematische Darstellung eines Kompressionsverfahrens für Knotenlisten, um das Verhältnis von benutzten Einträgen zu der Gesamtzahl der Einträge einer Liste zu verbessern;8 is a schematic illustration of a compression method for node lists in order to improve the ratio of entries used to the total number of entries in a list;
Fig. 9 Kompressionsbeispiele gemäß dem Kompressionsverfahren von Fig. 8;Fig. 9 compression examples according to the compression method of Fig. 8;
Fig. 10 eine komprimierte Darstellung des Baums von Fig. 7;Fig. 10 is a compressed representation of the tree of Fig. 7;
Fig. 11 eine Speicherplatz-optimierte Abspeicherung des Baums von Fig. 10; undFIG. 11 shows a storage space-optimized storage of the tree from FIG. 10; and
Fig. 12 eine Darstellung einer virtuellen Adresse, die modifiziert ist, um auf eine physikalische Adresse zu verweisen, an der eine Knotenliste abgespeichert ist.12 is a representation of a virtual address modified to refer to a physical address at which a node list is stored.
Fig. 1 zeigt ein erfindungsgemäßes Rechnersystem mit einer CPU 10, einem nicht-flüchtigen Speicher in Form eines ROM 12 und eines E2PROM 14, der in Fig. 1 auch als NVM (NVM = non volatile memory) bezeichnet wird. Das Rechnersystem kann ferner einen flüchtigen Speicher 16, der in Fig. 1 mit RAM be- zeichnet ist, und gegebenenfalls weitere Peripheriekomponenten, wie z. B. einen Coprozessor, eine Eingabe/Ausgabe- Schnittstelle, einen Zufallszahlengenerator etc. umfassen.1 shows a computer system according to the invention with a CPU 10, a non-volatile memory in the form of a ROM 12 and an E 2 PROM 14, which is also referred to in FIG. 1 as NVM (NVM = non volatile memory). The computer system can also have a volatile memory 16, which in FIG. is drawn, and possibly other peripheral components such. B. include a coprocessor, an input / output interface, a random number generator, etc.
Das Rechnersystem weist ferner eine Speicherverwaltungseinheit (MMU; MMU = Memory Management Unit) 18 sowie einen Cache 20 auf, wobei der Cache 20 in einen Befehls-Cache und einen Daten-Cache aufgeteilt sein kann, wenn das Rechnersystem gemäß der Harvard-Architektur aufgebaut ist. Die CPU ist über einen Bus 22 für virtuelle Adressen mit der Speicherverwaltungseinheit 18 verbunden. Die Speicherverwaltungseinheit 18 umfaßt eine Hardware-Zustandsmaschine 18a sowie vorzugsweise einen Translation-Look-Aside-Buffer (TLB) 18b, um aus einer von der CPU 10 über den Bus 22 gelieferten virtuellen Adresse eine physikalische Adresse zu ermitteln, um die einer virtuellen Adresse zugeordneten Daten von einem Speicher 12, 14, 16 zu adressieren und über einen Daten/Befehle-Bus 24 in den Cache 20 zu laden, aus dem die CPU 10 über einen weiteren Befehle/Daten-Bus 26 die einer virtuellen Adresse zugeordneten Daten erhält.The computer system also has a memory management unit (MMU) 18 and a cache 20, wherein the cache 20 can be divided into an instruction cache and a data cache if the computer system is constructed in accordance with the Harvard architecture , The CPU is connected to the memory management unit 18 via a virtual address bus 22. The memory management unit 18 comprises a hardware state machine 18a and preferably a translation look-aside buffer (TLB) 18b in order to determine a physical address from a virtual address supplied by the CPU 10 via the bus 22, in order to assign that to a virtual address Addressing data from a memory 12, 14, 16 and loading it into the cache 20 via a data / command bus 24, from which the CPU 10 receives the data assigned to a virtual address via a further command / data bus 26.
Aus Fig. 1 ist ferner zu sehen, daß die Hardware- Zustandsmaschine 18a der Speicherverwaltungseinheit 18 über einen Zugriffsbus 26 auf einen nicht-flüchtigen Speicher in Form des ROM 12 oder des NVM 14 zugreifen kann, um die Abbildungsvorschrift, die zur Berechnung der physikalischen Adresse aus der virtuellen Adresse erforderlich ist, aus dem nicht-flüchtigen Speicher zu laden. Die Hardware- Zustandsmaschine 18a kann somit über den Zugriffsbus 26 auf den nicht-flüchtigen Speicher zugreifen, um unter Verwendung einer virtuellen Adresse und der in dem nicht-flüchtigen Speicher gespeicherten Abbildungsvorschrift die der virtuellen Adresse zugeordnete physikalischen Adresse zu ermitteln.From Fig. 1 it can also be seen that the hardware state machine 18a of the memory management unit 18 can access a non-volatile memory in the form of the ROM 12 or the NVM 14 via an access bus 26 in order to implement the mapping rule which is used to calculate the physical address from the virtual address is required to load from the non-volatile memory. The hardware state machine 18a can thus access the non-volatile memory via the access bus 26 in order to determine the physical address assigned to the virtual address using a virtual address and the mapping rule stored in the non-volatile memory.
Aus Fig. 1 ist ersichtlich, daß die CPU 10 vorzugsweise ausschließlich über den virtuellen Adressbus 22 adressiert, und zwar insbesondere die Hardware-Zustandsmaschine 18a adres- siert, die erfindungsgemäß direkt auf den nicht-flüchtigen Speicher zugreifen kann, so daß das erfindungsgemäße Rechnersystem keinen physikalischen Adressierungsmodus benötigt, sondern im virtuellen Adressierungsmodus hochfahren kann, so daß es keinen Angriffspunkt in Form eines im physikalischen Adressierungsmodus laufenden Betriebssystems des erfindungsgemäßen Rechnersystems gibt.1 that the CPU 10 preferably addresses exclusively via the virtual address bus 22, in particular the hardware state machine 18a address. based, which can access the non-volatile memory according to the invention directly, so that the computer system according to the invention does not require a physical addressing mode, but rather can start up in virtual addressing mode, so that there is no point of attack in the form of an operating system of the computer system according to the invention running in physical addressing mode.
Im nachfolgenden wird allgemein auf virtuelle Speichersysteme eingegangen. Ein Schutzmechanismus für Multitasking- Rechnersysteme besteht darin, daß separaten Prozessen oder Anwendungen voneinander getrennte virtuelle Adressräume zugeordnet werden, so daß ein Multitasking-Betrieb mit verschiedenen Anwendungen möglich ist, wobei diese Anwendungen jedoch aus Sicherheitsgründen vollständig voneinander getrennt sein müssen. Bei einem bevorzugten Ausführungsbeispiel des erfindungsgemäßen Rechnersystems, das für eine Chipkarte geeignet ist, wird ein virtueller Adressraum von 4 Gigabyte bereitgestellt, wie es in Fig. 2 zu sehen ist. Der Adressraum wird aus Gründen der besseren Effizienz in virtuellen Speicherseiten 30 aufgeteilt, wobei eine Speicherseite eine Größe von 64 Byte, also 512 Bits hat. Die Speicherseiten des virtuellen Adressraums können durch eine 32 Bit breite virtuelle Adresse adressiert werden.In the following, virtual storage systems are discussed in general. A protective mechanism for multitasking computer systems is that separate processes or applications are assigned separate virtual address spaces, so that multitasking operation with different applications is possible, but these applications must be completely separated from one another for security reasons. In a preferred exemplary embodiment of the computer system according to the invention, which is suitable for a chip card, a virtual address space of 4 gigabytes is provided, as can be seen in FIG. 2. For reasons of better efficiency, the address space is divided into virtual memory pages 30, a memory page having a size of 64 bytes, that is 512 bits. The memory pages of the virtual address space can be addressed using a 32-bit wide virtual address.
Wesentlich am Konzept der virtuellen Adressierung ist, daß eine Anwendung, die auf der CPU läuft, nicht direkt auf den physikalischen Speicher zugreifen kann, sondern nur auf ihren eigenen virtuellen Adressraum. Unter Verwendung der Speicher- Verwaltungseinheit 18 von Fig. 1 wird der virtuelle Adressraum unter Verwendung einer Abbildungsvorschrift 32, die durch die in Fig. 2 gezeigten Pfeile symbolisiert ist, in physikalische Speicheradressen abgebildet. Bei dem in Fig. 2 gezeigten Ausführungsbeispiel ist der physikalische Adress- räum auf 4 MB festgelegt, wobei jedoch darauf hingewiesen wird, daß eine übliche Chipkarte bei weitem nicht so viel Speicher hat. Typische Speichergrößen für das E2PROM 14 von Fig. 1 sind 64 kByte. Der RAM 16 von Fig. 1 hat typischerweise 8 kByte, während der ROM 12 von Fig. 1 typischerweise 168 Kbyte hat. Wenn ein virtueller Adressraum von 4 GB auf etwa 240 kByte Speicherzellen abgebildet wird, so ist zu sehen, daß zunächst eine große Menge virtueller Adressen nicht in physikalische Speicheradressen abgebildet werden muß, und daß zusätzlich auch eine große Anzahl von physikalischen Speicheradressen nicht auf tatsächlich vorhandene physikalische Speicherzellen zeigen. Andererseits erlaubt die Überdimensio- nierung des virtuellen Adressraums gegenüber dem physikalischen Adressraum und die Überdimensionierung des physikalischen Adressraums bezüglich der tatsächlich vorhandenen Speicherzellen einfache Modifikationen dahingehend, daß zusätzliche Speicher ohne weiteres nachträglich eingefügt werden kön- nen bzw. daß der physikalische Adressraum je nach Notwendigkeit erweitert werden kann.It is essential in the concept of virtual addressing that an application that runs on the CPU cannot directly access the physical memory, but only its own virtual address space. Using the memory management unit 18 of FIG. 1, the virtual address space is mapped into physical memory addresses using a mapping rule 32, which is symbolized by the arrows shown in FIG. 2. In the exemplary embodiment shown in FIG. 2, the physical address space is fixed at 4 MB, although it is pointed out that a conventional chip card does not have as much memory by far. Typical memory sizes for the E 2 PROM 14 from 1 are 64 kbytes. The RAM 16 of FIG. 1 is typically 8 Kbytes, while the ROM 12 of FIG. 1 is typically 168 Kbytes. If a virtual address space of 4 GB is mapped to approximately 240 kByte memory cells, it can be seen that a large amount of virtual addresses does not first have to be mapped into physical memory addresses, and that, in addition, a large number of physical memory addresses do not refer to actually existing physical addresses Show memory cells. On the other hand, the overdimensioning of the virtual address space compared to the physical address space and the overdimensioning of the physical address space with respect to the memory cells actually present allow simple modifications in such a way that additional memories can be easily added subsequently or that the physical address space can be expanded as necessary can.
Wie es später noch erläutert werden wird, wird die Abbildungsvorschrift 32 erfindungsgemäß nicht von der CPU im RAM 16 aufgebaut, sondern beispielsweise bei der Herstellung der Chipkarte entwickelt und in dem ROM 12 in Form einer entsprechend gestalteten ROM-Maske einprogrammiert, bevor das erfindungsgemäße Rechnersystem in Betrieb genommen wird. Im Betrieb benötigt das Rechnersystem daher abgesehen von der Zu- standsmaschine keinerlei Ressourcen zum Erzeugen der Abbil- dungsvorschrift 32. Die dafür erforderlichen Schritte wurden bereits Off-Line ausgeführt, um nicht wertvolle On-Line- Kapazitäten des Rechnersystems hierzu in Anspruch nehmen zu müssen.As will be explained later, the mapping rule 32 according to the invention is not built up by the CPU in the RAM 16, but rather is developed, for example, during the manufacture of the chip card and programmed in the ROM 12 in the form of a correspondingly designed ROM mask before the computer system according to the invention in Is put into operation. In operation, apart from the state machine, the computer system therefore does not require any resources to generate the mapping rule 32. The steps required for this have already been carried out off-line in order not to have to use up valuable online capacities of the computer system for this purpose.
Eine virtuelle Adresse wird in eine entsprechende physikalischen Adresse z. B. unter Verwendung einer Übersetzungstabelle übersetzt, die üblicherweise als Page Table bezeichnet wird. Die Page Table kann in Form einer einzigen Tabelle organisiert sein, die Einträge hat, wobei jeder Eintrag eine virtuelle Adresse und die derselben zugeordnete physikalische Adresse umfaßt. Wie später ausgeführt wird, wird es gemäß der vorliegenden Erfindung jedoch bevorzugt, die Abbildungsvor- schrift in Form eines hierarchischen Seitenzuordnungsbaums zu organisieren. Eine solchermaßen organisierte Abbildungsvorschrift hat den Vorteil größerer Flexibilität zum Verwalten von Zugriffsrechten. Dieselbe ist ferner besser geeignet, um kleine Seitengrößen handzuhaben, was dann von Bedeutung ist, wenn das Rechnersystem als Sicherheits-IC in einer Chipkarte verwendet wird. Kleine Seitengrößen, z. B. kleiner oder gleich 256 Byte, dienen ferner dazu, eine Seitentabellen- Fragmentierung zu vermeiden. Eine Speicherseite hat daher, wie es bezugnehmend auf Fig. 2 ausgeführt worden ist, z. B. eine Größe von 64 Byte, d. h. 512 Bit. Dies bedeutet, daß der Seiten-Offset, um die 64 Byte ausgehend von der Startadresse für die Seite adressieren zu können, eine Länge von 6 Bits haben muß .A virtual address is converted into a corresponding physical address e.g. B. translated using a translation table commonly referred to as a page table. The page table can be organized in the form of a single table which has entries, each entry comprising a virtual address and the physical address assigned to it. As will be explained later, however, it is preferred according to the present invention to use the imaging organize the font in the form of a hierarchical page assignment tree. A mapping rule organized in this way has the advantage of greater flexibility for managing access rights. It is also more suitable for handling small page sizes, which is important when the computer system is used as a security IC in a chip card. Small page sizes, e.g. B. less than or equal to 256 bytes, also serve to avoid page table fragmentation. A memory page therefore has, as has been explained with reference to FIG. B. a size of 64 bytes, ie 512 bits. This means that the page offset must be 6 bits long in order to be able to address the 64 bytes starting from the start address for the page.
Im nachfolgenden wird auf Fig. 3 Bezug genommen. Fig. 3 zeigt eine schematische Darstellung einer Adressübersetzung, bei der eine Page Table verwendet wird. Eine virtuelle Adresse 30, ein AMO-Feld 32 und ein TID-Feld 34 werden als Eingabe verwendet. Das AMO-Feld 32 bezeichnet den Zugriffs-Modus, der durch den gegenwärtigen Zustand der CPU und den beabsichtigten Zugriffstyp (Lesen, Schreiben, Ausführen, etc.) eingestellt wird. Das TID-Feld 34 wird beim Multitasking-Betrieb benötigt und liefert einen Aufgaben-Identifizierer (Task I- dentifier) , der darauf hinweist, welcher Aufgabe die virtuelle Adresse 30 zugeordnet ist, um verschiedene virtuelle Adressräume verschiedener Anwendungen unterscheiden zu können. Aus der virtuellen Adresse 30 und dem TID-Feld 34 wird die sogenannten erweiterte virtuelle Adresse erhalten, die die Startadresse für die virtuelle Seite (VP 36) und einen Versatzwert (DP 38) aufweist.In the following, reference is made to FIG. 3. Fig. 3 shows a schematic representation of an address translation using a page table. A virtual address 30, an AMO field 32 and a TID field 34 are used as input. The AMO field 32 denotes the access mode that is set by the current state of the CPU and the intended access type (read, write, execute, etc.). The TID field 34 is required for multitasking operation and provides a task identifier (Task Identifier) which indicates which task the virtual address 30 is assigned to in order to be able to differentiate between different virtual address spaces of different applications. The so-called extended virtual address is obtained from the virtual address 30 and the TID field 34, which has the start address for the virtual page (VP 36) and an offset value (DP 38).
Die ZuOrdnungsvorschrift in Form einer Seitentabelle 40 umfaßt verschiedene Einträge, wobei jeder Eintrag eine Spalte 42 für die Startadresse der virtuellen Seite und eine Spalte 44 für die Startadresse der physikalischen Seite, die"der in der Spalte 42 stehenden virtuellen Seite zugeordnet ist, auf- weist. Die Seitentabelle umfaßt gemäß einem bevorzugten Ausführungsbeispiel der vorliegenden Erfindung ferner eine Spalte 46 für Zugriffsrechte (EAR; EAR = Effective Access Rights) , wobei anhand eines Rechtemoduls 48 überprüft wird, ob der durch das AMO-Feld 32 festgelegte CPU-Modus Zugriff auf eine virtuelle Adresse mit einem bestimmten EAR-Feld hat. Wird festgestellt, daß die CPU keinen Zugriff auf eine virtuelle Adresse hat, so wird die Adressübersetzung verweigert, und es wird eine Zugriffsverletzung ausgegeben. Die CPU kann daher, da die Zugriffsrechteüberprüfung vor der Adressübersetzung, also im virtuellen Adressraum, stattfindet, nicht einmal die physikalische Adresse geschweige denn den Inhalt der Speicherzelle, die durch die physikalische Adresse adressiert ist, erhalten. In der Seitentabelle wird eine assozia- tive Suche durchgeführt, um die Abbildung der virtuellen Adresse auf die physikalische Adresse zu liefern. Die virtuelle Adresse in der Seitentabelle muß mit dem Feld 36 der erweiterten virtuellen Adresse übereinstimmen. Wird kein derartiger Eintrag in der Seitentabelle gefunden, so wird durch ein Modul 50 ein Seitenfehler ausgegeben. Wird dagegen ein passender Eintrag gefunden, so wird aus der Spalte 44 die physikalische Seitenadresse ausgelesen. Bei einem bevorzugten Ausführungsbeispiel der vorliegenden Erfindung ist eine virtuelle Seite genau so groß wie eine physikalische Seite, und sind der Versatz der virtuellen Adresse (DP 38) und der Versatz 52 der physikalischen Adresse gleich groß, so daß keine Speicherung von Versatzwerten in der Page Table bzw. eine spezielle Verarbeitung von Versatzwerten nötig ist.The assignment rule in the form of a page table 40 comprises various entries, each entry having a column 42 for the start address of the virtual page and a column 44 for the start address of the physical page, which " is assigned to the virtual page in column 42. has. According to a preferred exemplary embodiment of the present invention, the page table furthermore comprises a column 46 for access rights (EAR = EAR = Effective Access Rights), wherein a rights module 48 is used to check whether the CPU mode defined by the AMO field 32 has access to a virtual one Has an address with a specific EAR field. If it is determined that the CPU has no access to a virtual address, the address translation is refused and an access violation is issued. Therefore, since the access rights check takes place before the address translation, that is to say in the virtual address space, the CPU cannot even get the physical address, let alone the content of the memory cell which is addressed by the physical address. An associative search is carried out in the page table in order to provide the mapping of the virtual address to the physical address. The virtual address in the page table must match field 36 of the extended virtual address. If no such entry is found in the page table, a page fault is output by a module 50. If, on the other hand, a suitable entry is found, the physical page address is read from column 44. In a preferred embodiment of the present invention, a virtual page is exactly the same size as a physical page, and the offset of the virtual address (DP 38) and the offset 52 of the physical address are the same, so that no offset values are stored in the page table or special processing of offset values is necessary.
Wie es bereits bezugnehmend auf Fig. 1 ausgeführt worden ist, umfaßt die Speicherverarbeitungseinheit 18 vorzugsweise einen TLB, um eine schnellere Adressierung zu erreichen. Die anhand von Fig. 3 beschriebene Seitentabelle wird gemäß einem bevorzugten Ausführungsbeispiel der vorliegenden Erfindung in dem TLB gehalten, wobei der TLB optional zusätzlich zur Hardware- Zustandsmaschine 18a vorhanden ist. Der TLB ist in Form der in Fig.3 gezeigten Cache-Tabelle ausgestaltet und umfaßt eine Liste von virtuellen Adressen mit entsprechenden physikalischen Adressen für einen schnellen Zugriff. Der TLB wird mit den zuletzt verwendeten Adressenpaaren gefüllt und kann entweder zufällig oder nach zeitlichen Gesichtspunkten aktuali- siert werden. Eine Möglichkeit besteht beispielsweise darin, daß, sobald der TLB aufgefüllt ist, und eine neuer Eintrag hinzugefügt werden soll, der älteste Eintrag gelöscht wird, um Platz für einen neuen Eintrag zu machen. Die Größe des TLB ist ein Hardware-Faktor und kann daher je nach Ausführungs- form spezifisch gewählt werden.As has already been explained with reference to FIG. 1, the memory processing unit 18 preferably comprises a TLB in order to achieve faster addressing. According to a preferred exemplary embodiment of the present invention, the page table described with reference to FIG. 3 is kept in the TLB, the TLB optionally being present in addition to the hardware state machine 18a. The TLB is designed in the form of the cache table shown in FIG. 3 and comprises one List of virtual addresses with corresponding physical addresses for quick access. The TLB is filled with the last used address pairs and can be updated either randomly or according to time. One possibility, for example, is that as soon as the TLB is filled up and a new entry is to be added, the oldest entry is deleted in order to make room for a new entry. The size of the TLB is a hardware factor and can therefore be selected specifically depending on the design.
Sind die Hardware-Ressourcen beispielsweise aufgrund des benötigten Chipplatzes begrenzt, so wird der TLB nicht all zu groß ausgestaltet sein, und die Hardware-Zustandsmaschine wird öfters aktiviert werden, während in anderen Fällen, bei denen der TLB sehr groß gehalten werden kann, die Hardware- Zustandsmaschine lediglich zu Beginn aktiv ist, wenn der TLB, der ein flüchtiger Puffer ist, noch leer ist, um den TLB nach und nach aufzufüllen.For example, if the hardware resources are limited due to the chip space required, the TLB will not be too large and the hardware state machine will be activated more often, while in other cases where the TLB can be kept very large, the hardware - State machine is only active at the beginning when the TLB, which is a volatile buffer, is still empty to gradually fill up the TLB.
Insbesondere aufgrund von Größenbegrenzungen für den TLB können oftmals nicht alle virtuellen Seiten mittels des TLB auf ihre entsprechenden physikalischen Seiten abgebildet werden. Darüber hinaus müssen aufgrund der starken Überdimensionie- rung des virtuellen Adressraums gegenüber dem physikalischen Adressraum nicht alle virtuellen Seiten auf physikalische Seiten abgebildet werden, sondern es müssen lediglich virtuelle Adressen für die physikalischen Adressen vorhanden sein, an denen tatsächlich Code oder Daten für die tatsächlich lau- fenden Tasks einer Multitasking-Umgebung gespeichert sind.In particular due to size restrictions for the TLB, not all virtual pages can often be mapped to their corresponding physical pages using the TLB. In addition, due to the large overdimensioning of the virtual address space compared to the physical address space, not all virtual pages have to be mapped to physical pages, but only virtual addresses for the physical addresses at which code or data for the actually active tasks of a multitasking environment are saved.
Wenn eine virtuelle Seite nicht auf eine physikalische Seite abgebildet wird, die entweder nicht vorhanden ist, oder die auf keine tatsächlich vorhandene physikalische Speicherzelle zeigt, so wird ein Seitenfehler ausgegeben, was darauf hin- weist, daß die virtuelle Adresse beschädigt war, oder daß bei der Adressübersetzung ein Fehler aufgetreten ist. Falls im TLB kein Eintrag mit einer entsprechenden virtuellen Adresse gefunden wird, so wird gemäß der vorliegenden Erfindung die Hardware-Zustandsmaschine 18a von Fig. 1 aktiviert, um eine virtuelle Adresse, die im TLB nicht gefunden worden ist, in eine physikalische Adresse umzurechnen, um die physikalische Adresse zusammen mit ihrer virtuellen Adresse in den TLB zu laden. Zu diesem Zweck wird, wie es ausgeführt worden ist, die Hardware-Zustandsmaschine auf den nicht-fluchtigen Speicher (z. B. 12 oder 14 von Fig. 1) zugreifen, um unter Verwendung der dort gespeicherten Abbildungsvorschrift die physikalische Adresse zu ermitteln.If a virtual page is not mapped to a physical page that either does not exist or that does not point to an actual physical memory cell, a page error is output, which indicates that the virtual address was damaged or that at an error occurred in the address translation. If no entry with a corresponding virtual address is found in the TLB, the hardware state machine 18a of FIG. 1 is activated in accordance with the present invention in order to convert a virtual address which was not found in the TLB into a physical address in order to load the physical address together with its virtual address into the TLB. For this purpose, as has been stated, the hardware state machine will access the non-volatile memory (e.g. 12 or 14 of FIG. 1) to determine the physical address using the mapping rule stored there.
Erfindungsgemaß wird als Abbildung eine hierarchische Baumstruktur mit physikalisch adressierten Knoten bevorzugt. Eine solche hierarchische Baumstruktur, die auch als Multilevel- Seitentabellen-Abbildungsvorschrift bezeichnet werden kann, hat den Vorteil, daß nicht eine große Seitentabelle im nichtflüchtigen Speicher gehalten werden muß, sondern daß statt einer großen Tabelle mehrere Ebenen oder Levels mit kleineren Listen eingesetzt werden können. Dies erlaubt eine effizientere Verwaltung insbesondere bei kleinen physikalischen Speicherseiten.According to the invention, a hierarchical tree structure with physically addressed nodes is preferred as the image. Such a hierarchical tree structure, which can also be called a multilevel page table mapping rule, has the advantage that it is not necessary to keep a large page table in the non-volatile memory, but that instead of one large table, several levels or levels with smaller lists can be used. This allows more efficient management, especially with small physical memory pages.
Die Hardware-Zustandsmaschine 18a ist dann in der Lage, die hierarchische Baumstruktur von Knoten zu Knoten zu durchlaufen, um schließlich eine physikalische Adresse zu einer gegebenen virtuellen Adresse zu ermitteln. Dieser Prozeß wird als „Page Table Walking" bezeichnet.The hardware state machine 18a is then able to traverse the hierarchical tree structure from node to node to finally determine a physical address for a given virtual address. This process is called "page table walking".
Ein solcher Vorgang wird anhand von Fig. 4a beschrieben. InSuch a process is described with reference to FIG. 4a. In
Fig. 4a ist eine virtuelle Adresse 400 gezeigt, die verschiedene Abschnitte 402 bis 310 aufweist. Der Abschnitt 410 ist einer Wurzelebene, d. h. der höchsten Ebene, zugeordnet. Der Abschnitt 408 ist der nächsthöheren Ebene, im Beispiel der Ebene 4, zugeordnet. Der Abschnitt 406 der virtuellen Adresse 400 ist entsprechend der Ebene 3 zugeordnet. Der Abschnitt 404 ist der Ebene 2 zugeordnet, während der Abschnitt 402 der Ebene 1, d. h. dem Endknoten, zugeordnet ist. Der letzte Abschnitt der physikalischen Adresse, der auch als Abschnitt für die Ebene 0 bezeichnet werden kann, enthält den Seiten- Versatz, der in Fig. 3 mit dem Bezugszeichen 38 bezeichnet ist. Die virtuelle Adresse umfaßt ferner eine sogenannten Pa- ckage-Adresse 412, die ein Speicher-Package adressiert. Bei dem bevorzugten Ausführungsbeispiel ist der virtuelle Adressraum in 256 gleich große Packages aufgeteilt, so daß jede Pa- ckage einen Adressraum von 16 MB hat. Damit ist es beispiels- weise möglich, für verschiedene Speicher-Packages des virtuellen Adressraum verschiedene Zugriffsrechte zu vergeben.FIG. 4a shows a virtual address 400 which has different sections 402 to 310. Section 410 is assigned to a root level, ie the highest level. Section 408 is assigned to the next higher level, in the example level 4. Section 406 of virtual address 400 is assigned in accordance with level 3. Section 404 is assigned to level 2, while section 402 is assigned to Level 1, ie the end node, is assigned. The last section of the physical address, which can also be referred to as a section for level 0, contains the page offset, which is identified in FIG. 3 by the reference symbol 38. The virtual address also includes a so-called package address 412, which addresses a memory package. In the preferred embodiment, the virtual address space is divided into 256 packages of equal size, so that each package has an address space of 16 MB. This makes it possible, for example, to assign different access rights for different storage packages in the virtual address space.
Der Abschnitt 410 der virtuellen Adresse 400, der bei einem bevorzugten Ausführungsbeispiel lediglich 1 Bit umfaßt, ist einem Wurzelknoten der hierarchischen Baumstruktur zugeordnet.The section 410 of the virtual address 400, which comprises only 1 bit in a preferred exemplary embodiment, is assigned to a root node of the hierarchical tree structure.
Die Liste für den Wurzelknoten kann im nicht-flüchtigen oder in Registern der Speicherverwaltungseinheit gespeichert sein. Alternativ kann die Liste für den Wurzelknoten auch an einem fest vereinbarten Platz in dem physikalischen Speicher abgelegt sein.The list for the root node can be stored in the non-volatile or in registers of the memory management unit. Alternatively, the list for the root node can also be stored at a fixed location in the physical memory.
Die Liste für den Wurzelknoten wird als Package-Descriptor- Buffer 414 bezeichnet und umfaßt aufgrund der Tatsache, daß der Abschnitt 410 der virtuellen Adresse 400 lediglich ein Bit hat, lediglich zwei Listeneinträge. Ein Eintrag in der Wurzel-Liste 414 umfaßt einen Index, der durch das Bit des Abschnitts 410 der virtuellen Adresse indexiert ist. Hat das Bit im Abschnitt 410 einen Wert von Eins, wie es bei dem inThe list for the root node is referred to as package descriptor buffer 414 and, due to the fact that section 410 of virtual address 400 has only one bit, comprises only two list entries. An entry in the root list 414 includes an index indexed by the bit of section 410 of the virtual address. If the bit in section 410 has a value of one, as in the case of
Fig. 4a bezeichneten Beispiel der Fall ist, so wird der erste Eintrag der Liste 414 ausgewählt. Der Eintrag umfaßt ferner einen Zeiger 416 auf die physikalische Adresse der Seite im nicht-flüchtigen Speicher, an der eine Liste 418 für den ers- ten Zwischenknoten gespeichert ist, dem der Abschnitt 408 der virtuellen Adresse 400 zugeordnet ist. Ist das Bit in" dem Abschnitt 410 der virtuellen Adresse dagegen eine Null, so wird der zweite Eintrag der Liste 414 ausgewählt, der einen Zeiger 420 auf die physikalische Adresse einer Speicherseite im nicht-flüchtigen Speicher umfaßt, in der eine weitere Liste 422 für den ersten Zwischenknoten gespeichert ist, dem der Abschnitt 408 der virtuellen Adresse 400 zugeordnet ist. Nachdem der Abschnitt 408 der virtuellen Adresse vier Bits umfaßt, haben die Listen 418 und 422 für den ersten Zwischenknoten jeweils 16 Einträge. Jeder Eintrag hat eine Länge von 32 Bits, so daß bei dem in Fig. 4a gezeigten Ausführungsbei- spiel jede Liste genau eine Speicherseite im nicht-flüchtigen Speicher in Anspruch nimmt.4a, the first entry in list 414 is selected. The entry further includes a pointer 416 to the physical address of the page in non-volatile memory, on which a list 418 for the first intermediate node to which section 408 of virtual address 400 is assigned is stored. If the bit in "the portion 410 of the virtual address, however, a zero, is the second entry of the list 414 is selected, which comprises a pointer 420 to the physical address of a memory page in the non-volatile memory, in which a further list 422 for the first intermediate node to which the section 408 of the virtual address 400 is assigned is stored. After the virtual address section 408 comprises four bits, lists 418 and 422 each have 16 entries for the first intermediate node. Each entry has a length of 32 bits, so that in the exemplary embodiment shown in FIG. 4a, each list takes up exactly one memory page in the non-volatile memory.
Nachdem die Hardware-Zustandsmaschine den oberen Eintrag der Wurzelliste 414 aufgrund des Abschnitts 410 der virtuellen Adresse 400 ermittelt hat, kann die Hardware-Zustandsmaschine aufgrund des Zeigers 416 unmittelbar auf die physikalische Speicherseite zugreifen, in der die Liste 418 für den ersten Zwischenknoten gespeichert ist. Die Hardware-Zustandsmaschine liest dann den Abschnitt 408 der virtuellen Adresse 400 ein und wählt aufgrund der Tatsache, daß der Abschnitt den Wert „1100" hat, den dreizehnten Eintrag in der Liste 418 aus.After the hardware state machine has determined the upper entry of the root list 414 based on the section 410 of the virtual address 400, the hardware state machine can use the pointer 416 to access the physical memory page in which the list 418 for the first intermediate node is stored. The hardware state machine then reads the section 408 of the virtual address 400 and, based on the fact that the section has the value "1100", selects the thirteenth entry in the list 418.
Der dreizehnte Eintrag umfaßt neben einem Eintragsindex wieder einen Zeiger 424 auf eine Liste 426 für einen weiteren Zwischenknoten, dem der Abschnitt 406 der virtuellen Adresse 400 zugeordnet ist.In addition to an entry index, the thirteenth entry again comprises a pointer 424 to a list 426 for a further intermediate node to which the section 406 of the virtual address 400 is assigned.
Die Hardware-Zustandsmaschine liest dann den Abschnitt ein und wählt den ersten Eintrag der Liste 426 aus, da der Ab- schnitt 406 den Wert „0000" hat.The hardware state machine then reads in the section and selects the first entry in the list 426 since the section 406 has the value “0000”.
Der erste Eintrag in der Liste 426 enthält wiederum einen Zeiger 428 auf eine Liste 430, die einem weiteren Zwischenknoten mit niedrigerer Hierarchie zugeordnet ist. Die Hard- ware-Zustandsmaschine liest nun den Abschnitt 404 der virtuellen Adresse 400 ein und wählt den achten Eintrag dieser Liste aus, da der Wert des Abschnitts 404 „Olli" beträgt. Der ausgewählte Eintrag der Liste 430 enthält wiederum einen Zeiger 432 auf eine physikalische Adresse der physikalischen Seite im nicht-flüchtigen Speicher, in der eine Liste 434 für einen Endknoten, der dem Abschnitt 402 der virtuellen Adresse 400 zugeordnet ist, gespeichert ist. Die Hardware- Zustandsmaschine liest nun den Abschnitt 402 der virtuellen Adresse ein und wählt aus der Liste 434 aufgrund der Tatsache, daß der Wert des Abschnitts 402 „10011" beträgt, den zwanzigsten Eintrag der Liste 434 aus. Da der Abschnitt 402 der virtuellen Adresse 400 der End-Ebene zugeordnet ist, enthält der ausgewählte Eintrag der Liste 434 für den Endknoten einen Zeiger 436 auf die physikalische Adresse der physikalischen Seite, die der virtuellen Startadresse der virtuellen Seite entspricht. Zu der physikalischen Adresse, auf die der Zeiger 436 zeigt, muß nun lediglich noch der Seitenversatz hinzugefügt werden, wie es durch einen gestrichelten Pfeil 438 in Fig. 4a symbolisch dargestellt ist, um die physikalische Adresse 440 zu erhalten, die der virtuellen Adresse 400 zugeordnet ist.The first entry in the list 426 in turn contains a pointer 428 to a list 430 which is assigned to a further intermediate node with a lower hierarchy. The hardware state machine now reads the section 404 of the virtual address 400 and selects the eighth entry in this list, since the value of the section 404 is “Olli”. The selected entry of the list 430 in turn contains a pointer 432 to a physical address of the physical page in the non-volatile memory, in which a list 434 for an end node which is assigned to the section 402 of the virtual address 400 is stored. The hardware state machine now reads the section 402 of the virtual address and selects the twentieth entry of the list 434 from the list 434 due to the fact that the value of the section 402 is "10011". Since the section 402 of the virtual address 400 associated with the end level, the selected entry of the list 434 for the end node contains a pointer 436 to the physical address of the physical page which corresponds to the virtual start address of the virtual page, to the physical address to which the pointer 436 points now only the page offset has to be added, as is symbolically represented by a dashed arrow 438 in FIG. 4a, in order to obtain the physical address 440 which is assigned to the virtual address 400.
Es sei darauf hingewiesen, daß das in Fig. 4a beschriebene Konzept ebenso verwendet werden kann, wenn keine seitenweise Speicherorganisation eingesetzt wird, sondern eine direkte Adressierung von Speicherzellen ohne Seitenadresse undIt should be pointed out that the concept described in FIG. 4a can also be used if no page-by-page memory organization is used, but a direct addressing of memory cells without a page address and
Versatzwert. In diesem Fall würde einfach der letzte Schritt, der durch den Pfeil 438 in Fig. 4a dargestellt ist, entfallen.Offset value. In this case, the last step, which is represented by arrow 438 in FIG. 4a, would simply be omitted.
Wie es bereits ausgeführt worden ist, ist der virtuelle Adressraum wesentlich größer als der physikalische Adressraum. Aus diesem Fall existieren in den in Fig. 4 gezeigten Listen für die verschiedenen Knoten viele Einträge, die auf keinen nächst-niedrigeren Knoten verweisen. In Fig. 4a sind dies sämtliche Einträge, die keinen Ausgangs-Zeiger enthalten.As has already been stated, the virtual address space is significantly larger than the physical address space. For this case, there are many entries in the lists shown in FIG. 4 for the different nodes that do not refer to a next-lower node. In Fig. 4a, these are all entries that do not contain an exit pointer.
Diese Einträge werden auch als Null-Einträge bezeichnet. Aufgrund der Übersichtlichkeit der Darstellung wurde bei sämtli- chen Zeigern, die in Fig. 4a ins Leere zeigen, die denselben zugeordneten Listen weggelassen. Eine vollständige Abbildungsvorschrift würde jedoch zu jedem Zeiger in Fig. 4a eine entsprechende Liste umfassen.These entries are also referred to as zero entries. Due to the clarity of the presentation, all Chen pointers, which point to nothing in FIG. 4a, the lists assigned to the same have been omitted. A complete mapping rule would, however, include a corresponding list for each pointer in FIG. 4a.
Abgesehen von dem PAD-Abschnitt 412 wird bei dem in Fig. 4a gezeigten Ausführungsbeispiel die virtuelle Adresse 400 in sechs Teile oder Abschnitte aufgeteilt. Jedem Abschnitt ist eine Ebene in dem Adressübersetzungsprozeß, der durch die Hardware-Zustandsmaschine ausgeführt wird, zugeordnet. Die höchste Ebene, d. h. Ebene 5, indexiert, wie es ausgeführt worden ist, einen von zwei Einträgen in der Liste 414. Selbstverständlich könnte auch die Liste 414 mehrere Einträge enthalten. In diesem Fall müßte der Abschnitt 410 der virtu- eilen Adresse 40 dementsprechend mehr Bit haben. Mit zweiApart from the PAD section 412, in the exemplary embodiment shown in FIG. 4a, the virtual address 400 is divided into six parts or sections. Each section is assigned a level in the address translation process performed by the hardware state machine. The highest level, i.e. H. Level 5, as was done, indexes one of two entries in list 414. Of course, list 414 could also contain multiple entries. In this case, section 410 of virtual address 40 would have to have more bits accordingly. With two
Bits könnten bereits vier Einträge in der Liste 414 vorhanden sein.Bits might already have four entries in list 414.
Fig. 4b zeigt den Adressbereich, der durch jede Ebene gewis- sermaßen adressiert werden kann. Durch die Wurzel-Liste 414 (letzte Zeile der Tabelle in Fig. 4b) können die gesamten 16 Megabyte des virtuellen Adressraum adressiert werden, wobei der obere Zeiger 416 die oberen acht Megabyte auswählt, während der untere Zeiger 420 die unteren acht Megabyte aus- wählt. Daher kann durch die Liste 418 bzw. analog dazu durch die Liste 422 jeweils ein physikalischer Adressraum von acht Megabyte adressiert werden, wobei jeder Eintrag der Liste 418, d. h. jeder Pfeil, der aus der Liste 418 heraus zeigt, 512 Kilobyte adressieren kann. Jeder Zeiger aus der Liste 418 zeigt nämlich auf eine Liste 426 der dritten Ebene (dritte4b shows the address area that can be addressed to a certain extent by each level. The entire 16 megabytes of the virtual address space can be addressed by the root list 414 (last line of the table in FIG. 4b), the upper pointer 416 selecting the upper eight megabytes, while the lower pointer 420 selecting the lower eight megabytes , Therefore, the list 418 or, analogously, the list 422 can address a physical address space of eight megabytes, with each entry in the list 418, i. H. each arrow pointing out of list 418 can address 512 kilobytes. Each pointer from list 418 points to a list 426 of the third level (third
Zeile der Tabelle von Fig. 4b) . Analog dazu kann wieder jeder Zeiger aus einer Liste der dritten Ebene, wie z. B. der Zeiger 428, wieder einen Adressbereich von 32 Kilobyte adressieren. Der Adressbereich von 32 Kilobyte ist der Adressbereich, der durch die Liste 430 der zweiten Ebene umspannt wird, wobei ein Eintrag in dieser Liste wiederum einen Adressbereich von zwei Kilobyte adressieren kann. Fig. 5 zeigt einen Ausschnitt aus der hierarchischen Page Table Struktur von Fig. 4a, jedoch mit einer anderen virtuellen Adresse, die in den Abschnitten 408 und 406 für die vier- te Ebene und für die dritte Ebene jeweils lauter Einsen hat. Die Abbildungsvorschrift in Form des hierarchischen Baums, der mit der Wurzelliste 414 beginnt und mit der physikalischen Adresse 440 endet, erlaubt im Gegensatz zu der in Fig. 4a gezeigten Abbildungsvorschrift ein Überspringen von min- destens einer Ebene. Das Überspringen einer Ebene wird in der virtuellen Adresse durch einen bestimmten Abschnitt signalisiert, beispielsweise dadurch, daß in einem Abschnitt lauter Einsen stehen, wie es in Fig. 5 der Fall ist. Für das Überspringen einer Ebene könnte jedoch auch jeder andere vorbe- stimmte Code reserviert sein. Der Zeiger, der von der Wurzelliste 414 ausgeht und in Fig. 5 mit 500 bezeichnet ist, zeigt nun nicht mehr auf eine Liste der vierten Ebene oder der dritten Ebene, sondern gleich auf die Liste 430 der zweiten Ebene. Ein Überspringen einer beliebigen Anzahl von Ebenen bzw. Knoten ist möglich. Die Bits in der virtuellen Adresse, die diesen Ebenen entsprechen, müssen den vorbestimmten Code haben, um der Zustandsmaschine das Ebenen-Überspringen zu signalisieren. Diese Optimierung erfordert eine zusätzliche Information für den Zeiger 500, wobei diese zusätzlichen In- formationen in den Einträgen der Wurzelliste 414 abgespeichert sind. Selbstverständlich könnte auch nur die Ebene 3 übersprungen werden, während der Knoten der Ebene 4 nicht ü- bersprungen werden darf. In diesem Fall müßten die zusätzlichen Informationen in einem Eintrag einer Liste für den Kno- ten der Ebene 4 vorhanden sein.Row of the table of Fig. 4b). Similarly, each pointer from a third level list, such as. B. the pointer 428, again address an address range of 32 kilobytes. The 32 kilobyte address range is the address range spanned by the second level list 430, and an entry in this list can in turn address an address range of two kilobytes. FIG. 5 shows a section of the hierarchical page table structure from FIG. 4a, but with a different virtual address, which in sections 408 and 406 has loud ones for the fourth level and for the third level. In contrast to the mapping rule shown in FIG. 4a, the mapping rule in the form of the hierarchical tree which begins with the root list 414 and ends with the physical address 440 allows skipping at least one level. The skipping of a level is signaled in the virtual address by a certain section, for example by the fact that there are all ones in one section, as is the case in FIG. 5. However, any other predetermined code could also be reserved for skipping a level. The pointer which starts from the root list 414 and is labeled 500 in FIG. 5 no longer points to a list of the fourth level or the third level, but immediately to the list 430 of the second level. It is possible to skip any number of levels or nodes. The bits in the virtual address that correspond to these levels must have the predetermined code to signal the level machine to skip levels. This optimization requires additional information for the pointer 500, and this additional information is stored in the entries in the root list 414. Of course, only level 3 could be skipped, while the level 4 node may not be skipped. In this case, the additional information should be available in an entry in a list for the level 4 node.
In nachfolgenden wird auf Fig. 6 Bezug genommen. Fig. 6 zeigt eine zu Fig. 4a und Fig. 5 korrespondierende Tabelle für die Bedeutung der Bits der virtuellen Adresse und den Zusammen- hang zwischen der Knotengröße, d. h. der maximalen Anzahl von Einträgen in die Knotenliste. Anders ausgedrückt stellt jede Zeile der Tabelle in Fig. 6 einen Abschnitt der ganz links in Fig. 6 bezeichneten Ebene der virtuellen Adresse dar. In der ersten Zeile der Tabelle von Fig. 6, die sich auf die Ebene 5, also auf die Wurzelebene, bezieht, ist ausgeführt, daß der Abschnitt 410 lediglich ein Bit hat, nämlich bei dem bevor- zugten Ausführungsbeispiel der vorliegenden Erfindung das Bit 23 der virtuellen Adresse. Durch ein Bit können zwei verschiedene Einträge in die Wurzelliste indexiert werden, so daß die Knotengröße des Wurzelknotens 2 beträgt. Die vierte Ebene umfaßt die Bits 19-22. Durch vier Bits können 16 ver- schiedene Einträge in einer Liste für die vierte Ebene indexiert werden, so daß die Knotengröße, also die Größe einer Liste der vierten Ebene 16 beträgt. Die Anzahl der Listen in der vierten Ebene beträgt 2, da die Wurzelliste zwei Einträge hat.In the following, reference is made to FIG. 6. FIG. 6 shows a table corresponding to FIGS. 4a and 5 for the meaning of the bits of the virtual address and the relationship between the node size, ie the maximum number of entries in the node list. In other words, each row of the table in FIG. 6 represents a section of the leftmost one in FIG 6 represents the level of the virtual address. In the first line of the table of FIG. 6, which relates to level 5, that is to say to the root level, it is stated that section 410 has only one bit, namely in which preferred embodiment of the present invention, bit 23 of the virtual address. One bit can be used to index two different entries in the root list so that the node size of the root node is 2. The fourth level comprises bits 19-22. Four bits can be used to index 16 different entries in a list for the fourth level, so that the node size, that is to say the size of a list in the fourth level, is 16. The number of lists in the fourth level is 2 because the root list has two entries.
Sowohl der Abschnitt für die dritte Ebene als auch der Abschnitt für die zweite Ebene haben beide vier Bits, so daß eine Liste der zweiten Ebene oder der dritten Ebene ebenfalls maximal 16 Einträge haben kann. Der Abschnitt 402 für die erste Ebene umfaßt fünf Bits, so daß durch diesen Abschnitt 32 Einträge einer Liste indexiert werden können, wie es auch aus der Liste 434 für die erste Ebene von Fig. 4a deutlich wird, dieselbe hat 32 Zeilen, während eine Liste der zweiten Ebene lediglich 16 Zeilen hat. Die nullte Ebene, d. h. der Seitenversatz ausgehend von einer Seitenanfangsadresse, umfaßt sechs Bits, so daß hiermit 64 Listeneinträge indexiert werden können. Nachdem eine physikalische Seite 64 Byte hat, können minimale Versätze von einem Byte adressiert werden. Wäre die Seitengröße beispielsweise 128 Byte, so wäre die mi- nimale Speichergröße, die adressiert werden kann, zwei Byte groß .Both the section for the third level and the section for the second level both have four bits, so that a list of the second level or the third level can also have a maximum of 16 entries. The section 402 for the first level comprises five bits, so that through this section 32 entries of a list can be indexed, as is also clear from the list 434 for the first level of Fig. 4a, it has 32 lines while a list the second level has only 16 lines. The zero level, i. H. the page offset starting from a start page address comprises six bits, so that 64 list entries can be indexed with it. After a physical page has 64 bytes, minimal offsets of one byte can be addressed. For example, if the page size were 128 bytes, the minimum memory size that can be addressed would be two bytes.
Im nachfolgenden wird auf Fig. 7 Bezug genommen. In Fig. 7 sind ebenso wie in den Fig. 5 und 4a benutzte Einträge in ei- ne Liste fett gezeichnet, während Null-Einträge als nicht- ausgefülltes Rechteck dargestellt sind. Aus der in Ffg". "7 gezeigten Abbildungsvorschrift wird klar, daß sehr viele Null- Einträge vorhanden sind, und lediglich ein paar verwendete Einträge. Dies rührt daher, daß der virtuelle Adressraum wesentlich größer ist als der physikalische Adressraum. Bei dem bevorzugten Ausführungsbeispiel der vorliegenden Erfindung ist der virtuelle Adressraum 4 Gigabyte groß, während der physikalische Adressraum lediglich 4 Megabyte groß ist. Wenn eine seitenweise Speicherorganisation verwendet wird, muß jedoch dennoch für jede in Fig. 7 gezeigte Liste eine Speicherseite vorgesehen werden. Bei dem in Fig. 7 gezeigten Beispiel für eine Abbildungsvorschrift müssen daher 10 Speicherseiten verwendet werden, um lediglich 4 physikalische Seiten, in denen Code bzw. Daten vorhanden sind, zu verwalten. In Anwendungen, bei denen eine ausreichende Menge an nicht-flüchtigem Speicher vorhanden ist, um die Listen für die Ebenen zu spei- ehern, spielt dies keine Rolle.In the following, reference is made to FIG. 7. In FIG. 7, as in FIGS. 5 and 4a, entries used in a list are shown in bold, while zero entries are shown as a blank rectangle. From the mapping rule shown in Ffg "." 7 It is clear that very many zero Entries exist, and just a few used entries. This is because the virtual address space is significantly larger than the physical address space. In the preferred embodiment of the present invention, the virtual address space is 4 gigabytes, while the physical address space is only 4 megabytes. However, if a page-by-page memory organization is used, a page of memory must still be provided for each list shown in FIG. In the example of a mapping rule shown in FIG. 7, 10 memory pages must therefore be used in order to manage only 4 physical pages in which code or data are present. In applications where there is a sufficient amount of non-volatile memory to store the lists for the levels, this does not matter.
Wenn jedoch der Speicherplatz begrenzt ist und eine wertvolle Ressource ist, so wird es bevorzugt, die n-Knoten-Listen zu komprimieren, um das Verhältnis der Anzahl der verwendeten Einträge einer Liste zur Gesamtanzahl der Einträge in der Liste zu vergrößern. Es wird daher von den sogenannten n- Knoten zu den q-Knoten übergegangen. Während der Ausdruck „n- Knoten" bedeutet, daß sämtliche Listen eines Knotens einer Ebene dieselbe Anzahl von Einträgen, nämlich n Einträge hat, bedeutet der Ausdruck „q-Knoten", daß die Knotenliste komprimiert ist, und daß die Anzahl der Einträge in eine Liste für ein und dieselbe Ebene von Liste zu Liste variieren kann.However, if space is limited and is a valuable resource, it is preferred to compress the n-node lists to increase the ratio of the number of entries used in a list to the total number of entries in the list. The so-called n-nodes are therefore switched to the q-nodes. While the expression "n-node" means that all lists of a node of a level have the same number of entries, namely n entries, the expression "q-node" means that the node list is compressed and that the number of entries into one List for one and the same level can vary from list to list.
Teilweise gefüllte Knotenlisten werden komprimiert und, wie es insbesondere bezugnehmend auf Fig. 11 ausgeführt wird, können mehrere komprimierte Knoten auf einer Seite des physikalischen Speicherbereichs abgespeichert werden. Die komprimierten Knoten werden q-Knoten genannt, wobei die hierarchische Baumstruktur mit komprimierten Knoten als q-Baum be- zeichnet wird. Die Theorie, die hinter einem q-Knoten steht, besteht darin, daß alle verwendeten Einträge einer Liste, d. h. alle NichtNull-Zeiger, in einem n-Knoten in einer Struktur plaziert werden können (dem q-Knoten) , die kleiner als der ursprüngli- ehe n-Knoten ist. Dies wird erreicht, indem der n-Knoten in kleinere Abschnitt aufgeteilt wird, wobei für eine maximale Kompression der kleinste Abschnitt genommen wird, der alle Nicht-Null-Zeiger enthält. Um die Position eines Zeigers in dem n-Knoten zu spezifizieren, wird ein Offset-Wert für den q-Knoten-Zeiger benötigt. Dieser Offset-Wert wird auch als virtueller Offset bezeichnet.Partially filled node lists are compressed and, as is particularly explained with reference to FIG. 11, several compressed nodes can be stored on one page of the physical memory area. The compressed nodes are called q nodes, and the hierarchical tree structure with compressed nodes is referred to as the q tree. The theory behind a q-node is that all entries in a list, ie all non-zero pointers, can be placed in a n-node in a structure (the q-node) that is smaller than the original one - before n node is. This is accomplished by dividing the n-node into smaller sections, taking the smallest section containing all non-zero pointers for maximum compression. In order to specify the position of a pointer in the n-node, an offset value for the q-node pointer is required. This offset value is also referred to as a virtual offset.
Im nachfolgenden wird auf Fig. 8 Bezug genommen, um eine mögliche Kompressionsart einer Liste 800 eines n-Knotens darzu- stellen. Die Liste 800 umfaßt zwei Nicht-Null-Einträge, die binär durch 1100 und 1110 indexiert werden können. Neben der Liste 800 sind mögliche q-Knoten dargestellt. Bei der beschriebenen abschnittsweisen Kompression können prinzipiell drei verschiedene „komprimierte" Listen, d. h. q-Knoten, 802, 804 und 806 erzeugt werden. Die Liste 802 entspricht der Liste 800. Hier handelt es sich um die triviale Form der Kompression, die q-Knoten-Liste 802 ist genau so groß wie die Liste 800, und es wird kein Offset-Bit benötigt. Dagegen ist die Liste 804 bereits auf die Hälfte des Speicherplatzes komprimiert. Die Liste enthält zwei Einträge, die mit 110 und 100 indexiert werden können. Um von den Einträgen der komprimierten Liste 804 auf die Einträge der nicht-komprimierten Liste 800 zu kommen, wird ein virtuelles Offset-Bit benötigt, das einen Wert von 1 hat. Das virtuelle Offset-Bit entspricht dem höchstwertigen Bit (msb) beider Einträge der Liste 800. Eine Kompression ist also möglich, wenn die msbs der NichtNull-Einträge der Liste 800 gleich sind. Da auch die höchstwertigen Bits der Einträge der komprimierten Liste 804 gleich sind, ist noch eine höhere Kompression zu erreichen, wie es die komprimierte Liste 806 zeigt. Die beiden NichtNull-Einträge der Liste 806 haben höchstwertige Bits,~~die nicht gleich sind, so daß keine weitere Kompression möglich ist. Um von der komprimierten Liste 806 wieder auf die nichtkomprimierte Liste 800 zu kommen, werden zwei Offset-Bits benötigt, nämlich die zwei höchstwertigen Bits der Einträge in der Liste 800, die für beide Nicht-Null-Einträge in der Liste gleich sind.In the following, reference is made to FIG. 8 in order to illustrate a possible type of compression of a list 800 of an n-node. List 800 includes two non-zero entries that can be binary indexed by 1100 and 1110. Possible q nodes are shown next to list 800. In principle, three different "compressed" lists, ie q-nodes, 802, 804 and 806 can be generated in the described section-wise compression. The list 802 corresponds to the list 800. This is the trivial form of compression, the q-node -List 802 is exactly the same size as list 800 and no offset bit is required, whereas list 804 is already compressed to half the storage space and contains two entries that can be indexed with 110 and 100. Um Coming from the entries in the compressed list 804 to the entries in the uncompressed list 800 requires a virtual offset bit which has a value of 1. The virtual offset bit corresponds to the most significant bit (msb) of both entries in the list 800. Compression is therefore possible if the msbs of the non-zero entries in list 800 are the same, since the most significant bits of the entries in the compressed list 804 are also the same achieve higher compression, as shown by the compressed list 806. The two non-zero entries of list 806 have most significant bits ~ ~ are not equal, so that no further compression is possible is. In order to return from the compressed list 806 to the uncompressed list 800, two offset bits are required, namely the two most significant bits of the entries in the list 800, which are the same for both non-zero entries in the list.
Abhängig vom Ausmaß der Kompression des Knotens (keine Kompression, eine Kompression von 16 Einträgen auf 8 Einträge und schließlich eine Kompression von 16 Einträgen auf 4 Ein- träge) beträgt der virtuelle Offset-Wert 0, 1 Bit oder 2Depending on the degree of compression of the node (no compression, a compression from 16 entries to 8 entries and finally a compression from 16 entries to 4 entries), the virtual offset value is 0, 1 bit or 2
Bits. Die Kompression auf 8 Einträge, d. h. eine halbe Speicherseite, bedeutet, daß die Zeiger im ursprünglichen n- Knoten nur in entweder der oberen oder der unteren Hälfte sind. Der virtuelle Offset muß daher 1 Bit betragen, um die Position zu spezifizieren, wobei das Offsetbit mit einem Wert von 0 bedeutet, daß sämtliche Nicht-Null-Einträge in der unteren Hälfte sind, während ein Offsetbit von 1 bedeutet, daß sämtliche Einträge der Liste in der oberen Hälfte der n- Knotenliste 800 sind.Bits. The compression to 8 entries, i. H. half a page of memory means that the pointers in the original n-node are only in either the upper or lower half. The virtual offset must therefore be 1 bit to specify the position, the offset bit with a value of 0 means that all non-zero entries are in the lower half, while an offset bit of 1 means that all entries in the list are 800 in the upper half of the n-node list.
Analog dazu ist, wie es anhand von Fig. 8 dargestellt worden ist, bei der Liste 800 eine weitere Kompression möglich, da sämtliche Nicht-Null-Einträge nicht nur in der oberen Hälfte sondern sogar im oberen Viertel der Liste sind. In diesem Fall sind die Offset-Bits bei einem Wert von „11", was anzeigt, daß die Zeiger in der n-Knoten-Liste im vierten Viertel zu finden sind. Wenn keine Kompression durchgeführt wird (Liste 802) , weil das Kompressionsverfahren keine Kompression erlaubt, wie es anhand von Fig. 9 dargestellt wird, werden auch keine Offset-Bits benötigt. Die Größe der Liste im nächstniedrigeren Knoten wird in der Knotenliste spezifiziert, die den Zeiger umfaßt, der auf den nächstniedrigeren (komprimierten) Knoten zeigt. Wenn beispielsweise die Liste 430 von Fig. 4a komprimiert ist, beispielsweise um die Hälf- te, so würde der Eintrag 426 der nächsthöheren Liste neben der physikalischen Adresse, an der die Liste 430 gespeichert ist, auch die Größe der Liste spezifizieren. Die Liste 430 wäre dann beispielsweise bei einer Kompression um die Hälfte, lediglich 8 Einträge groß, obgleich der Abschnitt 404 der virtuellen Adresse, der dem Level 2 entspricht, 4 Bits hat und eigentlich eine 16-Einträge-Liste indexiert. Der Ab- schnitt 404 der virtuellen Adresse wäre dann so gestaltet, daß ein Bit desselben, typischerweise das höchstwertige Bit, als virtuelles Offsetbit interpretiert wird.Analogously to this, as has been illustrated with reference to FIG. 8, a further compression is possible with the list 800 since all non-zero entries are not only in the upper half but even in the upper quarter of the list. In this case the offset bits are at a value of "11", indicating that the pointers can be found in the n-node list in the fourth quarter. If no compression is performed (list 802) because the compression method does not Compression allowed, as shown in Fig. 9, no offset bits are required either, and the size of the list in the next lower node is specified in the node list, which includes the pointer that points to the next lower (compressed) node For example, the list 430 of FIG. 4a is compressed, for example by half, the entry 426 of the next higher list would also specify the size of the list in addition to the physical address at which the list 430 is stored would be, for example, a compression by half, only 8 entries large, although the section 404 of the virtual address, which corresponds to level 2, has 4 bits and actually indexes a 16 entry list. The section 404 of the virtual address would then be designed such that a bit of the same, typically the most significant bit, is interpreted as a virtual offset bit.
Dadurch ergibt sich auch ein weiterer Kontrollmechanismus. Die Hardware-Zustandsmaschine wird das höchstwertige Bit des Abschnitts 404 mit dem Größenbit im Nicht-Null-Eintrag der Liste 426 vergleichen und bei Übereinstimmung eine Adressübersetzung fortsetzen, während, falls die Bits nicht übereinstimmen, ein Seitenfehler ausgegeben wird, da dann zumin- dest entweder die Abbildungsvorschrift oder die virtuelle Adresse fehlerhaft ist.This also results in another control mechanism. The hardware state machine will compare the most significant bit of section 404 to the size bit in the non-zero entry of list 426 and continue address translation if matched, while if the bits do not match, a page fault is issued because then at least either the mapping rule or the virtual address is incorrect.
Im nachfolgenden wird auf Fig. 9 eingegangen, um weitere Beispiele darzustellen, wie n-Knoten auf ihre minimalen q-Knoten reduziert werden können, wenn das bezüglich Fig. 8 beschrieben Kompressionsverfahren verwendet wird. Die Liste 900 in Fig. 9 umfaßt lediglich einen Nicht-Null-Eintrag, der durch die Bitkombination „1100" indexiert ist. Der minimale q- Knoten umfaßt lediglich einen einzigen Eintrag und, dement- sprechend, 4 virtuelle Offsetbits „1100". Eine Liste 900 mit lediglich einem einzigen Nicht-Null-Eintrag kann somit auf einfache Art und Weise hinsichtlich ihres Speicherplatzbedarfs um das 1/16-fache reduziert werden.In the following, FIG. 9 is discussed in order to show further examples of how n-nodes can be reduced to their minimum q-nodes if the compression method described with reference to FIG. 8 is used. The list 900 in Fig. 9 only includes a non-zero entry indexed by the bit combination "1100". The minimum q-node comprises only a single entry and, accordingly, 4 virtual offset bits "1100". A list 900 with only a single non-zero entry can thus be reduced in a simple manner with respect to its storage space requirement by 1/16 times.
Die Liste 902 umfaßt zwei Nicht-Null-Einträge, die mit „0001" und „0011" indexiert werden können. Die beiden Einträge haben zwei gleiche höchstwertige Bits, so daß zwei virtuelle Offsetbits 00 entstehen, und die Liste um ein Viertel reduziert werden kann.List 902 includes two non-zero entries that can be indexed with "0001" and "0011". The two entries have two equal most significant bits, so that two virtual offset bits 00 are created and the list can be reduced by a quarter.
Die Liste 904 umfaßt zwei Nicht-Null-Einträge, deren "Höchstwertige Bits jedoch ungleich sind, so daß bei dem hier gewählten beispielhaften Kompressionsalgorithmus keine Kompression erreichbar ist. Der q-Knoten ist daher genau so groß wie der n-Knoten.List 904 includes two non-zero entries, the "most significant bits of which are not equal, however, so this one selected compression algorithm no compression is achievable. The q-node is therefore exactly the same size as the n-node.
Die Beispielliste 906 umfaßt zwei Einträge mit „0100" undThe sample list 906 includes two entries with "0100" and
„0101". Die drei höchstwertigen Bits sind gleich, so daß eine Kompression um das 1/8-fache erreicht werden kann, was zu den virtuellen Offset-Bits „010" führt."0101". The three most significant bits are the same so that compression can be achieved 1/8 times, which leads to the virtual offset bits "010".
Die Beispielliste 908 umfaßt vier Nicht-Null-Einträge zwischen „1010" und „1101". Alle vier Einträge haben dasselbe höchstwertige Bit, so daß eine Kompression um das ^-fache erreicht werden kann, was zu einem virtuellen Offset-Bit von „1" führt.The sample list 908 includes four non-zero entries between "1010" and "1101". All four entries have the same most significant bit, so that a compression by ^ times can be achieved, which leads to a virtual offset bit of "1".
Es sei darauf hingewiesen, daß die q-Knoten der Ebene 1 (Fig. 4a) eine spezielle Rolle spielen. Da ihre Einträge nicht auf weitere q-Knoten zeigen, sondern direkt auf die physikalischen Speicherseiten, müssen keine zusätzlichen Informatio- nen, wie z. B. ein Größenwert einer hierarchisch niedrigen q- Liste, zusammen mit den Zeigern gespeichert werden. Folglich wird ein Eintrag in einer Liste auf Ebene 1 dazu verwendet, zwei Zeiger zu speichern. Daher umfaßt der Abschnitt 402 der virtuellen Adresse, der der Ebene 1 zugeordnet ist, fünf vir- tuelle Adressbits. Das zusätzliche Bit spezifiziert, welcher der Zeiger in dem ausgewählten q-Knoten-Eintrag verwendet werden soll. Es sei darauf hingewiesen, daß auch einer der zwei Zeiger 0 sein kann. Nachdem ein Eintrag in einer Liste der Ebene 1 zwei Zeiger speichert, ist die Listenlänge einer Liste, wie z. B. der Liste 434 von Fig. 4a, doppelt so groß wie die Länge einer Liste einer höheren Ebene, wie z. B. der Ebene 430.It should be noted that the q-nodes of level 1 (FIG. 4a) play a special role. Since their entries do not point to other q nodes, but directly to the physical memory pages, no additional information, such as B. a size value of a hierarchically low q-list can be stored together with the pointers. As a result, an entry in a level 1 list is used to store two pointers. Therefore, section 402 of the virtual address associated with level 1 comprises five virtual address bits. The additional bit specifies which of the pointers to use in the selected q-node entry. It should be noted that one of the two pointers can also be 0. After an entry in a level 1 list stores two pointers, the list length of a list, such as The list 434 of Fig. 4a, twice the length of a higher level list, such as. B. level 430.
Im nachfolgenden wird auf Fig. 10 Bezug genommen, um darzu- stellen, wie die komprimierten q-Knoten dazu eingesetzt werden können, um die Speicherbelegung zu minimieren. Zunächst werden beispielsweise gemäß der Tabelle von Fig. 9 die mini- malen q-Knoten einer hierarchischen Abbildungsvorschrift i- dentifiziert . Daraus entsteht eine Abbildungsvorschrift, wie sie in Fig. 10 dargestellt ist. Die ausgefüllten Rechtecke bezeichnen benutzte Einträge, während die nicht-ausgefüllten Rechtecke Null-Einträge bezeichnen. Jeder q-Knoten ist durch eine dicke Linie umrandet. Es ist zu sehen, daß bei dem gewählten Beispiel der Abbildungsvorschrift sämtliche Listen außer einer Liste 1000 komprimiert werden konnten. Die Liste 1000 konnte mit dem gewählten Kompressionsverfahren nicht komprimiert werden, da die zwei Nicht-Null-Einträge, die dieselbe umfaßt, nicht in der derselben Hälfte der Liste aufgeführt sind.In the following, reference is made to FIG. 10 to illustrate how the compressed q nodes can be used to minimize the memory usage. First, for example according to the table in FIG. 9, the mini paint q-nodes of a hierarchical mapping rule identified. This results in a mapping rule as shown in FIG. 10. The filled rectangles indicate used entries, while the empty rectangles indicate zero entries. Each q-node is surrounded by a thick line. It can be seen that in the selected example of the mapping rule, all lists except a list 1000 could be compressed. The list 1000 could not be compressed with the compression method chosen, since the two non-zero entries it contains are not listed in the same half of the list.
Bei der in Fig. 10 gezeigten Abbildungsvorschrift sind noch alle, auch die komprimierten, Listen an jeweils eigenen physikalischen Speicherseiten oder „Page Frames" abgelegt, so daß die Page Frames sehr locker belegt sind, es wurde jedoch noch keine Reduktion der Anzahl von Page Frames erreicht. Die nicht-belegten Worte in den Page Frames können bei dem in Fig. 10 gezeigten Ausführungsbeispiel jedoch bereits durch andere Daten belegt werden, so daß in einer physikalischen Speicherseite eine Liste für die Abbildungsvorschrift und zusätzlich weitere Daten gespeichert werden können. Aus Speicherverwaltungsgründen wird es jedoch bevorzugt, zu einem Konzept gemäß Fig. 11 überzugehen, um die Abbildungs- vorschrifts-Informationen, also die Listen für die einzelnen Ebenen, in möglichst wenigen physikalischen Speicherseiten zu konzentrieren, damit komplette Speicherseiten frei gemacht werden, um in denselben andere Daten abspeichern zu können.In the mapping rule shown in FIG. 10, all, including the compressed, lists are each stored on their own physical memory pages or “page frames”, so that the page frames are occupied very loosely, but the number of page frames has not yet been reduced In the embodiment shown in Fig. 10, the unoccupied words in the page frames can, however, already be occupied by other data, so that a list for the mapping rule and additional data can be stored in a physical memory page However, it is preferred to move on to a concept according to FIG. 11 in order to concentrate the mapping regulation information, that is to say the lists for the individual levels, in as few physical memory pages as possible, so that complete memory pages are freed up in order to store other data in the same to be able to.
Nachdem die meisten q-Knoten klein sind, können bei der in Fig. 11 dargestellten Abbildungsvorschrift alle Knotenlisten außer einer Knotenliste 1100 in die gleiche physikalische Speicherseite 1102 gepackt werden. Folglich wird die Abbil- dungsvorschrift bzw. die Seitenzuordnungsstruktur, von 10 auf 2 Speicherseiten reduziert. Auf diese Art und Weise liefert die q-Baum-Struktur eine beträchtliche Optimierung im Ver- gleich zu der in Fig. 4a gezeigten Option, bei der keine Listenkompression durchgeführt worden ist.Since most q-nodes are small, in the mapping rule shown in FIG. 11, all node lists except a node list 1100 can be packed into the same physical memory page 1102. As a result, the mapping rule or the page assignment structure is reduced from 10 to 2 memory pages. In this way, the q-tree structure provides considerable optimization in terms of equal to the option shown in FIG. 4a, in which no list compression has been carried out.
Der einzige „verschwendete" Speicher ist aufgrund der Listen vorhanden, die mehrere Null-Zeiger enthalten und nicht weiter komprimiert werden können. Die Liste 1100 fällt in diese Kategorie. Erfahrungsgemäß existieren jedoch wenige solcher q- Knoten. Normale Programme verwenden üblicherweise zumindest einige zusammenhängende Speicherbereiche, wie z. B. Code, statische Daten, Stack und Heap. Speicherlayouts dieser Art haben für die Zuordnungsstruktur einen kleineren Zusatzaufwand. Dennoch sind manchmal fragmentierte Speicherlayouts notwendig.The only "wasted" memory is due to the lists, which contain several null pointers and cannot be further compressed. List 1100 falls into this category. Experience has shown, however, that there are few such q-nodes. Normal programs usually use at least some contiguous memory areas , such as code, static data, stack, and heap, memory layouts of this type have a smaller overhead for the mapping structure, but fragmented memory layouts are sometimes necessary.
Obgleich im vorhergehenden lediglich die in Fig. 9 näher dargestellte Listenkompressionsfunktion dargestellt worden ist, sei darauf hingewiesen, daß sämtliche Listenkompressionsverfahren eingesetzt werden können. Die Kompression muß also nicht ausschließlich darauf basieren, daß Einträge in dersel- ben Hälfte bzw. in dem gleichen Viertel einer Liste sein müssen. So könnte die Liste 1100 beispielsweise dadurch komprimiert werden, daß ein alternatives Kompressionsverfahren verwendet wird, das darauf beruht, daß Einträge in unterschiedlichen Hälften der Liste sind. Je nach Layout der virtuellen Adresse und nach der Bedeutung der Offset-Bits in einem Abschnitt der virtuellen Adresse können auch mehrere verschiedene Kompressionsverfahren kombiniert werden, wenn die Speicheranforderungen so sind, daß auch eine geringe Anzahl von Listen, die nicht-komprimiert werden können, wie z. B. die Liste 1100 von Fig. 11, nicht akzeptierbar ist.Although only the list compression function shown in more detail in FIG. 9 has been shown above, it should be pointed out that all list compression methods can be used. The compression therefore does not have to be based exclusively on the fact that entries must be in the same half or in the same quarter of a list. For example, the list 1100 could be compressed using an alternative compression method based on entries in different halves of the list. Depending on the layout of the virtual address and the meaning of the offset bits in a section of the virtual address, several different compression methods can also be combined if the memory requirements are such that a small number of lists that cannot be compressed, such as z. B. List 1100 of FIG. 11 is not acceptable.
Bei einem bevorzugten Ausführungsbeispiel der vorliegenden Erfindung wird ein Knotenadressierungsmodus (NAM; NAM = Node Addressing Mode) vorgesehen, um die Abbildungsvorschrift im nicht-flüchtigen Speicher modifizieren zu können. Hierzu wird das in Fig. 12 dargestellte Format für eine virtuelle Adresse 1200 verwendet. Die virtuelle Adresse ist wie in Fig. A in mehrere Abschnitte aufgeteilt, wobei die Abschnitte 1210 bis 1202 den Abschnitten 410 bis 402 von Fig. 4a prinzipiell entsprechen. Der letzte Abschnitt 1212, der in Fig. 4a den Versatzwert bezeichnet hatte, wird bei der virtuellen Adresse 1200 jedoch dafür verwendet, die q-Knoten-Ebene zu signalisieren, deren Liste im NAM-Modus modifiziert werden soll.In a preferred embodiment of the present invention, a node addressing mode (NAM) is provided in order to be able to modify the mapping rule in the non-volatile memory. The format for a virtual address 1200 shown in FIG. 12 is used for this. The virtual address is as in Fig. A in divided several sections, the sections 1210 to 1202 basically corresponding to the sections 410 to 402 of FIG. 4a. The last section 1212, which had designated the offset value in FIG. 4a, is however used at the virtual address 1200 to signal the q-node level, the list of which is to be modified in the NAM mode.
Der NAM-Modus wird dazu verwendet, um virtuelle Adressen zu manipulieren, da aus Sicherheitsaspekten lediglich ein virtu- eller Adressierungsmodus gefahren werden soll, so daß die CPU keinen direkten Zugriff auf physikalische Seiten hat. Durch Einstellen des Abschnitts 1212 der virtuellen Adresse 1200 kann auf Listen für einzelne Ebenen und insbesondere auf die Einträge in diesen Listen zugegriffen werden.The NAM mode is used to manipulate virtual addresses, since for security reasons only a virtual addressing mode is to be used so that the CPU has no direct access to physical pages. By setting the section 1212 of the virtual address 1200, lists for individual levels and in particular the entries in these lists can be accessed.
Hierzu umfaßt jeder Paketbeschreiber, der in der Wurzelliste 414, d. h. dem Package Descriptor Buffer, abgespeichert ist, ein NAM-Bit, das, wenn es gesetzt ist, einen Zugriff auf die q-Knoten-Listen für diese spezielle Speicherpackage erlaubt. Es sei jedoch darauf hingewiesen, daß nur Packages in privi- ligierten Schichten, d. h. privilegierte Modi des Betriebssystems, das NAM-Bit manipulieren können. Wenn das NAM-Bit gesetzt ist, wird der letzte Abschnitt 1212 der virtuellen Adresse nicht mehr als Seitenversatzwert aufgefaßt, sondern wird dazu verwendet, um der Hardware-Zustandsmaschine zu signalisieren, ob der q-Knoten auf Ebene 4, auf Ebene 3, auf E- bene 2 oder auf Ebene 1 adressiert werden soll, um auf die Liste bzw. auf Einträge in der entsprechenden Liste zuzugreifen.To this end, each packet descriptor included in the root list 414, i.e. H. the package descriptor buffer, a NAM bit is stored which, when set, allows access to the q-node lists for this special memory package. However, it should be noted that only packages in privileged layers, i.e. H. privileged modes of the operating system that can manipulate the NAM bit. When the NAM bit is set, the last section 1212 of the virtual address is no longer interpreted as a page offset value, but is used to signal the hardware state machine whether the q-node at level 4, level 3, is at E. - Level 2 or level 1 should be addressed to access the list or entries in the corresponding list.
Wenn das NAM-Bit gesetzt ist, wird die virtuelle Adresse von der Hardware-Zustandsmaschine somit anders als bei dem in Fig. 4a beschriebenen Fall interpretiert.If the NAM bit is set, the virtual address is thus interpreted differently by the hardware state machine than in the case described in FIG. 4a.
Die Hardware-Zustandsmaschine führt nun, wenn das NAM-Bit gesetzt ist, eine Adressübersetzung lediglich durch, bis der q- Knoten der durch den Abschnitt 1212 definierten Stoppebene wiedergewonnen ist. Dann wird ein endgültiger Buszyklus auf die physikalische Seite erzeugt, die durch den Zeiger eines Eintrags in der Liste für die definierte Stoppebene bezeichnet ist. Auf die angeforderten Listendaten wird dann zuge- griffen und dieselben werden vorzugsweise in dem Datencache 20 (Fig. 1) gespeichert. Es sei darauf hingewiesen, daß diese Adressübersetzung nicht im TLB 18b (Fig. 1) gespeichert wird, da es sich um die Abbildungsvorschrift selbst handelt und nicht um eine Zuordnung einer virtuellen Adresse zu einer physikalischen Adresse. If the NAM bit is set, the hardware state machine now only performs an address translation until the q node of the stop level defined by section 1212 is recovered. Then a final bus cycle is generated on the physical side, which is indicated by the pointer of an entry in the list for the defined stop level. The requested list data is then accessed and is preferably stored in the data cache 20 (FIG. 1). It should be noted that this address translation is not stored in the TLB 18b (FIG. 1), since it is the mapping rule itself and not an assignment of a virtual address to a physical address.

Claims

Patentansprüche claims
1. Rechnersystem mit virtueller Adressierung, wobei eine virtuelle Adresse über eine Abbildungsvorschrift einer physika- lischen Adresse zugeordnet ist, mit folgenden Merkmalen:1. Computer system with virtual addressing, a virtual address being assigned to a physical address via a mapping rule, with the following features:
einem nicht-flüchtigen Speicher (12, 14) zum Speichern zumindest eines Teils der Abbildungsvorschrift; unda non-volatile memory (12, 14) for storing at least a portion of the mapping rule; and
einer Hardware-Zustandsmaschine (18a), die auf den nichtflüchtigen Speicher zugreifen kann (26) und ausgebildet ist, um unter Verwendung der virtuellen Adresse und zumindest des Teils der Abbildungsvorschrift die der virtuellen Adresse zugeordnete physikalische Adresse zu ermitteln.a hardware state machine (18a) which can access the non-volatile memory (26) and is designed to determine the physical address assigned to the virtual address using the virtual address and at least part of the mapping rule.
2. Rechnersystem nach Anspruch 1, bei dem die virtuelle Adresse eine Adresse für eine virtuelle Speicherseite und einen virtuellen Versatzwert umfaßt, um ein Wort in der virtuellen Speicherseite zu adressieren, und bei dem die physikalische Adresse eine Adresse für eine physikalische Speicherseite und einen physikalischen Versatzwert umfaßt, um ein Wort in der physikalischen Speicherseite zu adressieren.2. The computer system of claim 1, wherein the virtual address includes an address for a virtual memory page and a virtual offset value to address a word in the virtual memory page, and wherein the physical address includes an address for a physical memory page and a physical offset value to address a word in the physical memory page.
3. Rechnersystem nach Anspruch 2, bei dem die Abbildungsvor- schrift derart ausgebildet ist, daß die virtuelle Speicherseite und die physikalische Speicherseite gleich groß sind, und der virtuelle Versatzwert und der physikalische Versatzwert gleich groß sind.3. Computer system according to claim 2, in which the mapping rule is designed such that the virtual memory page and the physical memory page are the same size, and the virtual offset value and the physical offset value are the same size.
4. Rechnersystem nach einem der vorhergehenden Ansprüche, das angeordnet ist, um in einem virtuellen Modus initialisiert zu werden.4. Computer system according to one of the preceding claims, which is arranged to be initialized in a virtual mode.
5. Rechnersystem nach einem der vorhergehenden Ansprüche, das ferner folgende Merkmale aufweist: einen flüchtigen Speicher (18b), in dem Zuordnungen von physikalischen Adressen zu virtuellen Adressen speicherbar sind,5. Computer system according to one of the preceding claims, further comprising the following features: volatile memory (18b) in which assignments of physical addresses to virtual addresses can be stored,
wobei das Rechnersystem angeordnet ist, um zunächst auf den flüchtigen Speicher (18b) zuzugreifen, um festzustellen, ob eine angeforderte virtuelle Adresse gespeichert ist, undthe computer system being arranged to first access the volatile memory (18b) to determine whether a requested virtual address is stored, and
wobei das Rechnersystem angeordnet ist, um die Hardware- Zustandsmaschine (18a) zu einer Adressübersetzung zu aktivie- ren, falls die angeforderte virtuelle Adresse nicht in dem flüchtigen Speicher (18b) gespeichert ist.wherein the computer system is arranged to activate the hardware state machine (18a) for address translation if the requested virtual address is not stored in the volatile memory (18b).
6. Rechnersystem nach einem der vorhergehenden Ansprüche,6. Computer system according to one of the preceding claims,
bei dem die Abbildungsvorschrift hierarchisch als Baum mitwhere the mapping rule is hierarchical as a tree with
Knoten (414, 418, 422, 426, 430, 434) strukturiert ist, wobei der Baum einen Wurzelknoten (414), zumindest einen Zwischenknoten (418, 422, 426, 430) und einen Endknoten (434) aufweist,Node (414, 418, 422, 426, 430, 434) is structured, the tree having a root node (414), at least one intermediate node (418, 422, 426, 430) and an end node (434),
bei dem für einen Knoten eine Liste in dem nicht-flüchtigen Speicher gespeichert ist, wobei die Liste eines Knotens Einträge aufweist, wobei ein Eintrag einen Eintragsindex und einen Zeiger (424, 428, 432, 436) auf eine physikalische Adres- se aufweist, wobei der Zeiger für die physikalische Adresse auf eine physikalische Adresse des nicht-flüchtigen Speichers zeigt, mit der eine Liste für einen anderen Knoten des Baums wiedergewonnen werden kann,in which a list for a node is stored in the non-volatile memory, the list of a node having entries, an entry having an entry index and a pointer (424, 428, 432, 436) to a physical address, where the pointer for the physical address points to a physical address of the non-volatile memory, with which a list can be retrieved for another node of the tree,
bei dem die virtuelle Adresse (400) in Abschnitte (402, 404, 406, 408, 410) gegliedert ist, wobei für den Wurzelknoten (414), den zumindest einen Zwischenknoten (418, 422, 426, 430) und den Endknoten (434) je ein Abschnitt vorhanden ist, wobei der Abschnitt (402, 404, 406, 408, 410) einen Listen- eintrag einer zugehörigen Liste identifiziert, und bei dem die Hardware-Zustandsmaschine (18a) angeordnet ist, um aus der virtuellen Adresse einen Abschnitt zu extrahieren, um auf den nicht-flüchtigen Speicher (12, 14) zuzugreifen, um unter Verwendung des extrahierten Abschnitts einen Eintrag in einer Liste für den Knoten, der dem Abschnitt zugeordnet ist, zu ermitteln, und um das Extrahieren und das Zugreifen sequentiell so lange fortzusetzen, bis der Endknoten erreicht ist, um die physikalische Adresse (440), der die virtuelle Adresse (400) zugeordnet ist, zu erhalten.in which the virtual address (400) is divided into sections (402, 404, 406, 408, 410), whereby for the root node (414), the at least one intermediate node (418, 422, 426, 430) and the end node (434 ) there is one section each, the section (402, 404, 406, 408, 410) identifying a list entry of an associated list, and wherein the hardware state machine (18a) is arranged to extract a portion from the virtual address to access the non-volatile memory (12, 14) to use the extracted portion to make an entry in a list for the node associated with the section, and to continue extracting and accessing sequentially until the end node is reached to obtain the physical address (440) associated with the virtual address (400).
7. Rechnersystem nach Anspruch 6,7. Computer system according to claim 6,
bei dem der Paketbeschreibungspuffer (414) einen nichtflüchtigen Speicheranteil aufweist, in dem die Liste für ei- nen Wurzelknoten der Abbildungsvorschrift gespeichert ist,in which the packet description buffer (414) has a non-volatile memory portion in which the list for a root node of the mapping rule is stored,
wobei die Liste (414) für den Wurzelknoten zumindest zwei Einträge aufweist, wobei jeder Eintrag die physikalische Adresse (416) einer Liste für einen Zwischenknoten einer nied- rigeren Knotenebene aufweist, undwherein the list (414) for the root node has at least two entries, each entry having the physical address (416) of a list for an intermediate node of a lower node level, and
wobei die virtuelle Adresse einen Wurzelabschnitt (410) aufweist, der den Eintrag in der Wurzelliste für die virtuelle Adresse identifiziert.wherein the virtual address has a root section (410) that identifies the entry in the root list for the virtual address.
8. Rechnersystem nach Anspruch 6 oder 7,8. Computer system according to claim 6 or 7,
bei dem die Hardware-Zustandsmaschine (18a) ausgebildet ist, um eine Zwischen-Knotenebene zu überspringen (500), wenn der Abschnitt (406, 408) der virtuellen Adresse (400), der derwherein the hardware state machine (18a) is configured to skip (500) an intermediate node level when the portion (406, 408) of the virtual address (400) that the
Zwischen-Knotenebene zugeordnet ist, einen vorbestimmten Wert aufweist, undIs assigned between node level, has a predetermined value, and
bei dem im Falle eines Überspringens eines Zwischen-Knotens der Eintrag in einer Liste des Ausgangsknotens die physikalische Adresse einer Liste eines Sprung-Ausgangsknotens auf- weist, der in dem hierarchischen Baum auf einen übersprungenen Knoten folgt.where, in the event of an intermediate node being skipped, the entry in a list of the output node contains the physical address of a list of a jump output node. points that follows a skipped node in the hierarchical tree.
9. Rechnersystem nach einem der Ansprüche 6 bis 8,9. Computer system according to one of claims 6 to 8,
bei dem die Anzahl der virtuellen Adressen größer als die Anzahl der physikalischen Adressen ist, so daß eine Liste Leereinträge aufweist, die nicht auf eine physikalische Adresse verweisen,where the number of virtual addresses is greater than the number of physical addresses, so that a list has blank entries that do not refer to a physical address,
bei dem die in dem nicht-flüchtigen Speicher gespeicherte Liste eines Knotens komprimiert ist, so daß das Verhältnis der Anzahl von Einträgen, die einen Zeiger auf eine physikalische Adresse enthalten, zu der Gesamtanzahl der Einträge in der Liste im Vergleich zu einer nicht-komprimierten Liste erhöht ist, undin which the list of a node stored in the non-volatile memory is compressed so that the ratio of the number of entries containing a pointer to a physical address to the total number of entries in the list compared to an uncompressed list is increased, and
bei dem ein Eintrag in die Liste die Komprimierung des Knotens, zu dem die Liste gehört oder die Komprimierung eines in der Hierarchie niedrigeren Knotens identifiziert.where an entry in the list identifies the compression of the node to which the list belongs or the compression of a lower node in the hierarchy.
10. Rechnersystem nach Anspruch 9, bei dem der nichtflüchtige Speicher (12, 14) seitenweise organisiert ist,10. Computer system according to claim 9, in which the non-volatile memory (12, 14) is organized page by page,
bei dem zumindest zwei komprimierte Listen in der selben Speicherseite (1102) gespeichert sind, undin which at least two compressed lists are stored in the same memory page (1102), and
bei dem ein Listeneintrag einer Liste eines höheren Knotens die physikalische Adresse der Speicherseite sowie einen Ver- satzwert umfaßt, an dem die Liste des niedrigeren Knotens in der Speicherseite abgespeichert ist.in which a list entry of a list of a higher node comprises the physical address of the memory page and an offset value at which the list of the lower node is stored in the memory page.
11. Rechnersystem nach Anspruch 10, bei dem in einer Speicherseite des nicht-flüchtigen Speichers (12, 14) nur kompri- mierte Listen gespeichert sind, deren Anzahl von Einträgen nach einer Kompression gleich groß sind. 11. Computer system according to claim 10, in which only compressed lists are stored in a memory page of the non-volatile memory (12, 14), the number of entries of which are the same after compression.
12. Rechnersystem nach einem der Ansprüche 6 bis 11,12. Computer system according to one of claims 6 to 11,
bei dem die für eine virtuelle Adresse durchlaufenen Listeneinträge Zugriffsrechteinformationen (EAR) für die virtuelle Adresse aufweisen, die identifizieren, ob oder wie in einem Betriebsmodus des Rechnersystems auf Daten an der physikalischen Adresse, die der virtuellen Adresse durch die Abbildungsvorschrift zugeordnet ist, zugegriffen werden darf, undin which the list entries traversed for a virtual address have access rights information (EAR) for the virtual address which identify whether or how, in an operating mode of the computer system, data can be accessed at the physical address which is assigned to the virtual address by the mapping rule , and
bei dem der TLB (18b) angeordnet ist, um eine Zugriffsrechteüberprüfung (48) auf der Basis der Zugriffsrechteinformationen durchzuführen, bevor eine physikalische Adresse ermittelt wird.wherein the TLB (18b) is arranged to perform an access right check (48) based on the access right information before determining a physical address.
13. Rechnersystem nach einem der Ansprüche 6 bis 12,13. Computer system according to one of claims 6 to 12,
bei dem die Hardware-Zustandsmaschine (18a) angeordnet ist, um in einen Knotenadressierungsmodus versetzt zu werden, undwherein the hardware state machine (18a) is arranged to be placed in a node addressing mode, and
bei dem die virtuelle Adresse ausgestaltet ist, um über einen Abschnitt (1212) derselben den Knoten zu identifizieren, auf dessen Liste zugegriffen werden soll.in which the virtual address is designed to identify, via a section (1212) thereof, the node whose list is to be accessed.
14. Rechnersystem nach einem der vorhergehenden Ansprüche, das für sicherheitsrelevante Anwendungen bestimmt ist.14. Computer system according to one of the preceding claims, which is intended for security-relevant applications.
15. Rechnersystem nach einem der vorhergehenden Ansprüche, das auf einer Chipkarte integriert ist.15. Computer system according to one of the preceding claims, which is integrated on a chip card.
16. Rechnersystem nach einem der vorhergehenden Ansprüche, bei dem zumindest der Teil der in dem nicht-flüchtigen Speicher gespeicherten Abbildungsvorschrift in Form einer ROM- Maske bei der Herstellung des Rechnersystems einprogrammiert wird.16. Computer system according to one of the preceding claims, in which at least the part of the mapping rule stored in the non-volatile memory is programmed in the form of a ROM mask during the manufacture of the computer system.
17. Verfahren zum Ermitteln einer physikalischen Adresse aus einer virtuellen Adresse, mit folgenden Schritten: Erhalten einer virtuellen Adresse;17. A method for determining a physical address from a virtual address, comprising the following steps: Obtaining a virtual address;
Zugreifen (26) auf einen nicht-flüchtigen Speicher (12, 14), in dem zumindest ein Teil einer Abbildungsvorschrift gespeichert ist, über die die virtuelle Adresse einer physikalischen Adresse eindeutig zugeordnet ist;Accessing (26) a non-volatile memory (12, 14) in which at least part of a mapping rule is stored, via which the virtual address is uniquely assigned to a physical address;
Ermitteln (18a) der physikalischen Adresse unter Verwendung zumindest des Teils der in dem nicht-flüchtigen Speicher gespeicherten Abbildungsvorschrift; undDetermining (18a) the physical address using at least a portion of the mapping rule stored in the non-volatile memory; and
Ausgeben der ermittelten physikalischen Adresse.Output of the determined physical address.
18. Verfahren nach Anspruch 17, bei dem die Abbildungsvorschrift hierarchisch als Baum mit Knoten (414, 418, 422, 426, 430, 434) strukturiert ist, wobei der Baum einen Wurzelknoten (414), zumindest einen Zwischenknoten (418, 422, 426, 430) und einen Endknoten (434) aufweist,18. The method according to claim 17, wherein the mapping rule is structured hierarchically as a tree with nodes (414, 418, 422, 426, 430, 434), the tree being a root node (414), at least one intermediate node (418, 422, 426) , 430) and an end node (434),
bei dem für einen Knoten eine Liste in dem nicht-flüchtigen Speicher gespeichert ist, wobei die Liste eines Knotens Einträge aufweist, wobei ein Eintrag einen Eintragsindex und einen Zeiger (424, 428, 432, 436) auf eine physikalische Adres- se aufweist, wobei der Zeiger für die physikalische Adresse auf eine physikalische Adresse des nicht-flüchtigen Speichers zeigt, mit der eine Liste für einen anderen Knoten des Baums wiedergewonnen werden kann,in which a list for a node is stored in the non-volatile memory, the list of a node having entries, an entry having an entry index and a pointer (424, 428, 432, 436) to a physical address, where the pointer for the physical address points to a physical address of the non-volatile memory, with which a list can be retrieved for another node of the tree,
bei dem die virtuelle Adresse (400) in Abschnitte (402, 404, 406, 408, 410) gegliedert ist, wobei für den Wurzelknoten (414), den zumindest einen Zwischenknoten (418, 422, 426, 430) und den Endknoten (434) je ein Abschnitt vorhanden ist, wobei der Abschnitt (402, 404, 406, 408, 410) einen Listen- eintrag einer zugehörigen Liste identifiziert, und bei dem der Schritt des Ermitteins folgende Schritte aufweist :in which the virtual address (400) is divided into sections (402, 404, 406, 408, 410), whereby for the root node (414), the at least one intermediate node (418, 422, 426, 430) and the end node (434 ) there is one section each, the section (402, 404, 406, 408, 410) identifying a list entry of an associated list, and where the step of determining comprises the following steps:
Extrahieren eines Abschnitts (410) für den Wurzelknoten aus der virtuellen Adresse (400) ;Extracting a section (410) for the root node from the virtual address (400);
Zugreifen auf eine Liste (414), die dem extrahierten Abschnitt (410) der virtuellen Adresse zugeordnet ist, um einen Zeiger (416) auf eine physikalische Adresse einer Liste für einen Zwischenknoten zu erhalten;Accessing a list (414) associated with the extracted portion (410) of the virtual address to obtain a pointer (416) to a physical address of a list for an intermediate node;
Extrahieren eines Abschnitts (408) aus der virtuellen Adresse (400) für den Zwischenknoten;Extracting a section (408) from the virtual address (400) for the intermediate node;
Zugreifen auf einen Eintrag in die Liste unter Verwendung des extrahierten Abschnitts (408), um einen Zeiger (424) auf eine physikalische Adresse wiederzugewinnen, an der eine Liste (426) für einen niedrigeren Abschnitt gespeichert ist; undAccessing an entry in the list using the extracted section (408) to retrieve a pointer (424) to a physical address where a list (426) for a lower section is stored; and
Wiederholen der Schritte des Extrahierens und Zugreifens, bis sämtliche Abschnitte der virtuellen Adresse abgearbeitet sind, um unter Verwendung der Liste für den Endknoten und eines Abschnitts (402) der virtuellen Adresse für den Endknoten die physikalische Adresse (440) zu ermitteln, die der virtu- eilen Adresse (400) zugeordnet ist. Repeating the extracting and accessing steps until all portions of the virtual address have been processed to use the list for the end node and a portion (402) of the virtual address for the end node to determine the physical address (440) that the virtual address rile address (400) is assigned.
PCT/EP2002/006146 2001-06-05 2002-06-04 Computer system having virtual addressing and method for determining a physical address from a virtual address WO2002099653A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
DE10127186A DE10127186A1 (en) 2001-06-05 2001-06-05 Computer system with virtual addressing has a hardware unit within the memory management unit for controlling access to physical memory, so that the computer itself can use virtual memory addresses
DE10127186.7 2001-06-05

Publications (1)

Publication Number Publication Date
WO2002099653A1 true WO2002099653A1 (en) 2002-12-12

Family

ID=7687202

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/EP2002/006146 WO2002099653A1 (en) 2001-06-05 2002-06-04 Computer system having virtual addressing and method for determining a physical address from a virtual address

Country Status (2)

Country Link
DE (1) DE10127186A1 (en)
WO (1) WO2002099653A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7719579B2 (en) 2005-05-24 2010-05-18 Zoran Corporation Digital camera architecture with improved performance

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5123101A (en) * 1986-11-12 1992-06-16 Xerox Corporation Multiple address space mapping technique for shared memory wherein a processor operates a fault handling routine upon a translator miss
US5255384A (en) * 1985-02-22 1993-10-19 Intergraph Corporation Memory address translation system having modifiable and non-modifiable translation mechanisms
WO1994027222A1 (en) * 1993-05-10 1994-11-24 Jochen Liedtke Process for converting a virtual store address with a first length into a real address with a second length
US6069638A (en) * 1997-06-25 2000-05-30 Micron Electronics, Inc. System for accelerated graphics port address remapping interface to main memory

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5897660A (en) * 1995-04-07 1999-04-27 Intel Corporation Method for managing free physical pages that reduces trashing to improve system performance
US5696927A (en) * 1995-12-21 1997-12-09 Advanced Micro Devices, Inc. Memory paging system and method including compressed page mapping hierarchy
US6223271B1 (en) * 1998-07-15 2001-04-24 Compaq Computer Corp. System and method for detecting system memory size using ROM based paging tables

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5255384A (en) * 1985-02-22 1993-10-19 Intergraph Corporation Memory address translation system having modifiable and non-modifiable translation mechanisms
US5123101A (en) * 1986-11-12 1992-06-16 Xerox Corporation Multiple address space mapping technique for shared memory wherein a processor operates a fault handling routine upon a translator miss
WO1994027222A1 (en) * 1993-05-10 1994-11-24 Jochen Liedtke Process for converting a virtual store address with a first length into a real address with a second length
US6069638A (en) * 1997-06-25 2000-05-30 Micron Electronics, Inc. System for accelerated graphics port address remapping interface to main memory

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BURNS D ET AL: "68020 coprocessors", ELECTRONICS & WIRELESS WORLD, JUNE 1987, UK, vol. 93, no. 1616, pages 614 - 616, XP002215219, ISSN: 0266-3244 *
WU M ET AL: "ENVY: A NON-VOLATILE, MAIN MEMORY STORAGE SYSTEM", ACM SIGPLAN NOTICES, ASSOCIATION FOR COMPUTING MACHINERY, NEW YORK, US, vol. 29, no. 11, 1 November 1994 (1994-11-01), pages 86 - 97, XP000491727, ISSN: 0362-1340 *

Also Published As

Publication number Publication date
DE10127186A1 (en) 2002-12-12

Similar Documents

Publication Publication Date Title
EP1393184B1 (en) Device and method for determining a physical address from a virtual address, using a hierarchical mapping rule comprising compressed nodes
DE69819686T2 (en) OBJECT AND METHOD FOR PROVIDING EFFICIENT MULTIPLE-USER ACCESS TO DISTRIBUTED OPERATING SYSTEM CORE CODE BY INSTANCING
DE2459006C2 (en) Device for forming an absolute address in a data processing system
DE69721590T2 (en) A RANGE BASED SIDE-TABLE-WALK-BIT USING METHOD AND DEVICE
DE3151745C2 (en)
DE4410060B4 (en) Translating device for converting a virtual memory address into a physical memory address
DE2423194C2 (en) Device for calculating an absolute main memory address in a data processing system
DE2515696C2 (en) Data processing system
DE69738101T2 (en) Management of access to objects using three-state references
DE2131066B2 (en) ARRANGEMENT FOR ADDRESSING A TABLE MEMORY
DE2835989A1 (en) ARRANGEMENT FOR CONVERTING A VIRTUAL ADDRESS INTO A PHYSICAL ADDRESS OF A DATA WORD
DE10002120A1 (en) Address converting buffer arrangement for address translation and address converting buffers has two dividing/partial units, a higher and lower address converting planes
WO1994027222A1 (en) Process for converting a virtual store address with a first length into a real address with a second length
EP1314135B1 (en) Method for virtually enlarging the stack of a portable data carrier
WO2000014631A2 (en) Method for linking on a chip card program modules swapped in the working memory of a processor
EP1352318B1 (en) Microprocessor circuit for portable data carriers
DE10120615B4 (en) Dynamic memory management for objects of different sizes
DE19848241B4 (en) Device and method for determining address equality and transmission control system
CH495584A (en) Data processing system
DE69937585T2 (en) A method for arbitrarily accessing a memory area of a digital processing device in a physical addressing mode and a virtual addressing mode and apparatus for performing the method
WO2002099653A1 (en) Computer system having virtual addressing and method for determining a physical address from a virtual address
DE3340956A1 (en) METHOD AND DEVICE FOR DETECTING MEMORY ACCESSES
EP1543411B1 (en) Processor with explicit information on information to be secured in sub-program branches
EP2284710A1 (en) Method for managing storage resources in a portable data carrier
EP1675010A2 (en) Method for updating translation look-aside buffer entries in a multiprocessor computer system

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): US

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE TR

121 Ep: the epo has been informed by wipo that ep was designated in this application
DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)