Method for managing memory within a system-on-a-chip.

A hardware-based firewall device in systems on a chip manages memory access rights and physically erases regions during transitions, addressing unreliable software-based security issues and ensuring secure data handling.

FR3129500B1Active Publication Date: 2024-08-30STMICROELECTRONICS (GRAND OUEST) SAS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
FR2021012499
Authority / Receiving Office
FR · FR
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2024-08-30
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

Existing memory management techniques in systems on a chip are not 100% reliable for ensuring secure data access and erasure, particularly in the presence of hacking or errors, due to their reliance on software implementation.

Method used

Implement a hardware-based firewall device that manages memory access rights and physically erases memory regions during transitions to ensure secure data handling, using labels to control erasure based on access right level changes.

Benefits of technology

Ensures secure and reliable data erasure during access right level transitions, preventing data leaks and maintaining system security without software complexity or performance degradation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000019_0000
    Figure 00000019_0000
  • Figure 00000019_0001
    Figure 00000019_0001
  • Figure 00000019_0002
    Figure 00000019_0002
Patent Text Reader

Abstract

A method for managing memory within a system-on-a-chip (SoC) comprising at least one processor (PROC), one memory (MEM), and one firewall (FWL), said at least one processor (PROC) being configured to generate memory (MEM) access requests (REQs) each having a respective access level (Sec, NSec), the memory (MEM) comprising memory regions (MEM_Sec, MEM_Sh, MEM_NSec) dedicated to respective access levels (Sec, NSec), and at least one of the memory regions (MEM_Sh) being dedicated to an access level that can be modified by the processor (PROC), the firewall (FWL) being configured to control access to the memory regions (MEM_Sec, MEM_Sh, MEM_NSec) based on the access level (Sec, NSec) of the requests (REQs) and the access level to which the memory region is dedicated respective, the procedure including, in the event of a change in the level of access rights (S->NS,NS->S) to which a memory region (MEM_Sh) is dedicated, an erasure of the memory region (MEM_Sh) implemented in hardware by the firewall (FWL). Figure for the abbreviation: Figure 6,
Need to check novelty before this filing date? Find Prior Art

Description

Description of the invention: Method for managing a memory within a system on chip. Embodiments and implementations relate to systems-on-chip integrating one or more processors communicating with a memory, in particular the management of the memory by a firewall device. Firewalls are typically provided for security reasons when one or more applications from different software execution contexts, and possibly different processors, need to access the same memory of the system-on-chip, for example the memory in which a software system is stored. In this regard, each application has an access right level, allowing to define whether or not to access a memory region of memory, via the firewall. The access right level of an application typically comes from the execution context from which it comes. For example, a software system may provide an execution context with a "secure" access right level (usually called "Secure OS") and an application execution context with a "non-secure" access right level (usually called "Rich OS"). The firewall is conventionally designed to, on the one hand, assign, on command from the software execution context with a “secure” access right level, the different memory regions to respective execution contexts (each corresponding to an access right level); and on the other hand to filter, i.e. authorize or not, requests for access to the different memory regions depending on the access right level of said requests. The firewall is typically configured during system initialization to define access to memory regions for different system execution contexts. A memory region can be allocated exclusively to one execution context or shared between multiple execution contexts. However, the number of applications for a software execution context can be high so that the memory storage space is not sufficient to store all the application data. Memory then becomes a critical resource, especially on an embedded system for which it is not possible to physically change the memory during the lifetime of the system. For better efficiency, a memory region can be associated with different execution contexts during system operation depending on the app- plications executed. Thus, a reprogramming of the firewall is possible in order to reconfigure the access rights to the memory regions, after the initialization of the system, during the execution of the software system and the applications. For example, a secure display function with hardware image rotation consumes two secure buffered memory regions, one containing a frame of the secure image to be displayed above the unsecured image frame, the other containing a frame of the resulting image from the rotation that must also be secured. In the case of a high resolution image, each buffer region can be large, for example 8MB for a 1080p resolution. When secure display is not enabled, memory regions are typically allocated to the non-secure permission level execution context of the software system ("Rich OS"), for use as a cache or by another application. When Secure View is enabled, the memory regions are reclaimed by the Secure OS execution context, and the firewall is reconfigured to change the access rights of the memory regions. And, when Secure View is disabled, the reverse sequence must be performed. But furthermore, before returning the memory regions to the non-secure access right level execution context of the software system ("Rich OS"), the contents of the memory regions must be erased to prevent data leakage. This operation is under the control of the Secure OS execution context, and if an attacker succeeds in circumventing this operation or if a third-party programmer does not anticipate its implementation, the contents of the secure memory regions will become visible to the non-secure execution context. In other words, secure erasure of memory regions is the responsibility of a software functionality, which should be implemented by the secure execution context of the software system, but the use of this functionality is the responsibility of the software application because it depends on the usage of the memory regions. Therefore, since this technique is based on software implementation and depends on the application that causes the need, this technique is not 100% reliable. Thus, there is a need to propose solutions to this problem that do not suffer from these drawbacks. Implementation and realization methods propose a management technique of memory within a system-on-chip allowing to improve the security of the system in a simple, absolutely reliable way, and without complicating or slowing down the software system. According to one aspect, there is provided a method of managing a memory within a system on chip comprising at least a processor, a memory and a firewall device. Said at least one processor is configured to generate memory access requests each having a respective access right level. The memory comprises memory regions dedicated to respective access rights levels and at least one of the memory regions being dedicated to an access rights level that can be modified by the processor. And the firewall device is configured to control access to memory regions based on the access right level of the requests and the right level to which the respective memory region is dedicated. The method comprises, in the event of modification of the access right level to which a memory region is dedicated, an erasure of the memory region implemented materially by the firewall device. Memory regions correspond to a software organization of a memory into several data storage zones whose access right level is defined and managed by the firewall device. The access right level of the request may correspond, for example, to the access right level of a software execution context of a software system or, for example, to an access right level assigned to a processor among several processors that can use the memory. For example, the memory may be external or internal to the system-on-chip, such as random access memory (RAM) or non-volatile memory (Flash). A change in the access right level means that the firewall device is reprogrammed to reconfigure the access conditions to one or more memory regions. By "hardware-implemented erasure" is meant that the firewall device is manufactured so as to always implement said erasure under conditions defined in the circuit design. This is distinguished from a software implementation, for example, controlled by a program executed by the software system. In other words, the hardware implementation of erasure in this way makes it possible to completely eliminate the risk of data leakage caused by hacking or error. According to one implementation mode, the firewall device comprises, for each memory region, an attribute representative of the access right level of the corresponding memory region, and is configured to control accesses to memory regions by comparing the access right level of requests with the attribute of the respective memory region. The method further comprises, in the event of modification of the access right level to which the memory region is dedicated by said at least one processor, a modification of the attribute of the memory region after said erasure of the memory region implemented hardware by the firewall device. Changing the attribute means that the firewall device redefines access to the memory region according to the access right level to which this memory region is dedicated in the firewall device. The memory region can therefore be accessed by applications in a software execution context having the access level corresponding to the level redefined in the firewall as soon as the attribute has been modified. Therefore, a complete erasure of the memory region is ensured before modifying the attribute of the memory region, i.e. before making it accessible by applications of other software execution contexts having the access level corresponding to the level redefined in the firewall. Thus, this embodiment makes it possible to be sure that there is no possible flaw that could cause data leakage, during a “transient” phase, for example during the erasure procedure. According to one mode of implementation, the firewall device further comprises, for each possible modification of access right level, a label communicating a condition for implementing said erasure and in the event of modification of the access right level to which the memory region is dedicated, said erasure of the memory region being implemented materially by the firewall device in a manner controlled by the condition communicated by the corresponding label. The label may correspond to an indication of a change in access right level that may or may not harm the security of the data contained in the memory region. For example, a change from a first hierarchically lower access right level to a second hierarchically higher access right level may be acceptable without erasing the memory region. Whereas a change from the second access right level to the first access right level may be deemed likely to harm the security of the data, and an erasure of the memory region must be carried out. Therefore, checking the tag ensures that the memory region is erased during security-risk access level transitions and does not slow down the process during access level transitions. access that does not present a security risk. According to one embodiment, the method further comprises locking said memory region by the firewall device, blocking access to the memory region, during erasure. Locking the memory region is a prohibition on accessing that memory region, which prevents applications in all software execution contexts from reading or modifying data stored in the memory region during erasure. This again ensures that there are no flaws that could cause data to escape through this channel. According to one implementation, the access rights levels include a secure level and a non-secure level, or a privileged level and a non-privileged level, or respective access rights levels of multiple processors that can access said memory. Managing secure and non-secure access rights allows, in particular, granting access and preventing access to a memory region for storing application data implementing critical security functions, such as the secure display of passwords. Managing privileged and non-privileged access rights allows granting access and preventing access to a memory region for storing application data implementing sensitive functions, such as software system startup functions (usually "boot" in English). More global management of processor access rights also allows granting access and preventing access to a memory region for storing data specific to one or more processors. The memory region can therefore be accessed by applications in a software execution context according to the accesses configured in the firewall device. In systems comprising multiple processors, access to the memory region by each processor can also be configured in the firewall device. For example, each processor within the same system-on-chip may provide multiple software execution contexts with different access rights levels. Depending on these different rights levels, the software execution contexts within the same processor may access different memory regions provided that the processor itself has access to these memory regions. According to one embodiment, the memory further comprises a memory controller configured to erase at least one of the memory regions of the memory, and erasing said memory region comprises transmitting an erase command by the firewall device to the memory controller. A memory controller is a circuit typically integrated into memory, allowing in particular to receive and process control signals in a given communication protocol, and to implement in the memory the commanded actions, such as reading, writing or erasing data. According to one embodiment, erasing said memory region comprises a transmission by the firewall device of a burst of erasure data in said memory region on a direct memory access bus. In other words, when the memory is accessible by a direct memory access bus (usually "DMA" for "Direct Memory Access" in English), the firewall device can be advantageously configured to directly execute the erasure of data in the memory. According to another aspect, there is also provided a system-on-chip, comprising at least one processor, a memory and a firewall device, said at least one processor being configured to generate memory access requests each having a respective access right level, the memory comprising memory regions dedicated to respective access right levels and at least one of the memory regions being dedicated to an access right level that can be modified by the processor, the firewall device being configured to control access to the memory regions according to the access right level of the requests and the right level to which the respective memory region is dedicated, The firewall device is hardware configured, in the event of a change in the access right level to which a memory region is dedicated, to erase the memory region. According to one embodiment, the firewall device comprises, for each memory region, an attribute representative of the access right level of the corresponding memory region, and is configured to control access to the memory regions by comparing the access right level of the requests with the attribute of the respective memory region, the firewall device being configured, in the event of modification of the access right level to which the memory region is dedicated, to modify the attribute of the memory region after erasure of the memory region by the firewall device. According to one embodiment, the firewall device further comprises, for each possible modification of access right level, a label communicating a condition for implementing said erasure, and, in the event of modification of the access right level to which the memory region is dedicated, the firewall device is configured to implement said erasure of the memory region in a manner controlled by the condition communicated by the corresponding label. According to one embodiment, the firewall device is further configured to lock the memory region, blocking accesses to the memory region, during the erasure. According to one embodiment, said access rights levels comprise a secure level and a non-secure level, or a privileged level and a non-privileged level, or respective access rights levels of several processors which can access said memory. According to one embodiment, the memory further comprises a memory controller configured to erase at least one of the memory regions of the memory, and the firewall device is further configured to transmit an erase command to the memory controller to erase the memory region. According to one embodiment, the firewall device is further configured to transmit a burst of erase data into the memory region over a direct memory access bus to erase the memory region. 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: [Fig.1] [Fig.2] [Fig.3] [Fig.4] [Fig.5] [Fig.6] schematically illustrate embodiments and implementations of the invention. [Fig. 1] illustrates a system on chip SOC, configured to operate with a software system, during a step 100 of initializing the software system. The system on chip SOC comprises a memory MEM in which is stored, for example, the program code of the software system, a firewall device FWL and a processor PROC. The software system provides software execution contexts with different access right levels and, for each of these software execution contexts, applications. The applications are more particularly derived from a software execution context and inherit its access right level. The software system may provide, for example, an execution context with a “secure” access right level CXT_Sec (usually called “Secure OS”) and an application execution context CXT_NSec, with a “non-secure” access right level (usually called “Rich OS”). Subsequently and for reasons of simplification, the terms “secure context” and “non-secure context” may be used to refer respectively to a software execution context with a secure access right level Sec and that with a non-secure access right level NSec. The PROC processor includes an access rights management unit SAU / MPU, and can run applications from different software execution contexts, for example applications from the secure CXT_Sec and non-secure CXT_NSec contexts. In particular, in a relatively simple system-on-chip SOC, the access rights management unit SAU / MPU typically comprises a memory protection unit "MPU" (for "Memory Protection Unit" in English) adapted for managing the privileged access right levels Priv and non-privileged Npriv. Furthermore, the access rights management unit may comprise a security attribution unit (SAU) adapted for managing the secure Sec or non-secure NSec access rights levels, in addition to the memory protection unit (MPU). Alternatively, for a more complex system-on-chip, in particular capable of managing virtual addresses, the access rights management unit (referenced SAU / MPU in the figures) may comprise a memory management unit (MMU) adapted for managing the privileged Priv, non-privileged Npriv, secure Sec and non-secure NSec access rights levels and managing virtual addresses. Secure Sec and non-secure NSec access rights typically correspond to a physical separation of secure-level and non-secure-level PROC processor hardware elements. Applications in the CXT_Sec secure context are generally intended to implement security-critical functions through the secure hardware elements of the PROC processor. An example is the function of securely displaying sensitive data on a screen. Applications in the non-secure context CXT_NSec are typically intended to implement functions that do not affect the system's security through the non-secure hardware elements of the PROC processor. These applications most often represent programs developed by third parties, who, for example, do not have the required rights to manipulate the secure data of the software system. MEM memory has memory regions dedicated to respective access rights levels, typically assigned during initialization of the PROC processor and the software system. The SAU / MPU access rights management unit allows, on command from the secure context of the PROC processor, to define an access rights level, here Sec and NSec, of the applications executed according to the contexts from which they come, as well as the memory regions of the MEM memory. A secure memory region MEM_Sec is dedicated to a secure access right level Sec and is used to store the secure data-sec of applications in the secure context CXT_Sec. A non-secure memory region MEM_NSec is dedicated to a non-secure NSec access right level and allows storing non-secure data-nsec of applications in the non-secure CXT_NSec context. The MEM memory also includes a "shared" memory region MEM_Sh which is dedicated to an access right level that can be modified by the processor PROC during its operation. Thus, depending on the use made of it, the memory region MEM._Sh can be dedicated to a secure access right level Sec accessible by applications in the secure context CXT_Sec, or be dedicated to a non-secure access right level NSec accessible by applications in the non-secure context CXT_NSec. As part of application executions by the PROC processor, memory access requests REQ may be generated. The memory access requests REQ each have a respective access right level corresponding to the access right level of the application executed by the PROC processor. The FWL firewall device is configured to control access to memory regions based on the access right level of the REQ requests and the access right level to which the respective memory region is dedicated. For example, the FWL firewall device may be an input / output device interfacing between the PROC processor and the MEM memory. The PROC processor and the MEM memory may communicate via a data bus, in particular for the transmission of REQ requests and data via the FWL firewall device. In particular, the FWL firewall device comprises, for each memory region, an attribute representative of the access right level of the corresponding memory region, for example attributes S and NS for memory regions with secure Sec and non-secure NSec access right levels, respectively. The attribute of a memory region thus allows the FWL firewall device to compare the access right level of the REQ request with the attribute of the corresponding memory region, and to authorize or not the REQ request depending on the comparison. The secure context CXT_Sec of the processor PROC, possibly via the access rights management unit SAU / MPU, is furthermore capable of transmitting commands to modify the access right level to which the memory region MEM_Sh is dedicated in the firewall device FWL, for example via the data bus. Consequently, a change, for example, from the secure access right level Sec to the non-secure access right level Nsec can be considered as a transition that may harm the security of the system, in particular in terms of evasion of data stored in the memory region MEM_Sh. Indeed, data of secure level data-sec may possibly remain in the shared memory region MEM_Sh after the transition, and thus become accessible by an app- third-party application of unsecured level. In this regard, an erasure of the MEM_Sh memory region is implemented in hardware by the FWL firewall device in case of a change in the access right level to which the MEM_Sh memory region is dedicated. Thus, the erasure of the MEM_Sh memory region during the transition is carried out in hardware, unavoidably, by the FWL firewall device, and the escape of the secure data data-sec stored in the shared memory region MEM_Sh is impossible by this means. Advantageously, the FWL firewall device comprises a bank of labels (usually "tags" in English) labeling, for each possible transition from one level of access rights to another, whether the transition is likely to harm the security of the software system. The bank of labels can for example be provided during the manufacture of the system on chip SOC according to the types of access rights levels that can be used by the system on chip SOC, or be parameterized by the secure execution context CXT_Sec of the processor PROC for example during the initialization of the software system. The respective labels at each access right level transition allow the communication of the erase command, hardware implemented by the FWL firewall device, of the MEM_Sh memory region whose access right level is modified. In other words, the erasure of the MEM_Sh memory region is implemented in hardware by the FWL firewall device in a manner controlled by the condition communicated by the respective TAG(S->NS) or TAG(NS->S) tag. In particular, in the example of the “secure” and “non-secure” access right levels, two transitions are possible: a first transition from the non-secure NSec access right level to the secure access right level Sec, or a second transition from the secure access right level Sec to the level NSec non-secure access right. Either or both of said transitions may be considered likely to adversely affect the security of the software system. Thus, a first tag TAG(S->NS) is associated with the first transition, and a second tag TAG(NS->S) is associated with the second transition. The first tag TAG(S->NS) and the second tag TAG(NS->S) communicate a condition for implementing the erasure in the event of a command to modify the access rights levels of the memory region corresponding to the respective transition. Initialization step 100 represents the step in which accesses to memory regions are configured in the FWL firewall device. During this step, the secure context CXT_Sec of the processor PROC transmits a command to the firewall device FWL to set the access right level of the memory region MEM Sh. The choice of the access right level to define for the "shared" memory region MEM._Sh can take into account several factors, such as the memory resource requirement of applications in the secure CXT_Sec and non-secure CXT_NSec contexts and the fact that some of these resources can only be accessed by one software execution context at a time. It is also important to consider this resource requirement after the initialization step, especially when applications in each context generate a REQ for the first time, in order to determine a storage space suitable for each software execution context. Preferably, it is therefore intended that the access right level to which the MEM_Sh memory region is dedicated is defined as non-secure NSec. The MEM._Sh memory region therefore makes it possible to increase the storage space allocated to applications in the non-secure CXT_NSec context which typically require more memory resources, in particular when executing certain functions such as image displays. We now refer to [Fig.2]. [Fig.2] illustrates the system on chip SOC described previously in relation to [Fig.1], during a step 200 of modifying the access rights of the shared memory region MEM_Sh, and, during a step 201 of identifying a tag TAG(NS->S) and storing secure data data-sec. An application in the secure context CXT_Sec wants to launch a secure display function with rotation of a secure image. This type of function in practice consumes a first secure memory region for displaying the secure image and a second secure memory region for rotating this image. In the case of a high-resolution image, each memory region has a large size, for example 8MB for a resolution of 1080p. In this example, we consider that the secure memory region MEM_Sec does not have enough space on its own to store the data for this function. In step 200, the system-on-chip SOC will allocate the shared memory region MEM._Sh to the secure context CXT_Sec of the processor PROC, "NS->S". The non-secure context CXT_NSec releases the use of the shared memory region MEM._Sh, and the secure context CXT_Sec reconfigures the firewall device FWL so that the shared memory region MEM_Sh is dedicated to the secure access right level Sec. In optional step 201, the FWL firewall device identifies a TAG(NS->S) label associated with the transition of the access right level of the memory region MEM._Sh. The TAG(NS->S) label indicates, for example, that no erasure is ne- necessary for this transition, which allows the FWL firewall device to immediately reconfigure access to the MEM_Sh memory region by assigning it the S attribute. The secure context CXT_Sec of the processor PROC can access S_ACCESS the memory MEM through the firewall device FWL. Thus, applications in the secure context CXT_Sec can store secure data data-sec in the memory region MEM_Sh such as secure frame display data resulting from image rotation. [Fig. 3] illustrates the system-on-chip SOC described previously in relation to [Fig. 2], during a step 300, once the execution of the secure image display function is completed. The memory region MEM_Sh can be released by the secure context CXT_Sec and made available again to the non-secure context CXT_NSec. The secure context CXT_Sec of the PROC processor generates in this regard an "S->NS" command to define, in the FWL firewall device, a non-secure access right level NSec for the memory region MEM_Sh. [Fig.4] illustrates the system on chip SOC described previously in relation to [Fig.3], during a step 400 of identifying the tag TAG(S->NS), and during a step 401 of erasing the memory region MEM_Sh. In step 400, the FWL firewall device identifies a tag TAG(S->NS) associated with the transition of the access right level of the MEM_Sh memory region. The tag TAG(S->NS) indicates, for example, to the FWL firewall device that this transition is likely to harm the security of the system and therefore communicates a command to erase the MEM_Sh memory region. In step 401, the erasure of the memory region MEM_Sh is hardware implemented by the FWL firewall device and makes it possible to replace the secure data data-sec stored in the memory region MEM_Sh with other erasure data TRAFF according to a defined model. This erasure data TRAFF can be data coded on a number n of bits corresponding to the size of the memory region, of value 0 or of arbitrary value. Furthermore, the FWL firewall device can advantageously lock the MEM_Sh memory region during erasure. The FWL firewall device then blocks, for example, all access to the MEM_Sh memory region, regardless of the access right level of the REQ requests for access to the MEM memory. [Fig.5] illustrates the system-on-chip SOC described previously in relation to [Fig.4], in a step 500, after the completion of the erasure of the shared memory region MEM_Sh, in which the attribute S, NS is actually modified in the FWL firewall device. Step 500 finalizes the process of modifying the access rights of the shared memory region MEM_Sh, in response to the command to allocate said region to the secure context CXT_Sec. The state of the system on chip SOC at step 500 corresponds to the state of the system on chip SOC at the initialization step 100. [Fig.6] illustrates examples of alternatives of the system on chip SOC described previously in relation to Figures 1 to 4. On the one hand, several processors PROC1 to PROCn can communicate with the memory MEM via the firewall FWL. The system-on-chip SOC may provide both secure Sec and non-secure NSec level access rights, as well as, for each secure and non-secure level hardware domain, privileged Priv and non-privileged NPriv level access rights. However, PROCn processors may provide only the privileged Priv or non-privileged NPriv access right levels. Thus, the FWL firewall device may further comprise P and NP attributes representative of the privileged Priv and non-privileged NPriv access right levels, respectively. Furthermore, the different PROC1-PROCn processors may "own" respective memory regions, i.e., memory regions are respectively dedicated to the different processors, and the FWL firewall device may further comprise attributes (not shown) representative of the PROC1-PROCn processors owning the respective memory regions. Ownership of a memory region by a PROC-PROCn processor is also considered to be a level of access rights. For example, the P-NP (resp. S-NS) attributes mentioned above can be provided in such a way as to communicate both the information representative of the privileged access right levels Priv and non-privileged NPriv (resp. secure Sec and non-secure NSec) and the information representative of the respective proprietary PROC1-PROCn processor. Access rights management is also provided so that a task at the non-privileged NPriv level cannot access data or functions at the privileged Priv level. These privileged Priv and non-privileged NPriv access right levels make it possible in particular to grant access or respectively prevent access to a memory region for storing application data implementing sensitive functions, such as functions manipulating the startup data of the software system (usually "boot" in English). In this alternative, a processor access right level can also be considered for which the FWL firewall device is capable of granting or preventing access to the MEM_Sh memory region. In this case, attributes corresponding to the processor access right levels can be provided in the FWL firewall device. Regardless of the types of access rights used (secure / non-secure and / or privileged / non-privileged and / or associated with respective processors) the FWL firewall device is hardware configured, in the event of a change in the access right level to which a memory region MEM_Sh is dedicated, to erase the memory region MEM_Sh, possibly by means of the optional and advantageous mechanism of tags, for each possible change in access right level, communicating a condition for implementing said erasure. The erasure may, for example, be a transmission by the FWL firewall device of a burst of erasure data TRAFF into the memory region MEM_S by a direct memory access DMA mechanism. Thus, the secure data data-sec stored in the memory region MEM_Sh is overwritten and erased. In another example of implementing erasure, the MEM memory includes a memory controller MEM_CTRL. The memory controller MEM_CTRL can be provided in most random access memories "RAM" and allows receiving and processing control signals in a given communication protocol, and implementing in the MEM memory the commanded actions, such as reading, writing or erasing data. In this case, the FWL firewall device can then transmit a command to the memory controller MEM_CTRL to erase the memory region MEM_SH. Furthermore, the invention is not limited to these embodiments and implementations, but embraces all variants thereof, for example the specific access right levels "secure" and "non-secure" described in relation to figures 1 to 5 have been given as an example, and could be replaced by any other type of access right level, such as for example the access right levels mentioned in relation to [Fig.6]. Furthermore, although an advantageous mechanism using access right level transition labels has been described, the invention may provide, for example, for hardware implementation of erasure by the FWL firewall device each time the access rights of a memory region are modified.

Claims

Claims

1. Method for managing a memory on a system on chip (SOC) comprising at least one processor (PROC), one memory (MEM) and one firewall device (FWL), said at least one processor (PROC) being configured to generate memory access requests (REQs) (MEM) each having a respective access right level (Sec, NSec), memory (MEM) comprising memory regions (MEM_Sec, MEM_Sh, MEM_NSec) dedicated to access rights levels respective (Sec, NSec) and at least one of the memory regions (MEM_Sh) being dedicated to a level of access rights which can be modified by the processor (PROC), the firewall device (FWL) being configured to control access to memory regions (MEM_Sec, MEM._Sh, MEM _NSec) depending on the access right level (Sec, NSec) of requests (REQ) and the level of rights to which the respective memory region, the method comprising, in case of modi- definition of the access right level (S->NS, NS->S) to which is dedicated a memory region (MEM_Sh), a memory region erase (MEM_Sh) hardware implemented by the firewall device (FWL).

2. The method of claim |, wherein the firewall device (FWL) includes, for each memory region (MEM_Sec, MEM_Sh, MEM_NSec), an attribute (S, NS) representing the level of rights access (Sec, NSec) of the corresponding memory region, and is configured to control access to memory regions (MEM_Sec, MEM_Sh, MEM_NSec) by comparing the access right level (Sec, NSec) requests (REQ) with the (S, NS) attribute of the memory region respective, the method further comprising, in the event of modification of the access right level (S->NS, NS->S) to which the region is dedicated memory (MEM_Sh), a modification of the (S, NS) attribute of the region memory after said erasure of the memory region (MEM_Sh) put implemented hardware by the firewall device (FWL).

3. Method according to one of claims 1 or 2, in which the device firewall (FWL) also includes, for each modification of possible access right level, a label (TAG(S->NS), TAG(NS->S)) communicating a condition for implementing said ef- facing, and, in the event of modification of the access right level (S->NS, NS->S) to which the memory region (MEM_Sh) is dedicated, said ef- memory region facing (MEM_Sh) is implemented hardware- rially by the firewall device (FWL) in a controlled manner by the condition communicated by the tag (TAG(S->NS), corresponding TAG(NS->S)).

4. Method according to one of the preceding claims, comprising in in addition to locking said memory region (MEM_Sh) by the firewall device (FWL), blocking access to the memory region (MEM_Sh), during erasure.

5. Method according to one of the preceding claims, in which the Access rights levels include a secure (Sec) level and a non-secure level (NSec), or a privileged level (Priv) and a level non-privileged (NPriv), or the respective access rights levels of multiple processors (PROC) that can access said memory {MEM _Sh).

6. Method according to one of the preceding claims, in which the memory (MEM) further includes a memory controller (MEM_CTRL) set to clear at least one of the regions memory (MEM_Sec, MEM_Sh, MEM_NSec) of the memory (MEM), erasing said memory region (MEM_Sh) comprising a transmission of a delete command by the firewall device (FWL) to the memory controller (MEM_CTRL).

7. Method according to one of the preceding claims, in which erasing said memory region (MEM_Sh) comprises a transmission by the firewall device (FWL) of a burst of data erase (TRAFF) in said memory region on an access bus direct memory (DMA).

8. System on chip (SOC), comprising at least one processor (PROC), a memory (MEM) and a firewall device (FWL), said at least a processor (PROC) being configured to generate requests (REQ) memory access points (MEM) each having a level of access rights respective, the memory (MEM) comprising memory regions (MEM_Sec, MEM_Sh, MEM_NSec) dedicated to rights levels respective access points and at least one of the memory regions (MEM_Sh) being dedicated to a level of access rights which can be modified by the processor (PROC), the firewall device (FWL) being configured to control access to memory regions (MEM_Sec, MEM_Sh, MEM_NSec) depending on the access right level (Sec, NSec) of the requests (REQ) and the level of rights to which the region is dedicated respective memory, in which! the firewall device (FWL) is ma- actually configured, in case of modification of the right level access to which a memory region (MEM_Sh) is dedicated, to erase the memory region (MEM_Sh).

9. The system-on-chip of claim 8, wherein the device firewall (FWL) includes, for each memory region (MEM._Sec, MEM_Sh, MEM_NSec), an attribute (S, NS) representing the level of access right of the corresponding memory region, and is configured to control access to memory regions (MEM_Sec, MEM_Sh, MEM_NSec) by comparing the access right level (Sec, NSec) of the requests (REQ) with the attribute (S, NS) of the respective memory region, the firewall device (FWL) being configured, in case of modification of the access right level (S->NS, NS->S) to which the region is dedicated memory (MEM_Sh), to modify the attribute (S, NS) of the region memory (MEM_Sh), after erasing the memory region (MEM._Sh) by the firewall device (FWL).

10. A system-on-chip according to one of claims 8 or 9, wherein the firewall device (FWL) further includes, for each modi- possible access right level setting (S->NS, NS->S), a tag (TAG(S->NS), TAG(NS->S)) communicating a condition of implementation of said erasure, and, in the event of a change in the level of access right (S->NS, NS->S) to which the memory region is dedicated (MEM_Sh), the firewall device (FWL) is configured to put implements said erasure of the memory region (MEM_Sh) in a manner controlled by the condition communicated by the label (TAG(S->NS), TAG(NS->S)) corresponding.

11. | System on chip according to one of claims 8 to 10, wherein the firewall device (FWL) is further configured to lock the memory region (MEM_Sh), blocking accesses to the memory region (MEM_Sh), during erasure.

12. System on chip according to one of claims 8 to 11, wherein said access rights levels include a secure level (Sec) and a non-secure level (NSec), or a privileged level (Priv) and a non-privileged level (NPriv), or access rights levels respective of several processors (PROC) which can access said memory (MEM_Sh).

13. | System on chip according to one of claims 8 to 12, wherein the memory (MEM) further includes a memory controller (MEM_CTRL) set to clear at least one of the regions memory (MEM_Sec, MEM_Sh, MEM_NSec) of the memory (MEM), the firewall device (FWL) being further configured to transmit an erase command to the memory controller (MEM_CTRL) to clear the memory region (MEM_Sh).

14. | System on chip according to one of claims 8 to 13, wherein the firewall device (FWL) is further configured to transmit a erase data burst (TRAFF) in the memory region (MEM_Sh) on a direct memory access (DMA) bus to clear the memory region (MEM_Sh).