Electronic control unit, memory protection method, and memory protection program
The electronic control device dynamically switches memory areas based on vehicle states to address the limitations of conventional memory protection, achieving flexible and efficient memory protection for enhanced vehicle safety and reliability.
Patent Information
- Application Number
- JP2025078020
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2026-11-19
AI Technical Summary
Conventional memory protection functions in microcontrollers are limited by the number of protectable memory areas and lack flexibility to adapt to diverse vehicle-specific needs, particularly in terms of functional safety and security.
An electronic control device with a protection function unit that dynamically switches memory areas based on vehicle states, allowing flexible and efficient memory protection by assigning different functions to memory areas and restricting access accordingly.
This configuration optimizes resource efficiency, expands the range of protectable memory areas, and ensures appropriate protection based on vehicle states, enhancing system safety and reliability.
Smart Images

Figure 2026182092000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an electronic control device, a memory protection method, and a memory protection program that restrict access from a control unit that executes various types of control to a memory including a plurality of memory areas in which various types of information are stored.
Background Art
[0002] For example, some microcontrollers included in electronic control devices mounted on vehicles are provided with a memory protection function for restricting unintended access from each bus to the memory. In this specification, a microcontroller may be abbreviated as a microcomputer. Patent Document 1 discloses a technique related to such a memory protection function. In the memory protection function, a protection target area, which is an area to be protected among a plurality of memory areas included in the memory, is specified by a register, but there is an upper limit on the number of protection target areas. Particularly in vehicle systems, protection of a large number of memory areas is required in accordance with requirements such as functional safety and security.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of Invention
Problems to be Solved by the Invention
[0004] In the conventional memory protection function, the number of memory areas that can be protected is fixed due to register constraints, and it is difficult to flexibly change protection settings in response to diverse requirements. In addition, although general dynamic memory protection techniques exist as disclosed in Patent Document 1, in such general dynamic memory protection techniques, the relationship between protection target areas is fixed, and when applied to vehicles, it is difficult to realize efficient memory protection that meets the unique needs of vehicles.
[0005] The present invention has been made in view of the above circumstances, and its objective is to provide an electronic control device, a memory protection method, and a memory protection program that can realize flexible and efficient memory protection in accordance with the specific needs of a vehicle. [Means for solving the problem]
[0006] The electronic control device described in claim 1 is an electronic control device mounted on a vehicle, comprising: a control unit (11) that performs various controls; a memory (12) including a plurality of memory areas (13A to 13D) for storing various information; and a protection function unit (14, 44) that sets a protected area to which access from the control unit is restricted. Each of the plurality of memory areas is assigned to a different function. The plurality of memory areas include a group of areas consisting of any two or more of them.
[0007] The protection function unit includes a first protection function that sets one of the plurality of memory areas as the protected area and restricts access from the control unit, and a second protection function that sets one of the two or more memory areas included in the area group as the protected area and restricts access from the control unit. In the second protection function, the protection function unit dynamically switches the memory area set as the protected area according to various conditions related to the vehicle.
[0008] The above configuration allows for the optimization of resource efficiency and substantially expands the range of memory areas that can be protected. Furthermore, this configuration makes it possible to protect areas deemed appropriate for each of the various states related to the vehicle, enabling flexible memory protection and contributing to improved system safety and reliability in the vehicle. Therefore, the above configuration enables flexible and efficient memory protection that meets the specific needs of the vehicle. [Brief explanation of the drawing]
[0009] [Figure 1] A schematic diagram showing the configuration of the vehicle system according to the first embodiment. [Figure 2] A schematic diagram showing the configuration of the microcontroller in the comparative example. [Figure 3] This figure schematically shows the configuration of the microcontroller according to the first embodiment and illustrates the first example of operation. [Figure 4] A flowchart showing the processing flow in the first operation example according to the first embodiment. [Figure 5] This figure schematically shows the configuration of the microcontroller according to the first embodiment and illustrates the second example of operation. [Figure 6] A flowchart showing the processing flow in the second operation example according to the first embodiment. [Figure 7] A schematic diagram showing the configuration of the vehicle system according to the second embodiment. [Figure 8] This figure schematically shows the configuration of the microcontroller according to the second embodiment and illustrates an example of its operation. [Figure 9] A flowchart showing the processing flow in an example of operation according to the second embodiment. [Modes for carrying out the invention]
[0010] Several embodiments will be described below with reference to the drawings. In each embodiment, substantially identical components are denoted by the same reference numerals and their descriptions are omitted. (First Embodiment) The first embodiment will be described below with reference to Figures 1 to 6.
[0011] As shown in Figure 1, the vehicle system 1 of this embodiment is mounted on a vehicle such as an automobile, and includes a vehicle state detection unit 2 and an electronic control unit 3. In this specification and the drawings, the electronic control unit may be referred to by its abbreviation, ECU. In this embodiment, a configuration in which the vehicle system 1 has one ECU 3 is illustrated, but the number of ECUs that the vehicle system 1 has may be two or more.
[0012] The vehicle state detection unit 2 includes various sensors and equipment, and detects various states related to the vehicle. The vehicle state detection unit 2 outputs a signal to the ECU 3 representing the result of detecting various states related to the vehicle. In this embodiment, the various states related to the vehicle include the driving state, when the vehicle is in motion, and the stationary state, when the vehicle is stationary. In addition, in this embodiment, the various states related to the vehicle include the connected state, when diagnostic equipment for diagnostics is connected to the vehicle, and the unconnected state, when diagnostic equipment is not connected to the vehicle. The connected state is a state that the vehicle enters when it is in maintenance mode, and specifically, for example, a state in which diagnostic equipment is connected to the vehicle at a dealership. In the following description, the various states related to the vehicle may be referred to as vehicle-related states.
[0013] The ECU3 is primarily composed of a microcontroller 10 equipped with a CPU 11, memory 12, and the like. The CPU 11 performs various controls and is an example of a control unit. The memory 12 is, for example, RAM, ROM, or flash memory, and includes multiple memory areas where various information is stored, specifically four memory areas 13A, 13B, 13C, and 13D. In the following description, when it is not necessary to distinguish between the multiple memory areas 13A to 13D, the letters at the end of their names will be omitted and they will be collectively referred to as memory area 13. The number of memory areas 13 included in memory 12 may be three or fewer, or five or more. In this case, the multiple memory areas 13 include a group of areas consisting of any two or more of them.
[0014] Various functions of the microcomputer 10 are realized by the CPU 11 executing a program stored in a non-transitory tangible recording medium. The non-transitory tangible recording medium is, for example, the ROM in the memory 12. When the program is executed by the CPU 11, a method corresponding to the program is executed. The aforementioned program includes a memory protection program that restricts access from the CPU 11 to the memory 12. The aforementioned method includes a memory protection method that restricts access from the CPU 11 to the memory 12.
[0015] The microcomputer 10 includes, as a configuration for realizing the memory protection function, a functional block referred to as a protection function unit 14 that sets a protection target area for restricting access from the CPU 11 in the memory 12. Such a functional block can be realized by software, realized by hardware, or realized by cooperation of software and hardware. The protection function unit 14 can set any three of the four memory areas 13A to 13D as protection target areas. That is, in the memory protection function possessed by the microcomputer 10, the number of protectable memory areas 13 is three.
[0016] The protection function unit 14 has a first protection function and a second protection function. The first protection function is a function of setting any one of the plurality of memory areas 13 as a protection target area to restrict access from the CPU 11. The second protection function is a function of setting any one of two or more memory areas 13 included in an area group as a protection target area to restrict access from the CPU 11. In the second protection function, the protection function unit 14 can dynamically switch the memory area 13 set as the protection target area in accordance with various states related to the vehicle.
[0017] The protection function unit 14 includes functional blocks called a protection unit 21 and a switching unit 22 to implement the respective functions described above. The protection unit 21 is a functional block for implementing the first protection function. The protection unit 21 specifies a specific memory area 13 with a register, and imposes access restrictions on that memory area 13 to prevent unintended access from a specific task of the CPU 11. In this case, the protection unit 21 sets the memory areas 13C and 13D as protection target areas. Therefore, in the present embodiment, access from the CPU 11 to the memory areas 13C and 13D via the data buses 23C and 23D is blocked by the protection unit 21.
[0018] In the present embodiment, an area group consisting of memory areas 13A and 13B is set in advance. That is, a group consisting of two consecutive memory areas 13 can be set as the area group. For example, various combination groups can be set as the area group, such as a group consisting of memory areas 13B and 13C, a group consisting of memory areas 13C and 13D, and the like.
[0019] It should be noted that a group consisting of two non-consecutive memory areas 13 can also be set as the area group. For example, various combination groups can be set as the area group, such as a group consisting of memory areas 13A and 13C, a group consisting of memory areas 13B and 13D, a group consisting of memory areas 13A and 13D, and the like.
[0020] The area group is predetermined, and specifically, can be set as follows. That is, information related to the area group is stored in advance in the form of a table or the like in the ROM or the like of the memory 12 of the microcomputer 10. The information related to the area group includes, in addition to the setting information of the area group, information related to the association between the vehicle-related state and the protection target area. The microcomputer 10 acquires information of the preset area group based on the information, and executes a second protection function to be described later.
[0021] The switching unit 22 is a functional block for realizing the second protection function. In this case, the switching unit 22 sets one of the memory areas 13A and 13B included in the area group as the area to be protected. The switching unit 22 dynamically switches the memory area 13 to be set as the area to be protected from among memory areas 13A and 13B according to the vehicle-related status. The switching unit 22 has a memory address for securing dynamic memory protection, and can switch the area to be protected by specifying the dynamic address in a register.
[0022] The switching unit 22 sets memory area 13A as the protected area when the vehicle-related state is a predetermined first state, and sets memory area 13B as the protected area when the vehicle-related state is a predetermined second state different from the first state. Therefore, in this embodiment, when the vehicle-related state is the first state, access from the CPU 11 to memory area 13A via the data bus 23AB is blocked by the protection unit 21 and the switching unit 22. In other words, in this embodiment, when the vehicle-related state is the first state, as shown by the solid arrow in Figure 1, access from the CPU 11 to memory area 13B via the data bus 23AB is permitted without being blocked by the protection unit 21 and the switching unit 22.
[0023] Furthermore, in this embodiment, when the vehicle-related state is the second state, access from the CPU 11 to the memory area 13B via the data bus 23AB is blocked by the protection unit 21 and the switching unit 22. In other words, in this embodiment, when the vehicle-related state is the second state, as shown by the dashed arrow in Figure 1, access from the CPU 11 to the memory area 13A via the data bus 23AB is permitted without being blocked by the protection unit 21 and the switching unit 22.
[0024] Each of the multiple memory areas 13A to 13D is assigned to a specific function. In this case, memory area 13A or 13B stores information that should or should not be set as a protected area depending on various conditions related to the vehicle. Specifically, memory area 13A or 13B stores information related to functional safety, such as engine control and brake control. Memory area 13A or 13B also stores information related to security, such as communication security and data writing. Furthermore, memory area 13A or 13B stores information that should not be accessed by diagnostic equipment. Furthermore, memory area 13A or 13B also stores information that should be accessed by diagnostic equipment, such as diagnostic log information.
[0025] In this case, memory area 13C or 13D stores information that should be designated as a protected area regardless of the various vehicle-related states. Specifically, memory area 13C or 13D stores information about the boot loader, that is, the startup program, which is the first program that runs when the vehicle's computer starts up. If memory area 13 containing such information is unintentionally overwritten, the vehicle may malfunction or a malicious program may be run. In other words, unintentional overwriting of memory area 13 containing such information directly impacts both safe driving and security. Therefore, it is desirable to always protect such areas regardless of the vehicle-related state.
[0026] Furthermore, memory area 13C or 13D stores information related to the management of the diagnostic program. In other words, memory area 13, where such information is stored, is the area that manages the program used by dealers and others when diagnosing a vehicle. If such an area is tampered with, it could lead to incorrect diagnoses being performed or the vehicle's settings being changed with malicious commands. Therefore, it is desirable to always protect such an area, regardless of the vehicle's status, in order to ensure safety and accurate diagnosis.
[0027] Next, we will describe an example of the specific operation of the memory protection function unit 14 with the above configuration. For comparison with this embodiment, we will first describe a specific example of the operation of a conventional memory protection function as a comparative example, and then describe two specific examples of the operation of memory protection in this embodiment.
[0028] [1] Comparative example As shown in Figure 2, the comparative example microcontroller 31 differs from the microcontroller 10 of this embodiment in that it has a protection function unit 32 instead of a protection function unit 14. The comparative example's protection function unit 32 differs from the protection function unit 14 in that it has a protection unit 33 instead of a protection unit 21, and the switching unit 22 is omitted. The protection unit 33 has only the first protection function among the functions of the protection unit 21. In other words, the comparative example's protection function unit 32 differs from the protection function unit 14 of this embodiment in that the second protection function is omitted.
[0029] Similar to the protection function unit 14 in this embodiment, the protection function unit 32 can set any three of the four memory areas 13A to 13D as the areas to be protected. In this case, the protection unit 33 sets memory areas 13A, 13B, and 13C as the areas to be protected. Therefore, in the comparative example, access from the CPU 11 to memory areas 13A, 13B, and 13C via data buses 23A, 23B, and 23C is blocked by the protection unit 33.
[0030] However, in the comparative example, the memory protection setting is static, and regardless of changes in the vehicle-related state, only the memory areas 13A to 13C, which are set as protected areas, are protected. Therefore, in the comparative example, it is not possible to set memory protection for memory area 13D. Consequently, in the comparative example, access from the CPU 11 to memory area 13D via the data bus 23D is always permitted without being blocked by the protection unit 33.
[0031] [2] First example of operation In the first example of operation, it is assumed that the following information is stored in each of the memory areas 13A to 13D. Memory area 13A: Information on functional safety Memory area 13B: Security information Memory area 13C: Information about the boot loader Memory area 13D: Information about the diagnostic program
[0032] Furthermore, in the first operation example, the switching unit 22 sets the memory area 13A, which stores information related to functional safety, as the protected area when the vehicle-related state is in a driving state, and sets the memory area 13B, which stores information related to security, as the protected area when the vehicle-related state is in a stationary state.
[0033] In the first operational example, the protection function unit 14 sets memory areas 13C and 13D as protected areas regardless of the vehicle's operating status. Therefore, as shown in Figure 3, in the first operational example, regardless of the vehicle's status, access from the CPU 11 to memory areas 13C and 13D via data buses 23C and 23D is blocked by the protection unit 21.
[0034] In the first operational example, the protection function unit 14 dynamically switches the protected area according to the vehicle's driving status. As shown in Figure 3, in the first operational example, when the vehicle-related state is in the driving state, that is, when the vehicle is in motion, access from the CPU 11 to the memory area 13A via the data bus 23AB is blocked by the protection unit 21 and the switching unit 22. In other words, in the first operational example, when the vehicle is in motion, as shown by the solid arrows in Figure 3, access from the CPU 11 to the memory area 13B via the data bus 23AB is permitted without being blocked by the protection unit 21 and the switching unit 22.
[0035] As shown in Figure 3, in the first operational example, when the vehicle-related state is stopped, that is, when the vehicle is stopped, access from the CPU 11 to the memory area 13B via the data bus 23AB is blocked by the protection unit 21 and the switching unit 22. In other words, in the first operational example, when the vehicle is stopped, as shown by the dashed arrow in Figure 3, access from the CPU 11 to the memory area 13A via the data bus 23AB is permitted without being blocked by the protection unit 21 and the switching unit 22.
[0036] The processing flow in this first example of operation is as shown in the flowchart of Figure 4. The microcontroller 10 is configured to repeatedly execute the series of processes shown in Figure 4 at predetermined timings. As shown in Figure 4, in step S101, the vehicle information, which is the detection result from the vehicle state detection unit 2 and in this case indicates whether the vehicle is in a driving state, a stationary state, or any other state, is stored in a buffer or similar device provided by the microcontroller 10.
[0037] After step S101 is executed, the process proceeds to step S102, where vehicle information stored in a buffer or similar is retrieved, and it is determined what state the vehicle information represents. If the vehicle information represents a state other than driving or stopped, step S102 will show "Not applicable," and this series of processes will end. If the vehicle information represents a driving state, step S102 will show "Driving," and the process proceeds to step S103.
[0038] In step S103, memory area 13A is selected as the memory area 13 to be set as the protected area when the vehicle-related state is in the driving state. After step S103 is executed, the process proceeds to step S104, where a switch is performed so that the protected area becomes memory area 13A. At this time, if the protected area is already memory area 13A, that setting is maintained. After step S104 is executed, this series of processes is completed.
[0039] On the other hand, if the vehicle information represents a stationary state, the state becomes "stationary" in step S102, and the process proceeds to step S105. In step S105, memory area 13B is selected as the memory area 13 to be set as the protected area when the vehicle-related state is stationary. After step S105 is executed, the process proceeds to step S106, where a switch is performed so that the protected area becomes memory area 13B. If the protected area is already memory area 13B at this time, that setting is maintained. After step S106 is executed, this series of processes is completed.
[0040] [3] Second example of operation In the second example, it is assumed that the following information is stored in each of the memory areas 13A to 13D. Memory area 13A: Information that should not be accessed by diagnostic equipment. Memory area 13B: Information that allows access from diagnostic equipment. Memory area 13C: Information about the boot loader Memory area 13D: Information about the diagnostic program
[0041] In the second operation example, the switching unit 22 sets memory area 13A, which stores information that prohibits access from the diagnostic device when the vehicle-related status is connected, as the protected area, and sets memory area 13B, which stores information that allows access from the diagnostic device when the vehicle-related status is disconnected, as the protected area.
[0042] In the second operational example, the protection function unit 14 sets memory areas 13C and 13D as protected areas regardless of the vehicle's operating status. Therefore, as shown in Figure 5, in the second operational example, regardless of the vehicle's status, access from the CPU 11 to memory areas 13C and 13D via data buses 23C and 23D is blocked by the protection unit 21.
[0043] In the second operational example, the protection function unit 14 dynamically switches the protected area depending on the connection status of the diagnostic equipment, i.e., whether or not it is in maintenance mode. As shown in Figure 5, in the second operational example, when the vehicle-related state is connected, i.e., when the diagnostic equipment is connected, access from the CPU 11 to the memory area 13A via the data bus 23AB is blocked by the protection unit 21 and the switching unit 22. In other words, in the second operational example, when the diagnostic equipment is connected, i.e., while the diagnostic equipment is connected, access from the CPU 11 to the memory area 13B via the data bus 23AB is permitted without being blocked by the protection unit 21 and the switching unit 22, as shown by the solid arrows in Figure 5.
[0044] As shown in Figure 5, in the second operation example, when the vehicle-related status is disconnected, that is, when the diagnostic equipment is not connected, access from the CPU 11 to the memory area 13B via the data bus 23AB is blocked by the protection unit 21 and the switching unit 22. In other words, in the second operation example, when the diagnostic equipment is not connected, that is, when the diagnostic equipment is not connected, access from the CPU 11 to the memory area 13A via the data bus 23AB is permitted without being blocked by the protection unit 21 and the switching unit 22, as shown by the dashed arrow in Figure 5.
[0045] The processing flow in this second example of operation is as shown in the flowchart of Figure 6. The microcontroller 10 is configured to repeatedly execute the series of processes shown in Figure 6 at predetermined timings. As shown in Figure 6, in step S201, the connection information of the diagnostic equipment, which is the detection result by the vehicle state detection unit 2 and in this case indicates whether the vehicle-related state is connected, disconnected, or in any other state, is stored in a buffer or similar in the microcontroller 10.
[0046] After step S201 is executed, the process proceeds to step S202, where connection information for the diagnostic device stored in a buffer or similar is retrieved, and it is determined what state the connection information represents. If the connection information for the diagnostic device represents a state other than connected or disconnected, step S202 will show "Not applicable," and this series of processes will end. If the connection information for the diagnostic device represents a connected state, step S202 will show "Diagnostic device connected," and the process proceeds to step S203.
[0047] In step S203, memory area 13A is selected as the memory area 13 to be set as the protected area when the vehicle-related status is in the connected state. After step S203 is executed, the process proceeds to step S204, where a switch is performed so that the protected area becomes memory area 13A. At this time, if the protected area is already memory area 13A, that setting is maintained. After step S204 is executed, this series of processes is completed.
[0048] On the other hand, if the connection information for the diagnostic device indicates an unconnected state, step S202 will show "Diagnostic device unconnected," and the process will proceed to step S205. In step S205, memory area 13B is selected as the memory area 13 to be set as the protected area when the vehicle-related status is unconnected. After step S205 is executed, the process proceeds to step S206, where a switch is performed so that the protected area becomes memory area 13B. If the protected area is already memory area 13B at this time, that setting is maintained. After step S206 is executed, this series of processes is completed.
[0049] According to the embodiment described above, the following effects can be obtained. The microcontroller 10 of the ECU3 includes a CPU 11 that performs various controls, a memory 12 that includes multiple memory areas 13A to 13D where various information is stored, and a protection function unit 14 that sets protected areas to restrict access from the CPU 11. In this case, the multiple memory areas 13 include a group of areas consisting of any two or more of them. The protection function unit 14 has a first protection function that restricts access from the CPU 11 by setting one of the multiple memory areas 13 as a protected area, and a second protection function that restricts access from the CPU 11 by setting one of the two or more memory areas 13 included in the group of areas as a protected area. In the second protection function, the protection function unit 14 dynamically switches the memory area 13 to be set as a protected area according to various conditions related to the vehicle.
[0050] The above configuration allows for the optimization of resource efficiency and effectively expands the range of protectable memory areas 13 from three (a number determined by register constraints, etc.) to four. Furthermore, this configuration makes it possible to protect areas deemed appropriate for each of the various states related to the vehicle, enabling flexible memory protection and contributing to improved system safety and reliability in the vehicle. Therefore, the above configuration enables flexible and efficient memory protection that meets the specific needs of the vehicle.
[0051] In this embodiment, the various states related to the vehicle include a driving state in which the vehicle is in motion and a stationary state in which the vehicle is stationary. Furthermore, in the first operation example of this embodiment, of the two memory areas 13A and 13B included in the area group, memory area 13A stores information related to functional safety, and memory area 13B stores information related to security. In the first operation example, the protection function unit 14 can dynamically switch the protected area in the second protection function so as to set memory area 13A, which stores information related to functional safety, as the protected area when the vehicle is in the driving state, and to set memory area 13B, which stores information related to security, as the protected area when the vehicle is stationary.
[0052] According to this, unintended access to memory area 13A, which stores information related to functional safety such as engine control and brake control, can be restricted while the vehicle is in motion, and unintended access to memory area 13B, which stores information related to security such as communication security and data writing, can be restricted while the vehicle is stopped. Thus, according to this embodiment, the optimal memory protection setting is dynamically applied based on the vehicle's driving conditions, thereby realizing flexible memory protection that could not be achieved with conventional technology.
[0053] In this embodiment, the various states related to the vehicle include a connected state in which diagnostic equipment for diagnosis is connected to the vehicle, and an unconnected state in which diagnostic equipment is not connected to the vehicle. Furthermore, in the second operation example of this embodiment, of the two memory areas 13A and 13B included in the area group, memory area 13A stores information that does not allow access from the diagnostic equipment, and memory area 13B stores information that allows access from the diagnostic equipment. Then, in the second protection function, the protection function unit 14 can dynamically switch the protected area so that when the connected state is active, it sets memory area 13A, which stores information that does not allow access from the diagnostic equipment, as the protected area, and when the unconnected state is active, it sets memory area 13B, which stores information that allows access from the diagnostic equipment, as the protected area.
[0054] According to this, unintended access to memory area 13A, which stores information that should not be accessed by the diagnostic device while the diagnostic device is connected, can be restricted. At the same time, unintended access to memory area 13B, which stores information that should be accessed by the diagnostic device when the diagnostic device is not connected, specifically information such as log information, which may cause problems if accessed by anything other than the diagnostic device, can be restricted. Thus, according to this embodiment, the optimal memory protection setting is dynamically applied based on the connection status of the diagnostic device, thereby realizing flexible memory protection that could not be achieved with conventional technology.
[0055] (Second Embodiment) The second embodiment will be described below with reference to Figures 7 to 9. As shown in Figure 7, the electronic control unit 42 in the vehicle system 41 of this embodiment differs from the electronic control unit 3 of the first embodiment in that it includes a microcontroller 43 instead of a microcontroller 10. The microcontroller 43 differs from the microcontroller 10 in that it includes a protection function unit 44 instead of a protection function unit 14.
[0056] The protection function unit 44 can set any two of the four memory areas 13A to 13D as the areas to be protected. In other words, the memory protection function of the microcontroller 43 can protect two memory areas 13. The protection function unit 44 has the same functions as the protection function unit 14.
[0057] Similar to the protection function unit 14, the protection function unit 44 dynamically switches the memory area 13 to be set as the protected area in the second protection function according to the vehicle-related state. In this case, in the second protection function, the protection function unit 44 sets the memory area 13 containing the information of the highest functional safety importance as the protected area when the vehicle-related state is in motion, and sets the memory area 13 containing the information of the highest security importance as the protected area when the vehicle-related state is stationary.
[0058] The protection function unit 44 differs from the protection function unit 14 in that it includes a protection unit 45 and a switching unit 46 instead of the protection unit 21 and the switching unit 22. The protection unit 45 sets the memory area 13D as the area to be protected. Therefore, in this embodiment, access from the CPU 11 to the memory area 13D via the data bus 23D is blocked by the protection unit 45. In addition, in this embodiment, area groups consisting of memory areas 13A, 13B, and 13C are pre-configured.
[0059] The switching unit 46 sets one of the memory areas 13A, 13B, and 13C included in the area group as the area to be protected. The switching unit 46 dynamically switches the memory area 13 to be set as the area to be protected from among the memory areas 13A, 13B, and 13C according to the vehicle-related status. The switching unit 46 has a memory address for securing dynamic memory protection, and can switch the area to be protected by specifying the dynamic address in a register.
[0060] The switching unit 46 sets memory area 13A as the protected area when the vehicle-related state is a predetermined first state, sets memory area 13B as the protected area when the vehicle-related state is a predetermined second state different from the first state, and sets memory area 13C as the protected area when the vehicle-related state is a predetermined third state different from the first and second states.
[0061] Therefore, in this embodiment, when the vehicle-related state is the first state, access from the CPU 11 to the memory area 13A via the data bus 23ABC is blocked by the protection unit 45 and the switching unit 46. In other words, in this embodiment, when the vehicle-related state is the first state, as shown by the solid and dashed arrows in Figure 7, access from the CPU 11 to the memory areas 13B and 13C via the data bus 23ABC is permitted without being blocked by the protection unit 45 and the switching unit 46.
[0062] Furthermore, in this embodiment, when the vehicle-related state is the second state, access from the CPU 11 to the memory area 13B via the data bus 23ABC is blocked by the protection unit 45 and the switching unit 46. In other words, in this embodiment, when the vehicle-related state is the second state, as shown by the dashed and solid arrows in Figure 7, access from the CPU 11 to the memory areas 13A and 13C via the data bus 23ABC is permitted without being blocked by the protection unit 45 and the switching unit 46.
[0063] Furthermore, in this embodiment, when the vehicle-related state is the third state, access from the CPU 11 to the memory area 13C via the data bus 23ABC is blocked by the protection unit 45 and the switching unit 46. In other words, in this embodiment, when the vehicle-related state is the third state, as shown by the dashed and dotted arrows in Figure 7, access from the CPU 11 to the memory areas 13A and 13B via the data bus 23ABC is permitted without being blocked by the protection unit 45 and the switching unit 46.
[0064] In this case, memory areas 13A, 13B, and 13C store information that determines whether or not an area should be set as a protected area, depending on various conditions related to the vehicle. Specifically, one of memory areas 13A to 13C stores information corresponding to the functional safety level, more specifically the ASIL level, and information corresponding to the security level. ASIL is an abbreviation for Automotive Safety Integrity Level.
[0065] Information with a high ASIL level, such as ASIL-D information, can include information related to critical functions such as engine control and brake control. ASIL-D information is an example of information with the highest functional safety importance. Information with a medium ASIL level, such as ASIL-B information, can include information that is not critical to functional safety but is the next most important after ASIL-D. Information with a low ASIL level, such as non-ASIL information, can include information that does not pose any functional safety problems.
[0066] Examples of information with a high security level include customer personal information. High-security information is an example of information with the highest security importance. Medium-security information includes information that does not contain critical security information but is still considered important, second only to high-security information. Low-security information includes information that does not contain customer personal information, such as logs and diagnostic data, and therefore poses no security concerns.
[0067] In the following explanation, information with a high security level, information with a medium security level, and information with a low security level may be referred to as high-security-level information, medium-security-level information, and low-security-level information, respectively. In this case, memory area 13D stores information that should be set as a protected area regardless of the various states related to the vehicle. Specifically, memory area 13D stores information such as boot loader information and diagnostic program management information.
[0068] Next, we will describe a specific example of the operation related to memory protection by the protection function unit 44 of the above configuration. In this example, it is assumed that the following information is stored in memory areas 13A to 13D, respectively. Memory area 13A: ASIL-D information, low security level information Memory area 13B: ASIL-B information, security level information Memory area 13C: Information not covered by ASIL, information with a high security level. Memory area 13D: Information about the boot loader or diagnostic program
[0069] Furthermore, in this example of operation, the switching unit 46 sets the memory area 13A, which stores the information with the highest ASIL level, as the protected area when the vehicle-related state is in the driving state, and sets the memory area 13C, which stores the information with the highest security level, as the protected area when the vehicle-related state is in the stationary state. In this case, the driving state corresponds to the first state described above, and the stationary state corresponds to the third state described above.
[0070] In this example, the protection function unit 44 sets the memory area 13D as the protected area regardless of the vehicle's operating status. Therefore, as shown in Figure 8, in this example, access from the CPU 11 to the memory area 13D via the data bus 23D is blocked by the protection unit 45, regardless of the vehicle's status.
[0071] In this example, the protection function unit 44 dynamically switches the protected area according to the vehicle's driving status. As shown in Figure 8, in this example, when the vehicle-related state corresponds to the first state, i.e., when the vehicle is in motion, access from the CPU 11 to the memory area 13A via the data bus 23ABC is blocked by the protection unit 45 and the switching unit 46. In other words, in this example, when the vehicle is in motion, as shown by the solid and dashed arrows in Figure 8, access from the CPU 11 to the memory areas 13B and 13C via the data bus 23ABC is permitted without being blocked by the protection unit 45 and the switching unit 46.
[0072] As shown in Figure 8, in this example of operation, when the vehicle-related state is the stationary state corresponding to the third state, that is, when the vehicle is stationary, access from the CPU 11 to the memory area 13C via the data bus 23ABC is blocked by the protection unit 45 and the switching unit 46. In other words, in this example of operation, when the vehicle is stationary, as shown by the dashed and dotted arrows in Figure 8, access from the CPU 11 to the memory areas 13A and 13B via the data bus 23ABC is permitted without being blocked by the protection unit 45 and the switching unit 46.
[0073] The processing flow in this example of operation is as shown in the flowchart of Figure 9. The microcontroller 43 is configured to repeatedly execute the series of processes shown in Figure 9 at predetermined timings. As shown in Figure 9, in step S301, the vehicle information, which is the detection result from the vehicle state detection unit 2 and in this case indicates whether the vehicle is in a driving state, a stationary state, or any other state, is stored in a buffer or similar device provided by the microcontroller 43.
[0074] After step S301 is executed, the process proceeds to step S302, where vehicle information stored in a buffer or similar is retrieved, and it is determined what state the vehicle information represents. If the vehicle information represents a state other than driving or stopped, step S302 will show "Not applicable," and this series of processes will end. If the vehicle information represents a driving state, step S302 will show "Driving," and the process proceeds to step S303.
[0075] In step S303, memory area 13A is selected as the memory area 13 to be set as the protected area when the vehicle-related state is in the driving state. That is, in step S303, memory area 13A, which stores the information with the highest ASIL level among the three memory areas 13A to 13C included in the area group, is selected as the memory area 13 to be set as the protected area. After the execution of step S303, the process proceeds to step S304, where a switch is performed so that the protected area becomes memory area 13A. At this time, if the protected area is already memory area 13A, that setting is maintained. After the execution of step S304, this series of processes is completed.
[0076] On the other hand, if the vehicle information is information that indicates a stationary state, the state becomes "stationary" in step S302, and the process proceeds to step S305. In step S305, memory area 13C is selected as the memory area 13 to be set as the protected area when the vehicle-related state is stationary. In other words, in step S305, memory area 13C, which stores the information with the highest security level among the three memory areas 13A to 13C included in the area group, is selected as the memory area 13 to be set as the protected area. After the execution of step S305, the process proceeds to step S306, where a switch is performed so that the protected area becomes memory area 13C. If the protected area is already memory area 13C at this time, that setting is maintained. After the execution of step S306, this series of processes is completed.
[0077] According to the embodiment described above, the following effects can be obtained. In this embodiment, the protection function unit 44 pre-configures memory areas 13 to be set as protected areas according to the ASIL level, security risk, etc., and sets the memory area 13 that is assumed to be of the highest importance according to the vehicle-related state as the protected area. This makes it possible to efficiently and preferentially protect the memory areas 13 of important functions according to the state. Thus, according to this embodiment, appropriate protection settings are applied according to the functional safety level and security level of the vehicle system 41, thereby reducing functional safety or security risks.
[0078] In the operational example of this embodiment, the protection function unit 44, in the second protection function, sets the memory area 13A, which stores information of the highest functional safety importance, as the area to be protected when the vehicle-related state is in a driving state. This allows for focused protection of the memory area 13A, which stores information related to important functions such as engine control and brake control, while the memory area 13C, which stores information related to non-safety functions, is excluded from protection, thereby optimizing resource utilization.
[0079] Furthermore, in the operation example of this embodiment, the second protection function sets the memory area 13C, which stores information of the highest security importance, as the protected area when the vehicle-related state is stopped. This protects the memory area 13C, which stores high-security information such as key management and security-related information, while the vehicle is stopped, preventing unauthorized access and tampering. At the same time, it allows access to the memory area 13A, which stores low-security information such as recorded logs and system update information, thereby streamlining data update operations.
[0080] <Variations regarding the second protection function> In the second protection function, the protection function unit 44 can also set the memory area 13C, which stores information of the highest security importance, as the protected area when the vehicle-related state is in a connected state. With this modification, for example, when a diagnostic device is connected at a dealership, the memory area 13C, which stores information with a high security risk such as user information, i.e., customer personal information, can be protected, while access to the memory area 13A, which stores information with a lower security level such as logs and diagnostic data, can be permitted to support maintenance work. (Other embodiments)
[0081] It should be noted that the present invention is not limited to the embodiments described above and shown in the drawings, and can be arbitrarily modified, combined, or expanded without departing from its essence. The numerical values and other figures shown in each of the above embodiments are illustrative examples and are not limiting.
[0082] The present invention is not limited to the electronic control devices 3 and 42 included in the vehicle systems 1 and 41 described in each of the above embodiments, but can be applied to electronic control devices in general that include a control unit that performs various types of control and a memory that includes a plurality of memory areas for storing various types of information.
[0083] This disclosure is described in accordance with the embodiments, but it is understood that this disclosure is not limited to such embodiments or structures. This disclosure also includes various modifications and variations within the equivalence. In addition, various combinations and forms, as well as other combinations and forms that include only one, more, or fewer of those elements, fall within the scope and concept of this disclosure.
[0084] The control unit and its method described herein may be implemented by a dedicated computer provided by configuring a processor and memory programmed to perform one or more functions embodied by a computer program. Alternatively, the control unit and its method described herein may be implemented by a dedicated computer provided by configuring a processor by one or more dedicated hardware logic circuits. Alternatively, the control unit and its method described herein may be implemented by one or more dedicated computers configured by a combination of a processor and memory programmed to perform one or more functions and a processor configured by one or more hardware logic circuits. Furthermore, the computer program may be stored as instructions executed by the computer on a computer-readable non-transitional tangible recording medium. [Explanation of Symbols]
[0085] 3...Electronic control unit, 11...CPU, 12...Memory, 13A~13D...Memory area, 14...Protection function unit, 42...Electronic control unit, 44...Protection function unit.
Claims
1. An electronic control device installed in a vehicle, A control unit (11) that performs various controls, A memory (12) including multiple memory areas (13A to 13D) in which various types of information are stored, A protection function unit (14, 44) sets a protected area to restrict access from the control unit, Equipped with, Each of the aforementioned multiple memory regions is allocated to a specific function. The aforementioned plurality of memory regions include a group of regions consisting of two or more of them. The aforementioned protective function unit is A first protection function that sets one of the plurality of memory areas as the protected area and restricts access from the control unit, A second protection function that sets one of the two or more memory areas included in the area group as the protected area and restricts access from the control unit, It has, An electronic control device that dynamically switches the memory area set as the protected area in the second protection function according to various conditions related to the vehicle.
2. The various states related to the aforementioned vehicle include the "driving state" in which the vehicle is in motion and the "stationary state" in which the vehicle is stationary. Two or more memory regions included in the region group include a memory region storing information related to functional safety and a memory region storing information related to security, The protective function unit (14) is The electronic control device according to claim 1, wherein, in the second protection function, when the vehicle is in the driving state, the memory area in which information relating to functional safety is stored is set as the area to be protected, and when the vehicle is stopped, the memory area in which information relating to security is set as the area to be protected.
3. The various states associated with the aforementioned vehicle include a connected state in which diagnostic equipment for diagnostic purposes is connected to the vehicle, and an unconnected state in which the diagnostic equipment is not connected to the vehicle. Two or more memory regions included in the region group include a memory region storing information that is not permitted to be accessed by the diagnostic device, and a memory region storing information that is permitted to be accessed by the diagnostic device. The protective function unit (14) is The electronic control device according to claim 1, wherein, in the second protection function, when the device is in the connected state, the memory area storing information that does not allow access from the diagnostic device is set as the protected area, and when the device is not connected, the memory area storing information that allows access from the diagnostic device is set as the protected area.
4. The various states related to the aforementioned vehicle include the "driving state" in which the vehicle is in motion and the "stationary state" in which the vehicle is stationary. The aforementioned protective function unit (44) is The electronic control device according to claim 1, wherein, in the second protection function, when the vehicle is in the driving state, the memory area in which the information of the highest importance in terms of functional safety is stored is set as the area to be protected, and when the vehicle is stopped, the memory area in which the information of the highest importance in terms of security is stored is set as the area to be protected.
5. A method implemented by an electronic control device (3, 42) mounted on a vehicle, which restricts access from a control unit (11) that performs various controls to a memory (12) that includes multiple memory areas (13A to 13D) where various information is stored, Each of the aforementioned multiple memory regions is allocated to a specific function. The aforementioned plurality of memory regions include a group of regions consisting of two or more of them. The aforementioned electronic control device is A first protection function is executed that restricts access from the control unit by setting one of the plurality of memory areas as a protected area to which access from the control unit is restricted, A second protection function is executed which sets one of the two or more memory areas included in the area group as the protected area and restricts access from the control unit. When executing the second protection function, the memory area to be set as the protected area is dynamically switched according to various states related to the vehicle. Memory protection methods.
6. A memory protection program that is executed by an electronic control unit (3, 42) mounted on a vehicle, and which restricts access from a control unit (11) that performs various controls to a memory (12) that includes multiple memory areas (13A to 13D) where various information is stored, Each of the aforementioned multiple memory regions is allocated to a specific function. The aforementioned plurality of memory regions include a group of regions consisting of two or more of them. The aforementioned electronic control device, A first protection function is performed which restricts access from the control unit by setting one of the plurality of memory areas as a protected area to which access from the control unit is restricted, A second protection function is performed which sets one of the two or more memory areas included in the area group as the protected area and restricts access from the control unit, When executing the second protection function, the memory area to be set as the protected area is dynamically switched according to various states related to the vehicle, A memory protection program that executes [this].
Citation Information
Patent Citations
Memory protection method and information processor
JP2011146030A
