System on a chip comprising a memory controller and corresponding memory control method.

The memory controller in SoC integrates verification means to block unauthorized access by comparing transaction information with a list of special transactions, addressing the lack of protection during startup by adapting to the evolving SoC security level.

FR3148482A1Active Publication Date: 2024-11-08STMICROELECTRONICS INT NV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
FR2023004400
Authority / Receiving Office
FR · FR
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-05-02
Publication Date
2024-11-08
Estimated Expiration
2043-05-02

AI Technical Summary

Technical Problem

Conventional firewalls in system-on-chip (SoC) memory controllers fail to adequately protect memory regions during the startup process by not considering the evolving security level of the SoC, allowing unauthorized access even from authorized contexts.

Method used

A memory controller with integrated verification means that stores transaction information in a control register and conditions access based on a comparison with a list of special transactions, adapting to the evolving security level of the SoC during startup.

Benefits of technology

Enhances memory protection by blocking unauthorized access based on the SoC's evolving security level, ensuring secure access to memory regions as the startup process progresses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The system-on-chip (SoC) includes a memory controller (CNTMEM) adapted to receive transactions (TR1, TR2) containing transaction information (TINF) defining access to a memory (MEM). The memory controller (CNTMEM) is configured to store the transaction information in a control register (REG) and to control access to the memory (MEM) from the contents of said control register (REG). The memory controller (CNTMEM) includes verification means (CMP) configured to condition memory access based on a comparison between the transaction information stored in the control register (REG) and a special information list (LST) defining special transactions. Figure for the abstract: Fig 1
Need to check novelty before this filing date? Find Prior Art

Description

Title of the invention: System on chip comprising a memory controller and corresponding memory control method.

[0001] Embodiments and implementations of the invention relate to integrated circuits such as systems on chips (System on Chip) including in particular a memory controller, for example an external memory, and more particularly relating to authorizations and restrictions of access to memory regions of the memory.

[0002] Indeed, to help ensure the security of systems on chip, resource isolation techniques allow access to system resources, and for example particular memory regions, to be authorized or restricted. We speak of “illegal” access when a transaction does not comply with the access restrictions established by respective access rights. Resource isolation techniques in this context are usually called “firewalls”.

[0003] In conventional resource isolation techniques, for example as described in publication FR 3103586 A1 (28 / 05 / 2021), firewalls may be provided on the memory controller to provide runtime protection, depending on the execution context, for example defined by a compartmentalization identifier "CID", a security level, and / or by a privilege level.

[0004] For example, a first type of firewall can be adapted to RISUP slave device protection (Figures 1 and 2), to filter which context can access the controller in order to send commands to the external memory to read, write or erase data. This first type of RISUP firewall does not check the commands sent to the memory, but only which context accesses the controller at runtime.

[0005] A second type of firewall can be adapted to protect RIS AF slave addresses (Figures 1 and 2), to filter which regions of memory can be accessed by which contexts at runtime.

[0006] That being said, these firewalls are not conventionally capable of limiting access to external memory based on a security level of the system on chip specific to the boot process, and which evolves as the boot process progresses.

[0007] Indeed, during the system-on-chip boot process, the security level of the system-on-chip has less and less access permission, so as to "lock" the secrets, i.e. make them inaccessible, as they were used.

[0008] However, since conventional firewalls do not allow filtering based on the security level of the system on chip, it is possible that a command coming from an authorized context acts on a memory region that should be protected during the boot process.

[0009] Thus, there is a need to strengthen the protection mechanisms of external system-on-chip memories, particularly in the context of the boot process and with regard to the security level of the system-on-chip.

[0010] According to one aspect, there is provided in this regard a system on chip comprising a memory controller adapted to receive transactions containing transaction information defining access to a memory, for example an external memory, the memory controller being configured to store the transaction information in a control register, and to control access to the memory from the content of said control register, in which the memory controller comprises verification means configured to condition access to the memory according to a comparison between the transaction information stored in the control register and a list of special information defining special transactions, for example prohibited transactions or authorized transactions.

[0011] Thus, it is the memory controller itself which implements an additional protection mechanism with respect to special transactions (i.e. the list of special information), in addition to any firewalls. This additional protection can thus make it possible to supplement a gap in the protection established by the firewalls, in particular within the framework of the boot process.

[0012] According to one embodiment, the verification means are configured to receive a security level of the system on chip, and to carry out said conditioning of access to the memory as a function of the security level of the system on chip.

[0013] This makes it possible to ensure the security of the system on chip according to the security level of the system, in particular so as to take into account its evolution during the system startup process.

[0014] It is understood that the security level corresponds to an evolving security level which is automatically modified as the boot process progresses, so as to have increasingly restricted access. For example, the security level evolves temporally so as to block access to memory regions containing information from the boot process, as soon as this information has been used in the boot process.

[0015] It should also be noted that the evolving security level is automatically modified tically in the boot process, does not correspond to the "secure" or "non-secure" contexts, nor to the "privileged" or "non-privileged" contexts, which are conventionally filtered by RISUP, RIS AF firewalls. Indeed, said contexts are typically assigned for each device (master, resource, peripheral, etc.), possibly in a manner controlled by an access rights management mechanism. In any case, the secure / privileged contexts are not conventionally adapted to be automatically modified during the boot process.

[0016] According to one embodiment, the list of special information defining special transactions is made respectively for each possible security level of the system on chip.

[0017] According to one embodiment, the verification means are configured to carry out said conditioning so that access is blocked if at least one of said transaction information stored in the command register belongs to said list of special information; or if at least one of said transaction information stored in the command register does not belong to said list of special information.

[0018] According to one embodiment, the special information list is established on at least one of the following types of transaction information: a pre-established command of an action in the memory; a memory region address; a memory region size.

[0019] According to another aspect, there is also provided a method of controlling a memory, implemented by a memory controller of a system on chip, comprising receiving transactions containing transaction information defining a respective access to the memory, storing the received transaction information in a control register, the access to the memory being controlled from the content of said control register, the method further comprising conditioning the access to the memory based on a comparison between the transaction information stored in the control register and a list of special information defining special transactions, for example prohibited transactions or authorized transactions.

[0020] According to one embodiment, the method comprises receiving a security level of the system on chip, and wherein said conditioning of access is carried out as a function of the security level of the system on chip.

[0021] According to one embodiment, the list of special information defining special transactions is made respectively for each possible security level of the system on chip.

[0022] According to one embodiment, said conditioning is carried out so that access is blocked if at least one of said transaction information stored in the order register belongs to said list of special information, or if at least one of said transaction information stored in the order register does not belong to said list of special information.

[0023] According to one embodiment, the list of special information is established on at least one of the following types of transaction information: a pre-established command of an action in the memory; a memory region address; a memory region size.

[0024] Other advantages and characteristics of the invention will appear on examining the detailed description of embodiments and implementations, which are in no way limiting, and the appended drawings, in which:

[0025] [Fig. 1] and;

[0026] [Fig.2] and ;

[0027] [Fig.3] illustrate embodiments and implementations of the invention.

[0028] [Fig.l] schematically illustrates an example of an embodiment of a system on chip SOC, such as for example a microcontroller or a microprocessor, comprising a master device CPU, and a memory controller CNTMEM intended to control accesses to a memory MEM, for example a non-volatile external memory “Flash” or “EEPROM”.

[0029] The MEM memory is for example connected to the CNTMEM memory controller of the system on chip SOC, via an IOS input-output interface.

[0030] The master device CPU may for example be a processor or a central processing unit (for “Central Processing Unit” in English), adapted to implement software functionalities; or a master device of the direct memory access means “DMA” type (for “Direct Memory Access” in English).

[0031] The master device CPU is for example at the origin of accesses to the memory MEM, by transactions TRI, TR2 communicated on an interconnection bus BUS to the memory controller CNTMEM.

[0032] The interconnection bus BUS can for example be a bus of the “AXI” type for “Advanced extensible Interface” in English, or of the “AHB” type for “Advanced High-performance Bus” in English, which are types of “AMBA” microcontroller bus for “Advanced Microcontroller Bus Architecture”.

[0033] Each transaction TRI, TR2 contains transaction information TINF defining a respective access to the memory MEM. The transaction information TINF may for example contain information on the type of access cmd in reading, writing or possibly erasing; an identification of the memory region MEM with a start address addr and a size dlen; data data in writing; and other transaction information “status”, “Ctrl”.

[0034] Furthermore, it is considered that to access the memory MEM, there is a first type of transaction TRI based on a command communicated to the controller CNTMEM; and a second type of transaction TR2 based on an address or a region of the memory, for example as a function of a partition (or “mapping”) of the memory MMAP (usually “memory map” in English).

[0035] For example, a first firewall RISUP may be provided to authorize or restrict access to the CNTMEM controller by transactions of the first type TRI, i.e. according to the access rights to the memory of the master device CPU with respect to an execution context; and a second firewall RISAF may be provided to authorize or restrict access to the CNTMEM controller by transactions of the second type TR2, i.e. according to the access rights to each memory region MMAP by the master device CPU.

[0036] That being said, both types of transactions TRI, TR2 contain said transaction information TINF which defines the access.

[0037] In both cases also, the memory controller CNTMEM is configured to store the transaction information TINF in a control register REG, and to control access to the memory MEM from the contents of said control register REG.

[0038] Furthermore, the memory controller CNTMEM comprises, internally, verification means CMP configured to condition the effective access ACC to the memory MEM, based on a comparison between the transaction information stored in the command register REG and a list of special information LST.

[0039] Each special information in the LST list defines, for example, a prohibited transaction, or a prohibited ACC access to the MEM memory.

[0040] For example, the verification means CMP are configured in this regard to block access DEN if at least one of said transaction information stored in the control register REG belongs to said list of prohibited information LST.

[0041] Alternatively, each special information in the LST list defines, for example, an authorized transaction, or an authorized ACC access to the MEM memory.

[0042] For example, the verification means CMP are configured in this regard to block access DEN if at least one of said transaction information stored in the command register REG does not belong to said list of authorized information LST.

[0043] Depending on the design choice (in particular the exhaustiveness) of the list of special information, the verification means CMP can be configured to block access DEN if none of said transaction information stored in the command register REG belongs to said list of authorized information LST.

[0044] Advantageously, the verification means CMP are configured to carry out said conditioning of access to the memory as a function of the security level of the system on chip SOC_LVL; and for example the list of special information LST can be made respectively for each possible security level SOC_LVL of the system on chip SOC.

[0045] In this respect, each element of the LST list is for example linked to an identification of the security level r_lvl, d_lvl ([Fig.2]).

[0046] The security level of the system on chip SOC_LVL is for example communicated by an internal bus dedicated hardware and centrally for system on chip SOC. It will be noted in particular that the security level SOC_LVL cannot be modified by software programming.

[0047] The security level SOC_LVL (or LVL0-LVL3 - [Fig.3]) corresponds for example in practice to an evolving security level which is automatically modified as the boot process progresses, so as to have increasingly restricted access. For example, the security level evolves temporally so as to block access to memory regions containing information from the boot process, as soon as this information has been used in the boot process.

[0048] It should also be noted that the evolving security level SOC_LVL does not correspond to the “secure” or “non-secure” contexts, nor to the “privileged” or “non-privileged” contexts, which are conventionally filtered by RISUP, RISAF firewalls. Indeed, the secure / privileged contexts are typically assigned for each device (master, resource, peripheral, etc.), possibly in a manner controlled by a software mechanism for managing access rights.

[0049] The special information list LST is established on at least one of the following types of transaction information: a pre-established command of an action in the memory cmd; a memory region address addr; a memory region size dlen.

[0050] In a first example, illustrated by [Fig. 1], each element of the special information list LST includes a memory region start address r_addr and a memory region size r_dlen.

[0051] Thus, in this first example, the additional CMP verification means have been integrated directly internally into the CNTMEM memory controller. The CMP verification means provide additional firewall-type protection over a number N of regions (depending on the product) of the MEM memory.

[0052] Each region is thus defined by an address r_addr and a length r_dlen, depending on the external memory protocol used (for example it can be a raw address, a page address or a block address); as well as by the lowest authorized security level r_lvl, or the first unauthorized level r_lvl depending on the desired logic.

[0053] The configuration of regions in the LST list can be locked to never be reconfigured or overridden by another software component.

[0054] Whatever the transaction type TRI, TR2 (by transmission of a command or by access via segmentation / mapping) the address of the transaction addr, loaded in the command register REG is compared to the addresses r_addr contained in the list LST. If the address addr belongs to a region of the list LST, the current security level of the system on chip SOC_LVL is compared to the security level r_lvl which corresponds to the address identified "r_addrcaddr". If the current security level SOC_LVL is higher than that of the region identified r_lvl, the transaction is authorized ACC, otherwise it is blocked, or rejected, DEN and the memory controller CNTMEM can return an error.

[0055] The same verification process can be done for the last address of the transaction, equal to the start address added by the data length addr+dlen. If the last address of the transaction is outside all regions of the LST list, then the transaction is authorized ACC.

[0056] [Fig.2] illustrates a second example, in which each element of the special information list LST comprises a pre-established command for an action in the memory d_cmd.

[0057] In the second example, the additional CMP verification means have also been integrated directly internally into the CNTMEM memory controller, in order to offer additional protection of the firewall or “black list” type (list of prohibited commands), or “white list” (list of authorized commands), on a number M of commands (depending on the product).

[0058] The pre-established commands d_cmd can for example be coded on 8 bits, depending on the external memory or the protocol used. For example, these can be commands to erase memory sectors, or even the entire memory. The region to be protected can be different from the memory sector impacted by the command, since these commands can be sent with an addr address not corresponding to the region to be protected DAT_LVL0-DAT_LVL3 (in the case of [Fig. 1 ]), while having an impact on the region to be protected, for example DAT_LVL0, typically when the region to be protected is located inside the sector.

[0059] Each command in the d_cmd list is linked to the lowest authorized security level r_lvl, or the first unauthorized level r_lvl depending on the desired logic.

[0060] The configuration of commands in the LST list can be locked to never be reconfigured after initialization to ensure that no one will change it during execution.

[0061] Whatever the transaction type TRI, TR2 (by command or by identification of a segmentation / mapping) the transaction information which defines a command cmd, i.e. an action in memory, located in the command register REG, is compared to the special commands d_cmd contained in the list LST.

[0062] If the transaction information that defines the cmd command belongs to the LST list, the current security level of the system on chip SOC_LVL is compared to the security level d_lvl that corresponds to the command identified "cmd=d_cmd".

[0063] In an alternative where the special command list LST contains prohibited commands d_cmd, if the current security level SOC_LVL is lower (i.e. having more restricted access) than that of the identified command d_lvl, then the transaction is blocked or rejected DEN, and the memory controller CNTMEM may return an error.

[0064] Otherwise, if the current security level SOC_LVL is higher (i.e. has more permission) than that of the identified command d_lvl, or if the transaction information that defines the command cmd does not belong to the list of prohibited commands LST, then the command cmd is authorized and the transaction is executed normally, i.e. the memory controller CNTMEM controls the access ACC to the memory MEM.

[0065] In another alternative where the special command list LST contains authorized commands d_cmd, if the current security level SOC_LVL is greater than or equal to (i.e. has the equivalent permission or greater) that of the identified command d_lvl, then the command cmd is authorized and the transaction is executed normally, i.e. the memory controller CNTMEM controls the access ACC to the memory MEM.

[0066] Otherwise, if the current security level SOC_LVL is lower (i.e. having more restricted access) than that of the identified command d_lvl, or if the transaction information that defines the command cmd does not belong to the list of authorized commands LST, is blocked or rejected DEN, and the memory controller CNTMEM can return an error.

[0067] The list of special commands LST can be a simple set of registers. The number "M" of registers depends on the needs of the product.

[0068] [Fig. 3] illustrates an example of a system-on-chip SOC boot process, as described above in relation to Figures 1 and 2, during which a system-on-chip security level LVL0-LVL3 evolves as the boot process progresses.

[0069] In particular, it is recalled that the security level LVL0-LVL3 (or SOC_LVL - figures 1 and 2) evolves over time so as to have increasingly restricted access, in particular so as to block access to memory regions containing information from the boot process, as soon as this information has been used in the boot process.

[0070] It will be noted that in this example, the numerical values ​​representative of the security levels LVL0-LVL3 are incremented as the security level decreases, that is to say as the context has fewer and fewer access permissions.

[0071] Thus, for example, during a Bootrom boot initialization step, the initial boot code is loaded from a fixed location in the external memory MEM immediately available to the processor when execution begins, for example the location DAT_LVL0.

[0072] In the context of this very first Bootrom step, the LVL0 security level has the most access permissions possible, and all memory regions DAT_LVL0-DAT_LVL3 (and therefore all possible secrets they contain) are accessible.

[0073] Then, for example, an FSBL step called first stage bootloader (usually “first stage bootloader” in English) is implemented.

[0074] In the context of this first FSBL boot phase, the security level LVL1 corresponds to a secure boot level, in which the secrets of the Bootrom boot initialization step are no longer used, and are therefore hidden. For this purpose, access to the memory region DAT_LVL0 corresponding to the Bootrom context is blocked DEN. The other memory regions DAT_LVL1-DAT_LVL3 are accessible.

[0075] Then, for example, a SecOS step of executing a secure operating system is implemented.

[0076] In the context of the secure operating system SecOS, the security level LVL2 corresponds to a secure level, in which the secrets of the first boot phase FSBL, such as specific keys, are no longer used, and are therefore hidden. For this purpose, access to the memory region DAT_LVL1 corresponding to the FSBL context is blocked DEN. Access to the memory region DAT_LVL0 of the Bootrom context is always blocked DEN. The other memory regions DAT_LVL2-DAT_LVL3 are accessible.

[0077] Then, for example, SSBL, OS steps corresponding to a non-secure NSEC context are implemented.

[0078] In the non-secure context NSEC, the security level LVL3 corresponds to a non-secure level, in which only the "secrets" usable by the non-secure operating system OS are accessible. For this purpose, access to the memory region DAT_LVL2 corresponding to the SecOS context is blocked DEN. Access to the memory regions DAT_LVLO-DAT_LVL1 of the previous contexts FSBL, Bootrom are always blocked DEN. The memory region DAT_LVL3 is accessible.

[0079] Of course, the start-up process described above corresponds to a simplified example, for illustrative purposes.

[0080] In summary, embodiments and implementations of a mechanism internal to the CNTMEM memory controller have been described, for implementing additional protections of sensitive memory regions DAT_LVL0-DAT_LVL3, by means of the list of prohibited or authorized transactions LST, in addition to any conventional RISUP-RISAF firewalls of the SOC system on chip. This additional CMP protection can thus make it possible to fill a gap in the protection, in particular in the context of the boot process, and furthermore in a manner adaptable to all types of product.

Claims

Claims

1. System on chip (SOC) comprising a memory controller (CNTMEM) adapted to receive transactions (TRI, TR2) containing transaction information (TINF) defining access to a memory (MEM), the memory controller (CNTMEM) being configured to store the transaction information in a control register (REG), and to control access to the memory (MEM) from the content of said control register (REG), in which the memory controller (CNTMEM) comprises verification means (CMP) configured to condition access to the memory according to a comparison between the transaction information stored in the control register (REG) and a list of special information (LST) defining special transactions.

2. System on chip according to claim 1, wherein the verification means (CMP) are configured to receive a security level of the system on chip (SOC_LVL), and to carry out said conditioning of access to the memory according to the security level of the system on chip.

3. System on chip according to claim 2, wherein the special information list (LST) defining special transactions is made respectively for each possible security level (SOC_LVL) of the system on chip.

4. System on chip according to one of claims 1 to 3, wherein the verification means (CMP) are configured to carry out said conditioning so that access is blocked (DEN) if at least one of said transaction information stored in the command register (REG) belongs to said list of special information (LST), or if at least one of said transaction information stored in the command register (REG) does not belong to said list of special information (LST).

5. A system-on-chip according to one of claims 1 to 4, wherein the special information list (LST) is established on at least one of the following types of transaction information: a pre-established command of an action in the memory (cmd); a memory region address (addr); a memory region size (dlen).

6. A method of controlling a memory, implemented by a memory controller (CNTMEM) of a system on chip, comprising a reception of transactions (AC1, AC2) containing transaction information (TINF) defining a respective access to the memory (MEM), a storage of the transaction information received in a control register (REG), the access to the memory being controlled from the content of said control register, the method further comprising a conditioning of the access to the memory according to a comparison (CMP) between the transaction information (TINF) stored in the control register (REG) and a list of special information (LST) defining special transactions.

7. The method of claim 6, comprising receiving a system-on-chip security level (SOC_LVL), and wherein said access conditioning is performed based on the system-on-chip security level.

8. Method according to claim 7, wherein the special information list (LST) defining special transactions is made respectively for each possible security level (SOC_LVL) of the system on chip.

9. Method according to one of claims 6 to 8, wherein said conditioning is carried out so that access is blocked (DEN) if at least one of said transaction information stored in the control register (REG) belongs to said list of special information (LST), or if at least one of said transaction information stored in the control register (REG) does not belong to said list of special information (LST).

10. Method according to one of claims 6 to 9, wherein the special information list (LST) is established on at least one of the following types of transaction information: a pre-established command of an action in the memory (cmd); a memory region address (addr); a memory region size (dlen).

Citation Information

Patent Citations

  • A method for managing the operation of a system-on-chip, such as a microcontroller, and the corresponding system-on-chip.

    FR3103586A1

  • Remap address space controller

    EP3901776A1

  • Method and device for analyzing transaction propagation in a multiprotocol network of a system on chip

    FR2945396A1

  • Memory access protection in programmable logic device

    US11281810B1