WO2012131884A1 - マルチコアプロセッサシステム - Google Patents

マルチコアプロセッサシステム Download PDF

Info

Publication number
WO2012131884A1
WO2012131884A1 PCT/JP2011/057715 JP2011057715W WO2012131884A1 WO 2012131884 A1 WO2012131884 A1 WO 2012131884A1 JP 2011057715 W JP2011057715 W JP 2011057715W WO 2012131884 A1 WO2012131884 A1 WO 2012131884A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
memory
processor system
core processor
memory area
Prior art date
Application number
PCT/JP2011/057715
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 PCT/JP2011/057715 priority Critical patent/WO2012131884A1/ja
Priority to CN201180069869.6A priority patent/CN103493022B/zh
Priority to JP2013506906A priority patent/JP5716824B2/ja
Publication of WO2012131884A1 publication Critical patent/WO2012131884A1/ja
Priority to US14/036,758 priority patent/US20140025903A1/en

Links

Images

Classifications

    • 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/1483Protection against unauthorised use of memory or access to memory by checking the subject access rights using an access-table, e.g. matrix or list
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/1658Data re-synchronization of a redundant component, or initial sync of replacement, additional or spare unit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/1666Error detection or correction of the data by redundancy in hardware where the redundant component is memory or memory area
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/1666Error detection or correction of the data by redundancy in hardware where the redundant component is memory or memory area
    • G06F11/167Error detection by comparing the memory output
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • 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

Definitions

  • the present invention relates to a multi-core processor system that protects software.
  • FIG. 10 is an explanatory diagram showing an operation example when the software for the single core processor system operates on the multi-core processor system.
  • the explanatory diagram denoted by reference numeral 1001 describes the case where the application 1003 operates on a single core processor system
  • the explanatory diagram denoted by reference numeral 1002 describes the case where the application 1003 operates on a multi-core processor system.
  • the main thread 1004 in the application 1003 calls the function f (x) and uses the result of f (x). Therefore, the main thread 1004 activates a thread 1005 for offload processing that executes f (x), and after the thread 1005 ends, uses the result of f (x) to continue the processing.
  • the thread is a basic unit for managing processing performed by the CPU.
  • the main thread 1004 activates the thread 1005 at time t1. Subsequently, after the thread 1005 finishes the processing of f (x) at time t2, the main thread 1004 uses the result at time t3.
  • the main thread 1004 executed by the CPU (Central Processing Unit) # 1 starts the thread 1005 on the CPU # 2 at time t1.
  • CPU # 2 assumes a state in which a thread 1005 and another thread are allocated.
  • the thread 1005 ends the processing of f (x) at time t3.
  • the main thread 1004 When the application 1003 is a highly reliable application, the main thread 1004 has a synchronization process inserted before using the result of f (x). As a result, the main thread 1004 executes the synchronization process before using the result of the thread f (x) at time t2. The main thread 1004 that has executed the synchronization process waits until the thread 1005 finishes the process, and can safely execute the process.
  • FIG. 11 is an explanatory diagram when a library that has been called on a single-core processor system is called on a multi-core processor system.
  • An explanatory diagram denoted by reference numeral 1101 indicates a case where the library A operates on a single core processor system
  • an explanatory diagram denoted by reference numeral 1102 indicates a case where the library A operates on a multicore processor system.
  • the application X calls the library A.
  • Application Y calls library A and library B.
  • the library A called on the single core processor system does not have to be specially managed.
  • the app X is executed by the CPU # 1
  • the app Y is executed by the CPU # 2.
  • the library A takes measures such as performing exclusive control on the context 1103 of the library A.
  • the library A on the CPU # 1 performs exclusive control with the library A of the CPU # 2 using the IPC (Inter-Processor Communication) 1105 # 1 and the IPC 1105 # 2 through the interface 1104 # 1.
  • IPC Inter-Processor Communication
  • a system is divided into domains, and a safety domain that is a group of high-reliability apps that perform safe operations and a guarantee that safe operations are performed Divide into non-secure domains that will not be low-trust apps.
  • a safety domain a technique for accessing safety data that cannot be accessed by a non-secure domain in a memory is disclosed (for example, refer to Patent Documents 1 and 2 below).
  • a technique for protecting data for example, as an example of a flash memory, a technique for finding an unused spare block and making it an error block for a protection area is disclosed.
  • a technique for protecting data for example, a technique is disclosed in which a memory duplication area is provided to prevent destruction of important programs and data (see, for example, Patent Documents 3 and 4 below). ).
  • the multi-core processor system When the above-described conventional technology is applied and a high-reliability app and a low-reliability app are executed, the multi-core processor system operates by dividing the high-reliability app and the low-reliability app. Therefore, the multi-core processor system to which the conventional technology is applied has a problem that it is difficult to operate a high-reliability app and a low-reliability app together.
  • An object of the present invention is to provide a multi-core processor system in which a high-reliability application and a low-reliability application can be mixedly operated in order to solve the above-described problems caused by the prior art.
  • a plurality of CPUs, a memory, and a memory protection controller disposed between the plurality of CPUs and the memory are included.
  • a multi-core processor system is proposed in which the memory protect controller accesses a first memory area by an access request from a plurality of CPUs when executing an application, and accesses a second memory area secured at the time of system boot.
  • FIG. 1 is an explanatory diagram illustrating an operation example when a failure occurs in the multi-core processor system 100 according to the present embodiment and an operation example of restoration processing.
  • FIG. 2 is a block diagram illustrating a hardware example of the multi-core processor system 100.
  • FIG. 3 is a block diagram illustrating an example of functions of the multi-core processor system 100.
  • FIG. 4 is an explanatory diagram showing an example of functions inside the memory protect controller 106.
  • FIG. 5 is an explanatory diagram showing an example of registration of the memory protect controller 106.
  • FIG. 6 is a flowchart illustrating an example of a processing procedure when the multi-core processor system 100 is activated.
  • FIG. 1 is an explanatory diagram illustrating an operation example when a failure occurs in the multi-core processor system 100 according to the present embodiment and an operation example of restoration processing.
  • FIG. 2 is a block diagram illustrating a hardware example of the multi-core processor system 100.
  • FIG. 3 is a block diagram illustrating an example of functions of
  • FIG. 7 is a flowchart (part 1) illustrating an example of a processing procedure when switching applications in the multi-core processor system 100.
  • FIG. 8 is a flowchart (part 2) illustrating an example of a processing procedure when switching applications in the multi-core processor system 100.
  • FIG. 9 is a flowchart illustrating an example of a processing procedure when an error occurs in the multi-core processor system 100.
  • FIG. 10 is an explanatory diagram showing an operation example when software for a single core processor system operates on a multicore processor system.
  • FIG. 11 is an explanatory diagram when a library that has been called on a single-core processor system is called on a multi-core processor system.
  • FIG. 1 is an explanatory diagram illustrating an operation example when a failure occurs in the multi-core processor system 100 according to the present embodiment and an operation example of restoration processing.
  • an explanatory diagram denoted by reference numeral 101 shows an operation example when a failure occurs in the multi-core processor system 100
  • an explanatory diagram denoted by reference numeral 102 shows an operation example of restoration processing of the multi-core processor system 100.
  • the multi-core processor system 100 in FIG. 1 includes CPUs 103 serving as a plurality of cores and a memory 104.
  • the multi-core processor system 100 is assumed to be a mobile terminal such as a mobile phone.
  • CPUs 103 include CPU # 1 and CPU # 2.
  • the symbol accompanied by the suffix “#n” indicates that the symbol corresponds to the nth CPU.
  • the CPUs 103 and the memory 104 are connected by a bus 105. Further, the CPU # 1 and the CPU # 2 can communicate with the memory protect controller 106 # 1 and the memory protect controller 106 # 2, respectively.
  • the memory protect controller 106 is a device that operates according to the designated form of the two forms of the double access form and the access through form. When there is an instruction for a double access mode, the memory protect controller 106 has a function of accessing an address in the protected memory area while accessing the original request destination address of the application. When there is an instruction of the access through form, the memory protect controller 106 accesses the original request destination address of the application.
  • the multi-core processor system 100 executes the low-reliability application 111 and the high-reliability application 112. Specifically, CPU # 1 executes the low-reliability application 111, and CPU # 2 executes the high-reliability application 112.
  • the multi-core processor system 100 reserves a low-reliability application memory area 122 in the user area 121 as an area for storing the context of the low-reliability application 111.
  • the multi-core processor system 100 reserves a highly reliable application memory area 123 in the user area 121 as an area in which the context of the highly reliable application 112 is stored.
  • the context is data used by the application such as a program counter and a stack pointer that are values of the CPU registers.
  • the multi-core processor system 100 secures a protect area 124 that is an area different from the user area 121, and secures a highly reliable application memory area 125 in the protect area 124.
  • the highly reliable application memory area 125 stores the same data as the highly reliable application memory area 123.
  • the CPU # 2 registers the double access mode in the memory protect controller 106 # 2 at the timing when the highly reliable application 112 executes.
  • the memory protect controller 106 # 2 in the double access mode writes the written contents to the highly reliable application memory area 123 and also writes the same contents to the highly reliable application memory area 125.
  • the low-reliability application 111 performs illegal writing and destroys the data in the high-reliability application memory area 123 with the high-reliability application memory area 123 protected as described above. is doing.
  • the CPU # 2 tries to read and execute the high-reliability application memory area 123 when executing the high-reliability application 112, but the data in the high-reliability application memory area 123 does not indicate a correct value, 112 is forcibly terminated.
  • the program counter in the high-reliability application memory area 123 is rewritten to an illegal address
  • the CPU # 2 tries to execute the value of the illegal address as an execution code, and the high-reliability application 112 is forcibly terminated.
  • the OS may hang other than when the trusted application 112 is forcibly terminated due to unauthorized writing.
  • the operation when the OS hangs will be described with reference to FIG.
  • an explanatory diagram denoted by reference numeral 102 shows a restoration process after data destruction.
  • the CPU # 2 detects that an error has occurred in the highly reliable application 112, the CPU # 2 determines whether or not the highly reliable application 112 is being executed.
  • the CPU # 2 compares the high-reliability application memory area 123 and the high-reliability application memory area 125. If there is a difference, the CPU # 2 sets the high-reliability application memory area 123 as the high-reliability application memory area 123. Overwrite with the memory area 125. As a result, the data that has been illegally written is restored to normal data, and the CPU # 2 can continue the high-reliability application 112, so that the high-reliability application 112 can be protected.
  • FIG. 2 is a block diagram illustrating a hardware example of the multi-core processor system 100.
  • the multi-core processor system 100 includes CPUs 103 equipped with a plurality of CPUs, a ROM (Read-Only Memory) 201, and a RAM (Random Access Memory) 202.
  • the multi-core processor system 100 includes a flash ROM 203, a flash ROM controller 204, and a flash ROM 205.
  • the memory 104 may be all or a part of the RAM 202. Further, the memory 104 may include a ROM 201, a flash ROM 203, and a flash ROM 205.
  • the multi-core processor system 100 includes a display 206, an I / F (Interface) 207, and a keyboard 208 as input / output devices for users and other devices. Each unit is connected by a bus 105.
  • the CPUs 103 control the entire multi-core processor system 100.
  • the CPUs 103 refers to all CPUs in which single core processors are connected in parallel.
  • the CPUs 103 include CPU # 1 to CPU #x.
  • X is an integer of 2 or more.
  • a multi-core processor system is a computer system including a processor having a plurality of cores. If a plurality of cores are mounted, a single processor having a plurality of cores may be used, or a processor group in which single core processors are arranged in parallel may be used. In the present embodiment, an example in which CPUs that are single-core processors are arranged in parallel will be described.
  • CPU # 1 to CPU #x can communicate with the memory protect controller 106, respectively. Further, each of CPU # 1 to CPU #x may have a dedicated cache memory.
  • the ROM 201 stores a program such as a boot program.
  • the RAM 202 is used as a work area for the CPUs 103.
  • the flash ROM 203 stores system software such as an OS (Operating System), application software, and the like.
  • OS Operating System
  • the multi-core processor system 100 receives the new OS by the I / F 207 and updates the old OS stored in the flash ROM 203 to the received new OS.
  • the flash ROM controller 204 controls reading / writing of data with respect to the flash ROM 205 according to the control of the CPUs 103.
  • the flash ROM 205 stores data written under the control of the flash ROM controller 204.
  • data image data and video data acquired by the user using the multi-core processor system 100 through the I / F 207 and a program for executing the software protection method according to the present embodiment may be stored.
  • the flash ROM 205 for example, a memory card, an SD card, or the like can be adopted.
  • the display 206 displays data such as a document, an image, and function information as well as a cursor, an icon, or a tool box.
  • the display 206 can employ a TFT liquid crystal display or the like.
  • the I / F 207 is connected to a network 209 such as a LAN (Local Area Network), a WAN (Wide Area Network), or the Internet through a communication line, and is connected to another device via the network 209.
  • the I / F 207 controls an internal interface with the network 209 and controls input / output of data from an external device.
  • a modem or a LAN adapter can be used as the I / F 207.
  • the keyboard 208 has keys for inputting numbers, various instructions, etc., and inputs data.
  • the keyboard 208 may be a touch panel type input pad or a numeric keypad.
  • FIG. 3 is a block diagram illustrating an example of functions of the multi-core processor system 100.
  • the multi-core processor system 100 can access the reliable white list 301 as a storage area accessed from each function.
  • the multi-core processor system 100 includes a securing unit 311, a detection unit 312, a comparison unit 313, a notification unit 314, a registration unit 315, a detection unit 316, a detection unit 317, a comparison unit 318, and a restoration unit 319.
  • the functions (the securing unit 311 to the restoring unit 319) serving as the control unit realize the functions by the CPU # 1 to CPU #x executing the program stored in the storage device.
  • the storage device is, for example, the ROM 201, the RAM 202, the flash ROM 203, the flash ROM 205, etc. shown in FIG.
  • the function may be realized by execution by another CPU via the I / F 207.
  • the securing unit 311 has the function of the CPU # 2 that executes the high-reliability application 112, but the function of any one of the CPU # 1, CPU # 3 to CPU #x There may be.
  • the detection unit 312 to the restoration unit 319 may be functions included in all the CPUs CPU # 1 to CPU #x.
  • the CPU # 2 executes hypervisor # 2, OS # 2, and kernel # 2.
  • the hypervisor # 2 is a program that directly operates on hardware such as the CPU # 2.
  • the hypervisor # 2 can execute a privileged instruction that directly refers to the register in the CPU # 2, reads the register information in the CPU # 2, and rewrites the register information in the CPU # 2. It is a program.
  • the kernel # 2 is a core function of the OS # 2, for example, manages resources of the multi-core processor system 100 and allows software such as threads to access the hardware.
  • OS # 2 is a program for controlling CPU # 2.
  • a library that accesses resources in the multi-core processor system 100, an API (Application Programming Interface), and the like are provided to the application.
  • API Application Programming Interface
  • CPU # 1, CPU # 3 to CPU #x also execute the hypervisor, OS, and kernel.
  • the securing unit 311 to the notification unit 314 and the detection unit 316 are included in the function of the kernel # 2
  • the registration unit 315 and the detection unit 317 to the restoration unit 319 are included in the function of the hypervisor # 2.
  • the high reliability white list 301 is a list for registering a predetermined application.
  • the predetermined application to be registered is the high-reliability application 112 that has been verified for operation in the multi-core processor system 100.
  • the high reliability application 112 is an application preinstalled in the multi-core processor system 100.
  • an application provided by a manufacturer that manufactures the multi-core processor system 100, a communication carrier that provides the network 209, or the like may be registered as a highly reliable application. For example, when the multi-core processor system 100 downloads an application from the network 209 and the identification information indicating that the manufacturer or the communication carrier provides is attached, the downloaded application is registered in the reliable white list 301. Also good.
  • the content registered in the high-reliability white list 301 may be, for example, the name of an application, or, if a file system exists, a file path in which the application program is stored.
  • the securing unit 311 corresponds to a first memory area that is accessed by a plurality of CPUs when an application is executed at the time of system boot, and a second memory area that is similarly accessed when a plurality of CPUs access the first memory area.
  • the first memory area is a memory area that is an access destination of the running application, and is the user area 121 shown in FIG.
  • the second memory area becomes a protect area 124 that serves as an area for protecting data in the user area 121.
  • the timing for securing the second memory may be at the time of system boot or when the application is activated.
  • the multi-core processor system 100 assumes a mobile phone or the like, and does not assume that many applications are activated simultaneously.
  • the maximum value of N is, for example, 8 or 16.
  • N may be the number of CPUs 103.
  • the address of the reserved area is stored in a storage area such as the register of the CPU # 2, the cache memory, and the RAM 202.
  • the detection unit 312 has a function of detecting one of an event that the application has started, an event that the application has ended, and an event that the application has been switched. For example, the detection unit 312 detects an event that the highly reliable application 112 is activated. The detected event is stored in a storage area such as the register of CPU # 2, the cache memory, and the RAM 202.
  • the comparison unit 313 has a function of comparing an application to be executed with an application registered in a predetermined application list when an event is detected by the detection unit 312. For example, the comparison unit 313 compares the high-reliability application 112 to be executed with the applications registered in the high-reliability white list 301.
  • the comparison result is stored in a storage area such as a register of CPU # 2, a cache memory, and RAM 202.
  • the notification unit 314 When the comparison result by the comparison unit 313 indicates a match, the notification unit 314 provides an instruction for the memory protect controller 106 # 2 to access the first memory region and the second memory region for the access from the application to be executed. It has a function to notify # 2. For example, it is assumed that the high-reliability application 112 and the application registered in the high-reliability white list 301 indicate a match. At this time, the notification unit 314 notifies the hypervisor # 2 of an instruction for the memory protect controller 106 # 2 to access the high-reliability application memory area 123 and the high-reliability application memory area 125 for access from the high-reliability application 112. .
  • the notification unit 314 notifies the hypervisor # 2 of an instruction for the memory protect controller 106 # 2 to access the first memory area regarding the access from the executed application. May be.
  • the notification unit 314 notifies the instruction to add the area for the activated application in the second memory area when the application is activated and the comparison result by the comparison unit 313 of the activated application indicates a match. Also good.
  • the notification unit 314 may notify an instruction to release the completed application area in the second memory area when the application is completed and the comparison result of the completed application comparison unit 313 indicates a match. .
  • the notified contents may be stored in a storage area such as a register of CPU # 2, a cache memory, or RAM 202.
  • the registration unit 315 has a function of registering the instruction notified by the notification unit 314 in the memory protect controller 106 # 2. For example, when the instruction of the double access mode that is the first access mode is notified, the registration unit 315 registers the double access mode in the memory protect controller 106 # 2. Specifically, the registration unit 315 registers in a register in the memory protect controller 106 # 2.
  • the registration unit 315 registers the access through form in the memory protect controller 106 # 2. Specific registration contents will be described with reference to FIG.
  • the information indicating that the registration has been performed may be stored in a storage area such as the register of CPU # 2, the cache memory, and the RAM 202.
  • the detecting unit 316 has a function of detecting that the application in the own CPU has been forcibly terminated. For example, the detection unit 316 detects that a highly reliable application 112 has been forcibly terminated due to a segment error or the like indicating that an inaccessible memory has been accessed. Information that the application has been forcibly terminated is stored in a storage area such as a register of CPU # 2, a cache memory, and RAM 202.
  • the detection unit 317 has a function of detecting that OS # 2 is hung. For example, the detection unit 317 periodically monitors OS # 2, and detects that OS # 2 is hung when there is no response from OS # 2. Note that the OS being hung is in an abnormal state and cannot respond to the request.
  • the OS hang state is also called kernel panic. Information that OS # 2 is hung is stored in a storage area such as a register of CPU # 2, a cache memory, and RAM202.
  • the comparison unit 318 has a function of comparing the first memory area and the second memory area when the detection unit 316 detects forced termination of the application or when the detection unit 317 detects a hang of OS # 2. Have. For example, the comparison unit 318 compares the data in the high-reliability application memory area 123 and the high-reliability application memory area 125. Further, the comparison unit 318 may compare the first memory area and the second memory area when the application being executed is registered in the high-reliability white list 301. The comparison result is stored in a storage area such as a register of CPU # 2, a cache memory, and RAM 202.
  • the restoration unit 319 has a function of restoring the first memory area based on the comparison result by the comparison unit 318. For example, when the comparison result by the comparison unit 318 indicates a mismatch, the restoration unit 319 restores the first memory area by overwriting the difference of the comparison result in the first memory area. Note that the result of the restoration may be stored in a storage area such as the register of the CPU # 2, the cache memory, or the RAM 202.
  • FIG. 4 is an explanatory diagram showing an example of functions inside the memory protect controller 106.
  • the memory protect controller 106 # 1 will be described as an example, but the memory protect controller 106 # 2 to the memory protect controller 106 # x also have the same functions as the memory protect controller 106 # 1.
  • the memory protect controller 106 # 1 includes a storage unit 401 # 1, a determination unit 402 # 1, and a conversion unit 403 # 1.
  • the storage unit 401 stores an access mode of the memory protect controller 106 and a protected area corresponding to the application.
  • the storage unit 401 # 1 includes a control register 404 # 1 and storage registers 405 # 1_1 to 405 # 1_y.
  • y is an integer of 1 or more.
  • y may be the maximum value of the number of applications that can be executed simultaneously by CPU # 1.
  • the multi-core processor system 100 according to the present embodiment is assumed to be a mobile phone or the like, and is not assumed to execute a large number of applications simultaneously like a personal computer. Therefore, the maximum number of applications that are simultaneously activated on each CPU is also a number that does not assume that many applications are activated simultaneously.
  • y is a value of N or less. For example, y is a value such as 4 or 8.
  • the control register 404 # 1 includes two fields: an access mode flag and a protected area management number.
  • the access form flag field stores an identifier indicating access form information of either a double access form for accessing two addresses or an access through form for performing normal access. For example, as a specific identifier, “1” may mean a double access mode.
  • the protected area management number field when two addresses are accessed, a value indicating which storage register 405 # 1 is applied among the storage registers 405 # 1_1 to 405 # 1_y is stored. For example, when “1” is stored in the protected area management number field, the conversion unit 403 # 1 performs conversion using the setting of the storage register 405 # 1_1.
  • Storage registers 405 # 1_1 to 405 # 1_y are registers that store a protection area for each application. Further, the storage registers 405 # 1_1 to 405 # 1_y correspond to management number_1 to management number_y, respectively. Subsequently, each field of the storage register 405 # 1 will be described.
  • the storage register 405 # 1 includes four fields: a used bit, an application ID, a mask address, and a protect address.
  • in-use bit field a bit indicating whether or not the corresponding storage register 405 # 1 is in use is stored.
  • application ID field identification information of an application being executed by CPU # 1 is stored.
  • mask address field an address indicating a memory range accessed by the application is stored. The specific size of the memory range is determined by the memory management mechanism of the OS.
  • protect address field an address to the protect area of the application being executed by the CPU # 1 is stored.
  • the determination unit 402 # 1 has a function of determining whether or not to perform address conversion according to the access mode information stored in the storage unit 401 # 1. Specifically, the determination unit 402 # 1 accesses two addresses if the access form flag field is a double access form, and does not perform address conversion if the access form flag field is an access through form. , Address through.
  • the conversion unit 403 # 1 has a function of performing address conversion for one access destination when the determination unit 402 # 1 determines that it is a double access mode. Specifically, the conversion unit 403 # 1 performs address conversion with reference to the mask address field of the storage register 405 # 1 corresponding to the management number set in the protected area management number field and the protected address field. For example, the conversion unit 403 converts the converted address according to the following equation (1).
  • the conversion unit 403 performs conversion as follows according to (1).
  • the memory protect controller 106 # 1 may perform a double access mode for the write request access among the read request access and the write request access from the CPU # 1. The reason is that even if a double access mode related to read request access is performed in the state where no error has occurred, the same value is returned, so that read access to an address for which conversion is not performed is sufficient.
  • FIG. 5 is an explanatory diagram showing a registration example of the memory protect controller 106.
  • the multi-core processor system 100 shown in FIG. 5 is registered in the high-reliability white list 301, and the applications A and C that are high-reliability apps and the low-reliability apps that are not registered in the high-reliability white list 301 B, app D, app E are running.
  • Application A and application B are assigned to CPU # 1
  • application C to application E are assigned to CPU # 2.
  • CPU # 1 is executing application A
  • CPU # 2 is executing application D.
  • the application IDs of application A to application E are 0x0001, 0x0002, 0x0003, 0x0004, and 0x0005, respectively.
  • Kernel # 1 reserves a memory area 0x00000000 to 0x00500000 as a kernel occupation area 501 when the OS boots. Subsequently, the kernel # 1 secures the protected area 124 before securing the user area 121 serving as the application operation space. For example, it is assumed that the number N of simultaneous application executions of the multi-core processor system 100 is 5 and the memory size M allowed for one application is 1 [M bytes].
  • the protected area 124 is an area that cannot be accessed from the application. For this reason, for example, when the application A and the application B try to access the protected area 124 through the OS # 1, the kernel # 1 issues a segment error indicating that an unmanaged area of the OS # 1 is accessed. Become. As described above, the multi-core processor system 100 can prevent unauthorized writing of the protected area 124 by a low-reliability application by setting the protected area 124 to an area other than the user area 121.
  • the area to be the protected area 124 may not be a continuous range and fixed, and may be secured in a distributed manner as long as the memory protect controller 106 can manage the dynamic area during execution of the multi-core processor system 100. It may change to. In the present embodiment, in order to simplify the description, the description will be made with the area serving as the protected area 124 being a continuous range and fixed.
  • the multi-core processor system 100 reserves an area for storing the context of each application in the user area 121 when the applications A to E are activated.
  • the kernel # 1 secures the application A memory area 502 when the application A is activated, and secures the application B memory area 503 when the application B is activated.
  • the kernel # 2 secures the application C memory area 504 when the application C is activated, secures the application D memory area 505 when the application D is activated, and secures the application E memory area 506 when the application E is activated.
  • the top addresses of the application A memory area 502 to the application E memory area 506 are 0x05000000, 0x05010000, 0x05020000, 0x05030000, and 0x05040000, respectively.
  • the multi-core processor system 100 also secures a memory area in the protected area 124 when a highly reliable application is activated. Specifically, the hypervisor # 1 receiving the instruction from the kernel # 1 secures the application A memory area 507 when the application A is activated.
  • the hypervisor # 1 sets a value in the storage register 405 # 1_1. Specifically, the hypervisor # 1 sets in use in the in use bit field and sets 0x0001, which is the application ID of the application A, in the application ID field. Subsequently, the hypervisor # 1 sets 0x0000ffff in the mask address field, and sets 0x01000000, which is the start address of the application A memory area 507, in the protect address field.
  • the hypervisor # 2 reserves the application C memory area 508 when the application C is activated. Further, the hypervisor # 2 sets a value in the storage register 405 # 2_1. Specifically, the hypervisor # 2 sets in use in the in use bit field, and sets 0x0003, which is the application ID of the application C, in the application ID field. Subsequently, the hypervisor # 2 sets 0x0000ffff in the mask address field and sets 0x01020000 which is the start address of the application C memory area 508 in the protect address field.
  • the multi-core processor system 100 finishes the application activation stage and transitions to a state in which it actually operates.
  • CPU # 1 executes the applications in the order of application A, application B, application A,.
  • kernel # 1 sets the access mode to the double access mode.
  • the kernel # 1 also includes the switched application ID in the instruction content.
  • the hypervisor # 1 Upon receipt of the instruction, the hypervisor # 1 registers the double access mode in the memory protect controller 106 # 1. Specifically, the hypervisor # 1 sets the access mode flag of the memory protect controller 106 # 1 to the double access mode. In addition, the hypervisor # 1 sets the management number of the storage register 405 # 1 that matches the instructed application ID in the protected area management number field. By such an operation, the multi-core processor system 100 synchronizes with the operation that can be switched between the application A, the application B,... By the OS # 1, and the double access mode and the access through mode by the memory protect controller 106 # 1. It works with ...
  • the multi-core processor system 100 accesses two address spaces of 0x05000000 and 0x01000000.
  • the bandwidth of CPU access is such that a bus of 128 [bit] band is set for a 64 [bit] CPU. This is a rough state where the entire bandwidth of the bus is not used. Therefore, by coordinating with the data packing function that combines two 64 [bit] accesses into one 128 [bit] in the bus 105, deterioration of bus access performance can be avoided.
  • CPU # 2 executes the application in the order of application C, application D, application E, application C,.
  • the application D is not registered in the high-reliability white list 301. Therefore, the kernel # 2 generates an application switching event and sets the access mode to the access-through mode.
  • the kernel # 2 includes the switched application ID in the instruction content.
  • the hypervisor # 2 registers the access through form in the memory protect controller 106 # 2. Specifically, the hypervisor # 2 sets the access form flag of the memory protect controller 106 # 2 to the access through form.
  • the execution subject that executes an example of the processing procedure at the time of startup shown in FIG. 6 may be any CPU among CPU # 1 to CPU #x, but for simplification of explanation, CPU # 1
  • the description will be made assuming the case of execution.
  • the execution subject that executes the application switching processing procedure and the error processing procedure shown in FIGS. 7 to 9 is executed by all CPUs CPU # 1 to CPU #x. Therefore, description will be made assuming that CPU # 1 executes.
  • FIG. 6 is a flowchart illustrating an example of a processing procedure when the multi-core processor system 100 is started up.
  • the kernel # 1 starts to boot (step S601)
  • the kernel # 1 starts the memory management mechanism (step S602).
  • the kernel # 1 reserves an address space of N ⁇ M [bytes] by the memory management mechanism (step S603).
  • the kernel # 1 After securing, the kernel # 1 notifies the secured address space to the hypervisor # 1 (step S604), performs normal operation (step S605), and ends the processing at the time of startup. Note that in normal operation, the user area 121 is secured, or an application that is started at the beginning of booting is started.
  • the hypervisor # 1 Upon receiving the notification of the address space, the hypervisor # 1 sets the notified address space as the protected area 124 (step S606), and ends the processing at the time of activation. Thereby, the multi-core processor system 100 can secure a memory protection area of a highly reliable application.
  • FIG. 7 and 8 show an example of a processing procedure when switching the application of the multi-core processor system 100.
  • FIG. FIG. 7 shows an example of the processing procedure of the kernel # 1
  • FIG. 8 shows an example of the processing procedure of the hypervisor # 1.
  • FIG. 7 is a flowchart (part 1) illustrating an example of a processing procedure when switching applications in the multi-core processor system 100.
  • the kernel # 1 determines whether or not an event has occurred (step S701). If no event has occurred (step S701: no event has occurred), the kernel # 1 executes step S701 again after a predetermined time. Note that the kernel # 1 may execute another process of the kernel # 1 at a certain time.
  • step S701 application activation event
  • step S702 determines whether the activated application is registered in the reliable white list 301 (step S702). If registered (step S702: Yes), the kernel # 1 notifies the hypervisor # 1 of an instruction to add a management number (step S704). In step S704, the kernel # 1 includes the application ID of the activated application in the instruction content.
  • kernel # 1 executes normal processing (step S703), and proceeds to the processing of step S701. If not registered (step S702: No), the kernel # 1 proceeds to the process of step S703.
  • the normal process of the application activation event is, for example, a process of securing an area for storing the context of the activated application in the user area 121.
  • step S701 application end event
  • step S705 the kernel # 1 determines whether or not the ended application is registered in the reliable white list 301 (step S705). If registered (step S705: Yes), the kernel # 1 notifies the hypervisor # 1 of a management number release instruction (step S706). In step S706, kernel # 1 includes the application ID of the completed application in the instruction content.
  • step S705 After notification or if not registered (step S705: No), the kernel # 1 proceeds to the process of step S703.
  • the normal process of the application end event is, for example, a process of releasing an area for storing the context of the completed application that is secured in the user area 121.
  • step S701 application switching event
  • the kernel # 1 determines whether or not the switched application is registered in the reliable white list 301 (step S707). If registered (step S707: Yes), the kernel # 1 notifies the hypervisor # 1 of a dual access mode instruction (step S708). In step S708, kernel # 1 includes the application ID of the application after switching in the instruction content. After the notification, the kernel # 1 proceeds to the process of step S703. If not registered (step S707: No), the kernel # 1 notifies the hypervisor # 1 of an access through type instruction (step S709). After the notification, the kernel # 1 proceeds to the process of step S703.
  • the CPU registers and the like are saved in the area for storing the context of the application before switching, and the value of the register saved in the area for storing the context of the application after switching is set in the CPU register.
  • the multi-core processor system 100 can instruct the memory protection controller 106 to change the setting in response to an event such as application activation, termination, and switching.
  • FIG. 8 is a flowchart (part 2) illustrating an example of a processing procedure at the time of application switching in the multi-core processor system 100.
  • the hypervisor # 1 sets the control register 404 # 1 and the storage register 405 # 1 in the memory protect controller 106 # 1. Therefore, in the description of each step, for the sake of simplification of description, description that the setting destination register is a register in the memory protect controller 106 # 1 is omitted.
  • Hypervisor # 1 confirms the instruction content (step S801). If the instruction content is an instruction to add a management number (step S801: an instruction to add a management number), the hypervisor # 1 uses an unused storage register 405 # 1 among the storage registers 405 # 1_1 to 405 # 1_y. Is determined (step S802).
  • step S802 If there is an unused storage register 405 # 1 (step S802: Yes), the hypervisor # 1 sets the in-use bit field of the found storage register 405 # 1 to being used (step S803). Subsequently, the hypervisor # 1 sets the application ID field of the found storage register 405 # 1 to the application ID included in the instruction content (step S804). Further, the hypervisor # 1 sets an unassigned address in the protected address field of the found storage register 405 # 1 (step S805), and proceeds to the process of step S801. When the storage register 405 # 1 does not exist (step S802: No), the hypervisor # 1 proceeds to the process of step S801.
  • the unallocated address in the process of step S805 is an address of a memory area that is not allocated as a memory area of another highly reliable application in the protected area 124.
  • the mask address in the present embodiment is always a fixed value. Therefore, for example, in step S606 described above, hypervisor # 1 sets 0x0000ffff in the mask address fields of storage registers 405 # 1_1 to 405 # 1_y as the setting location of the mask address field.
  • the hypervisor # 1 When the instruction content is a management number release instruction (step S801: management number release instruction), the hypervisor # 1 includes the application ID field in the instruction content among the storage registers 405 # 1_1 to 405 # 1_y. The storage register 405 # 1 that matches the application ID that has been stored is selected (step S806). After selection, the hypervisor # 1 sets the value of the protected address field of the selected storage register 405 # 1 to an unassigned address (step S807). Subsequently, the hypervisor # 1 sets the in-use bit field of the selected storage register 405 # 1 to unused (step S808), and proceeds to the processing of step S801.
  • step S801 dual access mode instruction
  • the hypervisor # 1 stores the application ID field of the storage register 405 # 1 that matches the application ID included in the instruction content.
  • the management number is set in the protect management number field (step S809).
  • the hypervisor # 1 sets the access mode flag to the double access mode (step S810), and proceeds to the process of step S801.
  • step S801 access through type instruction
  • the hypervisor # 1 sets the access type flag to the access through type (step S811), and proceeds to the process of step S801.
  • the multi-core processor system 100 changes the access mode in synchronization with each event of the application in order to change the setting to the memory protection controller 106 in response to an event such as activation, termination, and switching of the application. it can.
  • FIG. 9 illustrates an example of a processing procedure when an error occurs.
  • the operation verification of the low-reliability application executed by CPU # 2 was insufficient, it is assumed that a failure occurs as a result of the low-reliability application writing to another memory area. Yes.
  • the first state is a state where a highly reliable application is terminated with a simple program error. For example, when an error occurs with respect to a highly reliable application running on OS # 1, OS # 1 can detect the occurrence of the error and notify hypervisor # 1.
  • the second state is when OS # 1 hangs. When OS # 1 hangs, it is impossible to detect the failure state of a highly reliable application. Therefore, the hypervisor # 1 operating independently of the OS # 1 detects whether the OS # 1 is hung by the period monitoring.
  • FIG. 9 is a flowchart illustrating an example of a processing procedure when an error occurs in the multi-core processor system 100.
  • the kernel # 2 executes the low reliability application (step S901). It is assumed that illegal execution is performed in the user area 121 by this execution and a failure occurs.
  • kernel # 1 detects a segment error (step S902). After detection, the kernel # 1 temporarily stops the multi-core processor system 100 (step S903), and instructs the hypervisor # 1 to perform recovery notification (step S904).
  • the hypervisor # 1 determines whether the running application is registered in the reliable white list 301 or not. Is determined (step S905). If registered (step S905: Yes), the hypervisor # 1 compares the data in the memory area of the running application in the protected area 124 with the data in the memory area of the running application in the user area 121 (step S906). .
  • the hypervisor # 1 determines whether or not the comparison results match (step S907). If they do not match (step S907: No), the hypervisor # 1 restores the data of the running application in the user area 121 (step S908). Specifically, the hypervisor # 1 overwrites the difference of the comparison result in the memory area of the running application in the user area 121. As a result, data that has been illegally written is restored to normal data.
  • step S905 If it is not registered in the high-reliability white list 301 (step S905: No), if the comparison results match (step S907: Yes), or after data restoration, the hypervisor # 1 is hung OS # 1 It is determined whether or not (step S909). If it is hung (step S909: Yes), the hypervisor # 1 performs a warm start of the OS # 1 (step S910), and ends the processing at the time of the error. As a specific warm start method, checkpoint restart technology or hibernation technology can be applied.
  • step S909 the hypervisor # 1 notifies the kernel # 1 that the multicore processor system 100 is released from the suspension (step S911), and ends the processing at the time of the error.
  • the kernel # 1 which has received the suspension cancellation, cancels the suspension of the multi-core processor system 100 (step S912), and ends the processing at the time of the error.
  • the multi-core processor system 100 can restore the data and continue the operation when an error occurs in the high-reliability application due to the memory destruction due to the illegal writing.
  • the multi-core processor system can perform recovery by using both the high-reliability app and the low-reliability application because the low-reliability app can destroy the first memory area and recover using the second memory area even if a failure occurs. .
  • the software protection method executed by the multi-core processor system according to the present embodiment can safely inherit the software assets in the single-core processor system to the multi-core processor system environment.
  • the multi-core processor system according to the present embodiment is operated in a normal operation state without occurrence of biased unfavorable scheduling such as not causing a low-reliability app to be executed during execution of a high-reliability app. Can do.
  • a recovery process occurs when a failure occurs, and a load-intensive process is not executed in a normal operation state, so that the overall performance is not deteriorated.
  • the multi-core processor system can access a list that stores a predetermined application, and may compare an application to be executed with an application stored in the list. Thereby, the multi-core processor system can determine whether or not the application to be executed is a highly reliable application.
  • the multi-core processor system has a memory protection controller corresponding to a CPU that executes an application so as to access the first memory area and the second memory area when the application to be executed matches the application stored in the list. You may register. Thereby, the multi-core processor system can protect data of a highly reliable application.
  • the multi-core processor system may register with the memory protect controller corresponding to the CPU executing the application so as to access the first memory area when the application to be executed and the application stored in the list do not match.
  • the multi-core processor system can effectively use the protected area reserved for data protection without protecting the data for the low-reliability application that does not need to protect the data.
  • the multi-core processor system may restore the first memory area based on the comparison result between the first memory area and the second memory area in response to the abnormality detection of the own system. Thereby, the multi-core processor system can recover the faulty application.
  • the multi-core processor system may protect an app that has been verified for operation in a multi-core processor system environment as a highly reliable app.
  • An unreliable application may destroy the first memory area itself.
  • the second memory area is also destroyed.
  • the multi-core processor system can recover the failure of the high-reliability app generated by the operation of the low-reliability app by targeting the high-reliability app verified as having no defects.
  • the present embodiment can be applied even if the target is a library. Can do.
  • the software protection method executed by the multi-core processor system described in this embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation.
  • a software protection program for executing the software protection method is recorded on a computer-readable recording medium such as a hard disk, a CD-ROM, a DVD, or a memory card, and is executed by being read from the recording medium by the computer.
  • the software protection program may be distributed through a network such as the Internet.
  • the memory protect controller 106 described in the present embodiment is a special purpose IC (hereinafter simply referred to as “ASIC”) such as a standard cell or a structured ASIC (Application Specific Integrated Circuit), or a PLD (Programmable) such as an FPGA. It can also be realized by Logic Device. Specifically, for example, the function (memory unit 401 to conversion unit 403) of the above-described memory protect controller 106 is defined by HDL description, and the HDL description is logically synthesized and given to the ASIC or PLD to protect the memory. Controller 106 can be manufactured.

Abstract

 マルチコアプロセッサシステム(100)を、高信頼アプリ(112)と低信頼アプリ(111)が混載した状態で運用する。マルチコアプロセッサシステム(100)は、CPU(#1)が低信頼アプリ(111)を実行し、CPU(#2)が高信頼アプリ(112)を実行する状態である。メモリプロテクトコントローラ(106#2)は、ユーザ領域(121)内の高信頼アプリメモリ領域(123)にアクセスするとともに、プロテクト領域(124)内の高信頼アプリメモリ領域(125)にアクセスする。低信頼アプリ(111)による不正書込によって、高信頼アプリメモリ領域(123)のデータが破壊された場合、CPU(#2)は、高信頼アプリメモリ領域(125)のデータを高信頼アプリメモリ領域(123)にコピーすることでデータを復元する。

Description

マルチコアプロセッサシステム
 本発明は、ソフトウェアを保護するマルチコアプロセッサシステムに関する。
 近年、1つのシステム内に、複数のコアを有するマルチコアプロセッサシステムの形態を採用する機器が増加している。1つのシステム内に1つのコアを有するシングルコアプロセッサシステム用のアプリケーションソフトウェア(以下、「アプリ」と称する)をマルチコアプロセッサシステムで動作させた場合、多くの障害が発生する可能性が存在する。また、新たにマルチコアプロセッサシステム向けに開発されたソフトウェアであっても、複数のコアが同時に動作する並列動作状態での検証について、試験者が全てのタイミングを検証することは困難であった。次に、マルチコアプロセッサシステムでどのような障害が起きるかということを図10、図11を参照して説明する。
 図10は、シングルコアプロセッサシステム向けのソフトウェアをマルチコアプロセッサシステム上で動作する場合の動作例を示す説明図である。符号1001で示す説明図では、アプリ1003をシングルコアプロセッサシステムで動作する場合について説明し、符号1002で示す説明図では、アプリ1003をマルチコアプロセッサシステムで動作する場合について説明する。
 初めに、符号1001で示す説明図にて、アプリ1003内のメインスレッド1004は、関数f(x)を呼び出し、f(x)の結果を利用する。そこで、メインスレッド1004は、f(x)を実行するオフロード処理用のスレッド1005を起動し、スレッド1005の終了後、f(x)の結果を利用し、処理を続行する。なお、スレッドとはCPUで行う処理を管理するための基本単位である。
 アプリ1003がシングルコアプロセッサシステムで動作する場合、メインスレッド1004は、時刻t1でスレッド1005を起動する。続けて、スレッド1005が時刻t2にてf(x)の処理を終了した後、時刻t3にて、メインスレッド1004は、結果を利用する。
 次に、符号1002で示す説明図にて、アプリ1003がマルチコアプロセッサシステムで動作する場合について説明する。アプリ1003が、マルチコアプロセッサシステム環境で動作検証されておらず安全でない場合、符号1006で示す動作となり、マルチコアプロセッサシステム環境で動作検証されており安全である場合、符号1007で示す動作となる。なお、以下の説明にて、マルチコアプロセッサシステム環境で動作検証されておらず安全でないアプリを低信頼アプリと呼称し、マルチコアプロセッサシステム環境で動作検証されており安全であるアプリを高信頼アプリと呼称する。なお、マルチコアプロセッサシステムで対象のアプリに信頼性があるか否かを検証する方法としては、様々なタイミングに対して検証を行う方法が存在する。
 アプリ1003が低信頼アプリである場合、CPU(Central Processing Unit)#1で実行するメインスレッド1004は、時刻t1でスレッド1005をCPU#2上で起動する。CPU#2は、スレッド1005と他スレッドが割り当てられている状態を想定している。スレッド1005は、時刻t3にてf(x)の処理を終了する。
 また、CPU#1はメインスレッド1004のみを実行しているため、メインスレッド1004の割当時間がシングルコアプロセッサシステム時より多くなる。結果、時刻t3より早い時刻t2にて、メインスレッド1004は、f(x)の結果を利用する。時刻t2では、まだf(x)の処理が終了していないため、メインスレッド1004は、予期せぬ値を読み込むことになり、障害が発生する。
 アプリ1003が高信頼アプリである場合、メインスレッド1004は、f(x)の結果を利用する前に同期処理が挿入されている。これにより、メインスレッド1004は、時刻t2にて、スレッドf(x)の結果を利用する前で同期処理を実行する。同期処理が実行されたメインスレッド1004は、スレッド1005が処理終了するまで待機し、安全に処理を実行することができる。
 図11は、シングルコアプロセッサシステム上で呼び出されていたライブラリがマルチコアプロセッサシステム上で呼び出される場合の説明図である。符号1101で示す説明図は、ライブラリAがシングルコアプロセッサシステム上で動作する場合を示しており、符号1102で示す説明図は、ライブラリAがマルチコアプロセッサシステム上で動作する場合を示している。
 符号1101で示す説明図にて、アプリXは、ライブラリAを呼び出している。また、アプリYは、ライブラリAとライブラリBを呼び出している。このように、シングルコアプロセッサシステム上で呼び出されるライブラリAは、特別な管理を行わなくてよい。
 符号1102で示す説明図にて、アプリXはCPU#1で実行されており、アプリYはCPU#2で実行されている。ライブラリAが共有リソースを有する場合、ライブラリAは、ライブラリAのコンテキスト1103に対して排他制御を行うといった対策が取られる。具体的な対策として、CPU#1上のライブラリAは、インターフェース1104#1を通じ、IPC(Inter-Processor Communication)1105#1、IPC1105#2を用いてCPU#2のライブラリAと排他制御を行う。このような対策が行われているライブラリは高信頼のライブラリとなり、対策が行われていないライブラリは低信頼のライブラリとなる。
 このような、高信頼アプリ、低信頼アプリを実行する場合の技術として、たとえば、システムを、ドメイン分割し、安全な動作をする高信頼アプリ群となる安全ドメインと、安全な動作をする保証がない低信頼アプリ群となる非安全ドメインとに分割する。安全ドメインは、メモリ内の非安全ドメインがアクセスできない安全データにアクセスする技術が開示されている(たとえば、下記特許文献1、2を参照。)。
 また、データを保護する技術として、たとえば、フラッシュメモリの例として、未使用の予備ブロックを探し出し、保護領域用のエラーブロックとする技術が開示されている。また、データを保護する他の技術として、たとえば、メモリを2重化する領域を設け、重要なプログラムやデータの破壊を防ぐ技術が開示されている(たとえば、下記特許文献3、4を参照。)。
特表2006-506754号公報 特開2004-171563号公報 特開2004-310770号公報 特開平5-108493号公報
 上述した従来技術を適用し、高信頼アプリ、低信頼アプリを実行する場合、マルチコアプロセッサシステムは、高信頼アプリ、低信頼アプリを分割して運用することになる。したがって、従来技術を適用したマルチコアプロセッサシステムは、高信頼アプリと低信頼アプリを混載して運用することが困難であるという問題があった。
 本発明は、上述した従来技術による問題点を解消するため、高信頼アプリと低信頼アプリを混載して運用できるマルチコアプロセッサシステムを提供することを目的とする。
 上述した課題を解決し、目的を達成するため、本発明の一側面によれば、複数のCPUと、メモリと、複数のCPUとメモリとの間に配置されるメモリプロテクトコントローラと、を含み、メモリプロテクトコントローラは、アプリケーション実行時に複数のCPUのアクセス要求によって第1メモリ領域にアクセスするとともに、システムブート時に確保された第2メモリ領域にアクセスするマルチコアプロセッサシステムが提案される。
 本発明の一側面によれば、高信頼アプリと低信頼アプリを混載して運用できるという効果を奏する。
図1は、本実施の形態にかかるマルチコアプロセッサシステム100の障害発生時の動作例と復元処理の動作例を示す説明図である。 図2は、マルチコアプロセッサシステム100のハードウェア例を示すブロック図である。 図3は、マルチコアプロセッサシステム100の機能例を示すブロック図である。 図4は、メモリプロテクトコントローラ106の内部の機能例を示す説明図である。 図5は、メモリプロテクトコントローラ106の登録例を示す説明図である。 図6は、マルチコアプロセッサシステム100の起動時の処理手順の一例を示すフローチャートである。 図7は、マルチコアプロセッサシステム100のアプリ切替時の処理手順の一例を示すフローチャート(その1)である。 図8は、マルチコアプロセッサシステム100のアプリ切替時の処理手順の一例を示すフローチャート(その2)である。 図9は、マルチコアプロセッサシステム100のエラー時の処理手順の一例を示すフローチャートである。 図10は、シングルコアプロセッサシステム向けのソフトウェアをマルチコアプロセッサシステム上で動作する場合の動作例を示す説明図である。 図11は、シングルコアプロセッサシステム上で呼び出されていたライブラリがマルチコアプロセッサシステム上で呼び出される場合の説明図である。
 以下に添付図面を参照して、開示のマルチコアプロセッサシステムの実施の形態を詳細に説明する。
 図1は、本実施の形態にかかるマルチコアプロセッサシステム100の障害発生時の動作例と復元処理の動作例を示す説明図である。図1では、符号101で示す説明図にて、マルチコアプロセッサシステム100の障害発生時の動作例を示し、符号102で示す説明図にて、マルチコアプロセッサシステム100の復元処理の動作例を示す。
 図1におけるマルチコアプロセッサシステム100は、複数のコアとなるCPUs103と、メモリ104とを含む。マルチコアプロセッサシステム100は、携帯電話といった携帯端末を想定している。CPUs103には、CPU#1とCPU#2が含まれる。以下、接尾記号“#n”が付随された記号は、n番目のCPUに対応する記号であることを示している。CPUs103とメモリ104は、バス105で接続されている。また、CPU#1、CPU#2は、それぞれ、メモリプロテクトコントローラ106#1、メモリプロテクトコントローラ106#2と通信可能である。
 メモリプロテクトコントローラ106は、2重アクセス形態とアクセススルー形態という、2つの形態のうち指示された形態に応じた動作をする装置である。2重アクセス形態の指示がある場合、メモリプロテクトコントローラ106は、アプリ本来の要求先アドレスにアクセスしつつ、保護されたメモリ領域内のアドレスにアクセスする機能を有している。また、アクセススルー形態の指示がある場合、メモリプロテクトコントローラ106は、アプリ本来の要求先アドレスにアクセスする。
 また、マルチコアプロセッサシステム100は、低信頼アプリ111と高信頼アプリ112を実行する。具体的には、CPU#1が低信頼アプリ111を実行し、CPU#2が高信頼アプリ112を実行する。また、マルチコアプロセッサシステム100は、低信頼アプリ111のコンテキストが格納される領域として、ユーザ領域121内に、低信頼アプリメモリ領域122を確保する。同様に、マルチコアプロセッサシステム100は、高信頼アプリ112のコンテキストが格納される領域として、ユーザ領域121内に、高信頼アプリメモリ領域123を確保する。なお、コンテキストとは、CPUのレジスタの値となるプログラムカウンタ、スタックポインタなどといったアプリが使用するデータである。
 さらに、マルチコアプロセッサシステム100は、ユーザ領域121とは別の領域となるプロテクト領域124を確保し、プロテクト領域124内に、高信頼アプリメモリ領域125を確保する。高信頼アプリメモリ領域125は、高信頼アプリメモリ領域123と同一のデータが格納される。同一のデータの格納方法として、CPU#2は、高信頼アプリ112が実行するタイミングで、メモリプロテクトコントローラ106#2に2重アクセス形態の登録を行う。2重アクセス形態となっているメモリプロテクトコントローラ106#2は、ライトアクセスが発生した場合、書き込み内容を高信頼アプリメモリ領域123に書き込みつつ、同内容を高信頼アプリメモリ領域125にも書き込む。
 符号101で示す説明図では、このように高信頼アプリメモリ領域123が保護されている状態で、低信頼アプリ111が不正書込を行い、高信頼アプリメモリ領域123のデータを破壊した場合を想定している。CPU#2は、高信頼アプリ112を実行する際に、高信頼アプリメモリ領域123を読み込んで実行しようとするが、高信頼アプリメモリ領域123のデータは正しい値を示しておらず、高信頼アプリ112が強制終了する。たとえば、高信頼アプリメモリ領域123のプログラムカウンタが不正なアドレスに書き換えられた場合、CPU#2は、不正なアドレスの値を実行コードとして実行しようとし、高信頼アプリ112が強制終了する。
 なお、不正書込が行われることによって高信頼アプリ112が強制終了する場合以外に、OSがハングする場合もある。OSがハングする場合の動作については、図9にて説明する。
 次に、符号102で示す説明図では、データ破壊後の復元処理を示している。CPU#2は、高信頼アプリ112に対してエラーが発生したことを検出すると、高信頼アプリ112が実行中であったか否かを判定する。高信頼アプリ112が実行中であった場合、CPU#2は、高信頼アプリメモリ領域123と高信頼アプリメモリ領域125を比較し、差分が存在する場合、高信頼アプリメモリ領域123を高信頼アプリメモリ領域125で上書きする。これにより、不正書込が行われたデータが正常なデータに復元し、CPU#2は、高信頼アプリ112を続行することができるため、高信頼アプリ112を保護することができる。
(マルチコアプロセッサシステム100のハードウェア)
 図2は、マルチコアプロセッサシステム100のハードウェア例を示すブロック図である。図2において、マルチコアプロセッサシステム100は、CPUを複数搭載するCPUs103と、ROM(Read‐Only Memory)201と、RAM(Random Access Memory)202と、を含む。また、マルチコアプロセッサシステム100は、フラッシュROM203と、フラッシュROMコントローラ204と、フラッシュROM205と、を含む。なお、メモリ104は、RAM202の全てであってもよいし、または一部であってもよい。さらに、メモリ104は、ROM201、フラッシュROM203、フラッシュROM205を含んでいてもよい。
 また、マルチコアプロセッサシステム100は、ユーザやその他の機器との入出力装置として、ディスプレイ206と、I/F(Interface)207と、キーボード208と、を含む。また、各部はバス105によってそれぞれ接続されている。
 ここで、CPUs103は、マルチコアプロセッサシステム100の全体の制御を司る。CPUs103は、シングルコアのプロセッサを並列して接続した全てのCPUを指している。CPUs103は、CPU#1~CPU#xを含む。なお、xは2以上の整数である。また、マルチコアプロセッサシステムとは、コアが複数搭載されたプロセッサを含むコンピュータのシステムである。コアが複数搭載されていれば、複数のコアが搭載された単一のプロセッサでもよく、シングルコアのプロセッサが並列されているプロセッサ群でもよい。なお、本実施の形態では、シングルコアのプロセッサであるCPUが並列されている形態を例にあげて説明する。
 また、CPU#1~CPU#xは、それぞれ、メモリプロテクトコントローラ106と通信可能である。さらに、CPU#1~CPU#xは、それぞれ専用のキャッシュメモリを有してもよい。
 ROM201は、ブートプログラムなどのプログラムを記憶している。RAM202は、CPUs103のワークエリアとして使用される。フラッシュROM203は、OS(Operating System)などのシステムソフトウェアやアプリケーションソフトウェアなどを記憶している。たとえば、OSを更新する場合、マルチコアプロセッサシステム100は、I/F207によって新しいOSを受信し、フラッシュROM203に格納されている古いOSを、受信した新しいOSに更新する。
 フラッシュROMコントローラ204は、CPUs103の制御にしたがってフラッシュROM205に対するデータのリード/ライトを制御する。フラッシュROM205は、フラッシュROMコントローラ204の制御で書き込まれたデータを記憶する。データの具体例としては、マルチコアプロセッサシステム100を使用するユーザがI/F207を通して取得した画像データ、映像データや、本実施の形態にかかるソフトウェア保護方法を実行するプログラムが格納されていてもよい。フラッシュROM205は、たとえば、メモリカード、SDカードなどを採用することができる。
 ディスプレイ206は、カーソル、アイコンあるいはツールボックスをはじめ、文書、画像、機能情報などのデータを表示する。たとえば、ディスプレイ206は、TFT液晶ディスプレイなどを採用することができる。
 I/F207は、通信回線を通じてLAN(Local Area Network)、WAN(Wide Area Network)、インターネットなどのネットワーク209に接続され、ネットワーク209を介して他の装置に接続される。そして、I/F207は、ネットワーク209と内部のインターフェースを司り、外部装置からのデータの入出力を制御する。I/F207には、たとえばモデムやLANアダプタなどを採用することができる。
 キーボード208は、数字、各種指示などの入力のためのキーを有し、データの入力を行う。また、キーボード208は、タッチパネル式の入力パッドやテンキーなどであってもよい。
(マルチコアプロセッサシステム100の機能例)
 次に、マルチコアプロセッサシステム100の機能例について説明する。図3は、マルチコアプロセッサシステム100の機能例を示すブロック図である。なお、マルチコアプロセッサシステム100は、各機能からアクセスされる記憶領域として、高信頼ホワイトリスト301にアクセス可能である。
 マルチコアプロセッサシステム100は、確保部311と検出部312と比較部313と、通知部314と、登録部315と、検出部316と、検出部317と、比較部318と、復元部319と、を含む。この制御部となる機能(確保部311~復元部319)は、記憶装置に記憶されたプログラムをCPU#1~CPU#xが実行することにより、その機能を実現する。記憶装置とは、具体的には、たとえば、図2に示したROM201、RAM202、フラッシュROM203、フラッシュROM205などである。または、I/F207を経由して他のCPUが実行することにより、その機能を実現してもよい。
 また、図3では、確保部311は、高信頼アプリ112を実行するCPU#2の機能となっているが、CPU#1、CPU#3~CPU#xのうちいずれか一つのCPUの機能であってもよい。また、検出部312~復元部319は、CPU#1~CPU#xの全てのCPUに含まれる機能であってもよい。
 なお、CPU#2は、ハイパーバイザ#2、OS#2、カーネル#2を実行する。ハイパーバイザ#2は、CPU#2などのハードウェア上で直接動作するプログラムである。ハイパーバイザ#2は、CPU#2内のレジスタを直接参照したり、CPU#2内のレジスタの情報を読み出したり、CPU#2内のレジスタの情報を書き換えたりする特権命令を実行することができるプログラムである。カーネル#2は、OS#2の中核の機能であり、たとえば、マルチコアプロセッサシステム100のリソースを管理し、スレッドなどのソフトウェアがハードウェアにアクセスできるようにする。
 また、図示していないが、OS#2は、CPU#2を制御するプログラムである。たとえば、マルチコアプロセッサシステム100内のリソースにアクセスするライブラリ、API(Application Programming Interface)等をアプリに提供する。
 なお、図示していないが、CPU#1、CPU#3~CPU#xも、ハイパーバイザ、OS、カーネルを実行する。確保部311~通知部314、検出部316は、カーネル#2の機能に含まれ、登録部315、検出部317~復元部319はハイパーバイザ#2の機能に含まれる。
 高信頼ホワイトリスト301は、所定のアプリを登録するリストである。登録される所定のアプリとは、マルチコアプロセッサシステム100での動作検証が行われた高信頼アプリ112である。たとえば、高信頼アプリ112は、マルチコアプロセッサシステム100に予めプリインストールされているアプリである。また、マルチコアプロセッサシステム100を製造するメーカ、ネットワーク209を提供する通信キャリア等が提供するアプリを高信頼アプリとして登録してもよい。たとえば、マルチコアプロセッサシステム100は、ネットワーク209からアプリをダウンロードした際に、メーカまたは通信キャリアが提供することを示す識別情報が付随していた場合、ダウンロードしたアプリを高信頼ホワイトリスト301に登録してもよい。
 なお、高信頼ホワイトリスト301に登録される内容は、たとえば、アプリの名称であってもよいし、またファイルシステムが存在する場合、アプリのプログラムが格納されたファイルパスであってもよい。
 確保部311は、システムブート時に、アプリ実行時に複数のCPUがアクセスする第1メモリ領域に対応するとともに、複数のCPUが第1メモリ領域にアクセスするときに同様にアクセスされる第2メモリ領域を確保する機能を有する。なお、第1メモリ領域は、実行中アプリのアクセス先となるメモリ領域であり、図3で示すユーザ領域121となる。また、第2メモリ領域は、ユーザ領域121のデータを保護する領域となるプロテクト領域124となる。また、第2メモリが確保されるタイミングとしては、システムブート時であってもよいし、アプリが起動されるときであってもよい。
 また、確保部311は、マルチコアプロセッサシステム100での同時に実行するアプリの数がNであり、アプリ実行時にて割り当てられるメモリ領域がM[バイト]である場合、第2メモリ領域の大きさをN×M[バイト]で確保してもよい。たとえば、確保部311は、N=5、M=1[Mバイト]である場合、N×M=5×1=5[Mバイト]の領域をユーザ領域121として確保する。
 また、Nの値として、本実施の形態にかかるマルチコアプロセッサシステム100は、携帯電話等を想定しており、多数のアプリを同時起動することを想定していない。Nの最大値としては、たとえば、8、16といった値になる。また、Nは、CPUs103の数であってもよい。なお、確保された領域のアドレスは、CPU#2のレジスタ、キャッシュメモリ、RAM202等の記憶領域に記憶される。
 検出部312は、アプリが起動したというイベント、アプリが終了したというイベント、またはアプリが切り替えられたというイベントのうち、いずれかのイベントを検出する機能を有する。たとえば、検出部312は、高信頼アプリ112が起動されたというイベントを検出する。なお、検出したイベントは、CPU#2のレジスタ、キャッシュメモリ、RAM202等の記憶領域に記憶される。
 比較部313は、検出部312によってイベントが検出された場合、実行されるアプリと所定のアプリのリストに登録されたアプリとを比較する機能を有する。たとえば、比較部313は、実行される高信頼アプリ112と高信頼ホワイトリスト301に登録されたアプリを比較する。なお、比較結果は、CPU#2のレジスタ、キャッシュメモリ、RAM202等の記憶領域に記憶される。
 通知部314は、比較部313による比較結果が一致を示すとき、実行されるアプリからのアクセスについて、メモリプロテクトコントローラ106#2が第1メモリ領域と第2メモリ領域とにアクセスする指示をハイパーバイザ#2に通知する機能を有する。たとえば、高信頼アプリ112と高信頼ホワイトリスト301に登録されたアプリが一致を示す場合を想定する。このとき、通知部314は、高信頼アプリ112からのアクセスについて、メモリプロテクトコントローラ106#2が高信頼アプリメモリ領域123と高信頼アプリメモリ領域125とにアクセスする指示をハイパーバイザ#2に通知する。
 また、通知部314は、比較部313による比較結果が不一致を示すとき、実行されるアプリからのアクセスについて、メモリプロテクトコントローラ106#2が第1メモリ領域にアクセスする指示をハイパーバイザ#2に通知してもよい。
 また、通知部314は、アプリが起動され、起動されたアプリの比較部313による比較結果が一致を示すとき、第2メモリ領域内に起動されたアプリ用の領域を追加する指示を通知してもよい。また、通知部314は、アプリが終了し、終了したアプリの比較部313による比較結果が一致を示すとき、第2メモリ領域内の終了したアプリ用の領域を解放する指示を通知してもよい。なお、通知された内容は、CPU#2のレジスタ、キャッシュメモリ、RAM202等の記憶領域に記憶されてもよい。
 登録部315は、通知部314によって通知された指示をメモリプロテクトコントローラ106#2に登録する機能を有する。たとえば、登録部315は、第1アクセス形態である2重アクセス形態の指示が通知された場合、メモリプロテクトコントローラ106#2に2重アクセス形態を登録する。具体的に、登録部315は、メモリプロテクトコントローラ106#2内のレジスタに登録する。
 また、登録部315は、第2アクセス形態であるアクセススルー形態の指示が通知された場合、メモリプロテクトコントローラ106#2にアクセススルー形態を登録する。なお、具体的な登録内容は、図4にて説明する。なお、登録を行ったという情報は、CPU#2のレジスタ、キャッシュメモリ、RAM202等の記憶領域に記憶されてもよい。
 検出部316は、自CPU内のアプリが強制終了したことを検出する機能を有する。たとえば、検出部316は、アクセス不可能なメモリにアクセスしたことを示すセグメントエラー等が発生し、高信頼アプリ112が強制終了したことを検出する。なお、アプリが強制終了したという情報は、CPU#2のレジスタ、キャッシュメモリ、RAM202等の記憶領域に記憶される。
 検出部317は、OS#2がハングしたことを検出する機能を有する。たとえば、検出部317は、OS#2を周期監視し、OS#2からの応答がない場合、OS#2がハングしたことを検出する。なお、ハング中にあるOSは、異常状態となり、要求に対する応答が行えない状態である。OSのハング状態は、カーネルパニックとも呼ばれる。なお、OS#2がハングしたという情報は、CPU#2のレジスタ、キャッシュメモリ、RAM202等の記憶領域に記憶される。
 比較部318は、検出部316によるアプリの強制終了が検出された場合、または検出部317によるOS#2のハングが検出された場合、第1メモリ領域と第2メモリ領域とを比較する機能を有する。たとえば、比較部318は、高信頼アプリメモリ領域123と高信頼アプリメモリ領域125のデータを比較する。また、比較部318は、実行中のアプリが高信頼ホワイトリスト301に登録されている場合に、第1メモリ領域と第2メモリ領域とを比較してもよい。なお、比較結果は、CPU#2のレジスタ、キャッシュメモリ、RAM202等の記憶領域に記憶される。
 復元部319は、比較部318による比較結果に基づいて、第1メモリ領域を復元する機能を有する。たとえば、復元部319は、比較部318による比較結果が不一致を示すとき、比較結果の差分を第1メモリ領域に上書きすることで、第1メモリ領域を復元する。なお、復元を行ったという結果は、CPU#2のレジスタ、キャッシュメモリ、RAM202等の記憶領域に記憶されてもよい。
 図4は、メモリプロテクトコントローラ106の内部の機能例を示す説明図である。図4では、メモリプロテクトコントローラ106#1を例にして説明を行うが、メモリプロテクトコントローラ106#2~メモリプロテクトコントローラ106#xも、メモリプロテクトコントローラ106#1と同様の機能を含む。メモリプロテクトコントローラ106#1は、記憶部401#1、判定部402#1、変換部403#1を含む。
 記憶部401は、メモリプロテクトコントローラ106のアクセス形態とアプリに対応するプロテクト領域を記憶する。具体的に、記憶部401#1は、制御レジスタ404#1と格納レジスタ405#1_1~格納レジスタ405#1_yを含む。yは1以上の整数である。
 なお、具体的なyの値としては、CPU#1が同時実行可能なアプリの数の最大値でよい。本実施の形態にかかるマルチコアプロセッサシステム100は、携帯電話等を想定しており、パーソナル・コンピュータのように多数のアプリを同時実行することを想定していない。したがって、各CPUで同時に起動される際の最大のアプリ数も、多数のアプリを同時起動することを想定していない数となる。さらに、yは、N以下の値となる。たとえば、yは4、または8といった値となる。
 制御レジスタ404#1は、アクセス形態フラグ、プロテクト領域管理番号という2つのフィールドを含む。アクセス形態フラグフィールドには、2箇所のアドレスにアクセスを行う2重アクセス形態、または通常のアクセスを行うアクセススルー形態、のうちいずれかのアクセス形態情報を示す識別子が格納される。たとえば、具体的な識別子として、“1”が2重アクセス形態を意味してもよい。プロテクト領域管理番号フィールドには、2箇所のアドレスにアクセスを行う場合、格納レジスタ405#1_1~格納レジスタ405#1_yのうち、どの格納レジスタ405#1を適用するかを示す値が格納される。たとえば、プロテクト領域管理番号フィールドに“1”が格納された場合、変換部403#1は、格納レジスタ405#1_1の設定を用いて変換を行う。
 格納レジスタ405#1_1~格納レジスタ405#1_yは、プロテクト領域をアプリごとに格納するレジスタである。また、格納レジスタ405#1_1~格納レジスタ405#1_yは、それぞれ、管理番号_1~管理番号_yに対応している。続けて、格納レジスタ405#1の各フィールドについて説明を行う。格納レジスタ405#1は、使用中ビット、アプリID、マスクアドレス、プロテクトアドレスという4つのフィールドを含む。
 使用中ビットフィールドには、該当の格納レジスタ405#1が使用中か否かを示すビットが格納される。アプリIDフィールドには、CPU#1にて実行中のアプリの識別情報が格納される。マスクアドレスフィールドには、アプリのアクセスするメモリ範囲を示すアドレスが格納される。具体的なメモリ範囲の大きさは、OSが有するメモリ管理機構によって決定される。プロテクトアドレスフィールドには、CPU#1にて実行中のアプリのプロテクト領域へのアドレスが格納される。なお、制御レジスタ404#1、格納レジスタ405#1の具体的な設定例は、図5にて後述する。
 判定部402#1は、記憶部401#1に記憶されたアクセス形態情報に応じてアドレス変換を行うか否かを判定する機能を有する。具体的には、判定部402#1は、アクセス形態フラグフィールドが2重アクセス形態であれば、2箇所のアドレスにアクセスを行い、アクセス形態フラグフィールドがアクセススルー形態であればアドレス変換を行わず、アドレススルーする。
 変換部403#1は、判定部402#1により2重アクセス形態であると判定された場合、一方のアクセス先についてアドレス変換を行う機能を有する。具体的には、変換部403#1は、プロテクト領域管理番号フィールドに設定された管理番号に対応する格納レジスタ405#1のマスクアドレスフィールドと、プロテクトアドレスフィールドとを参照してアドレス変換を行う。たとえば、変換部403は、変換後のアドレスを、下記(1)式によって変換する。
 変換後のアドレス=変換前のアドレス&マスクアドレス+プロテクトアドレス…(1)
 具体的に、変換前のアドレスとなるアプリからのアクセス先が、0x05000100であり、マスクアドレスフィールドが0x0000ffffであり、プロテクトアドレスフィールドが0x01000000である場合を想定する。このとき、変換部403は、(1)にしたがって、以下のように変換する。
 変換後のアドレス=0x05000100&0x0000ffff+0x01000000
⇔変換後のアドレス=0x01000100
 なお、メモリプロテクトコントローラ106#1は、CPU#1からのリードリクエストアクセスとライトリクエストアクセスのうち、ライトリクエストアクセスについて2重アクセス形態を行ってもよい。理由として、エラーが発生していない状態で、リードリクエストアクセスに関する2重アクセス形態を行っても同一の値が返ってくるので、変換を行わないアドレスに対するリードアクセスで十分なためである。
 図5は、メモリプロテクトコントローラ106の登録例を示す説明図である。図5で示すマルチコアプロセッサシステム100は、高信頼ホワイトリスト301に登録されており、高信頼アプリとなるアプリA、アプリCと、高信頼ホワイトリスト301に登録されておらず低信頼アプリとなるアプリB、アプリD、アプリEを実行している。アプリAとアプリBは、CPU#1に割り当てられており、アプリC~アプリEは、CPU#2に割り当てられている。さらに、CPU#1はアプリAを実行しており、CPU#2はアプリDを実行している。なお、アプリA~アプリEのアプリIDは、それぞれ、0x0001、0x0002、0x0003、0x0004、0x0005となる。
 カーネル#1は、OSがブートする際に、0x00000000~0x00500000となるメモリ領域をカーネル占有領域501として確保する。続けて、カーネル#1は、アプリの動作空間となるユーザ領域121を確保する前に、プロテクト領域124を確保する。たとえば、マルチコアプロセッサシステム100のアプリ同時実行数N=5であり、1つのアプリに対して許容するメモリサイズMを1[Mバイト]と想定する。
 このとき、カーネル#1は、N×M=5×1=5[Mバイト]となる0x01000000~0x0104ffffをプロテクト領域124として確保する。続けて、カーネル#1は、0x05000000~0xffffffffをユーザ領域121として確保する。また、カーネル#1は、ユーザ領域121からプロテクト領域124へのオフセットアドレスとして、0x05000000-0x01000000=0x04000000を記憶する。なお、M=1[Mバイト]であるため、1つのアプリがアクセスするアドレス範囲となるマスクアドレスは、0x0000ffffとなる。本実施の形態では、1つのアプリがアクセスするアドレス範囲は、説明の簡略化のため、常に固定であることを想定する。
 このとき、プロテクト領域124は、アプリからはアクセスできない領域となる。このため、たとえば、アプリA、アプリBがOS#1を通じてプロテクト領域124にアクセスしようとした場合、カーネル#1は、OS#1の管理外領域にアクセスすることを示すセグメントエラーを発行することになる。このように、マルチコアプロセッサシステム100は、プロテクト領域124をユーザ領域121以外の領域とすることで、低信頼アプリによってプロテクト領域124の不正書込を防ぐことができる。
 なお、プロテクト領域124となる領域は、連続範囲かつ固定でなくてもよく、メモリプロテクトコントローラ106が管理可能であれば、分散して確保されてもよいし、マルチコアプロセッサシステム100の実行中にダイナミックに変化してもよい。本実施の形態では、説明を簡略化するため、プロテクト領域124となる領域が連続範囲かつ固定で説明する。
 また、マルチコアプロセッサシステム100は、アプリA~アプリEが起動される際に、各アプリのコンテキストを格納する領域をユーザ領域121内に確保する。具体的に、カーネル#1は、アプリAの起動時にアプリAメモリ領域502を確保し、アプリBの起動時にアプリBメモリ領域503を確保する。また、カーネル#2は、アプリCの起動時にアプリCメモリ領域504を確保し、アプリDの起動時にアプリDメモリ領域505を確保し、アプリEの起動時にアプリEメモリ領域506を確保する。アプリAメモリ領域502~アプリEメモリ領域506の先頭アドレスは、それぞれ、0x05000000、0x05010000、0x05020000、0x05030000、0x05040000となる。
 また、マルチコアプロセッサシステム100は、高信頼アプリが起動する場合、プロテクト領域124内にもメモリ領域を確保する。具体的に、カーネル#1から指示を受けたハイパーバイザ#1が、アプリAの起動時にアプリAメモリ領域507を確保する。
 アプリAメモリ領域507のアドレスの設定方法として、たとえば、ハイパーバイザ#1は、アプリAメモリ領域502の先頭アドレスから、ユーザ領域121へのオフセットアドレスを減じたアドレスをアプリAメモリ領域507の先頭アドレスに設定する。具体的に、ハイパーバイザ#1は、アプリAメモリ領域502の先頭アドレス0x05000000-オフセットアドレス0x04000000=0x01000000をアプリAメモリ領域507の先頭アドレスに設定する。
 続けて、ハイパーバイザ#1は、格納レジスタ405#1_1に値を設定する。具体的に、ハイパーバイザ#1は、使用中ビットフィールドに使用中を設定し、アプリIDフィールドにアプリAのアプリIDである0x0001を設定する。続けて、ハイパーバイザ#1は、マスクアドレスフィールドに0x0000ffffを設定し、プロテクトアドレスフィールドにアプリAメモリ領域507の先頭アドレスである0x01000000を設定する。
 同様に、ハイパーバイザ#2は、アプリCの起動時にアプリCメモリ領域508を確保する。さらに、ハイパーバイザ#2は、格納レジスタ405#2_1に値を設定する。具体的に、ハイパーバイザ#2は、使用中ビットフィールドに使用中を設定し、アプリIDフィールドにアプリCのアプリIDである0x0003を設定する。続けて、ハイパーバイザ#2は、マスクアドレスフィールドに0x0000ffffを設定し、プロテクトアドレスフィールドにアプリCメモリ領域508の先頭アドレスである0x01020000を設定する。
 上述の段階で、マルチコアプロセッサシステム100はアプリの起動の段階を終え、実際に動作する状態に遷移する。CPU#1は、アプリA、アプリB、アプリA、…、の順でアプリを実行する。アプリ切替イベントが発生し、CPU#1がアプリAを実行するときに、アプリAは高信頼ホワイトリスト301に登録されているため、カーネル#1は、アクセス形態を2重アクセス形態に設定するようにハイパーバイザ#1に指示する。このとき、カーネル#1は、切替後のアプリIDも指示内容に含める。
 指示を受けたハイパーバイザ#1は、メモリプロテクトコントローラ106#1に2重アクセス形態を登録する。具体的に、ハイパーバイザ#1は、メモリプロテクトコントローラ106#1のアクセス形態フラグを2重アクセス形態に設定する。また、ハイパーバイザ#1は、指示されたアプリIDと一致する格納レジスタ405#1の管理番号を、プロテクト領域管理番号フィールドに設定する。このような動作により、マルチコアプロセッサシステム100は、OS#1にてアプリA、アプリB、…、と切り替えられる動作と同期して、メモリプロテクトコントローラ106#1にて2重アクセス形態、アクセススルー形態、…、と動作する。
 なお、この動作により、アプリAが実行中の場合、マルチコアプロセッサシステム100は、0x05000000および0x01000000の2つのアドレス空間にアクセスを行うことになる。2重アクセスによって、バスアクセスのパフォーマンスが劣化する可能性があるが、一般的に、64[ビット]系のCPUに対し、128[ビット]帯域のバス設定が行われるなど、CPUアクセスの帯域はバスの帯域を全て使用しない粗の状態である。したがって、バス105内にて、2つの64[ビット]のアクセスを1つの128[ビット]にまとめるデータパッキング機能と連動することにより、バスアクセスのパフォーマンスの劣化を避けることができる。
 同様に、CPU#2は、アプリC、アプリD、アプリE、アプリC、…、の順でアプリを実行する。たとえば、CPU#2がアプリDを実行するとき、アプリDは高信頼ホワイトリスト301に登録されていないため、カーネル#2は、アプリ切替イベントが発生し、アクセス形態をアクセススルー形態に設定するようにハイパーバイザ#2に指示する。このとき、カーネル#2は、切替後のアプリIDも指示内容に含める。指示を受けたハイパーバイザ#2は、メモリプロテクトコントローラ106#2にアクセススルー形態を登録する。具体的に、ハイパーバイザ#2は、メモリプロテクトコントローラ106#2のアクセス形態フラグをアクセススルー形態に設定する。
 次に、図5で説明した動作を行うフローチャートを図6~図9にて説明する。なお、図6で示す起動時の処理手順の一例を実行する実行主体は、CPU#1~CPU#xのうちいずれのCPUであってもよいが、説明の簡略化のため、CPU#1が実行する場合を想定して説明を行う。また、図7~図9で示すアプリ切替時の処理手順とエラー時の処理手順を実行する実行主体は、CPU#1~CPU#xの全てのCPUで実行されるが、説明の簡略化のため、CPU#1が実行する場合を想定して説明を行う。
 図6は、マルチコアプロセッサシステム100の起動時の処理手順の一例を示すフローチャートである。カーネル#1は、ブート開始する(ステップS601)と、メモリ管理機構を起動する(ステップS602)。カーネル#1は、メモリ管理機構により、N×M[バイト]のアドレス空間を確保する(ステップS603)。
 確保後、カーネル#1は、確保されたアドレス空間をハイパーバイザ#1に通知し(ステップS604)、通常運用を行い(ステップS605)、起動時の処理を終了する。なお、通常運用としては、ユーザ領域121の確保を行ったり、ブートの初めに起動されるアプリを起動したりする。アドレス空間の通知を受けたハイパーバイザ#1は、通知されたアドレス空間をプロテクト領域124として設定し(ステップS606)、起動時の処理を終了する。これにより、マルチコアプロセッサシステム100は、高信頼アプリのメモリ保護領域を確保することができる。
 図7、図8では、マルチコアプロセッサシステム100のアプリ切替時の処理手順の一例を示す。図7では、カーネル#1の処理手順の一例を示し、図8では、ハイパーバイザ#1の処理手順の一例を示す。
 図7は、マルチコアプロセッサシステム100のアプリ切替時の処理手順の一例を示すフローチャート(その1)である。カーネル#1は、イベントが発生したか否かを判断する(ステップS701)。イベントが発生していない場合(ステップS701:イベント発生なし)、カーネル#1は、一定時間後に、ステップS701を再度実行する。なお、カーネル#1は、一定時間にカーネル#1の他の処理を実行してもよい。
 アプリ起動イベントが発生した場合(ステップS701:アプリ起動イベント)、カーネル#1は、起動したアプリが高信頼ホワイトリスト301に登録されているか否かを判断する(ステップS702)。登録されている場合(ステップS702:Yes)、カーネル#1は、ハイパーバイザ#1に管理番号の追加指示を通知する(ステップS704)。なお、ステップS704の処理にて、カーネル#1は、起動したアプリのアプリIDを指示内容に含める。
 通知後、カーネル#1は、通常時の処理を実行し(ステップS703)、ステップS701の処理に移行する。登録されていない場合(ステップS702:No)、カーネル#1は、ステップS703の処理に移行する。なお、アプリ起動イベントの通常時の処理としては、たとえば、起動したアプリのコンテキストを格納する領域をユーザ領域121内に確保する処理等である。
 アプリ終了イベントが発生した場合(ステップS701:アプリ終了イベント)、カーネル#1は、終了したアプリが高信頼ホワイトリスト301に登録されているか否かを判断する(ステップS705)。登録されている場合(ステップS705:Yes)、カーネル#1は、ハイパーバイザ#1に管理番号の解放指示を通知する(ステップS706)。なお、ステップS706の処理にて、カーネル#1は、終了したアプリのアプリIDを指示内容に含める。
 通知後、または、登録されていない場合(ステップS705:No)、カーネル#1は、ステップS703の処理に移行する。なお、アプリ終了イベントの通常時の処理としては、たとえば、ユーザ領域121内に確保されている、終了したアプリのコンテキストを格納する領域を解放する処理等である。
 アプリ切替イベントが発生した場合(ステップS701:アプリ切替イベント)、カーネル#1は、切替後のアプリが高信頼ホワイトリスト301に登録されているか否かを判断する(ステップS707)。登録されている場合(ステップS707:Yes)、カーネル#1は、ハイパーバイザ#1に2重アクセス形態指示を通知する(ステップS708)。なお、ステップS708の処理にて、カーネル#1は、切替後のアプリのアプリIDを指示内容に含める。通知後、カーネル#1は、ステップS703の処理に移行する。登録されていない場合(ステップS707:No)、カーネル#1は、ハイパーバイザ#1にアクセススルー形態指示を通知する(ステップS709)。通知後、カーネル#1は、ステップS703の処理に移行する。
 なお、アプリ切替イベントの通常時の処理としては、たとえば、ディスパッチ処理がある。ディスパッチ処理とは、CPUのレジスタ等を切替前のアプリのコンテキストを格納する領域に退避し、切替後のアプリのコンテキストを格納する領域に退避されていたレジスタの値をCPUのレジスタに設定する。
 これにより、マルチコアプロセッサシステム100は、アプリの起動、終了、切替といったイベントに対して、メモリプロテクトコントローラ106への設定変更を指示することができる。
 図8は、マルチコアプロセッサシステム100のアプリ切替時の処理手順の一例を示すフローチャート(その2)である。なお、図8では、ハイパーバイザ#1がメモリプロテクトコントローラ106#1内の制御レジスタ404#1、格納レジスタ405#1を設定することを想定している。したがって、各ステップの説明において、説明の簡略化のため、設定先のレジスタがメモリプロテクトコントローラ106#1内のレジスタであるという記述を省略する。
 ハイパーバイザ#1は、指示内容を確認する(ステップS801)。指示内容が管理番号の追加指示である場合(ステップS801:管理番号の追加指示)、ハイパーバイザ#1は、格納レジスタ405#1_1~格納レジスタ405#1_yのうち、未使用の格納レジスタ405#1が存在するか否かを判断する(ステップS802)。
 未使用の格納レジスタ405#1が存在する場合(ステップS802:Yes)、ハイパーバイザ#1は、発見された格納レジスタ405#1の使用中ビットフィールドを使用中に設定する(ステップS803)。続けて、ハイパーバイザ#1は、発見された格納レジスタ405#1のアプリIDフィールドを指示内容に含まれていたアプリIDに設定する(ステップS804)。さらに、ハイパーバイザ#1は、発見された格納レジスタ405#1のプロテクトアドレスフィールドに未割当のアドレスを設定し(ステップS805)、ステップS801の処理に移行する。格納レジスタ405#1が存在しない場合(ステップS802:No)、ハイパーバイザ#1は、ステップS801の処理に移行する。
 なお、ステップS805の処理での未割当のアドレスとは、プロテクト領域124内で、他の高信頼アプリのメモリ領域として割り当てられていないメモリ領域のアドレスである。また、ステップS803~ステップS805の処理にて、マスクアドレスフィールドの記述がないが、本実施の形態におけるマスクアドレスは常に固定値であることを想定している。したがって、マスクアドレスフィールドの設定箇所として、たとえば、前述のステップS606にて、ハイパーバイザ#1は、格納レジスタ405#1_1~格納レジスタ405#1_yのマスクアドレスフィールドに0x0000ffffを設定する。
 指示内容が管理番号の解放指示である場合(ステップS801:管理番号の解放指示)、ハイパーバイザ#1は、格納レジスタ405#1_1~格納レジスタ405#1_yのうち、アプリIDフィールドが指示内容に含まれていたアプリIDと一致する格納レジスタ405#1を選択する(ステップS806)。選択後、ハイパーバイザ#1は、選択された格納レジスタ405#1のプロテクトアドレスフィールドの値を未割当のアドレスに設定する(ステップS807)。続けて、ハイパーバイザ#1は、選択された格納レジスタ405#1の使用中ビットフィールドを未使用に設定し(ステップS808)、ステップS801の処理に移行する。
 指示内容が2重アクセス形態指示である場合(ステップS801:2重アクセス形態指示)、ハイパーバイザ#1は、アプリIDフィールドが指示内容に含まれていたアプリIDと一致する格納レジスタ405#1の管理番号を、プロテクト管理番号フィールドに設定する(ステップS809)。続けて、ハイパーバイザ#1は、アクセス形態フラグを2重アクセス形態に設定し(ステップS810)、ステップS801の処理に移行する。
 指示内容がアクセススルー形態指示である場合(ステップS801:アクセススルー形態指示)、ハイパーバイザ#1は、アクセス形態フラグをアクセススルー形態に設定し(ステップS811)、ステップS801の処理に移行する。このように、マルチコアプロセッサシステム100は、アプリの起動、終了、切替といったイベントに対応してメモリプロテクトコントローラ106への設定を変更するため、アプリの各イベントに同期してアクセス形態を変更することができる。
 続けて、図9では、エラー時の処理手順の一例を説明する。図9で示すフローチャートでは、CPU#2で実行している低信頼アプリの動作検証が不十分であったため、低信頼アプリが他のメモリ領域へ書き込んだ結果、障害が発生した場合を想定している。不具合によって引き起こされる状態には2種類ある。
 1つ目の状態は、単純なプログラムエラーで高信頼アプリが終了する状態である。たとえば、OS#1で実行している高信頼アプリに対してエラーが発生した場合、OS#1はエラーの発生を検出し、ハイパーバイザ#1に通知することが可能である。2つ目の状態は、OS#1がハングする場合である。OS#1がハングすると高信頼アプリの障害状態を検出できない。したがって、OS#1と独立で動作しているハイパーバイザ#1が、周期監視によりOS#1がハングしているかどうかを検出する。
 図9は、マルチコアプロセッサシステム100のエラー時の処理手順の一例を示すフローチャートである。カーネル#2は、低信頼アプリを実行する(ステップS901)。この実行により、ユーザ領域121に不正書込が行われ、障害が発生した場合を想定する。
 不正書込により、アプリが強制終了するなどの軽微な障害が発生した場合、カーネル#1は、セグメントエラーを検出する(ステップS902)。検出後、カーネル#1は、マルチコアプロセッサシステム100を一時停止し(ステップS903)、ハイパーバイザ#1へリカバリ通知を指示する(ステップS904)。
 OSハング等の重大な障害が発生し、周期監視より検出した場合、または、リカバリ通知を指示された場合、ハイパーバイザ#1は、実行中アプリが高信頼ホワイトリスト301に登録されているか否かを判断する(ステップS905)。登録されている場合(ステップS905:Yes)、ハイパーバイザ#1は、プロテクト領域124内の実行中アプリのメモリ領域とユーザ領域121内の実行中アプリのメモリ領域のデータを比較する(ステップS906)。
 続けて、ハイパーバイザ#1は、比較結果が一致したか否かを判断する(ステップS907)。一致しない場合(ステップS907:No)、ハイパーバイザ#1は、ユーザ領域121内の実行中アプリのデータを復元する(ステップS908)。具体的に、ハイパーバイザ#1は、比較結果の差分をユーザ領域121内の実行中アプリのメモリ領域に上書きする。これにより、不正書込が行われたデータが正常なデータに復元することになる。
 高信頼ホワイトリスト301に登録されていない場合(ステップS905:No)、比較結果が一致した場合(ステップS907:Yes)、または、データ復元後、ハイパーバイザ#1は、OS#1がハング中か否かを判断する(ステップS909)。ハング中である場合(ステップS909:Yes)、ハイパーバイザ#1は、OS#1のウォームスタートを実行し(ステップS910)、エラー時の処理を終了する。具体的なウォームスタートの方法としては、チェックポイントリスタート技術や、ハイバネーション技術を適用することができる。
 ハング中でない場合(ステップS909:No)、ハイパーバイザ#1は、カーネル#1にマルチコアプロセッサシステム100の一時停止解除を通知し(ステップS911)、エラー時の処理を終了する。一時停止解除を受け付けたカーネル#1は、マルチコアプロセッサシステム100の一時停止を解除し(ステップS912)、エラー時の処理を終了する。このように、マルチコアプロセッサシステム100は、不正書込によるメモリ破壊が原因で高信頼アプリにエラーが発生した場合、データを復元し動作を続行することができる。
 以上説明したように、マルチコアプロセッサシステムによれば、高信頼アプリがアクセスする第1メモリ領域とは異なる第2メモリ領域を確保し、同一の内容を書き込む。これにより、マルチコアプロセッサシステムは、低信頼アプリが第1メモリ領域を破壊し障害が発生しても第2メモリ領域を使用してリカバリできるため、高信頼アプリと低信頼アプリを混載して実行できる。
 また、本実施の形態にかかるマルチコアプロセッサシステムが実行するソフトウェア保護方法は、シングルコアプロセッサシステムでのソフトウェア資産を、安全にマルチコアプロセッサシステム環境に継承することができる。また、本実施の形態にかかるマルチコアプロセッサシステムは、通常動作状態において、たとえば、高信頼アプリ実行中に低信頼アプリを実行させないなどといった、バイアスのかかった不利なスケジューリングが発生することなく運用することができる。また、本実施の形態にかかるマルチコアプロセッサシステムは、障害が発生した場合にリカバリ処理が発生し、通常動作状態では負荷のかかる処理を実行しないため、全体のパフォーマンスが劣化することはない。
 また、マルチコアプロセッサシステムは、所定のアプリを格納するリストにアクセス可能であり、実行されるアプリとリストに格納されたアプリとを比較してもよい。これにより、マルチコアプロセッサシステムは、実行されるアプリが高信頼アプリか否かを判断することができる。
 また、マルチコアプロセッサシステムは、実行されるアプリとリストに格納されたアプリが一致する場合、第1メモリ領域と第2メモリ領域とにアクセスするようにアプリを実行するCPUに対応するメモリプロテクトコントローラに登録してもよい。これにより、マルチコアプロセッサシステムは、高信頼アプリのデータを保護することができる。
 また、マルチコアプロセッサシステムは、実行されるアプリとリストに格納されたアプリが一致しない場合、第1メモリ領域にアクセスするようにアプリを実行するCPUに対応するメモリプロテクトコントローラに登録してもよい。これにより、マルチコアプロセッサシステムは、データの保護を行わなくてよい低信頼アプリについてはデータを保護せず、データ保護用に確保したプロテクト領域を有効に使用することができる。
 また、マルチコアプロセッサシステムは、自システムの異常検出に応答して、第1メモリ領域と第2メモリ領域との比較結果に基づいて第1メモリ領域を復元してもよい。これにより、マルチコアプロセッサシステムは、障害があったアプリをリカバリすることができる。
 また、マルチコアプロセッサシステムは、マルチコアプロセッサシステム環境での動作検証が行われたアプリを高信頼アプリとして保護してもよい。低信頼のアプリは、第1メモリ領域を自ら破壊してしまう場合があり、このとき、メモリプロテクトコントローラによって第2メモリ領域にデータを保護していても、第2メモリ領域も破壊する結果となる。この状態で、第1メモリ領域のデータを復元しても、破壊されたデータで上書きされてしまい、マルチコアプロセッサシステムは、リカバリすることができない。したがって、マルチコアプロセッサシステムは、不具合がないと検証された高信頼アプリを対象とすることで、低信頼アプリの動作によって発生した高信頼アプリの障害をリカバリすることができる。
 なお、本実施の形態で説明したマルチコアプロセッサシステムが実行するソフトウェア保護方法では、対象がアプリである場合に対して説明していたが、対象がライブラリであっても本実施の形態を適用することができる。
 なお、本実施の形態で説明したマルチコアプロセッサシステムが実行するソフトウェア保護方法は、予め用意されたプログラムをパーソナル・コンピュータやワークステーション等のコンピュータで実行することにより実現することができる。また、ソフトウェア保護方法を実行するソフトウェア保護プログラムは、ハードディスク、CD-ROM、DVD、メモリカード等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。またソフトウェア保護プログラムは、インターネット等のネットワークを介して配布してもよい。
 また、本実施の形態で説明したメモリプロテクトコントローラ106は、スタンダードセルやストラクチャードASIC(Application Specific Integrated Circuit)などの特定用途向けIC(以下、単に「ASIC」と称す。)やFPGAなどのPLD(Programmable Logic Device)によっても実現することができる。具体的には、たとえば、上述したメモリプロテクトコントローラ106の機能(記憶部401~変換部403)をHDL記述によって機能定義し、そのHDL記述を論理合成してASICやPLDに与えることにより、メモリプロテクトコントローラ106を製造することができる。
 #1、#2 CPU
 100 マルチコアプロセッサシステム
 104 メモリ
 105 バス
 106 メモリプロテクトコントローラ
 111 低信頼アプリ
 112 高信頼アプリ
 121 ユーザ領域
 122 低信頼アプリメモリ領域
 123 高信頼アプリメモリ領域
 124 プロテクト領域
 125 高信頼アプリメモリ領域
 301 高信頼ホワイトリスト
 311 確保部
 312 検出部
 313 比較部
 314 通知部
 315 登録部
 316 検出部
 317 検出部
 318 比較部
 319 復元部

Claims (10)

  1.  複数のCPUと、
     メモリと、
     前記複数のCPUと前記メモリとの間に配置されるメモリプロテクトコントローラと、
     を含み、
     前記メモリプロテクトコントローラは、
     アプリケーション実行時に前記複数のCPUのアクセス要求によって第1メモリ領域にアクセスするとともに、システムブート時に確保された第2メモリ領域にアクセスすること
     を特徴とするマルチコアプロセッサシステム。
  2.  所定のアプリケーションのリストを格納するテーブルと、
     実行されるアプリケーションと前記リストのアプリケーションとを比較する比較部と、
     を含むことを特徴とする請求項1に記載のマルチコアプロセッサシステム。
  3.  比較結果が一致を示すとき、前記実行されるアプリケーションについて、前記第1メモリ領域と前記第2メモリ領域とをアクセスする指示を登録すること
     を特徴とする請求項2に記載のマルチコアプロセッサシステム。
  4.  比較結果が不一致を示すとき、前記実行されるアプリケーションについて、前記第1メモリ領域のみをアクセスする指示を登録すること
     を特徴とする請求項2に記載のマルチコアプロセッサシステム。
  5.  自システムの異常の検出に応答して、前記実行されるアプリケーションが実行中であるときに前記第1メモリ領域と前記第2メモリ領域との比較結果に基づいて前記第1メモリ領域を復元すること
     を特徴とする請求項1乃至請求項4の何れか一に記載のマルチコアプロセッサシステム。
  6.  前記所定のアプリケーションは、マルチコアプロセッサシステム環境での動作検証が行われたアプリケーションであること
     を特徴とする請求項1乃至請求項5の何れか一に記載のマルチコアプロセッサシステム。
  7.  前記複数のCPUの数がN(Nは2以上の整数)であり、アプリケーション実行時に割り当てられる前記メモリのメモリ領域がM(Mは1以上の整数)バイトであるとき、前記第2メモリ領域の大きさはN×Mであること
     を特徴とする請求項1乃至請求項6の何れか一に記載のマルチコアプロセッサシステム。
  8.  複数のCPUと、
     メモリと、
     前記複数のCPUと前記メモリとの間に配置されるメモリプロテクトコントローラと、
     を含み、
     前記メモリプロテクトコントローラは、
     アクセス形態情報が第1アクセス形態を示す場合には、アプリケーション実行において第1メモリ領域へのアクセスと同様に第2メモリ領域をアクセスし、
     アクセス形態情報が第2アクセス形態を示す場合には、アプリケーション実行において前記第1メモリ領域のみをアクセスすること
     を特徴とするマルチコアプロセッサシステム。
  9.  前記アプリケーションとリストに登録されるアプリケーションとの比較結果に基づいて前記アクセス形態情報が設定されること
     を特徴とする請求項8に記載のマルチコアプロセッサシステム。
  10.  前記比較結果が一致を示すとき、前記アクセス形態情報が第1アクセス形態に設定され、
     前記比較結果が不一致を示すとき、前記アクセス形態情報が第2アクセス形態に設定されること
     を特徴とする請求項9に記載のマルチコアプロセッサシステム。
PCT/JP2011/057715 2011-03-28 2011-03-28 マルチコアプロセッサシステム WO2012131884A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/JP2011/057715 WO2012131884A1 (ja) 2011-03-28 2011-03-28 マルチコアプロセッサシステム
CN201180069869.6A CN103493022B (zh) 2011-03-28 2011-03-28 多核处理器系统
JP2013506906A JP5716824B2 (ja) 2011-03-28 2011-03-28 マルチコアプロセッサシステム
US14/036,758 US20140025903A1 (en) 2011-03-28 2013-09-25 Multi-core processor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2011/057715 WO2012131884A1 (ja) 2011-03-28 2011-03-28 マルチコアプロセッサシステム

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/036,758 Continuation US20140025903A1 (en) 2011-03-28 2013-09-25 Multi-core processor system

Publications (1)

Publication Number Publication Date
WO2012131884A1 true WO2012131884A1 (ja) 2012-10-04

Family

ID=46929719

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/057715 WO2012131884A1 (ja) 2011-03-28 2011-03-28 マルチコアプロセッサシステム

Country Status (4)

Country Link
US (1) US20140025903A1 (ja)
JP (1) JP5716824B2 (ja)
CN (1) CN103493022B (ja)
WO (1) WO2012131884A1 (ja)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9760712B2 (en) * 2014-05-23 2017-09-12 Vmware, Inc. Application whitelisting using user identification
US10387668B2 (en) 2014-07-08 2019-08-20 International Business Machines Corporation Data protected process cores
JP6360387B2 (ja) * 2014-08-19 2018-07-18 ルネサスエレクトロニクス株式会社 プロセッサシステム、エンジン制御システム及び制御方法
CN104199777B (zh) * 2014-09-11 2017-10-03 福州瑞芯微电子股份有限公司 一种中央处理器系统验证方法及装置
CN112462926B (zh) * 2020-12-09 2021-07-30 北京元心科技有限公司 移动终端中的电源管理方法、装置、电子设备及计算机存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05108493A (ja) * 1991-10-17 1993-04-30 Shikoku Nippon Denki Software Kk メモリ制御方式
JPH05143467A (ja) * 1991-11-22 1993-06-11 Mitsubishi Electric Corp 冗長構成切替方法および冗長構成切替装置
JP2003316752A (ja) * 2002-04-25 2003-11-07 Nec Corp マルチプロセッサシステムおよびリソース割り当て方法
JP2009251967A (ja) * 2008-04-07 2009-10-29 Toyota Motor Corp マルチコアシステム
JP2009271597A (ja) * 2008-04-30 2009-11-19 Toshiba Corp プロセッサ
JP2010118010A (ja) * 2008-11-14 2010-05-27 Nomura Research Institute Ltd 情報取得仲介プログラム、オペレーティングシステム、情報取得仲介方法

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6449699B2 (en) * 1999-03-29 2002-09-10 International Business Machines Corporation Apparatus and method for partitioned memory protection in cache coherent symmetric multiprocessor systems
JP3968227B2 (ja) * 2001-10-05 2007-08-29 ソフトバンクテレコム株式会社 情報処理方法および情報処理装置
US7149862B2 (en) * 2002-11-18 2006-12-12 Arm Limited Access control in a data processing apparatus
US20050080999A1 (en) * 2003-10-08 2005-04-14 Fredrik Angsmark Memory interface for systems with multiple processors and one memory system
EP1763744B1 (en) * 2004-04-30 2017-07-19 BlackBerry Limited System and method of owner application control of electronic devices
US7406711B2 (en) * 2005-09-02 2008-07-29 Motorola, Inc. Method and apparatus for enforcing independence of processors on a single IC
US7953914B2 (en) * 2008-06-03 2011-05-31 International Business Machines Corporation Clearing interrupts raised while performing operating system critical tasks
US8296526B2 (en) * 2009-06-17 2012-10-23 Mediatek, Inc. Shared memory having multiple access configurations
CN201716716U (zh) * 2009-12-15 2011-01-19 深圳市杰和科技发展有限公司 一种基本输入输出系统只读存储器数据的备份系统
US8438338B2 (en) * 2010-08-15 2013-05-07 International Business Machines Corporation Flexible use of extended cache using a partition cache footprint

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05108493A (ja) * 1991-10-17 1993-04-30 Shikoku Nippon Denki Software Kk メモリ制御方式
JPH05143467A (ja) * 1991-11-22 1993-06-11 Mitsubishi Electric Corp 冗長構成切替方法および冗長構成切替装置
JP2003316752A (ja) * 2002-04-25 2003-11-07 Nec Corp マルチプロセッサシステムおよびリソース割り当て方法
JP2009251967A (ja) * 2008-04-07 2009-10-29 Toyota Motor Corp マルチコアシステム
JP2009271597A (ja) * 2008-04-30 2009-11-19 Toshiba Corp プロセッサ
JP2010118010A (ja) * 2008-11-14 2010-05-27 Nomura Research Institute Ltd 情報取得仲介プログラム、オペレーティングシステム、情報取得仲介方法

Also Published As

Publication number Publication date
JPWO2012131884A1 (ja) 2014-07-24
CN103493022A (zh) 2014-01-01
CN103493022B (zh) 2016-05-04
JP5716824B2 (ja) 2015-05-13
US20140025903A1 (en) 2014-01-23

Similar Documents

Publication Publication Date Title
EP2989579B1 (en) Redundant system boot code in a secondary non-volatile memory
US9880908B2 (en) Recovering from compromised system boot code
JP4916576B2 (ja) マルチオペレーティングシステム(os)起動装置及びマルチos起動プログラム及び記録媒体及びマルチos起動方法
US10733288B2 (en) Verifying controller code and system boot code
US8028174B2 (en) Controlling update of content of a programmable read-only memory
JP5203967B2 (ja) メモリ障害を処理するために、センサーネットワークで使用可能な方法及びシステム
US10032029B2 (en) Verifying integrity of backup file in a multiple operating system environment
JP6736456B2 (ja) 情報処理装置およびプログラム
US9205809B2 (en) Vehicle unit and method for operating the vehicle unit
US8146150B2 (en) Security management in multi-node, multi-processor platforms
US8327415B2 (en) Enabling byte-code based image isolation
JP5716824B2 (ja) マルチコアプロセッサシステム
WO2015174512A1 (ja) 情報処理装置、情報処理監視方法、プログラム、及び記録媒体
JP6984710B2 (ja) コンピュータ装置およびメモリ管理方法
JP2009157542A (ja) 情報処理装置及びそのスタックポインタ更新方法
WO2007022687A1 (fr) Système et procédé de contrôle de sécurité de système d’exploitation
JP5920509B2 (ja) コントローラの制御プログラム、およびコントローラの制御方法
WO2010032330A1 (ja) 情報処理装置及びそのメモリ保護方法
US20080313489A1 (en) Flash memory-hosted local and remote out-of-service platform manageability
JP6462540B2 (ja) ドライバ装置、情報処理システム、プログラムおよび方法
JP5565187B2 (ja) 情報処理装置および割込み制御プログラム
JP2020140689A (ja) 計算機、オペレーティングシステム及び方法
US20240134720A1 (en) Apparatus, and method
JP5454686B2 (ja) マルチコアプロセッサシステム、復元プログラム、および復元方法
JP2009271597A (ja) プロセッサ

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180069869.6

Country of ref document: CN

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

Ref document number: 11862026

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2013506906

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: 11862026

Country of ref document: EP

Kind code of ref document: A1