WO2019167360A1 - メモリ管理システム及びメモリ管理方法、並びに情報処理装置 - Google Patents

メモリ管理システム及びメモリ管理方法、並びに情報処理装置 Download PDF

Info

Publication number
WO2019167360A1
WO2019167360A1 PCT/JP2018/043086 JP2018043086W WO2019167360A1 WO 2019167360 A1 WO2019167360 A1 WO 2019167360A1 JP 2018043086 W JP2018043086 W JP 2018043086W WO 2019167360 A1 WO2019167360 A1 WO 2019167360A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory
cache
processor core
security state
security
Prior art date
Application number
PCT/JP2018/043086
Other languages
English (en)
French (fr)
Inventor
マムン カジ
Original Assignee
ソニー株式会社
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 ソニー株式会社 filed Critical ソニー株式会社
Priority to CN201880090079.8A priority Critical patent/CN111868700B/zh
Priority to KR1020207023718A priority patent/KR20200125596A/ko
Priority to US16/971,151 priority patent/US11392496B2/en
Priority to JP2020502806A priority patent/JPWO2019167360A1/ja
Publication of WO2019167360A1 publication Critical patent/WO2019167360A1/ja

Links

Images

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/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • 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/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0893Caches characterised by their organisation or structure
    • G06F12/0895Caches characterised by their organisation or structure of parts of caches, e.g. directory or tag array
    • 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/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0891Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using clearing, invalidating or resetting 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/1458Protection against unauthorised use of memory or access to memory by checking the subject access rights
    • G06F12/1491Protection against unauthorised use of memory or access to memory by checking the subject access rights in a hierarchical protection system, e.g. privilege levels, memory rings
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1052Security improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/50Control mechanisms for virtual memory, cache or TLB
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/65Details of virtual memory and virtual address translation
    • G06F2212/657Virtual address space management

Definitions

  • the technology disclosed in the present specification relates to a virtual address cache type memory management system, a memory management method, and an information processing apparatus.
  • a memory management unit In a general memory system, a memory management unit (MMU) is arranged between a processor and physical memory, and the MMU performs such address conversion on the entire virtual address space, thereby performing a process. In addition to realizing a virtual address space for each, a virtual memory exceeding the actual memory capacity is provided.
  • MMU memory management unit
  • memory hierarchization is performed. Specifically, a high-speed small-capacity memory is built in the same chip as the processor as the primary cache, and the next expensive but fast SRAM (Static Random Access Memory) is used as the secondary cache in the vicinity of the processor.
  • SRAM Static Random Access Memory
  • a physical address cache method for searching by a converted physical address there are a physical address cache method for searching by a converted physical address and a virtual address cache method for searching by a virtual address.
  • an MMU is disposed between a processor and a cache memory, and address conversion is performed each time the processor accesses the cache.
  • an MMU is placed between the cache memory and the main memory, and the processor refers to the cache memory using the virtual address, and the address conversion is performed by the MMU only when a cache miss occurs. As a result, access to the main memory occurs.
  • the physical address cache method In a memory system with a cache memory, the physical address cache method is the mainstream.
  • the physical address cache method has a problem in that power efficiency and circuit speed are reduced because address conversion processing in the MMU is executed each time the processor accesses the cache memory.
  • the virtual address cache method only when there is a cache miss, the address conversion and activation of the cache memory are executed in the MMU, so that power consumption is reduced. Therefore, the virtual address cache method is regarded as promising for ultra-low power consumption IoT (Internet Of Things) that must be operated for a long time with a battery and wearable devices in which low power consumption is indispensable.
  • IoT Internet Of Things
  • An object of the technology disclosed in the present specification is to provide a memory management system, a memory management method, and an information processing apparatus that efficiently protect data in a cache memory of a virtual address cache system.
  • the first aspect of the technology disclosed in this specification is: A cache memory for temporarily storing data requested for memory access from the processor core; A state storage unit that stores a security state communicated simultaneously with the memory access request from the processor core; A memory management unit that manages access to the main memory; A memory management system.
  • the cache memory is a virtual address cache system.
  • system here refers to a logical collection of a plurality of devices (or functional modules that realize specific functions), and each device or functional module is in a single housing. It does not matter whether or not.
  • the state storage unit includes either a tag memory in the cache memory, a register arranged separately from the tag memory in the cache memory, or a memory or a register mounted outside the cache line main body, The security state for each line of the cache memory is stored.
  • the memory management system performs cache flush of the hit cache line when the security state when the memory access is requested from the processor core does not match the security state stored in the state storage unit. It has become.
  • the memory management system performs a protection check by the memory management unit when the security state when the memory access is requested from the processor core does not match the security state stored in the state storage unit.
  • this memory access request is granted, access is made to the hit cache line and the security state stored in the state storage unit is updated.
  • the security state when the memory access is requested from the processor core does not match the security state stored in the state storage unit, but the difference is a predetermined value in the cache memory.
  • the security state stored in the state storage unit is updated.
  • the second aspect of the technology disclosed in this specification is: Reading the memory access requested data from the processor core from the main memory and temporarily storing it in the cache memory; A state storage step of storing a security state communicated simultaneously with the memory access request from the processor core; A control step of controlling access to the cache memory and the main memory based on a result of comparing a security state when a memory access request is made from the processor core with a security state stored in the state storage unit; Is a memory management method.
  • the third aspect of the technology disclosed in this specification is: A processor core, Main memory, A cache memory for temporarily storing data requested for memory access from the processor core; A state storage unit that stores a security state communicated simultaneously with the memory access request from the processor core; A memory management unit for managing access to the main memory; Is an information processing apparatus.
  • a memory management system a memory management method, and information processing that can realize protection of data in a cache memory of a virtual address cache system with a small amount of information stored in the cache memory.
  • An apparatus can be provided.
  • FIG. 1 is a diagram schematically illustrating a configuration example of a system including an embedded device.
  • FIG. 2 is a diagram illustrating a hardware configuration example of the sensing device 100.
  • FIG. 3 is a diagram schematically illustrating a configuration example of the virtual address cache type memory management system 1.
  • FIG. 4 is a diagram showing how the security state communicated simultaneously with the memory access request from the processor core 10 is stored in the cache memory 20.
  • FIG. 5 is a flowchart (first half) showing a processing procedure for controlling memory access in the memory management system 1.
  • FIG. 6 is a flowchart (second half) illustrating a processing procedure for controlling memory access in the memory management system 1.
  • FIG. 7 is a diagram showing an implementation example of the cache memory 20 configured to store the security state for each cache line in the tag bit.
  • FIG. 8 is a flowchart (first half) showing the deformability of the processing procedure for controlling memory access in the memory management system 1.
  • FIG. 9 is a flowchart (second half) showing a modification of the processing procedure for controlling memory access in the memory management system 1.
  • FIG. 10 is a flowchart (first half) showing another variation of the processing procedure for controlling memory access in the memory management system 1.
  • FIG. 11 is a flowchart (second half) showing another variation of the processing procedure for controlling memory access in the memory management system 1.
  • FIG. 12 is a diagram showing how permission information is copied from the MMU 30 to the cache memory 20.
  • Each piece of data handled by the processor may be set with permission information such as a security state or a protection attribute such as a user who is permitted to access or a permitted process (read, write, execute, etc.). In such a case, it is necessary to perform a permission check each time the processor accesses to protect the memory.
  • the MMU includes a translation lookaside buffer (TLB) that stores information for converting a virtual address to a physical address in units of pages, and holds permission information of the corresponding page as a page attribute for each entry of the TLB. be able to. Therefore, in the physical address cache method, a permission check can be easily performed every time the cache memory is accessed from the processor core.
  • TLB translation lookaside buffer
  • the MMU is arranged after the cache memory (described above). For this reason, when accessing the cache memory from the processor core, it is not possible to receive a permission check by the MMU, so it is necessary to protect the memory by another method (that is, a method that does not rely on the MMU).
  • the cache line size is smaller than the page size, which is the unit of address translation, so that the copied permission information has redundancy.
  • the page size is 16 Kbytes
  • the total capacity of the cache memory is 16 Kbytes
  • FIG. 1 schematically shows a configuration example of a system including an embedded device to which the memory management system disclosed in this specification can be applied.
  • the illustrated system includes a sensing device 100 corresponding to an embedded device, a base station 200, and a server 202 installed on a cloud 201.
  • the sensing device 100 can wirelessly connect to the base station 200 and access the server 202 via the cloud 201.
  • the sensing device 100 includes a CPU (Central Processing Unit) 101, an MMU 102, an SRAM (Static RAM (Random Access Memory)) 103, a memory such as a flash memory 104, a sensor 105, and a communication module 106, and is a device driven by a battery 107. is there.
  • a virtual address cache type cache memory (L1 cache or L2 cache) is arranged between the CPU 101 and the MMU 102, but is omitted in FIG. 1 for the sake of simplicity.
  • the battery 107 may be a rechargeable lithium ion battery or a non-chargeable battery.
  • the sensing device 100 is used by being worn by a wearer, for example.
  • the CPU 101 analyzes the wearer's behavior (stopped, walking, running, etc.) based on the detection signal of the sensor 105. Then, the analysis result is wirelessly transmitted from the communication module 106 to the base station 200 and recorded in the server 202 via the cloud 201.
  • the server 202 uses the data received from the sensing device 100 for monitoring the wearer.
  • FIG. 2 shows a hardware configuration example of the sensing device 100 as an example of an embedded device.
  • the CPU 101 is connected to the system bus 110 via the MMU 102.
  • devices such as an SRAM 103, a flash memory 104, a sensor 105, and a communication module 106 are connected.
  • the flash memory 104 stores, for example, data such as an application that estimates the wearer's behavior based on a signal from the sensor 105, a library used when executing the application, and a behavior estimation dictionary for estimating the wearer's behavior. Storing.
  • the sensor 105 includes one or more sensor devices such as an acceleration sensor, an atmospheric pressure sensor, a gyro, a GPS (Global Positioning System), a TOF (Time Of Flight) image distance sensor, and a LIDAR (Light Detection and Ranging) sensor. .
  • the physical address space in which these devices connected to the system bus 110 are arranged is a target of address conversion by the MMU 102.
  • the SRAM 103 is arranged, and the flash memory 104 is arranged so that the contents can be directly seen from the CPU 101 or the MMU 102, or the I / O of various sensor devices included in the communication module 106 or the sensor 105.
  • O port is arranged.
  • the sensing device 100 must operate for a long time with the battery 107, and reduction of power consumption is indispensable. Therefore, a virtual address cache system in which address translation in the MMU is executed only when a cache miss occurs is applied to improve power efficiency.
  • FIG. 3 schematically shows a configuration example of the virtual address cache type memory management system 1 applied in the sensing device 100.
  • the illustrated memory management system 1 includes a processor core 10, a cache memory 20, a memory management unit (MMU) 30, and a main memory 40 as a physical memory.
  • MMU memory management unit
  • the cache memory 20 is a virtual address cache method, and the processor 10 accesses the cache memory 20 using the virtual address.
  • the cache memory 20 may be either an L1 cache or an L2 cache.
  • the cache memory 20 When the virtual address requested from the processor core 10 has a cache hit, the cache memory 20 performs a read or write operation on the corresponding cache line. When the virtual address requested from the processor core 10 causes a cache miss, the cache memory 20 makes a memory request to the MMU 30 using the virtual address. Details of the memory access control flow of the cache memory 20 and the MMU 30 will be described later.
  • the MMU 30 includes a translation lookaside buffer (TLB) 31 and a page walk mechanism 32.
  • TLB 31 is used to have information for converting a virtual address to a physical address in units of pages.
  • the page walk mechanism 32 has a function of referring to the page table 41 arranged on the main memory. In the page table 41, the correspondence between virtual addresses and physical addresses is described in units of pages.
  • the MMU 30 uses the information of the entry to perform virtual The address is converted into a physical address, and the main memory 40 is accessed using the converted physical address.
  • the page walk mechanism 32 searches the page table 41 to request The information on the physical address of the page corresponding to the virtual address thus obtained is found, and a new entry for mapping the virtual address and the physical address requested to be accessed is created in the TLB 31. Thereafter, the MMU 30 can perform address conversion processing again to convert the requested virtual address into a physical address.
  • the permission information of the corresponding page is held as the page attribute for each TLB entry, so that when the processor core accesses the cache memory, the MMU performs a permission check and is permitted. Only when the address conversion is performed, data protection can be realized at the time of address conversion.
  • the virtual address cache method since the processor core can directly access the cache memory without going through the MMU, when the processor core accesses the cache memory, the MMU cannot receive a permission check. For this reason, it is necessary to protect the memory by a method that does not rely on the MMU (described above).
  • the permission information stored as the page attribute in the corresponding TLB entry in the TLB 31 is stored in the cache as shown in FIG. There is a method of copying to each line in the memory 20.
  • the security status of the process is transmitted to the cache memory 20 simultaneously with the requested virtual address.
  • the process type whether it is “developer” or “proprietary” or the mode of the process (“user” mode or “privileged” mode)
  • 8 combinations of a plurality of parameters related to security such as permitted processing (read, write, etc.) are expressed by 3-bit information.
  • the permission information of the corresponding page is held for each entry of the TLB 31.
  • the permission information includes the memory access authority (that is, whether access is permitted or the memory is protected) for each of the above eight security states, that is, a total of 8 bits, that is, 8 It is expressed by flags A to H.
  • permission information corresponding to the security state for the corresponding physical page includes eight flags A to H indicating whether or not memory access is possible. It is held in the form. For example, the flag A indicates whether the memory access to the corresponding page with respect to the security state (developer, user, read) is 1 or 0.
  • the flag B indicates whether or not memory access to the corresponding page with respect to the security state (developer, user, write) is performed
  • the flag C indicates whether or not memory access to the corresponding page with respect to the security state (developer, private, read) is possible. ing.
  • 8-bit permission information flags A to H relating to data in the corresponding page is copied into the cache memory 20 for each cache line.
  • the cache memory 20 corresponds to the security state in which the processor core 10 communicates simultaneously with the memory access request among the 8-bit permission information copied from the MMU 30.
  • the flag can be referenced to determine whether to allow memory access or protect the memory. For example, when a process executing in the security state “A” makes a memory access request, the MMU 30 refers to the flag “A” in the permission information held in the TLB entry corresponding to the requested virtual address, and accesses It can be determined whether or not.
  • each entry in the TLB 31 of the MMU 30 includes 8-bit permission information (flags A to B) related to data in the corresponding page, together with information (T) for converting virtual addresses to physical addresses in units of pages.
  • H) is held as a page attribute.
  • the page size is 16 Kbytes
  • the total capacity of the cache memory 20 is 16 Kbytes, even if all the data in the cache memory 20 is the same page data, the same permission information
  • the memory capacity for 1024 ⁇ 8 bits must be held in the cache memory 20 for copying, which is redundant.
  • the capacity having a copy of the permission information for the line in the cache memory 20 is increased.
  • the line size of the cache memory 20 is smaller than the page size, which is a unit of normal address conversion, redundancy occurs in the copied information.
  • a sideband signal (in the reverse direction) and a control circuit for transmitting permission information from the MMU 30 to the cache memory 20 are required.
  • FIG. 4 shows how the security state communicated simultaneously with the memory access request from the processor core 10 is stored in the cache memory 20 in units of cache lines.
  • the security status of the process is transmitted to the cache memory 20 simultaneously with the requested virtual address.
  • the process type (whether it is “developer” or “proprietary”) or the mode of the process (“user” mode or “privileged” mode)
  • 8 combinations of a plurality of parameters related to security such as permitted processing (read, write, etc.) are expressed by 3-bit information.
  • the cache memory 20 stores 3-bit information related to the security state in association with the cache line requested to be accessed. However, it is assumed that the processor core 10 and the cache memory 20 are connected by a 3-bit sideband signal for communicating a security state together with an address bus for requesting memory access.
  • the permission information of the corresponding page is held for each entry of the TLB 31.
  • the permission information includes the memory access authority (that is, whether to permit access or protect the memory) for each of the above eight security states, that is, 8 bits in total, that is, 8 bits. It is expressed by the number of flags A to H.
  • permission information corresponding to the security state for the corresponding physical page includes eight flags A to H indicating whether or not memory access is possible. It is held in the form.
  • the flag A indicates whether the memory access to the corresponding page with respect to the security state (developer, user, read) is 1 or 0.
  • the flag B indicates whether or not memory access to the corresponding page with respect to the security state (developer, user, write) is performed
  • the flag C indicates whether or not memory access to the corresponding page with respect to the security state (developer, private, read) is possible. ing.
  • the processor core 10 When the processor core 10 that is executing a certain process makes a memory access request, the processor core 10 first accesses the cache memory 20. When the data referenced by the requested virtual address in the cache line is cached (cache hit), the security state stored in association with the cache line hit by the cache is communicated from the processor core 10 simultaneously with the memory access request. By comparing with the security state of the process to be performed, the processor core 10 can directly access the memory data cached in the cache memory 20 without going through the MMU 30. Only when a cache miss occurs, the permission reference function in the TLB 31 is used via the MMU 30.
  • Permission information for each page is expressed in 8 bits (as described above), whereas the security status is expressed in 3 bits. Therefore, it can be understood that holding the security state for each cache line instead of the permission information can greatly reduce the memory capacity. Further, since the security state is transmitted to the cache memory 20 by a normal memory access request from the processor core 10, a reverse sideband signal and control circuit for holding the security state in the cache memory 20 are not required. .
  • the permission information for each security state is expressed by 1 bit. For example, “1” indicates that the security state is permitted, and “0” indicates that the security state is rejected.
  • permission information for each security state may be expressed by 2 bits or more. By assigning a larger number of bits, detailed system operations can be defined according to the level of unauthorized access. For example, by using 2 bits for the permission information of the security state “A”, detailed system operations as shown in Table 1 below can be defined.
  • a method of expanding a tag area associated with each cache line, a method of mounting a register or a memory different from the tag, the cache memory 20 In addition to the above, a method for mounting a register or a memory for holding a security state for each cache line can be used.
  • FIGS. 5 and 6 show a processing procedure for controlling memory access in the virtual address cache type memory management system 1 in the form of a flowchart.
  • the cache memory 20 is configured to store the security state in units of cache lines.
  • the processing steps performed by the MMU 30 are painted in gray, and the other processing steps are performed in the cache memory 20.
  • This processing procedure is started in response to a memory access request issued from the processor core 10.
  • the cache memory 20 is searched to check whether a cache line corresponding to the virtual address requested from the processor core 10 exists, that is, whether a cache hit occurs (step S501).
  • step S501 If there is a cache hit (Yes in step S501), it is further checked whether the security status communicated simultaneously with the memory access request is the same as the security status stored in the hit cache line (step S502).
  • step S503 If there is no change in the security state (Yes in step S502), a read process or a write process is executed for the cache line in accordance with the memory access request (step S503), and this process ends.
  • the data stored in the cache memory 20 can continue to be accessed without checking the permission by the MMU 30 as long as the security state of the process of the processor core 10 does not change.
  • step S502 when there is a change in the security state (No in step S502), if the cache hit line is “dirty”, that is, the cache line data is updated (Yes in step S504), the cache line is stored. In the security state, writing back to the main memory 40 is performed (step S505). In other words, when there is a change in the security state requested by the memory access from the processor core 10, a cache flush is performed regardless of whether or not the data has been updated.
  • step S506 If the virtual address requested from the processor core 10 has a cache miss (No in step S501), it is checked whether the cache memory 20 is full and needs to be replaced (step S506). If replacement is necessary (step S506 Yes), data to be discarded, that is, a cache line to be sacrificed is determined according to a predetermined replacement algorithm. When the victim line is “dirty”, that is, when the data is updated (Yes in step S507), the data of the victim line is written to the main memory 40 in the security state stored for the victim line. Returning is performed (step S508).
  • the MMU 30 When the virtual address requested from the processor core 10 has a cache miss (No in step S501) or when the security status of the processing of the processor core 10 has changed (No in step S502), the MMU 30 The virtual address is converted into a physical address with reference to the permission information of the corresponding entry in the TLB 31, and it is checked whether or not the memory access request of the processor core 10 is permitted (step S509).
  • the MMU 30 sets a flag corresponding to the security state in which the processor core 10 communicates at the same time as the memory access request among the 8-bit permission information stored in the TLB entry corresponding to the requested virtual address. By reference, it can be determined whether to allow memory access or protect the memory (described above).
  • Step S509 when the MMU 30 permits the memory access request of the processor core 10 (Yes in Step S509), the data is read from the corresponding physical address of the main memory 40 (Step S510). Then, the read data is written to an empty line or victim line on the cache memory 20 (step S511). In addition, the tag information of the cache line is updated, the security state of the data written to the cache line is stored in the tag (step S512), and this process is terminated.
  • the MMU 30 If the memory access request of the processor core 10 is not permitted (No in step S509), the MMU 30 returns a protection error to the processor core 10 that is the access request source (step S513), and ends this processing. .
  • the protection of data in the cache memory 20 of the virtual address cache method can be realized by storing a small amount of information called a security state in the cache memory 20. it can.
  • the data stored once in the cache memory 20 after the occurrence of a cache miss is the security status of the process executed on the processor core 10.
  • the MMU 30 can be used without permission check.
  • power efficiency and circuit speed in the memory management system 1 are improved.
  • the cache memory 20 detects it, flushes the minimum old data, and the processing at the time of a cache miss is executed again by the MMU 30. At that time, a permission check is also performed.
  • FIG. 7 shows an implementation example of the cache memory 20 configured to store the security state for each cache line in the tag bit.
  • a cache memory having a 1-way configuration is shown, but the configuration can be similarly made even if the cache memory has 2 ways or more.
  • the illustrated cache memory 20 includes a data array 71 composed of a set of cache lines and a tag array 72 composed of a tag memory for each cache line.
  • the data array 71 is composed of a data RAM consisting of 64 lines of 0 to 63 in one bank.
  • One line consists of 4 words.
  • One word is 32 bits, so one line consists of 128 bits.
  • the tag array 72 is composed of a tag RAM composed of a total of 64 tag memories of 0 to 63, each corresponding to each line of the data array 71.
  • One tag is composed of 22-bit tag bits.
  • a data RAM address is assigned to each line of the data array 71. Also.
  • a tag RAM address is assigned to each tag of the tag array 72. There is a correspondence between the data RAM address and the tag RAM address.
  • Each tag includes a Valid bit indicating whether the corresponding cache line is valid or invalid, and a Dirty bit indicating whether data on the cache line has been updated.
  • the tag assigns 3 bits to the security bit in order to further indicate the security state (Security state).
  • security of data in the cache memory can be realized with a granularity according to necessity. Furthermore, by combining an operating system and software, a high-level security model can be realized even in a processor core having only a simple security function.
  • Other methods for storing the security state for each cache line in the cache memory 20 include a method of mounting a register or memory different from the tag, and a register for holding the security state for each cache line outside the cache line.
  • a method of mounting a memory can be cited (none of them are shown).
  • bit compression is also possible when storing the security status for each cache line.
  • 3 bits are assigned to the security state.
  • the security state may be compressed to 2 bits and stored.
  • Such compression / decompression processing can be implemented using either or both of hardware and software.
  • the corresponding cache line is not immediately flushed to the MMU 30.
  • a modification in which only the protection check is required is also possible. According to this modified example, if the result of the protection check by the MMU 30 is access permission, the cache flush can be omitted only by updating the security state stored in the cache memory 20.
  • FIG. 8 and FIG. 9 show a modified example of the processing procedure for controlling the memory access in the memory management system 1 in the form of a flowchart.
  • the cache flush can be omitted simply by updating the security status stored in the cache memory 20. it can.
  • the cache memory 20 is configured to store the security state in units of cache lines.
  • the processing steps performed by the MMU 30 are painted in gray, and the other processing steps are performed in the cache memory 20.
  • This processing procedure is started in response to a memory access request issued from the processor core 10.
  • the cache memory 20 is searched to check whether a cache line corresponding to the virtual address requested from the processor core 10 exists, that is, whether a cache hit occurs (step S801). If a cache hit occurs (Yes in step S801), it is further checked whether the security status communicated simultaneously with the memory access request is the same as the security status stored in the hit cache line (step S802). If there is no change in the security state (Yes in step S802), a read process or a write process is executed for the cache line in accordance with the memory access request (step S803), and this process ends.
  • the MMU 30 refers to the permission information of the corresponding entry in the TLB 31, converts the virtual address into a physical address, and requests the memory access from the processor core 10 Is checked (step S814).
  • step S814 When the MMU 30 permits the memory access request of the processor core 10 (Yes in step S814), after executing the read process or the write process for the cache line (step S815), the data written to the cache line The security state is stored in the tag (step S816), and this process ends.
  • the cache flush can be performed only by updating the security state stored in the tag. It is supposed to be omitted.
  • the cache hit line is “dirty”, that is, the cache line data is updated (Yes in step S804). Writing back to the main memory 40 is performed in the security state stored for the cache line (step S805).
  • step S806 If the virtual address requested from the processor core 10 has a cache miss (No in step S801), it is checked whether the cache memory 20 is full and needs to be replaced (step S806). If replacement is necessary (Yes in step S806), data to be discarded, that is, a cache line to be sacrificed is determined according to a predetermined replacement algorithm. When the victim line is “dirty”, that is, when the data is updated (Yes in step S807), the data of the victim line is written to the main memory 40 in the security state stored for the victim line. Returning is performed (step S808).
  • step S801 When the virtual address requested from the processor core 10 has a cache miss (No in step S801), or when the security status of the processing of the processor core 10 has changed (No in step S802), the MMU 30 Then, referring to the permission information of the corresponding entry in the TLB 31, the virtual address is converted into a physical address and it is checked whether the memory access request of the processor core 10 is permitted (step S809).
  • the MMU 30 refers to the flag corresponding to the security state that the processor core 10 communicated with at the same time as the memory access request, among the 8-bit permission information stored in the TLB entry corresponding to the requested virtual address. Thus, it is possible to determine whether to permit memory access or protect the memory (described above).
  • Step S810 when the MMU 30 permits the memory access request of the processor core 10 (Yes in Step S809), the data is read from the corresponding physical address of the main memory 40 (Step S810). Then, the read data is written to an empty line or victim line on the cache memory 20 (step S811). In addition, the tag information of the cache line is updated and step S812), the security state of the data written to the cache line is stored in the tag (step S816), and this process is terminated.
  • the MMU 30 If the memory access request of the processor core 10 is not permitted (No in step S809), the MMU 30 returns a protection error to the processor core 10 that is the access request source (step S813), and ends this process. .
  • the default rule is stored inside the cache memory 20.
  • a modification in which the permission determination is performed according to the rule is also possible. According to this modification, the corresponding cache line is not immediately flushed, and it is not necessary to request only the protection check from the MMU 30.
  • the security state (developer, user, write) is already permitted by the MMU 30, there is a predetermined rule that permits (developer, user, read).
  • the security state communicated from the processor core 10 at the same time as the memory access request is (developer, user, write)
  • the security state stored in the cache line that hits the memory access request is (Developer, user, read), which do not match, but without performing a permission check or cache flush by the MMU 30, the hit cache line is accessed and only the security state update stored in the tag is updated. Do. It is not necessary to perform a protection check by the MMU 30, and the corresponding cache line is not flushed immediately.
  • the default rule may be to allow memory access requests in a higher security level.
  • “proprietary” is a security state with higher authority than “developer”
  • “privileged” is a security state with higher authority than “user”. Even if the security status communicated simultaneously with the memory access request from the processor core 10 does not match the security status stored in the cache memory 20, if the authority is higher, the hit status The cache line is accessed and only the security state stored in the tag is updated. There is no need to perform a protection check by the MMU 30. Of course, the corresponding cache line is not flushed immediately.
  • the access control function to the cache memory 20 based on such a predetermined rule can be implemented by hardware or software, or a combination of hardware and software.
  • FIGS. 10 and 11 show a modified example of the processing procedure for controlling memory access in the memory management system 1 in the form of a flowchart.
  • the security states do not match, access to the cache memory 20 is controlled according to a predetermined rule in which the changed security state exists in the cache memory 20.
  • the cache flush can be omitted simply by updating the security state stored in the cache memory 20.
  • the cache memory 20 is configured to store the security state in units of cache lines. Further, in the flowcharts shown in FIGS. 10 and 11, processing steps performed by the MMU 30 are painted in gray, and other processing steps are performed in the cache memory 20.
  • This processing procedure is started in response to a memory access request issued from the processor core 10.
  • the cache memory 20 is searched to check whether a cache line corresponding to the virtual address requested from the processor core 10 exists, that is, whether a cache hit occurs (step S1001). If a cache hit occurs (Yes in step S1001), it is further checked whether the security status communicated simultaneously with the memory access request is the same as the security status stored in the hit cache line (step S1002). If there is no change in the security state (Yes in step S1002), a read process or a write process is executed on the cache line in accordance with the memory access request (step S1003), and this process ends.
  • step S1002 when there is a change in the security state (No in step S1002), it is checked whether the changed security state satisfies a predetermined rule existing in the cache memory 20 (step S1014). For example, it is checked whether the security status when the memory access request is issued from the processor core 10 is higher than the security status stored in the cache line hit in the cache memory 20.
  • step S1014 If the change in the security state satisfies the predetermined rule (Yes in step S1014), after executing the read process or the write process on the cache line (step S1015), the security state of the data written to the cache line Is stored in the tag (step S1016), and the process is terminated.
  • the security state stored in the tag is updated if it is determined to permit according to a predetermined rule existing in the cache memory 20. Only the cache flush is to be omitted.
  • the cache hit line is “dirty”, that is, the cache line data is updated (Yes in step S1004). Writing back to the main memory 40 is performed in the security state stored for the cache line (step S1005).
  • step S1006 If the virtual address requested from the processor core 10 has a cache miss (No in step S1001), it is subsequently checked whether the cache memory 20 is full and needs to be replaced (step S1006). If replacement is necessary (step S1006 Yes), data to be discarded, that is, a cache line to be sacrificed is determined according to a predetermined replacement algorithm. When the victim line is “dirty”, that is, when the data is updated (Yes in step S1007), the data of the victim line is written to the main memory 40 in the security state stored for the victim line. Returning is performed (step S1008).
  • step S1001 When the virtual address requested from the processor core 10 has a cache miss (No in step S1001), or when the security status of the processing of the processor core 10 has changed (No in step S1002), the MMU 30 Then, referring to the permission information of the corresponding entry of the TLB 31, the virtual address is converted into a physical address, and it is checked whether or not the memory access request of the processor core 10 is permitted (step S1009).
  • the MMU 30 refers to the flag corresponding to the security state that the processor core 10 communicated with at the same time as the memory access request among the 8-bit permission information stored in the TLB entry corresponding to the requested virtual address. Thus, it is possible to determine whether to permit memory access or protect the memory (described above).
  • Step S1010 when the MMU 30 permits the memory access request of the processor core 10 (Yes in Step S1009), the data is read from the corresponding physical address of the main memory 40 (Step S1010). Then, the read data is written into an empty line or victim line on the cache memory 20 (step S1011). In addition, the tag information of the cache line is updated and step S1012), the security state of the data written to the cache line is stored in the tag (step S1016), and the process is terminated.
  • the MMU 30 If the memory access request of the processor core 10 is not permitted (No in step S1009), the MMU 30 returns a protection error to the processor core 10 that is the access request source (step S1013), and ends this processing. .
  • the memory management system 1 can also be configured to automatically detect the change and omit the cache flush by software.
  • the memory management system 1 can reduce the amount of information to be stored in the cache memory 20 in order to protect the data in the cache memory 20. Therefore, expensive memory resources (flip-flops or SRAMs) used for the tag memory can be reduced.
  • the technology disclosed in this specification can be easily realized only by changing the design of the cache line, and a sideband signal (for copying permission information) is added to a bus connecting the cache memory 20 and the MMU 30. There is no need to change the design of the MMU 30.
  • the technology disclosed in this specification it is possible to reduce memory resources and control circuits for protecting data in the cache memory in the virtual address cache method, and to improve power efficiency. is there. Therefore, the technology disclosed in this specification can be suitably applied to ultra-low power consumption IoT and wearable devices.
  • the memory management technology disclosed in this specification is applied to, for example, an embedded device having only a small-capacity memory, and data protection in the cache memory of the virtual address cache method is realized with less information stored in the cache memory can do.
  • the memory management technique disclosed in this specification can be applied to various types of information processing apparatuses that are equipped with a normal or large-capacity memory and adopt a virtual address cache system.
  • a cache memory for temporarily storing data requested for memory access from the processor core;
  • a state storage unit that stores a security state communicated simultaneously with the memory access request from the processor core;
  • a memory management unit that manages access to the main memory;
  • a memory management system comprising: (2)
  • the state storage unit stores a security state in units of cache lines of the cache memory.
  • the memory management system according to (1) above.
  • the state storage unit may be a tag memory in the cache memory, a register arranged separately from the tag memory in the cache memory, or a memory or a register mounted outside the cache line main body. And storing the security status for each line of the cache memory,
  • the memory management system according to any one of (1) and (2) above.
  • the cache flush of the hit cache line is performed.
  • the memory management system according to any one of (1) to (5) above.
  • a protection check is performed by the memory management unit, and the memory access request is permitted. If it is, the access to the hit cache line is performed and the security state stored in the state storage unit is updated.
  • the memory management system according to any one of (1) to (5) above.
  • the cache hit Performing access to the line and updating the security state stored in the state storage unit;
  • the memory management system according to any one of (1) to (5) above.
  • the cache memory is a virtual address cache system. The memory management system according to any one of (1) to (9) above.
  • (11) a step of reading data requested for memory access from the processor core from the main memory and temporarily storing it in the cache memory;
  • a memory management method (11-1) In the control step, if the security state when the memory access is requested from the processor core does not match the security state stored in the state storage unit, a cache flush of the hit cache line is performed.
  • a processor core Main memory, A cache memory for temporarily storing data requested for memory access from the processor core; A state storage unit that stores a security state communicated simultaneously with the memory access request from the processor core; A memory management unit for managing access to the main memory;
  • An information processing apparatus comprising:
  • SYMBOLS 1 Memory management system, 10 ... Processor core 20 ... Cache memory, 30 ... MMU 31 ... TLB, 32 ... Page walk mechanism 40 ... Main memory, 41 ... Page table 100 ... Sensing device 101 ... CPU, 102 ... MMU, 103 ... SRAM 104 ... Flash memory, 105 ... Sensor 106 ... Communication module, 107 ... Battery, 110 ... Bus 200 ... Base station, 201 ... Cloud, 202 ... Server

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Storage Device Security (AREA)

Abstract

仮想アドレスキャッシュ方式のキャッシュメモリ内のデータを効率的に保護するメモリ管理システムを提供する。 メモリ管理システムは、プロセッサコアからメモリアクセス要求されたデータを一時記憶するキャッシュメモリと、前記プロセッサコアからメモリアクセス要求と同時に通信されたセキュリティ状態を記憶する状態記憶部と、メインメモリへのアクセスを管理するメモリ管理ユニットを具備する。前記プロセッサコアからメモリアクセス要求した際、セキュリティ状態が変化している場合には、ヒットしたキャッシュラインのキャッシュフラッシュを実施する。

Description

メモリ管理システム及びメモリ管理方法、並びに情報処理装置
 本明細書で開示する技術は、仮想アドレスキャッシュ方式のメモリ管理システム及びメモリ管理方法、並びに情報処理装置に関する。
 一般的なメモリシステムにおいては、プロセッサと物理メモリの間にメモリ管理ユニット(Memory Management Unit:MMU)が配置され、MMUは、仮想アドレス空間全体に対してこのようなアドレス変換を行うことで、プロセス毎の仮想アドレス空間を実現するとともに、実メモリ容量以上の仮想メモリを提供する。
 また、プロセッサに対するメモリの速度不足を解消するために、メモリの階層化が行われている。具体的には、高速の小容量メモリを1次キャッシュとしてプロセッサと同一チップに内蔵し、次に高価であるが高速なSRAM(Static Random Access Memory)を2次キャッシュとしてプロセッサの近傍に、さらに比較的に低速であるが安価であるDRAM(Dynamic RAM)で構成されるメインメモリを配置する。
 ここで、プロセッサがキャッシュメモリを参照する方法として、変換後の物理アドレスで検索する物理アドレスキャッシュ方式と、仮想アドレスで検索する仮想アドレスキャッシュ方式が挙げられる。物理アドレスキャッシュ方式を採用するメモリシステムでは、プロセッサとキャッシュメモリの間にMMUが配置され、プロセッサがキャッシュにアクセスする度にアドレス変換が実施される。また、仮想アドレスキャッシュ方式を採用するメモリシステムでは、キャッシュメモリとメインメモリの間にMMUが配置され、プロセッサは仮想アドレスを使ってキャッシュメモリを参照し、キャッシュミスした場合のみMMUによりアドレス変換が実施されてメインメモリへのアクセスが発生する。
 キャッシュメモリを持つメモリシステムにおいては、物理アドレスキャッシュ方式が主流である。しかしながら、物理アドレスキャッシュ方式は、プロセッサからキャッシュメモリにアクセスする度に、MMUにおけるアドレス変換の処理が実行されるため、電力効率と回路速度が低下するという問題がある。
 これに対し、仮想アドレスキャッシュ方式では、キャッシュミスした場合のみMMUにおけるアドレス変換とキャッシュメモリの活性化が実行されるので、消費電力が削減される。したがって、バッテリで長期間稼働しなければならない超低消費電力IoT(Internet Of Things)や、低消費電力化が不可欠なウェアラブルデバイスに対しては、仮想アドレスキャッシュ方式が有力視される。
特開2014-78248号公報 特開2006-155516号公報
 本明細書で開示する技術の目的は、仮想アドレスキャッシュ方式のキャッシュメモリ内のデータを効率的に保護するメモリ管理システム及びメモリ管理方法、並びに情報処理装置を提供することにある。
 本明細書で開示する技術の第1の側面は、
 プロセッサコアからメモリアクセス要求されたデータを一時記憶するキャッシュメモリと、
 前記プロセッサコアからメモリアクセス要求と同時に通信されたセキュリティ状態を記憶する状態記憶部と、
 メインメモリへのアクセスを管理するメモリ管理ユニットと、
を具備するメモリ管理システムである。前記キャッシュメモリは仮想アドレスキャッシュ方式である。
 但し、ここで言う「システム」とは、複数の装置(又は特定の機能を実現する機能モジュール)が論理的に集合した物のことを言い、各装置や機能モジュールが単一の筐体内にあるか否かは特に問わない。
 前記状態記憶部は、前記キャッシュメモリ内のタグメモリ、前記キャッシュメモリ内でタグメモリとは別に配置されたレジスタ、又は、キャッシュライン本体の外に実装されたメモリ又はレジスタのいずれかからなり、前記キャッシュメモリのライン毎のセキュリティ状態を記憶する。
 第1の側面に係るメモリ管理システムは、前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態と一致しない場合は、ヒットしたキャッシュラインのキャッシュフラッシュを実施するようになっている。
 あるいは、第1の側面に係るメモリ管理システムは、前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態と一致しない場合は、前記メモリ管理ユニットによるプロテクションチェックを実施して、このメモリアクセス要求が許可された場合には、ヒットしたキャッシュラインへのアクセスを実施するとともに前記状態記憶部に記憶したセキュリティ状態を更新するようになっている。
 あるいは、第1の側面に係るメモリ管理システムは、前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態と一致しないが、その相違が前記キャッシュメモリ内部の既定のルールを満たす場合には、ヒットしたキャッシュラインへのアクセスを実施するとともに前記状態記憶部に記憶したセキュリティ状態を更新するようになっている。
 また、本明細書で開示する技術の第2の側面は、
 プロセッサコアからメモリアクセス要求されたデータをメインメモリから読み出してキャッシュメモリに一時記憶するステップと、
 前記プロセッサコアからメモリアクセス要求と同時に通信されたセキュリティ状態を記憶する状態記憶ステップと、
 前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態と比較した結果に基づいて、前記キャッシュメモリ及び前記メインメモリへのアクセスを制御する制御ステップと、
を有するメモリ管理方法である。
 また、本明細書で開示する技術の第3の側面は、
 プロセッサコアと、
 メインメモリと、
 前記プロセッサコアからメモリアクセス要求されたデータを一時記憶するキャッシュメモリと、
 前記プロセッサコアからメモリアクセス要求と同時に通信されたセキュリティ状態を記憶する状態記憶部と、
 前記メインメモリへのアクセスを管理するメモリ管理ユニットと、
を具備する情報処理装置である。
 本明細書で開示する技術によれば、仮想アドレスキャッシュ方式のキャッシュメモリ内のデータの保護を、キャッシュメモリ内に記憶する少ない情報で実現することができるメモリ管理システム及びメモリ管理方法、並びに情報処理装置を提供することができる。
 なお、本明細書に記載された効果は、あくまでも例示であり、本発明の効果はこれに限定されるものではない。また、本発明が、上記の効果以外に、さらに付加的な効果を奏する場合もある。
 本明細書で開示する技術のさらに他の目的、特徴や利点は、後述する実施形態や添付する図面に基づくより詳細な説明によって明らかになるであろう。
図1は、組み込み機器を含むシステムの構成例を模式的に示した図である。 図2は、センシングデバイス100のハードウェア構成例を示した図である。 図3は、仮想アドレスキャッシュ方式のメモリ管理システム1の構成例を模式的に示した図である。 図4は、プロセッサコア10からのメモリアクセス要求と同時に通信されるセキュリティ状態をキャッシュメモリ20内に記憶する様子を示した図である。 図5は、メモリ管理システム1においてメモリアクセスを制御するための処理手順を示したフローチャート(前半)である。 図6は、メモリ管理システム1においてメモリアクセスを制御するための処理手順を示したフローチャート(後半)である。 図7は、キャッシュライン毎のセキュリティ状態をタグビットに保存するように構成されたキャッシュメモリ20の実装例を示した図である。 図8は、メモリ管理システム1においてメモリアクセスを制御するための処理手順の変形性を示したフローチャート(前半)である。 図9は、メモリ管理システム1においてメモリアクセスを制御するための処理手順の変形例を示したフローチャート(後半)である。 図10は、メモリ管理システム1においてメモリアクセスを制御するための処理手順の他の変形例を示したフローチャート(前半)である。 図11は、メモリ管理システム1においてメモリアクセスを制御するための処理手順の他の変形例を示したフローチャート(後半)である。 図12は、MMU30からキャッシュメモリ20へパーミッション情報をコピーする様子を示した図である。
 以下、図面を参照しながら本明細書で開示する技術の実施形態について詳細に説明する。
 プロセッサが扱う各データには、アクセスが許可されたユーザや、許可された処理(読み取り、書き込み、実行など)といった、セキュリティ状態若しくは保護属性といったパーミッション情報が設定されていることがある。このような場合、プロセッサがアクセスする度に、パーミッションチェックを実施して、メモリを保護する必要がある。
 例えば、MMUは、ページ単位で仮想アドレスから物理アドレスへ変換するための情報を格納するトランスレーションルックアサイドバッファ(TLB)を備え、このTLBのエントリ毎に該当ページのパーミッション情報をページ属性として保持することができる。したがって、物理アドレスキャッシュ方式では、プロセッサコアからキャッシュメモリにアクセスする度に、容易にパーミッションチェックを行うことができる。
 これに対し、仮想アドレスキャッシュ方式では、キャッシュメモリの後段にMMUが配置される(前述)。このため、プロセッサコアからキャッシュメモリにアクセスする際に、MMUによるパーミッションチェックを受けることができないので、別の方法(すなわち、MMUに頼らない方法)でメモリを保護する必要がある。
 例えば、キャッシュミスして、MMUを経由してキャッシュメモリにデータをキャッシュする際に、ラインデータのページ属性をキャッシュライン毎に記憶しておく処理システムについて提案がなされている(例えば、特許文献1を参照のこと)。この処理システムによれば、キャッシュヒットしたときにはキャッシュメモリ内にある情報に基づいてパーミッションチェックを行うことができるので、仮想アドレスキャッシュ方式において容易にメモリ保護を実現することができる。 
 しかしながら、この処理システムでは、キャッシュメモリ内のライン分のパーミッション情報のコピーを持つ容量が、キャッシュメモリ内に別途必要になる。通常、アドレス変換の単位であるページサイズよりもキャッシュのラインサイズは小さいので、コピーしたパーミッション情報に冗長性が生じる。例えば、キャッシュラインが16Byteで、ページサイズが16KByte、キャッシュメモリの総容量が16KByteというメモリ構成の場合、キャッシュメモリ内のすべてのデータが同一のページのデータであっても、1024個の同じパーミッション情報のコピーをキャッシュメモリ内に保持しなければならず、冗長である。
 また、この処理システムでは、MMUからキャッシュメモリへパーミッション情報を伝達するためのサイドバンド信号や制御回路が必要になると思料される。一般には、キャッシュメモリからMMUへの一方向の通信しか存在しないので、このようなサイドバンド回路や制御回路を設けると、MMUからキャッシュメモリへの情報通信のための回路コストが増加してしまう。
 また、アクセス権の変更を加えた際にキャッシュメモリの内容をフラッシュして、次回アクセス時にはキャッシュミスが発生し、必ず物理メモリよりデータを取得するように構成されるメモリ管理システムについて提案がなされている(例えば、特許文献2を参照のこと)。このメモリ管理システムによれば、アクセス権が変更した後は、MMU経由で正しくパーミッションチェックを行って、メインメモリからデータを取得することができる。しかしながら、このメモリ管理システムでは、外部信号によってキャッシュメモリのデータ全体を一度フラッシュして、メインメモリとの間で同期をとる必要がある。
 そこで、本明細書では、仮想アドレスキャッシュ方式のキャッシュメモリ内のデータの保護を、キャッシュメモリ内に記憶する少ない情報で実現することができるメモリ管理システムについて、以下に提案する。
 図1には、本明細書で開示するメモリ管理システムを適用可能な組み込み機器を含むシステムの構成例を模式的に示している。図示のシステムは、組み込み機器に相当するセンシングデバイス100と、基地局200と、クラウド201上に設置されたサーバ202で構成される。センシングデバイス100は、基地局200に無線接続して、クラウド201経由でサーバ202にアクセスすることができる。
 センシングデバイス100は、CPU(Central Processing Unit)101、MMU102、SRAM(Static RAM(Random Access Memory))103やフラッシュメモリ104などのメモリ、センサ105、通信モジュール106を備え、電池107で駆動する機器である。なお、CPU101とMMU102の間には、仮想アドレスキャッシュ方式のキャッシュメモリ(L1キャッシュ又はL2キャッシュ)が配置されるが、図1では図面の簡素化のため省略している。なお、電池107は、充電可能なリチウムイオン電池でもよいし、充電不可能な電池であってもよい。
 センシングデバイス100は、例えば装着者に装着して用いられる。CPU101は、センサ105の検出信号に基づいて装着者の行動(止まっている、歩いている、走っているなど)を解析する。そして、解析結果を通信モジュール106から基地局200へ無線送信し、クラウド201経由でサーバ202に記録される。サーバ202は、センシングデバイス100から受け取ったデータを、装着者の見守りなどに使用する。
 図2には、組み込み機器の一例としてのセンシングデバイス100のハードウェア構成例を示している。
 CPU101は、MMU102経由でシステムバス110に接続されている。また、システムバス110上には、SRAM103、フラッシュメモリ104、センサ105、通信モジュール106といったデバイスが接続されている。
 フラッシュメモリ104は、例えば、センサ105の信号に基づいて装着者の行動を推定するアプリケーションや、アプリケーションを実行する際に使用するライブラリ、装着者の行動を推定するための行動推定辞書などのデータを格納している。また、センサ105は、加速度センサ、気圧センサ、ジャイロ、GPS(Global Positioning System)、TOF(Time Of Flight)画像距離センサ、LIDAR(Light Detection and Ranging)センサなど、1以上のセンサデバイスで構成される。
 システムバス110に接続されたこれらデバイスが配置される物理アドレス空間が、MMU102によるアドレス変換の対象となる。この物理アドレス空間には、SRAM103が配置される他、フラッシュメモリ104がその内容がCPU101若しくはMMU102から直接見える形で配置されていたり、通信モジュール106や、センサ105に含まれる各種センサデバイスのI/Oポートが配置されていたりする。
 センシングデバイス100は、電池107で長時間稼働しなければならず、消費電力の削減が不可欠である。そこで、キャッシュミスした場合のみMMUにおけるアドレス変換が実行される仮想アドレスキャッシュ方式が適用され、電力効率の向上が図られている。
 図3には、センシングデバイス100において適用される、仮想アドレスキャッシュ方式のメモリ管理システム1の構成例を模式的に示している。図示のメモリ管理システム1は、プロセッサコア10と、キャッシュメモリ20と、メモリ管理ユニット(MMU)30と、物理メモリとしてのメインメモリ40で構成される。まず、メモリ管理システム1におけるメモリアクセス動作について、簡単に説明しておく。
 キャッシュメモリ20は、仮想アドレスキャッシュ方式であり、プロセッサ10は、仮想アドレスを使用してキャッシュメモリ20にアクセスする。但し、キャッシュメモリ20は、L1キャッシュ又はL2キャッシュのいずれであってもよい。
 キャッシュメモリ20は、プロセッサコア10から要求された仮想アドレスがキャッシュヒットした場合には、該当するキャッシュラインに対して読み取り又は書き込みの操作を実施する。また、プロセッサコア10から要求された仮想アドレスがキャッシュミスした場合には、キャッシュメモリ20は、MMU30に対して、仮想アドレスを使用してメモリ要求を行う。なお、キャッシュメモリ20及びMMU30のメモリアクセス制御フローの詳細については、後述に譲る。
 MMU30は、トランスレーションルックアサイドバッファ(TLB)31と、ページウォーク機構32を備えている。TLB31は、ページ単位で仮想アドレスから物理アドレスへ変換するための情報を持つために用いられる。また、ページウォーク機構32は、メインメモリ上に配置されたページテーブル41を参照する機能を備えている。ページテーブル41には、仮想アドレスと物理アドレスの対応関係が、ページ単位で記述されている。
 プロセッサコア10から要求された仮想アドレス(但し、キャッシュミスした場合)に対応するエントリがTLB31上で見つかった場合(すなわち、TLBヒットした場合)には、MMU30は、そのエントリの情報を用いて仮想アドレスを物理アドレスに変換して、その変換後の物理アドレスを使用してメインメモリ40にアクセスする。
 一方、プロセッサコア10から要求された仮想アドレスに対応するエントリがTLB31上で見つからなかった場合(すなわち、TLBミスした場合)には、ページウォーク機構32は、ページテーブル41上を探索して、要求された仮想アドレスに対応するページの物理アドレスの情報を見つけ出して、アクセス要求された仮想アドレスと物理アドレスをマッピングする新たなエントリをTLB31に作成する。その後、MMU30は、改めてアドレス変換処理を実施して、要求された仮想アドレスを物理アドレスに変換することができる。
 続いて、仮想アドレスキャッシュ方式のメモリ管理システム1におけるデータの保護について考察する。
 物理アドレスキャッシュ方式のキャッシュメモリにおいては、TLBのエントリ毎に該当ページのパーミッション情報をページ属性として保持することで、プロセッサコアからキャッシュメモリにアクセスする際に、MMUがパーミッションチェックを行い、許可された場合にのみアドレス変換を実施するようにして、アドレス変換時にデータの保護を実現することができる。これに対し、仮想アドレスキャッシュ方式では、プロセッサコアがMMUを介さずに直接キャッシュメモリにアクセスできるため、プロセッサコアからキャッシュメモリにアクセスする際に、MMUによるパーミッションチェックを受けることができない。このため、MMUに頼らない方法でメモリを保護する必要がある(前述)。
 例えば、キャッシュミスして、MMU30を経由してキャッシュメモリ20にデータをキャッシュする際に、図12に示すように、TLB31内の該当するTLBエントリにページ属性として格納されているパーミッション情報を、キャッシュメモリ20内の各ラインにコピーしておく方法が挙げられる。
 図12において、プロセッサコア10がメモリアクセス要求する際には、要求する仮想アドレスと同時に、プロセスのセキュリティ状態が、キャッシュメモリ20に伝達される。図示の例では、プロセスの種別(「developer」又は「proprietary」のいずれのプロセスであるか)、プロセスのモード(「user」モード又は「privileged(特権)」モードのいずれのモードで実行されているか)、許可された処理(読み取り(read)、書き込み(write)など)といった、セキュリティに関わる複数のパラメータの8通りの組み合わせを3bitの情報で表現している。
 一方、MMU30内では、TLB31のエントリ毎に該当ページのパーミッション情報を保持している。具体的には、パーミッション情報は、上記の8通りのセキュリティ状態の各々に対するメモリアクセスの権限(すなわち、アクセスを許可するか又はメモリを保護するか)を、各1bitで合計8bit、すなわち8個のフラグA~Hで表現している。TLB31の各エントリでは、該当する仮想アドレスから物理アドレスへ変換するための情報(T)とともに、対応する物理ページに対するセキュリティ状態に応じたパーミッション情報がメモリアクセスの可否を表す8個のフラグA~Hという形態で保持されている。例えば、フラグAは、セキュリティ状態(developer,user,read)に対する該当ページへのメモリアクセスの可否を1又は0で示している。同様に、フラグBはセキュリティ状態(developer,user,write)に対する該当ページへのメモリアクセスの可否を示し、フラグCはセキュリティ状態(developer,privileged,read)に対する該当ページへのメモリアクセスの可否を示している。そして、図12に示す例では、キャッシュメモリ20内には、キャッシュライン毎に、該当するページ内のデータに関する8bitのパーミッション情報(フラグA~H)がコピーされる。
 あるプロセスを実行中のプロセッサコア10が、メモリアクセス要求したとき、キャッシュメモリ20は、MMU30からコピーした8bitのパーミッション情報のうち、プロセッサコア10がメモリアクセス要求と同時に通信してきたセキュリティ状態に対応するフラグを参照して、メモリアクセスを許可するか又はメモリを保護するかを判定することができる。例えば、セキュリティ状態「A」で実行しているプロセスがメモリアクセス要求したときには、MMU30は、要求された仮想アドレスに対応するTLBエントリで保持するパーミッション情報のうちフラグ「A」を参照して、アクセスの可否を判断することができる。
 図12に示す例では、MMU30のTLB31内の各エントリは、ページ単位で仮想アドレスから物理アドレスへ変換するための情報(T)とともに、該当するページ内のデータに関する8bitのパーミッション情報(フラグA~H)をページ属性として保持している。例えば、キャッシュラインが16Byteで、ページサイズが16KByte、キャッシュメモリ20の総容量が16KByteというメモリ構成の場合、キャッシュメモリ20内のすべてのデータが同一のページのデータであっても、同じパーミッション情報のコピーのために1024個×8bit分のメモリ容量をキャッシュメモリ20内に保持しなければならず、冗長である。
 要するに、図12に示したような、MMU30内のパーミッション情報をキャッシュメモリ20内にコピーすることによってメモリを保護する方法によれば、キャッシュメモリ20内のライン分のパーミッション情報のコピーを持つ容量が、キャッシュメモリ20内に別途必要になるという問題がある。また、通常アドレス変換の単位であるページサイズよりもキャッシュメモリ20のラインサイズは小さいので、コピーした情報に冗長性が生じる。さらに、MMU30からキャッシュメモリ20へパーミッション情報を伝達するための(逆方向の)サイドバンド信号や制御回路が必要になる。
 そこで、本実施形態では、ページ単位で定義されたパーミッション情報をキャッシュメモリ20内にコピーする方法(図12を参照のこと)に代えて、プロセッサコア10からのメモリアクセス要求と同時に通信されるセキュリティ状態を、キャッシュメモリ20内にキャッシュライン単位で記憶することで、仮想アドレスキャッシュ方式のキャッシュメモリ内のデータの保護を実現する。
 図4には、プロセッサコア10からのメモリアクセス要求時と同時に通信されるセキュリティ状態を、キャッシュメモリ20内にキャッシュライン単位で記憶する様子を示している。
 プロセッサコア10がメモリアクセス要求する際には、要求する仮想アドレスと同時に、プロセスのセキュリティ状態が、キャッシュメモリ20に伝達される。図示の例では、プロセスの種別(「developer」又は「proprietary」のいずれのプロセスであるか)、プロセスのモード(「user」モード又は「privileged(特権)」モードのいずれのモードで実行されているか)、許可された処理(読み取り(read)、書き込み(write)など)といった、セキュリティに関わる複数のパラメータの8通りの組み合わせを3bitの情報で表現している。キャッシュメモリ20は、セキュリティ状態に関する3bitの情報を、アクセス要求されたキャッシュラインに対応付けて記憶する。但し、プロセッサコア10とキャッシュメモリ20間は、メモリアクセス要求するアドレスバスとともに、セキュリティ状態を通信する3bitのサイドバンド信号で接続されているものとする。
 一方、MMU30内では、TLB31のエントリ毎に該当ページのパーミッション情報を保持している。図4に示す例では、パーミッション情報は、上記の8通りのセキュリティ状態の各々に対するメモリアクセスの権限(すなわち、アクセスを許可するか又はメモリを保護するか)を、各1bitで合計8bit、すなわち8個のフラグA~Hで表現している。TLB31の各エントリでは、該当する仮想アドレスから物理アドレスへ変換するための情報(T)とともに、対応する物理ページに対するセキュリティ状態に応じたパーミッション情報がメモリアクセスの可否を表す8個のフラグA~Hという形態で保持されている。
 例えば、フラグAは、セキュリティ状態(developer,user,read)に対する該当ページへのメモリアクセスの可否を1又は0で示している。同様に、フラグBはセキュリティ状態(developer,user,write)に対する該当ページへのメモリアクセスの可否を示し、フラグCはセキュリティ状態(developer,privileged,read)に対する該当ページへのメモリアクセスの可否を示している。
 あるプロセスを実行中のプロセッサコア10が、メモリアクセス要求したとき、プロセッサコア10は、まずキャッシュメモリ20にアクセスする。キャッシュラインに要求した仮想アドレスで参照されるデータがキャッシュされている場合(キャッシュヒット)、キャッシュヒットしたキャッシュラインに対応付けて記憶されているセキュリティ状態を、メモリアクセス要求と同時にプロセッサコア10から通信されるプロセスのセキュリティ状態と比較することで、プロセッサコア10は、MMU30を介することなく、キャッシュメモリ20にキャッシュされたメモリのデータに直接アクセスすることができる。キャッシュミスが発生した場合にのみ、MMU30を介してTLB31内のパーミッション参照機能が使われる。
 ページ毎のパーミッション情報が8bitで表現されるのに対し(前述)、セキュリティ状態は3bitで表現される。したがって、パーミッション情報の代わりにセキュリティ状態をキャッシュライン毎に保持することにより、大幅なメモリ容量の削減になる、ということを理解できよう。また、プロセッサコア10からの通常のメモリアクセス要求でセキュリティ状態がキャッシュメモリ20へ伝達されるので、キャッシュメモリ20内にセキュリティ状態を保持するための逆方向のサイドバンド信号や制御回路は不要である。
 上記の例では、セキュリティ状態毎のパーミッション情報を1ビットで表現するようになっている。例えば、「1」であればそのセキュリティ状態を許可し、「0」であればそのセキュリティ状態を拒否することを表す。その変形例として、セキュリティ状態毎のパーミッション情報を2ビット以上で表現するようにしてもよい。より多いビット数を割り当てることで、不正アクセスのレベルに応じて詳細なシステム動作を定義することができる。例えば、セキュリティ状態「A」のパーミッション情報に2bitを使用することで、以下の表1に示すような詳細なシステム動作を定義することができる。
Figure JPOXMLDOC01-appb-T000001
 なお、キャッシュライン毎のセキュリティ状態をキャッシュメモリ20内に記憶する方法として、各キャッシュラインに対応付けられたタグ領域を拡張する方法、タグとは別のレジスタ又はメモリを実装する方法、キャッシュメモリ20の外にキャッシュライン毎のセキュリティ状態を保持するレジスタ又はメモリを実装する方法、などを挙げることができる。
 図5及び図6には、仮想アドレスキャッシュ方式のメモリ管理システム1においてメモリアクセスを制御するための処理手順をフローチャートの形式で示している。但し、キャッシュメモリ20内では、キャッシュライン単位でセキュリティ状態を記憶するように構成されているものとする。また、図5及び図6に示すフローチャート中で、MMU30が実施する処理ステップはグレーで塗り潰し、それ以外の処理ステップはキャッシュメモリ20内で実施されるものとする。
 この処理手順は、プロセッサコア10からメモリアクセス要求が発行されたことに応答して開始される。
 まず、キャッシュメモリ20内を探索して、プロセッサコア10から要求された仮想アドレスに該当するキャッシュラインが存在するかどうか、すなわちキャッシュヒットするかどうかをチェックする(ステップS501)。
 キャッシュヒットした場合には(ステップS501のYes)、メモリアクセス要求と同時に通信されたセキュリティ状態が、ヒットしたキャッシュラインに記憶されたセキュリティ状態と同じであるかどうかをさらにチェックする(ステップS502)。
 そして、セキュリティ状態に変化がなければ(ステップS502のYes)、メモリアクセス要求に従って、そのキャッシュラインに対して読み出し処理又は書き込み処理を実行して(ステップS503)、本処理を終了する。
 したがって、キャッシュメモリ20内に格納されているデータは、プロセッサコア10の処理(プロセス)のセキュリティ状態が変化しない限り、MMU30によるパーミッションのチェックを省略してアクセスし続けることができる。
 一方、セキュリティ状態に変化があったときには(ステップS502のNo)、キャッシュヒットしたラインが「dirty」すなわちキャッシュラインのデータが更新されているときには(ステップS504のYes)、そのキャッシュラインに対して記憶しているセキュリティ状態で、メインメモリ40への書き戻しを行うことにする(ステップS505)。言い換えれば、プロセッサコア10からのメモリアクセス要求したセキュリティ状態に変化があったときには、データが更新されているか否かに拘わらず、キャッシュフラッシュが実施されるようになっている。
 また、プロセッサコア10から要求された仮想アドレスがキャッシュミスした場合には(ステップS501のNo)、続いて、キャッシュメモリ20が満杯で置換が必要かどうかをチェックする(ステップS506)。置換が必要な場合には(ステップS506Yes)、所定の置換アルゴリズムに従って、捨てるべきデータ、すなわち犠牲(victim)となるキャッシュラインを決定する。そして、そのvictimラインが「dirty」すなわちデータが更新されているときには(ステップS507のYes)、そのvictimラインに対して記憶しているセキュリティ状態で、そのvictimラインのデータのメインメモリ40への書き戻しを行うことにする(ステップS508)。
 そして、プロセッサコア10から要求された仮想アドレスがキャッシュミスしたとき(ステップS501のNo)、又は、プロセッサコア10の処理のセキュリティ状態が変化していた場合には(ステップS502のNo)、MMU30は、TLB31の該当するエントリのパーミッション情報を参照して、仮想アドレスを物理アドレスに変換するとともに、プロセッサコア10のメモリアクセス要求を許可するかどうかをチェックする(ステップS509)。
 MMU30がTLB31を参照してアドレス変換する仕組み、並びにTLBミスが発生したときにページウォーク機構32がメインメモリ40内のページテーブル41を探索して要求された仮想アドレスに対応するページの物理アドレスの情報を見つけ出し、新たなTLBエントリを作成する仕組みは、従来と同様なので、ここでは詳細な説明は省略する。
 また、処理ステップS509において、MMU30は、要求された仮想アドレスに対応するTLBエントリに格納された8bitのパーミッション情報のうち、プロセッサコア10がメモリアクセス要求と同時に通信してきたセキュリティ状態に対応するフラグを参照して、メモリアクセスを許可するか又はメモリを保護するかを判定することができる(前述)。
 ここで、MMU30が、プロセッサコア10のメモリアクセス要求を許可する場合には(ステップS509のYes)、メインメモリ40の該当する物理アドレスからデータを読み出す(ステップS510)。そして、読み出したデータを、キャッシュメモリ20上の空きライン又はvictimラインに書き込みを行う(ステップS511)。また、そのキャッシュラインのタグ情報を更新するとともに、そのキャッシュラインに書き込んだデータのセキュリティ状態をタグに記憶して(ステップS512)、本処理を終了する。
 また、MMU30は、プロセッサコア10のメモリアクセス要求を許可しない場合には(ステップS509のNo)、アクセス要求元のプロセッサコア10に対してプロテクションエラーを返して(ステップS513)、本処理を終了する。
 図5及び図6に示したメモリアクセス処理手順によれば、キャッシュメモリ20内にセキュリティ状態という少ない情報を記憶することによって、仮想アドレスキャッシュ方式のキャッシュメモリ20内のデータの保護を実現することができる。
 また、図5及び図6に示したメモリアクセス処理手順によれば、一度キャッシュミスが発生してキャッシュメモリ20内に格納したデータは、プロセッサコア10上で実行される処理(プロセス)のセキュリティ状態が変化しない限り、MMU30のパーミッションチェックなしに使い続けることができる。この結果、メモリ管理システム1における電力効率と回路速度が向上する。そして、プロセッサコア10上で実行される処理のセキュリティ状態が変化したときには、キャッシュメモリ20においてそれを検知して、最小限の古いデータをフラッシュして、改めてMMU30によりキャッシュミス時の処理が実行され、その際にパーミッションチェックも行われる。
 キャッシュライン毎のセキュリティ状態をキャッシュメモリ20内に記憶する方法として、各キャッシュラインに対応付けられたタグ領域を拡張する方法を挙げることができる。
 図7には、キャッシュライン毎のセキュリティ状態をタグビットに保存するように構成されたキャッシュメモリ20の実装例を示している。但し、図面の簡素化として、1way構成のキャッシュメモリを示しているが、2way以上であっても同様に構成することができる。
 図示のキャッシュメモリ20は、キャッシュラインの集合からなるデータアレイ71と、各キャッシュラインにタグメモリからなるタグアレイ72からなる。
 図示の例では、データアレイ71は、1バンクが0~63の64ラインからなるデータRAMで構成される。また、1ラインは、4ワードからなる。1ワードは32ビットであり、したがって、1ラインは128ビットからなる。
 タグアレイ72は、それぞれデータアレイ71の各ラインに対応する、0~63の合計64個のタグメモリからなるタグRAMで構成される。1つのタグは22ビット長のタグビットからなる。
 データアレイ71の各ラインには、データRAMアドレスがそれぞれ割り振られている。また。タグアレイ72の各タグには、タグRAMアドレスがそれぞれ割り振られている。データRAMアドレスとタグRAMアドレスには対応関係がある。
 各タグは、対応するキャッシュラインが有効又は無効のいずれであるかを示すValidビット、キャッシュライン上のデータが更新されたか否かを示すDirtyビットを含んでいる。本実施形態では、タグは、さらにセキュリティ状態(Security state)を示すために、3ビットをセキュリティビットに割り当てている。
 セキュリティビットとパーミッション情報を適切に定義することで(例えば、図4を参照のこと)、必要性に応じた粒度でキャッシュメモリ内のデータのセキュリティを実現することができる。さらに、オペレーティングシステムとソフトウェアを組み合わせることによって、簡素のセキュリティ機能しか搭載していないプロセッサコアにおいても、高度なセキュリティモデルを実現することができる。
 また、キャッシュライン毎のセキュリティ状態をキャッシュメモリ20内に記憶するその他の方法として、タグとは別のレジスタ又はメモリを実装する方法や、キャッシュラインの外にキャッシュライン毎のセキュリティ状態を保持するレジスタ又はメモリを実装する方法などを挙げることができる(いずれも図示しない)。
 なお、キャッシュライン毎のセキュリティ状態を記憶する際に、ビット圧縮することも可能である。上記の例ではセキュリティ状態に3bitを割り当てているが、実際の運用では4種類の値しか使用しない場合には、2bitに圧縮して記憶するようにしてもよい。このような圧縮展開の処理を、ハードウェア又はソフトウェアのいずれかあるいは両方を利用して実装することができる。
 上述した図5及び図6に示した処理手順では、プロセッサコア10からメモリアクセス要求されたデータのセキュリティ状態がキャッシュメモリ20内に記憶したセキュリティ状態と一致しない場合には、該当するキャッシュラインをフラッシュするようになっている。
 これに対して、プロセッサコア10からのメモリアクセス要求のセキュリティ状態がキャッシュメモリ20内に記憶したセキュリティ状態と一致しない場合であっても、該当するキャッシュラインをすぐにフラッシュしないで、MMU30に対してプロテクションチェックだけを要求するという変形例も可能である。この変形例によれば、MMU30によるプロテクションチェック結果がアクセス許可であれば、キャッシュメモリ20に記憶したセキュリティ状態を更新するだけで、キャッシュフラッシュを省略することができる。
 図8及び図9には、メモリ管理システム1においてメモリアクセスを制御するための処理手順の変形例をフローチャートの形式で示している。図示の処理手順では、セキュリティ状態が不一致の場合であっても、MMU30によるプロテクションチェック結果がアクセス許可であれば、キャッシュメモリ20に記憶したセキュリティ状態を更新するだけで、キャッシュフラッシュを省略することができる。
 但し、キャッシュメモリ20内では、キャッシュライン単位でセキュリティ状態を記憶するように構成されているものとする。また、図8及び図9に示すフローチャート中で、MMU30が実施する処理ステップはグレーで塗り潰し、それ以外の処理ステップはキャッシュメモリ20内で実施されるものとする。
 この処理手順は、プロセッサコア10からメモリアクセス要求が発行されたことに応答して開始される。
 まず、キャッシュメモリ20内を探索して、プロセッサコア10から要求された仮想アドレスに該当するキャッシュラインが存在するかどうか、すなわちキャッシュヒットするかどうかをチェックする(ステップS801)。そして、キャッシュヒットした場合には(ステップS801のYes)、メモリアクセス要求と同時に通信されたセキュリティ状態が、ヒットしたキャッシュラインに記憶されたセキュリティ状態と同じであるかどうかをさらにチェックし(ステップS802)、セキュリティ状態に変化がなければ(ステップS802のYes)、メモリアクセス要求に従って、そのキャッシュラインに対して読み出し処理又は書き込み処理を実行して(ステップS803)、本処理を終了する。
 一方、セキュリティ状態に変化があったときには(ステップS802のNo)、MMU30は、TLB31の該当するエントリのパーミッション情報を参照して、仮想アドレスを物理アドレスに変換するとともに、プロセッサコア10のメモリアクセス要求を許可するかどうかをチェックする(ステップS814)。
 MMU30がプロセッサコア10のメモリアクセス要求を許可する場合には(ステップS814のYes)、そのキャッシュラインに対して読み出し処理又は書き込み処理を実行した後(ステップS815)、そのキャッシュラインに書き込んだデータのセキュリティ状態をタグに記憶して(ステップS816)、本処理を終了する。言い換えれば、プロセッサコア10からのメモリアクセス要求したセキュリティ状態に変化があったときには、MMU30によるプロテクションチェック結果がアクセス許可であれば、タグに記憶しているセキュリティ状態を更新するだけで、キャッシュフラッシュを省略するようになっている。
 また、MMU30がプロセッサコア10のメモリアクセス要求を許可しない場合には(ステップS814のNo)、キャッシュヒットしたラインが「dirty」すなわちキャッシュラインのデータが更新されているときには(ステップS804のYes)、そのキャッシュラインに対して記憶しているセキュリティ状態で、メインメモリ40への書き戻しを行うことにする(ステップS805)。
 また、プロセッサコア10から要求された仮想アドレスがキャッシュミスした場合には(ステップS801のNo)、続いて、キャッシュメモリ20が満杯で置換が必要かどうかをチェックする(ステップS806)。置換が必要な場合には(ステップS806Yes)、所定の置換アルゴリズムに従って、捨てるべきデータ、すなわち犠牲(victim)となるキャッシュラインを決定する。そして、そのvictimラインが「dirty」すなわちデータが更新されているときには(ステップS807のYes)、そのvictimラインに対して記憶しているセキュリティ状態で、そのvictimラインのデータのメインメモリ40への書き戻しを行うことにする(ステップS808)。
 そして、プロセッサコア10から要求された仮想アドレスがキャッシュミスしたとき(ステップS801のNo)、又は、プロセッサコア10の処理のセキュリティ状態が変化していた場合には(ステップS802のNo)、MMU30は、TLB31の該当するエントリのパーミッション情報を参照して、仮想アドレスを物理アドレスに変換するとともに、プロセッサコア10のメモリアクセス要求を許可するかどうかをチェックする(ステップS809)。
 処理ステップS809では、MMU30は、要求された仮想アドレスに対応するTLBエントリに格納された8bitのパーミッション情報のうち、プロセッサコア10がメモリアクセス要求と同時に通信してきたセキュリティ状態に対応するフラグを参照して、メモリアクセスを許可するか又はメモリを保護するかを判定することができる(前述)。
 ここで、MMU30が、プロセッサコア10のメモリアクセス要求を許可する場合には(ステップS809のYes)、メインメモリ40の該当する物理アドレスからデータを読み出す(ステップS810)。そして、読み出したデータを、キャッシュメモリ20上の空きライン又はvictimラインに書き込みを行う(ステップS811)。また、そのキャッシュラインのタグ情報を更新するとともにステップS812)、そのキャッシュラインに書き込んだデータのセキュリティ状態をタグに記憶して(ステップS816)、本処理を終了する。
 また、MMU30は、プロセッサコア10のメモリアクセス要求を許可しない場合には(ステップS809のNo)、アクセス要求元のプロセッサコア10に対してプロテクションエラーを返して(ステップS813)、本処理を終了する。
 図8及び図9に示した処理手順によれば、プロセッサコア10からのメモリアクセス要求のセキュリティ状態がキャッシュメモリ20内に記憶したセキュリティ状態と一致しない場合であっても、MMU30によるプロテクションチェック結果がアクセス許可であれば、キャッシュメモリ20に記憶したセキュリティ状態を更新するだけで、メインメモリ40への書き戻しを省略することができる。
 また、パーミッションに既定のルールが存在する場合には、プロセッサコア10からのメモリアクセス要求のセキュリティ状態がキャッシュメモリ20内に記憶したセキュリティ状態と一致しない場合には、キャッシュメモリ20内部でその既定のルールに従って許可判断を実施するという変形例も可能である。この変形例によれば、該当するキャッシュラインをすぐにフラッシュしないで、且つ、MMU30に対してプロテクションチェックだけを要求する必要がない。
 また、パーミッションに既定のルールが存在する場合には、キャッシュメモリ20内部でその既定のルールに従って許可判断するというメモリアクセス制御も可能である。プロセッサコア10からのメモリアクセス要求のセキュリティ状態がキャッシュメモリ20内に記憶したセキュリティ状態と一致しない場合であっても、キャッシュメモリ20内部でその既定のルールに従って許可判断するので、MMU30によるプロテクションチェックを行う必要がない。もちろん、該当するキャッシュラインをすぐにフラッシュすることはない。
 例えば、書き込み処理が既にMMU30のパーミッションチェックにより許可されたセキュリティ状態であれば、処理を「読み取り」に置き換えたセキュリティ状態も許可する、という既定のルールがキャッシュメモリ20内部に存在するものとする。
 具体的には、セキュリティ状態(developer,user,write)が既にMMU30により許可されていれば、(developer,user,read)も許可するという既定のルールが存在するものとする。このような場合、プロセッサコア10からメモリアクセス要求と同時に通信されたセキュリティ状態が(developer,user,write)であるのに対し、そのメモリアクセス要求にヒットしたキャッシュラインで記憶されているセキュリティ状態が(developer,user,read)であり、一致しないが、MMU30によるパーミッションチェックやキャッシュフラッシュを行うことなく、ヒットしたキャッシュラインへのアクセスを実施し、タグに記憶しておいたセキュリティ状態の更新のみを行う。MMU30によるプロテクションチェックを行う必要がなく、該当するキャッシュラインをすぐにフラッシュすることもない。
 あるいは、既定のルールは、権限が上位のセキュリティ状態でのメモリアクセス要求は許可するというものであってもよい。例えば、あるいは、「proprietary」は「developer」よりも権限が上位のセキュリティ状態であり、「privileged」は「user」よりも権限が上位のセキュリティ状態である。そして、プロセッサコア10からメモリアクセス要求と同時に通信されたセキュリティ状態が、キャッシュメモリ20内部に記憶しておいたセキュリティ状態と一致しない場合であっても、権限が上位のセキュリティ状態であれば、ヒットしたキャッシュラインへのアクセスを実施し、タグに記憶しておいたセキュリティ状態の更新のみを行う。MMU30によるプロテクションチェックを行う必要がない。もちろん、該当するキャッシュラインをすぐにフラッシュすることはない。
 なお、このような既定のルールに基づくキャッシュメモリ20へのアクセス制御機能は、ハードウェア若しくはソフトウェア、あるいはハードウェアとソフトウェアの組み合わせによって実装することができる。
 図10及び図11には、メモリ管理システム1においてメモリアクセスを制御するための処理手順の変形例をフローチャートの形式で示している。図示の処理手順では、セキュリティ状態が不一致の場合には、変化したセキュリティ状態がキャッシュメモリ20内部に存在する既定のルールに従ってキャッシュメモリ20へのアクセスが制御される。キャッシュメモリ20へのアクセスが許可される場合には、キャッシュメモリ20に記憶したセキュリティ状態を更新するだけで、キャッシュフラッシュを省略することができる。
 但し、キャッシュメモリ20内では、キャッシュライン単位でセキュリティ状態を記憶するように構成されているものとする。また、図10及び図11に示すフローチャート中で、MMU30が実施する処理ステップはグレーで塗り潰し、それ以外の処理ステップはキャッシュメモリ20内で実施されるものとする。
 この処理手順は、プロセッサコア10からメモリアクセス要求が発行されたことに応答して開始される。
 まず、キャッシュメモリ20内を探索して、プロセッサコア10から要求された仮想アドレスに該当するキャッシュラインが存在するかどうか、すなわちキャッシュヒットするかどうかをチェックする(ステップS1001)。そして、キャッシュヒットした場合には(ステップS1001のYes)、メモリアクセス要求と同時に通信されたセキュリティ状態が、ヒットしたキャッシュラインに記憶されたセキュリティ状態と同じであるかどうかをさらにチェックし(ステップS1002)、セキュリティ状態に変化がなければ(ステップS1002のYes)、メモリアクセス要求に従って、そのキャッシュラインに対して読み出し処理又は書き込み処理を実行して(ステップS1003)、本処理を終了する。
 一方、セキュリティ状態に変化があったときには(ステップS1002のNo)、変化したセキュリティ状態がキャッシュメモリ20内部に存在する既定のルールを満たすかどうかをチェックする(ステップS1014)。例えば、プロセッサコア10からメモリアクセス要求した際のセキュリティ状態がキャッシュメモリ20内のヒットしたキャッシュラインで記憶しているセキュリティ状態よりも権限が上位であるかどうかをチェックする。
 セキュリティ状態の変化が既定のルールを満たす場合には(ステップS1014のYes)、そのキャッシュラインに対して読み出し処理又は書き込み処理を実行した後(ステップS1015)、そのキャッシュラインに書き込んだデータのセキュリティ状態をタグに記憶して(ステップS1016)、本処理を終了する。言い換えれば、プロセッサコア10からのメモリアクセス要求したセキュリティ状態に変化があったときには、キャッシュメモリ20内部に存在する既定のルールに従って許可すると判断されれば、タグに記憶しているセキュリティ状態を更新するだけで、キャッシュフラッシュを省略するようになっている。
 また、MMU30がプロセッサコア10のメモリアクセス要求を許可しない場合には(ステップS1014のNo)、キャッシュヒットしたラインが「dirty」すなわちキャッシュラインのデータが更新されているときには(ステップS1004のYes)、そのキャッシュラインに対して記憶しているセキュリティ状態で、メインメモリ40への書き戻しを行うことにする(ステップS1005)。
 また、プロセッサコア10から要求された仮想アドレスがキャッシュミスした場合には(ステップS1001のNo)、続いて、キャッシュメモリ20が満杯で置換が必要かどうかをチェックする(ステップS1006)。置換が必要な場合には(ステップS1006Yes)、所定の置換アルゴリズムに従って、捨てるべきデータ、すなわち犠牲(victim)となるキャッシュラインを決定する。そして、そのvictimラインが「dirty」すなわちデータが更新されているときには(ステップS1007のYes)、そのvictimラインに対して記憶しているセキュリティ状態で、そのvictimラインのデータのメインメモリ40への書き戻しを行うことにする(ステップS1008)。
 そして、プロセッサコア10から要求された仮想アドレスがキャッシュミスしたとき(ステップS1001のNo)、又は、プロセッサコア10の処理のセキュリティ状態が変化していた場合には(ステップS1002のNo)、MMU30は、TLB31の該当するエントリのパーミッション情報を参照して、仮想アドレスを物理アドレスに変換するとともに、プロセッサコア10のメモリアクセス要求を許可するかどうかをチェックする(ステップS1009)。
 処理ステップS1009では、MMU30は、要求された仮想アドレスに対応するTLBエントリに格納された8bitのパーミッション情報のうち、プロセッサコア10がメモリアクセス要求と同時に通信してきたセキュリティ状態に対応するフラグを参照して、メモリアクセスを許可するか又はメモリを保護するかを判定することができる(前述)。
 ここで、MMU30が、プロセッサコア10のメモリアクセス要求を許可する場合には(ステップS1009のYes)、メインメモリ40の該当する物理アドレスからデータを読み出す(ステップS1010)。そして、読み出したデータを、キャッシュメモリ20上の空きライン又はvictimラインに書き込みを行う(ステップS1011)。また、そのキャッシュラインのタグ情報を更新するとともにステップS1012)、そのキャッシュラインに書き込んだデータのセキュリティ状態をタグに記憶して(ステップS1016)、本処理を終了する。
 また、MMU30は、プロセッサコア10のメモリアクセス要求を許可しない場合には(ステップS1009のNo)、アクセス要求元のプロセッサコア10に対してプロテクションエラーを返して(ステップS1013)、本処理を終了する。
 図10及び図11に示した処理手順によれば、プロセッサコア10からのメモリアクセス要求のセキュリティ状態がキャッシュメモリ20内に記憶したセキュリティ状態と一致しない場合であっても、変化したセキュリティ状態がキャッシュメモリ20内部に存在する既定のルールに従って許可されれば、キャッシュメモリ20に記憶したセキュリティ状態を更新するだけで、メインメモリ40への書き戻しを省略することができる。
 なお、上述した処理手順(図5及び図6、図8及び図9、図10及び図11)の他に、プロセッサコア10のセキュリティ状態が変化するときに、仮想アドレス方式のキャッシュメモリ20内でその変化を自動的に検知して、ソフトウェアによりキャッシュフラッシュを省略するように、メモリ管理システム1を構成することもできる。
 本実施形態に係るメモリ管理システム1によれば、キャッシュメモリ20内にあるデータを保護するために、キャッシュメモリ20内に記憶すべき情報量を削減することができる。したがって、タグメモリに使用する高価なメモリリソース(フリップフロップ又はSRAM)を削減することができる。
 本明細書で開示する技術は、キャッシュラインの設計変更だけで容易に実現することができ、キャッシュメモリ20とMMU30間を接続するバスに(パーミッション情報をコピーするための)サイドバンド信号を追加したり、MMU30を設計変更したりする必要がない。
 したがって、本明細書で開示する技術によれば、仮想アドレスキャッシュ方式におけるキャッシュメモリ内のデータを保護するためのメモリリソースや制御回路を削減することができ、且つ、電力効率が向上するという効果がある。したがって、本明細書で開示する技術は、超低消費電力IoTやウェアラブルデバイスに好適に適用することができる。
 以上、特定の実施形態を参照しながら、本明細書で開示する技術について詳細に説明してきた。しかしながら、本明細書で開示する技術の要旨を逸脱しない範囲で当業者が該実施形態の修正や代用を成し得ることは自明である。
 本明細書で開示するメモリ管理技術は、例えば小容量のメモリしか持たない組み込み機器に適用して、仮想アドレスキャッシュ方式のキャッシュメモリ内のデータの保護を、キャッシュメモリ内に記憶する少ない情報で実現することができる。勿論、本明細書で開示するメモリ管理技術を、通常又は大容量のメモリを装備し、仮想アドレスキャッシュ方式を採用するさまざまなタイプの情報処理装置に適用することができる。
 要するに、例示という形態により本明細書で開示する技術について説明してきたのであり、本明細書の記載内容を限定的に解釈するべきではない。本明細書で開示する技術の要旨を判断するためには、特許請求の範囲を参酌すべきである。
 なお、本明細書の開示の技術は、以下のような構成をとることも可能である。
(1)プロセッサコアからメモリアクセス要求されたデータを一時記憶するキャッシュメモリと、
 前記プロセッサコアからメモリアクセス要求と同時に通信されたセキュリティ状態を記憶する状態記憶部と、
 メインメモリへのアクセスを管理するメモリ管理ユニットと、
を具備するメモリ管理システム。
(2)前記状態記憶部は、前記キャッシュメモリのキャッシュライン単位でセキュリティ状態を記憶する、
上記(1)に記載のメモリ管理システム。
(3)前記状態記憶部は、前記キャッシュメモリ内のタグメモリ、前記キャッシュメモリ内でタグメモリとは別に配置されたレジスタ、又は、キャッシュライン本体の外に実装されたメモリ又はレジスタのいずれかからなり、前記キャッシュメモリのライン毎のセキュリティ状態を記憶する、
上記(1)又は(2)のいずれかに記載のメモリ管理システム。
(4)前記メモリ管理ユニットは、
 トランスレーションルックアサイドバッファ内のページテーブルの各エントリに、セキュリティ状態毎のアクセスの可否を示すパーミッション情報を格納し、
 前記プロセッサコアからメモリアクセス要求と同時に通信してきたセキュリティ状態に対するアクセスの可否を、ヒットしたエントリに格納されたパーミッション情報に基づいて判断する、
上記(1)乃至(3)のいずれかに記載のメモリ管理システム。
(5)前記プロセッサコアからのメモリアクセス要求に対し、前記メモリ管理ユニットによるプロテクションチェックを経て、前記メインメモリから読み取ったデータを前記キャッシュメモリに書き込むとともに、前記状態記憶部は該当するキャッシュラインに対応付けてセキュリティ状態を記憶する、
上記(1)乃至(4)のいずれかに記載のメモリ管理システム。
(6)前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態と一致しない場合は、ヒットしたキャッシュラインのキャッシュフラッシュを実施する、
上記(1)乃至(5)のいずれかに記載のメモリ管理システム。
(7)前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態と一致しない場合は、前記メモリ管理ユニットによるプロテクションチェックを実施して、このメモリアクセス要求が許可された場合には、ヒットしたキャッシュラインへのアクセスを実施するとともに前記状態記憶部に記憶したセキュリティ状態を更新する、
上記(1)乃至(5)のいずれかに記載のメモリ管理システム。
(8)前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態と一致しないが、その相違が前記キャッシュメモリ内部の既定のルールを満たす場合には、ヒットしたキャッシュラインへのアクセスを実施するとともに前記状態記憶部に記憶したセキュリティ状態を更新する、
上記(1)乃至(5)のいずれかに記載のメモリ管理システム。
(9)前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態よりも権限が上位である場合には、ヒットしたキャッシュラインへのアクセスを実施するとともに前記状態記憶部に記憶したセキュリティ状態を更新する、
上記(1)乃至(5)のいずれかに記載のメモリ管理システム。
(10)前記キャッシュメモリは仮想アドレスキャッシュ方式である、
上記(1)乃至(9)のいずれかに記載のメモリ管理システム。
(11)プロセッサコアからメモリアクセス要求されたデータをメインメモリから読み出してキャッシュメモリに一時記憶するステップと、
 前記プロセッサコアからメモリアクセス要求と同時に通信されたセキュリティ状態を記憶する状態記憶ステップと、
 前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態と比較した結果に基づいて、前記キャッシュメモリ及び前記メインメモリへのアクセスを制御する制御ステップと、
を有するメモリ管理方法。
(11-1)前記制御ステップでは、前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態と一致しない場合は、ヒットしたキャッシュラインのキャッシュフラッシュを実施する、
上記(11)に記載のメモリ管理方法。
(11-2)前記制御ステップでは、前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態と一致しない場合は、前記メモリ管理ユニットによるプロテクションチェックを実施して、このメモリアクセス要求が許可された場合には、ヒットしたキャッシュラインへのアクセスを実施するとともに前記状態記憶部に記憶したセキュリティ状態を更新する、
上記(11)に記載のメモリ管理方法。
(11-3)前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態と一致しないが、その相違が前記キャッシュメモリ内部の既定のルールを満たす場合には、ヒットしたキャッシュラインへのアクセスを実施するとともに前記状態記憶部に記憶したセキュリティ状態を更新する、
上記(11)に記載のメモリ管理方法。
(12)プロセッサコアと、
 メインメモリと、
 前記プロセッサコアからメモリアクセス要求されたデータを一時記憶するキャッシュメモリと、
 前記プロセッサコアからメモリアクセス要求と同時に通信されたセキュリティ状態を記憶する状態記憶部と、
 前記メインメモリへのアクセスを管理するメモリ管理ユニットと、
を具備する情報処理装置。
 1…メモリ管理システム、10…プロセッサコア
 20…キャッシュメモリ、30…MMU
 31…TLB、32…ページウォーク機構
 40…メインメモリ、41…ページテーブル
 100…センシングデバイス
 101…CPU、102…MMU、103…SRAM
 104…フラッシュメモリ、105…センサ
 106…通信モジュール、107…電池、110…バス
 200…基地局、201…クラウド、202…サーバ

Claims (12)

  1.  プロセッサコアからメモリアクセス要求されたデータを一時記憶するキャッシュメモリと、
     前記プロセッサコアからメモリアクセス要求と同時に通信されたセキュリティ状態を記憶する状態記憶部と、
     メインメモリへのアクセスを管理するメモリ管理ユニットと、
    を具備するメモリ管理システム。
  2.  前記状態記憶部は、前記キャッシュメモリのキャッシュライン単位でセキュリティ状態を記憶する、
    請求項1に記載のメモリ管理システム。
  3.  前記状態記憶部は、前記キャッシュメモリ内のタグメモリ、前記キャッシュメモリ内でタグメモリとは別に配置されたレジスタ、又は、キャッシュライン本体の外に実装されたメモリ又はレジスタのいずれかからなり、前記キャッシュメモリのライン毎のセキュリティ状態を記憶する、
    請求項1に記載のメモリ管理システム。
  4.  前記メモリ管理ユニットは、
     トランスレーションルックアサイドバッファ内のページテーブルの各エントリに、セキュリティ状態毎のアクセスの可否を示すパーミッション情報を格納し、
     前記プロセッサコアからメモリアクセス要求と同時に通信してきたセキュリティ状態に対するアクセスの可否を、ヒットしたエントリに格納されたパーミッション情報に基づいて判断する、
    請求項1に記載のメモリ管理システム。
  5.  前記プロセッサコアからのメモリアクセス要求に対し、前記メモリ管理ユニットによるプロテクションチェックを経て、前記メインメモリから読み取ったデータを前記キャッシュメモリに書き込むとともに、前記状態記憶部は該当するキャッシュラインに対応付けてセキュリティ状態を記憶する、
    請求項1に記載のメモリ管理システム。
  6.  前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態と一致しない場合は、ヒットしたキャッシュラインのキャッシュフラッシュを実施する、
    請求項1に記載のメモリ管理システム。
  7.  前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態と一致しない場合は、前記メモリ管理ユニットによるプロテクションチェックを実施して、このメモリアクセス要求が許可された場合には、ヒットしたキャッシュラインへのアクセスを実施するとともに前記状態記憶部に記憶したセキュリティ状態を更新する、
    請求項1に記載のメモリ管理システム。
  8.  前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態と一致しないが、その相違が前記キャッシュメモリ内部の既定のルールを満たす場合には、ヒットしたキャッシュラインへのアクセスを実施するとともに前記状態記憶部に記憶したセキュリティ状態を更新する、
    請求項1に記載のメモリ管理システム。
  9.  前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態よりも権限が上位である場合には、ヒットしたキャッシュラインへのアクセスを実施するとともに前記状態記憶部に記憶したセキュリティ状態を更新する、
    請求項1に記載のメモリ管理システム。
  10.  前記キャッシュメモリは仮想アドレスキャッシュ方式である、
    請求項1に記載のメモリ管理システム。
  11.  プロセッサコアからメモリアクセス要求されたデータをメインメモリから読み出してキャッシュメモリに一時記憶するステップと、
     前記プロセッサコアからメモリアクセス要求と同時に通信されたセキュリティ状態を記憶する状態記憶ステップと、
     前記プロセッサコアからメモリアクセス要求した際のセキュリティ状態が前記状態記憶部に記憶したセキュリティ状態と比較した結果に基づいて、前記キャッシュメモリ及び前記メインメモリへのアクセスを制御する制御ステップと、
    を有するメモリ管理方法。
  12.  プロセッサコアと、
     メインメモリと、
     前記プロセッサコアからメモリアクセス要求されたデータを一時記憶するキャッシュメモリと、
     前記プロセッサコアからメモリアクセス要求と同時に通信されたセキュリティ状態を記憶する状態記憶部と、
     前記メインメモリへのアクセスを管理するメモリ管理ユニットと、
    を具備する情報処理装置。
PCT/JP2018/043086 2018-02-28 2018-11-21 メモリ管理システム及びメモリ管理方法、並びに情報処理装置 WO2019167360A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201880090079.8A CN111868700B (zh) 2018-02-28 2018-11-21 存储器管理系统、存储器管理方法以及信息处理设备
KR1020207023718A KR20200125596A (ko) 2018-02-28 2018-11-21 메모리 관리 시스템 및 메모리 관리 방법, 그리고 정보 처리 장치
US16/971,151 US11392496B2 (en) 2018-02-28 2018-11-21 Memory management system, memory management method, and information processing apparatus with reduced power consumption
JP2020502806A JPWO2019167360A1 (ja) 2018-02-28 2018-11-21 メモリ管理システム及びメモリ管理方法、並びに情報処理装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018035904 2018-02-28
JP2018-035904 2018-02-28

Publications (1)

Publication Number Publication Date
WO2019167360A1 true WO2019167360A1 (ja) 2019-09-06

Family

ID=67804930

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/043086 WO2019167360A1 (ja) 2018-02-28 2018-11-21 メモリ管理システム及びメモリ管理方法、並びに情報処理装置

Country Status (5)

Country Link
US (1) US11392496B2 (ja)
JP (1) JPWO2019167360A1 (ja)
KR (1) KR20200125596A (ja)
CN (1) CN111868700B (ja)
WO (1) WO2019167360A1 (ja)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11438963B2 (en) 2019-04-29 2022-09-06 Sonicwall Inc. Method for providing an elastic content filtering security service in a mesh network
US11540132B2 (en) 2019-04-29 2022-12-27 Sonicwall Inc. Method for providing an elastic content filtering security service in a mesh network
US11310665B2 (en) * 2019-04-29 2022-04-19 Sonicwall Inc. Elastic security services and load balancing in a wireless mesh network

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08110873A (ja) * 1994-10-11 1996-04-30 Toshiba Corp キャッシュメモリサブシステム
JP2012212440A (ja) * 2005-10-20 2012-11-01 Qualcomm Inc キャッシュされたメモリデータを伴うキャッシュメモリ属性インジケータ
JP2013522702A (ja) * 2010-02-17 2013-06-13 アーム・リミテッド メモリのセキュア領域および非セキュア領域へのセキュアモードページテーブルデータの格納

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5265227A (en) * 1989-11-14 1993-11-23 Intel Corporation Parallel protection checking in an address translation look-aside buffer
JP3866597B2 (ja) * 2002-03-20 2007-01-10 株式会社東芝 内部メモリ型耐タンパプロセッサおよび秘密保護方法
FR2859292A1 (fr) * 2003-08-27 2005-03-04 St Microelectronics Sa Dispositif de controle de l'acces a une memoire securisee, comprenant un circuit synchrome de recherche d'attributs
JP2006155516A (ja) 2004-12-01 2006-06-15 Ntt Docomo Inc メモリ管理装置、メモリ管理システム及びメモリ管理方法
US7650479B2 (en) * 2006-09-20 2010-01-19 Arm Limited Maintaining cache coherency for secure and non-secure data access requests
US7958320B2 (en) * 2006-12-05 2011-06-07 Intel Corporation Protected cache architecture and secure programming paradigm to protect applications
US9684601B2 (en) * 2012-05-10 2017-06-20 Arm Limited Data processing apparatus having cache and translation lookaside buffer
GB2516477A (en) * 2013-07-24 2015-01-28 Ibm Method and system for handling virtual memory address synonyms in a multi-level cache hierarchy structure
JP6027562B2 (ja) * 2014-02-24 2016-11-16 株式会社東芝 キャッシュメモリシステムおよびプロセッサシステム
JP6118285B2 (ja) * 2014-03-20 2017-04-19 株式会社東芝 キャッシュメモリシステムおよびプロセッサシステム
US20190102324A1 (en) * 2017-09-29 2019-04-04 Intel Corporation Cache behavior for secure memory repartitioning systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08110873A (ja) * 1994-10-11 1996-04-30 Toshiba Corp キャッシュメモリサブシステム
JP2012212440A (ja) * 2005-10-20 2012-11-01 Qualcomm Inc キャッシュされたメモリデータを伴うキャッシュメモリ属性インジケータ
JP2013522702A (ja) * 2010-02-17 2013-06-13 アーム・リミテッド メモリのセキュア領域および非セキュア領域へのセキュアモードページテーブルデータの格納

Also Published As

Publication number Publication date
US20210117323A1 (en) 2021-04-22
CN111868700A (zh) 2020-10-30
US11392496B2 (en) 2022-07-19
JPWO2019167360A1 (ja) 2021-02-12
CN111868700B (zh) 2024-04-19
KR20200125596A (ko) 2020-11-04

Similar Documents

Publication Publication Date Title
CN107111455B (zh) 电子处理器架构以及缓存数据的方法
US8819392B2 (en) Providing metadata in a translation lookaside buffer (TLB)
US7130956B2 (en) Storage system including hierarchical cache metadata
US7130957B2 (en) Storage system structure for storing relational cache metadata
WO2019167360A1 (ja) メモリ管理システム及びメモリ管理方法、並びに情報処理装置
US9086991B2 (en) Solid state drive cache recovery in a clustered storage system
KR101414384B1 (ko) 연산 장치, 정보 처리 장치 및 연산 방법
JP5583274B2 (ja) コンピュータ・メモリを管理する方法、対応するコンピュータ・プログラム製品、およびそのためのデータ・ストレージ・デバイス
US10078588B2 (en) Using leases for entries in a translation lookaside buffer
US10282308B2 (en) Method and apparatus for reducing TLB shootdown overheads in accelerator-based systems
US20180081585A1 (en) Page migration acceleration using a two-level bloom filter on high bandwidth memory systems
US10860481B2 (en) Data recovery method, data recovery system, and computer program product
US11755480B2 (en) Data pattern based cache management
US11392508B2 (en) Lightweight address translation for page migration and duplication
US20190324914A1 (en) Method, Apparatus, and Non-Transitory Readable Medium for Accessing Non-Volatile Memory
US8352646B2 (en) Direct access to cache memory
KR20120127108A (ko) 메모리 시스템
US20180217938A1 (en) Software Controlled Cache Line Replacement within a Cache Segment
US11397691B2 (en) Latency hiding for caches
US20230251963A1 (en) Architectural support for persistent applications
US20230409472A1 (en) Snapshotting Pending Memory Writes Using Non-Volatile Memory
Alwadi High Performance and Secure Execution Environments for Emerging Architectures

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18908040

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020502806

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18908040

Country of ref document: EP

Kind code of ref document: A1