Secure embedded element
A low-level operating system in embedded systems optimizes memory management by isolating and transferring data between volatile and non-volatile memory, addressing inefficiencies and security challenges in managing multiple applications.
Patent Information
- Application Number
- FR2020009752
- Authority / Receiving Office
- FR · FR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-09-25
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2040-09-25
AI Technical Summary
Existing embedded systems face challenges in managing memory efficiently, particularly in terms of data security and optimization across multiple applications, due to constraints associated with volatile and non-volatile memories.
Implementing a low-level operating system that manages volatile memory allocation for multiple high-level operating systems, ensuring data isolation and efficient transfer of execution data between volatile and non-volatile memory based on application needs, with high-level operating systems accessing a virtual image of the memory.
Enhances memory management efficiency, ensuring quick application startup and data security by isolating applications and optimizing memory usage, particularly for applications requiring speed and data integrity.
Smart Images

Figure 00000022_0000 
Figure 00000022_0001 
Figure 00000023_0000
Abstract
Description
Description Title of the invention: Embedded secure element Technical field This description relates generally to electronic systems and, more particularly, to embedded electronic systems. This description relates, even more particularly, to the use of memories in an embedded electronic system. Prior art An embedded electronic system is a stand-alone electronic and software system suitable for being embedded in an electronic device and / or electronic equipment. The difficulties in designing an embedded system are frequently linked to constraints in managing memories internal or external to the embedded system. The system may include non-volatile memories, rewritable or not, and volatile memories, each adapted to store data of different types with the constraints and advantages specific to each type of memory. The management of these memories generates constraints in terms of data security, particularly when the system is used for different applications. It would be desirable to be able to improve, at least in part, certain aspects of known on-board electronic systems, more particularly to be able to improve, at least in part, certain aspects of the use of memories in on-board electronic systems. Summary of the invention There is a need for embedded systems capable of managing multiple applications independently of each other. In particular, there is a need for embedded systems in which memory usage is optimized. An embodiment of a first aspect provides an on-board electronic system comprising: - at least one volatile memory: and - at least one low-level operating system managing the allocation of volatile memory areas to several high-level operating systems each comprising one or more applications, wherein said volatile memory comprises: at least a first part reserved for execution data of a first application; and at least one second part intended to store execution data of at least one second application, the execution data of the first application remaining in the volatile memory in the event of deactivation or suspension of this first application and execution of said at least one second application. An embodiment of the first aspect provides a method implemented by an on-board electronic system comprising: - at least one volatile memory: and - at least one low-level operating system managing the allocation of volatile memory areas to several high-level operating systems each comprising one or more applications, wherein said volatile memory comprises: at least a first part reserved for execution data of a first application; and at least one second part intended to store execution data of at least one second application, the execution data of the first application remaining in the volatile memory in the event of deactivation or suspension of this first application and execution of said at least one second application. According to an embodiment of the first aspect, execution data of one or more tasks of an application are transferred, in whole or in part, by the low-level operating system, from said volatile memory to a non-volatile memory when the execution of said task is interrupted by the execution of at least one task of another application. According to an embodiment of the first aspect, a volatile memory area is allocated to the second application while it is not being executed, the execution data of this second application being transferred to non-volatile memory if the available volatile memory size is not sufficient for the execution of a third application. An embodiment of a second aspect provides an on-board electronic system comprising: - at least one volatile memory; - at least one low-level operating system managing the allocation of volatile memory areas to several high-level operating systems each comprising one or more applications, wherein execution data of one or more tasks of said first application are transferred, in whole or in part, by the low-level operating system, from said volatile memory to a non-volatile memory when the execution of said task of the first application is interrupted by the execution of at least one task of a second application. An embodiment of the second aspect provides a method implemented in an on-board electronic system comprising: - at least one volatile memory; - at least one low-level operating system managing the allocation of volatile memory areas to several high-level operating systems each comprising one or more applications, wherein execution data of one or more tasks of said first application are transferred, in whole or in part, by the low-level operating system, from said volatile memory to an area of non-volatile memory when the execution of said task of the first application is interrupted by the execution of at least one task of a second application. According to an embodiment of the second aspect, a volatile memory area is allocated to the first application while it is not being executed, the data of this first application being transferred to non-volatile memory if the available volatile memory size is not sufficient for the execution of a second application. According to one embodiment of either aspect, applications of one high-level operating system do not have access to areas of volatile memory allocated to applications of another high-level operating system. According to one embodiment of either aspect, a memory management function or unit executed by the low-level operating system prevents access to runtime data of one application by other applications. According to an embodiment of the first aspect, the memory management function or unit adapts the size of the first and second parts of the volatile memory according to the needs of the different applications. According to one embodiment of either aspect, execution data of multiple applications are simultaneously present in volatile memory. According to one embodiment of either aspect, the non-volatile memory is external to the on-board electronic system. According to one embodiment of either aspect, execution code of an application is transferred into volatile memory for execution. According to one embodiment of either aspect, the non-volatile memory is internal to the on-board electronic system. According to one embodiment of either aspect, execution code of an application remains in non-volatile memory during execution of a task. According to one embodiment of either aspect, a non-volatile memory area allocated to a high-level operating system is viewed by the high-level operating system as volatile working memory. According to one embodiment of either aspect, the high-level operating systems maintain a virtual image of the memories in which the volatile and non-volatile memories are one. According to one embodiment of either aspect, upon execution, a main task of an application is allocated a volatile memory area. One embodiment provides an embedded secure element, configured to implement the described system or method. Brief description of the drawings These and other features and advantages will be set forth in detail in the following description of particular embodiments given without limitation in relation to the attached figures, among which: [Fig.1] [Fig.1] represents, schematically and in the form of blocks, an embodiment of hardware components of an embedded secure element or embedded electronic system; [Fig.2] [Fig.2] represents, schematically and in the form of blocks, a software architecture of an on-board electronic system; [Fig.3] [Fig.3] represents views (a), (b) and (c) illustrating, schematically and in block form, the implementation of a method for executing applications of the on-board electronic system of figures 1 and 2; [Fig.4] [Fig.4] represents views (a), (b) and (c) illustrating, schematically and in block form, a mode of implementation of a method for executing applications of the on-board electronic system of figures 1 and 2; [Fig.5] [Fig.5] represents views (a), (b) and (c) illustrating, schematically and in block form, the implementation of a method for executing applications of the on-board electronic system of figures 1 and 2; and [Fig.6] [Fig.6] represents views (a), (b) and (c) illustrating, schematically and in the form of blocks, another mode of implementation of a method of executing applications of the on-board electronic system of figures 1 and 2. Description of the embodiments The same elements have been designated by the same references in the different figures. In particular, the structural and / or functional elements common to the different embodiments may have the same references and may have identical structural, dimensional and material properties. For the sake of clarity, only the phases and elements useful for understanding the embodiments described have been represented and are detailed. Unless otherwise specified, when referring to two elements connected between them, it means directly connected without intermediate elements other than conductors, and when referring to two elements connected or coupled together, it means that these two elements can be connected or be connected or coupled through one or more other elements. In the following description, when reference is made to absolute position qualifiers, such as the terms “front”, “back”, “top”, “bottom”, “left”, “right”, etc., or relative position qualifiers, such as the terms “above”, “below”, “upper”, “lower”, etc., or to orientation qualifiers, such as the terms “horizontal”, “vertical”, etc., reference is made unless otherwise specified to the orientation of the figures. Unless otherwise specified, the expressions 'about', 'approximately', 'substantially', and 'of the order of' mean to within 10%, preferably to within 5%. [Fig.1] represents, very schematically and in the form of blocks, an embodiment of hardware components HW (Hardware) of an embedded secure element E or embedded electronic system. Element E is produced in the form of an electronic circuit comprising, in material terms: - one or more digital processing units (PUs), for example state machines, microprocessors or central processing units (CPUs), programmable logic circuits, etc.; - one or more memories 12, 13 for volatile (RAM) and / or non-volatile (NVM) storage of data and programs; - one or more data, address and / or command buses 14 between the different internal elements of the circuit!; - one or more input-output (I / O) interfaces 15 for wired or wireless communication with the outside of the circuit 1: - one or more communication circuits, for example a near field communication circuit 16 (NFC — Near Field Communication); and - various other circuits depending on the application, symbolized in [Fig.1] by a block 17 (FCT), for example a short-distance communication device using, for example, the Bluetooth standard, biometric sensors, etc. [Fig.2] represents, schematically and in the form of blocks, a software architecture 100 of an embedded secure element E, or secure embedded electronic system. The software architecture 100 is implemented by the hardware components HW of the secure element E described in [Fig.1]. The architecture 100 includes a primary platform 110, generally referred to as a virtual primary platform (VPP) including access to the electronic components 111 (HW) of the secure element E, and comprising one or more low-level operating systems 113 (LLOS, Low Level Operating System). The low-level operating systems 113 are operating systems for facilitating communication between one or more high-level operating systems (HLOS1, HLOS2, HLOS, High Level Operating System) 124A, 124B (two high-level operating systems in the case illustrated in [Fig. 1]) of the secure element E and the components 111 of the element E. For example, the low-level operating systems comprise driver software for the components 111. A low-level operating system 113 is composed of execution code (or executable code) and execution data. The execution code contains instructions that allow the execution of the program's functions. By definition, the instructions are invariable for a given program, except for a program update that then modifies the instructions. The execution data is used by the execution code to contextualize the execution and perform the desired function. Execution data can be divided into two categories: so-called "temporary" execution data and so-called "permanent" or "fixed" execution data.For example, if the function consists of verifying a PIN code, this function is decomposed into three parts, the execution code contains instructions for verifying the PIN code while the permanent execution data contains the reference PIN code and the number of remaining attempts and the temporary execution data contains the PIN code subject to verification. In an embedded secure element, the low-level system manages the memory components of the element, i.e. the physical memories, volatile 12 ([Fig.1]) and non-volatile 13 (rewritable or not). The high-level operating systems 124A and 124B use virtual images of the available memories for managing execution codes and execution data. Thanks to this technique, the high-level operating systems do not have direct access to the management of physical memories, whether volatile or non-volatile. In other words, in the embodiments described, the high-level operating systems manage a virtual image of the memories in which the volatile and non-volatile memories are one and the same. The management of the physical distribution in the volatile and non-volatile memories is provided by the low-level operating system(s). The platform 110 has, according to the embodiments described, in particular the following roles: - to define a low-level operating system between the hardware components (HW), in particular the processor and memories, and the high-level operating systems level and the applications they run; - to manage exchanges between high-level operating systems and hardware components; - to implement a function (firewall) preventing interactions between high-level operating systems; and - to allow sharing of the same hardware components of the secure element between several high-level operating systems while ensuring that only one is active at any given time. The low-level operating system 113 uses a memory management function (MMF) 115 to control or manage the access of the high-level operating systems to the physical memories by linking the virtual memories and the physical memories according to the needs and demands of the high-level operating systems 124A and 124B. More particularly, the low-level operating systems 113, using the memory management function (MMF) 115, implement the isolation of the high-level operating systems 124A and 124B from each other and manage the access of the high-level operating systems 124A, 124B to the different memories.For example, the low-level operating systems 113 can manage the data stored in said memories, and more particularly, manage access to this data, especially in the case where several high-level operating systems are present in the secure element E. The low-level operating systems 113 can, for example, prohibit access to certain data to a high-level operating system. The architecture 100 further comprises applications adapted to be implemented by the primary platform 110. These applications are, for example, adapted to process commands originating from communication interfaces, such as for example a banking transaction using a near-field communication device. Each of these applications is implemented using fixed data forming the application, for example instructions, lines of code, or permanent data such as user data such as an identifier, and temporary data, execution data, or variables such as data stacks, temporary encryption keys. The execution data of an application is data used by the application only during its execution and not retained once the execution of the application is finished. More specifically, an application implements one or more tasks, each task being, for example, a succession of instructions. It is the implementation of a task that produces execution data. Some execution data may be used by different tasks of the application, while others may not be used by only one task. It is considered that an application can only implement one task at a time. Thus, in the remainder of the description, the task that is currently being executed by the application is called 'main task' and the other tasks of the application that are not currently being executed are called 'secondary tasks'. Execution tasks are, for example, tasks that have not yet been implemented, and which have not generated execution data, or tasks that have already been implemented but have been, for example, interrupted (and paused), and which have therefore already generated execution data. Thus, in the remainder of the description, a distinction is made between execution data relating to the main task and execution data relating to the secondary tasks. These applications can be of different types, for example, a SIM (Subscriber Identity Module) application, a payment application, an application allowing the validation of a public transport ticket, etc. According to an example of application type, an application 121 (App1) is adapted to be implemented directly by the primary platform 110. The application 121 is, for example, an application allowing payments to be made by communicating with a near field communication (NFC) device. According to another example of application type, an application 122 (App2) is adapted to send commands to the primary platform 110 via one of the high-level operating systems, for example the operating system 124B. This high-level operating system may be, for example, one of the operating systems of the secure element E exchanging commands with the primary platform 110. As a variant, it may also be considered that the high-level operating system, as well as all the applications attached to it, are an application adapted to be implemented by the primary platform 110. According to another example of application type, an application 123 (App3) is adapted to send commands to the primary platform 110 via an execution environment 125 (ENV) and one of the high-level operating systems, for example the operating system 124A. The operating environment is for example of the Java or JavaCard type. Alternatively, it can also be considered that the operating system, as well as all the applications attached to it, are an application adapted to be implemented by the primary platform 110. To implement these different applications 121, 122, 123, the operating systems 124A, 124B, and the execution environment 125, the components 111 of the secure element E comprise, more particularly, at least one non-volatile memory and at least one volatile memory. The non-volatile memory is generally used to store fixed data and the execution code of one or more applications. Volatile memory is generally used to store the execution data of one or more applications. In the case where the fixed data and the execution data of several applications are stored at the same time in the volatile memory and in the non-volatile memory, there is protection, for example protection software and / or a firewall mechanism, to prevent one application from accessing the fixed data and the execution data of another application. This function is, as indicated previously, implemented by a memory management function 115 MMF (Memory Management Function) or memory management unit (MMU). This function 115 makes it possible to make the link between the "virtual" memory known by the application and the physical memories (volatile and non-volatile).High-level operating systems (124A and 124B) do not have "direct" access to physical memory management. They use a virtual image of this memory. However, the management of this virtual image or virtual memory is split in order to allow high-level operating systems (124A and 124B) to manage execution codes, as well as fixed data or execution data depending on their nature. It is the high-level operating systems that manage their data and not the low-level operating systems. The low-level operating systems and the memory management function make the correspondence between virtual execution data (virtual memory) and their storage in physical memory. According to one embodiment, at least one area or part of the non-volatile memory is used as a working memory. In other words, this area of the non-volatile memory functions, seen from the perspective of high-level applications, as a volatile memory, to store temporary data used by the applications during their operation. The non-volatile memory may be internal or external to the secure element E (internal or external to the HW circuit). Depending on whether the non-volatile memory (its area used as working memory by the high-level operating systems) is internal or external to the secure element, the management of this memory differs during the execution of a high-level operating system. In the case where the non-volatile memory is internal to the secure element E, the high-level operating system can be directly executed from the memory where the operating system is located (is loaded). This is called "in-place" (XIP) execution. In general, low-level operating systems then allow the management of the execution of several high-level operating systems. In the case where an application is executed "in-place", the instruction part (the execution code) of the application remains in non-volatile memory. The execution data (permanent and temporary) are, if necessary, moved to working memory (non-volatile memory). volatile). Conversely, if the non-volatile memory is external to the secure element E, "in place" execution is not possible. Managing non-volatile memory involves moving all or part of the high-level operating system into an internal volatile memory of the secure element. In this case, the low-level operating system may or may not allow the management of the execution of several high-level operating systems in its internal memory. Furthermore, it is considered that an application can be in at least three different states: - an active or running state by the primary platform 110; - a sleep state, that is to say that its execution is interrupted but that it can resume at any time; and - an inactive or deactivated state, that is to say that its execution cannot be restarted without one or more prior operations. When an application wakes up to run again, it resumes execution where it left off. It does not need to use any special routines to continue its processing. From the application's perspective, everything appears as if the application has not been interrupted. More particularly, when an application is running, all or part of the data relating to its main task is stored in the volatile memory of the circuit and is used for the implementation of the application. Data relating to secondary tasks of the application may be stored in the volatile memory or in the working (non-volatile) memory. Alternatively, certain execution data (permanent or temporary) relating to the main task may be located in the working (non-volatile) memory and be loaded into the volatile memory when the main task needs it. When an application is sleeping, the data related to its primary task is stored in volatile memory and is not being used for the implementation of the application. Data related to secondary tasks of the application can be stored in volatile memory or in working memory. An application can, in addition, be sleeping if its execution is interrupted by the execution of another application which may be in a different high-level operating system. In this case, all the tasks of the sleeping application are considered secondary tasks since none are executed. Thus, when an application is sleeping because another application is running, all of its data is physically located either in a dedicated area of volatile memory not accessible to other operating systems, or in non-volatile memory.This management is carried out by the management function. memory 115. However, seen from the application (of the high-level operating system), the temporary data are in a working memory assimilated, by the virtual image used by this operating system, to a volatile memory. According to another exemplary embodiment, execution data of several different applications of several different high-level operating systems are located at the same time in the volatile memory. In this case, each application only has access to its own data and does not have access to the data of the other application(s). By using the low-level system and the memory management function, the applications are not aware of the presence of data from other applications in the volatile memory. When an application is disabled, all its data (whether related to a primary task or a secondary task) is stored in memory in the same way as for a sleeping application. Figures 3 to 6 illustrate different implementations of applications of the secure element E, and more particularly the use of volatile and non-volatile (working) physical memories. One might have thought of letting high-level operating systems directly manage volatile 12 and non-volatile 13 memory. However, some transactions performed by certain applications (for example, near-field transactions — NFC) require a speed of execution incompatible with management of non-volatile memory by a high-level operating system. Transferring this management to the low-level operating system and "making believe" the high-level operating system that it is transferring its data into volatile memory speeds up the process. [Fig. 3] comprises three views (a), (b), and (c) each illustrating a phase of an implementation of a method for executing applications App20 and App21 of the secure element E described in relation to figures 1 and 2. These three views illustrate more particularly the use of the working memory WM using the non-volatile memory (Physical NVM), considered by the applications as a volatile memory, and of the real volatile RAM memory (Physical RAM), of the secure element E during the execution of the applications App20 and App21. App20 and App21 applications, depending on their implementation, can be located in the same high-level operating system or in two different high-level operating systems. According to the example described in [Fig.3], it is assumed that the application App21 is deactivated, but has already been started, before the start of the application App20. The execution data relating to the main and secondary tasks of the application App21 are stored in an area W21 of the non-volatile working memory WM. The App20 application is also disabled but has never been started, so it has not yet generated any runtime data. In a first phase (view (a)), the application App20 is started by the secure element E. More particularly, the application App20 is started by the low-level operating system 113. The application App20 is then running. Execution data, relating to the main task of the application App20 are downloaded or loaded into the volatile RAM memory. During its entire execution, and if it is not interrupted by the execution of another application, the App20 application stores its execution data in volatile RAM memory. In a second phase (view (b)), we assume that the application App21, previously deactivated, requests to be executed by the secure element E. The execution data relating to the main task, and possibly to secondary tasks, of the application App20, present in the volatile RAM memory are transferred and stored in an area WM20 of the non-volatile working memory WM and are deleted from the volatile RAM memory. Thus, the current state of the application App20 is saved in the memory WM, seen by the application App20 as volatile memory, and the application App20 then becomes deactivated. Runtime data related to the App21 application previously stored in the WM21 area is loaded into volatile RAM. This allows the App21 application to resume use where it previously left off. In other words, the App21 application moves from a disabled state to a “running” state. In a third phase (view (c)), the application App21 continues to execute, and modifies in the volatile RAM memory its execution data relating to its main task and, possibly, to secondary tasks. Data is therefore transferred from the non-volatile working memory WM to the volatile RAM memory. [Fig.4] comprises three views (a), (b), and (c) each illustrating a phase of an embodiment of a method for executing applications App30 and App31 of the secure element E described in relation to figures 1 and 2. These three views illustrate more particularly the use of the non-volatile working memory WM and a volatile memory RAM of the secure element E during the activation of the applications App30 and App31. App30 and App31 applications, depending on their implementation, can be located in the same high-level operating system or in two different high-level operating systems. According to one embodiment, the application App30 is a frequent use application, or resident application, or implements a frequent use task, a resident task. Whether an application is considered “frequent” is decided, requested, and / or indicated by the high-level operating system that hosts the application. Runtime data for the resident application App30 is stored in a reserved PRAM30 area of volatile RAM. The PRAM30 area (or physical address range) of RAM is always available to store the runtime data of the application App30, and the runtime data of one or more other applications cannot be stored there. It is assumed that the App30 application is active and running. In a first phase (view (a)), the application App30 is put to sleep. Execution data relating to the main task of the application App30 are stored in the PRAM30 area. The main task of the application App30 is, for example, a resident task. The application App31 is then started by the secure element E. Execution data, relating to the main task, and possibly to secondary tasks, of the application App31, are downloaded or loaded into a PRAM31 area of the volatile RAM memory. The PRAM31 area is distinct from the PRAM30 area. The application App31 is then running. During its entire execution, and if it is not interrupted by the execution of another application, the App31 application stores its execution data in the PRAM31 area of the volatile RAM memory. In a second phase (view (b)), the resident application App30, previously in standby, requests to be executed by the secure element E, more specifically, by the low-level operating system 113. If the capacity of the volatile memory is not sufficient to contain the execution data of the App30 and App31 areas, the execution data relating to the App31 application, present in the PRAM31 area of the volatile RAM memory, are then transferred to a WM31 area of the non-volatile working memory WM. Thus, the current state of the App31 application is saved in the working memory WM and the App31 application is then deactivated. This situation can also occur if two applications are already present in the volatile memory and a third application requests to be executed. In a third phase (view (c)), execution data relating to the main task of the application App30, already present in the PRAM30 area of the volatile RAM memory dedicated to the application 30, can be directly processed. Thus, the use of the application App30 can resume where it had previously stopped. The application App30 is then being executed. An advantage of this embodiment is that a frequently used application, or resident application, is guaranteed to have space in the physical volatile memory. PRAM to store its execution data. In the case where the size of the resident volatile memory requested by a new resident application that should be activated is greater than the size of the physical volatile memory PRAM, its activation would be refused until the PRAM memory is freed, or the available size of the PRAM memory is sufficient, or the size of the so-called resident memory requested by the application to be activated is compatible with the available size of the PRAM memory. This case can occur if several resident applications are activated. [Fig.5] comprises three views (a), (b) and (c) each illustrating a phase of an implementation of a method for executing applications App40 and App41 of the secure element E described in relation to figures 1 and 2. These three views illustrate more particularly the use of the non-volatile working memory WM and the volatile memory RAM of the secure element E during the activation of the applications App40 and App41. App40 and App41 applications, depending on their implementation, could be located in the same high-level operating system or in two different high-level operating systems. It is assumed that the applications App40 and App41 have already been previously started or executed by the secure element E, but are now sleeping or inactive. All execution data relating to the start and operation of the applications App40 and App41 are then stored in, respectively, areas WM40 and WM41 of the non-volatile working memory WM. In a first phase (view (a)), the application App40 requests to be executed by the secure element E, and then becomes “running”. Startup and operating execution data relating to the application App40 are transferred, downloaded or loaded into a PRAM40 area of the volatile RAM memory, from the WM40 area of the non-volatile working memory WM, when the main task of the application App40 needs it. In a second phase (view (b)), the application App41 in turn requests to be executed by the secure element E. The execution data relating to the main task of the application App41 are transferred, downloaded or loaded into a PRAM41 area of the volatile RAM memory, from the WM41 area of the non-volatile working memory WM. This data is stored following the execution data relating to the application App40 in the volatile RAM memory. The application App41 is then running, and the application App40 is then in standby. At a third phase (view (c)), the application App41 is still executed by the secure element E, but the volatile RAM memory no longer has space available for store additional execution data relating to this application App41. Execution data relating to secondary tasks of the application App40, present in the PRAM40 area, are then transferred or moved to the WM40 area of the non-volatile memory WM to free up storage space in the volatile RAM memory. It may also happen that data from the App41 application is transferred to the working memory, for example if all the runtime data of the App40 application has already been transferred to the working memory but the capacity of the volatile memory is not sufficient for all the runtime data of the App41 application. In this case, the least used or oldest data is transferred to the working memory. [Fig. 6] comprises three views (a), (b), and (c) each illustrating a phase of an embodiment of a method for executing applications App50 and App51 of the secure element E described in relation to [Fig. 1]. These three views illustrate more particularly the use of the non-volatile working memory WM and the volatile memory RAM of the secure element E during the activation of the applications App50 and App51. - App50 and App51 applications, depending on their implementation, could be located in the same high-level operating system or in two different high-level operating systems. It is assumed that applications App50 and App51 have already been started by secure element E and are deactivated. All runtime data relating to the start and operation of applications App50 and App51 are stored in areas WM50 and WMS5 | of the non-volatile working memory WM, respectively. According to the example described in [Fig.6], the application App50 is a frequently used application, subsequently called a resident application, also described in relation to [Fig.4]. In a first phase (view (a)), the resident application App50 requests to be executed by the secure element E. Execution, startup and operating data relating to the application App50 are transferred, downloaded or loaded into a reserved PRAMS50 area of the volatile RAM memory, from the WM50 area of the non-volatile working memory WM. The PRAMS50 area is an area of the volatile RAM memory always available to store the execution data of the application App50, and which cannot be used to store execution data of other applications. The application App50 is then being executed. In a second phase (view (b)), the application App51 requests to be executed by the secure element E. Startup and operating execution data relating to the application App51 are transferred, downloaded or loaded into a PRAMS1 area of volatile RAM, from WM51 area of non-volatile working memory WM. This data is stored after the execution data relating to the App50 application in volatile RAM. The App51 application is then running, and the App50 application is then sleeping. In a third phase (view (c)), the application App51 is still being executed by the secure element E, but the volatile RAM memory no longer has space available to store additional execution data relating to the application App51. Since the execution data relating to the application App51 cannot be stored in the PRAMSO area, certain execution data relating to secondary tasks of the application App51 are then moved to the WM51 area of the non-volatile working memory WM to free up storage space in the volatile RAM memory. In the case where the secure element E needs to implement a third application, while the volatile RAM memory has no more space available to store execution data, the low-level system (its memory management function MMF) will move the data of the application, which is not resident, whose execution is the oldest. Alternatively, a resident application has part of its runtime data in dedicated (resident) volatile memory and another part in volatile memory shared with other applications. This shared part can then be transferred to working (non-volatile) memory when the execution of the application's task is interrupted or needs more space in volatile memory. An advantage of the described embodiments is that all applications are loaded into memory that is viewed by the high-level operating systems of those applications as volatile memory. This allows for fast startup of each application. Another advantage of the described embodiments is that a frequently used application is guaranteed to have space in the volatile RAM memory of the circuit to store its operating execution data. Preferably, the low-level operating systems 113, described in relation to [Fig. 2], manage the allocation of memory areas and their filling with the execution data of the applications (resident or not). More particularly, the low-level operating system(s) are adapted to detect whether an application is a resident application or not. A secure element E may comprise several resident applications. The low-level operating systems 113 are, furthermore, adapted to refuse the installation of an application as a resident application, for example, if the secure element E comprises too many resident applications, in particular when too large a portion, for example more than half, of the volatile RAM is reserved for runtime data of resident applications. According to a variant, the low-level operating systems 113 are adapted to configure the sizes of the portions of the volatile RAM reserved for runtime data of resident applications. In particular, the low-level operating systems 113 are adapted to configure the size of a portion of the volatile RAM reserved for runtime data of a resident application, to make it equal to zero. In addition, if the secure element includes several resident applications, then the execution data of these resident applications are all stored in the same "resident" part of the volatile RAM memory. When this "resident" part is full, the execution data relating to secondary tasks of the resident applications are moved to the non-volatile working memory WM. In addition, if all resident applications of the secure element are disabled, the "resident" portion of volatile RAM, which is reserved for the execution data of resident applications, can be used to store execution data of other applications of the secure element. Furthermore, the size of the "resident" portion of volatile RAM can be adjusted according to the needs of the resident applications. Furthermore, if a resident application, which requests to be executed, does not have enough space to load its data into the "resident" portion of volatile RAM, its execution is suspended and it remains in the disabled state. The application concerned can only be executed when there is enough space in the "resident" portion of volatile RAM. For example, space can be freed by disabling other resident applications.According to another example, the size of the "resident" part of the volatile PRAM memory can be increased. According to another embodiment, the execution data of an inactive or sleeping application that are stored in the working memory WM are only transferred to volatile memory, upon a new activation of this application, as and when required by the application. This action is carried out by the low-level operating system and is transparent to the application and the corresponding high-level operating system. Indeed, the movements of data between the volatile memory and the non-volatile working memory and vice versa are not seen by the high-level operating systems. In the case where all the volatile memory needs to be used during a loading, the low-level operating system first moves, to the working memory, an execution data item that is considered to be the oldest (the one that has been used least recently) or the least used. Various embodiments, aspects and variations have been described. Those skilled in the art will understand that certain features of these various embodiments, aspects and variations could be combined, and other variations will occur to those skilled in the art. In particular, the use of non-volatile working memory has mostly been described with the execution of two applications but, in practice, this use can be transposed with the use of more than two applications. Additionally, an application could be divided into one or more resident sub-applications and one or more non-resident sub-applications. That is, the resident application could be a part of another application. Finally, the practical implementation of the embodiments and variants described is within the reach of those skilled in the art from the functional indications given above.
Claims
Claims
1. On-board electronic system (E) comprising: - at least one volatile memory (12, RAM); and - at least one low-level operating system (113) managing allocation of volatile memory areas to multiple systems high-level operating systems, each comprising one or more app- applications (App30, App31; App50, App51), wherein said volatile memory comprises: at least a first part (PRAM30; PRAMS50) reserved for execution data of a first application (App30; App50) of a first operating system; and at least one second part intended to store data execution of at least one second application (App31; App51) of a second operating system, the execution data of the first application remaining in the volatile memory if this is disabled or put into sleep mode first application and execution of said at least one second app- plication.
2. Method implemented by an on-board electronic system (E) comprising: - at least one volatile memory (12, RAM); and - at least one low-level operating system (113) managing allocation of volatile memory areas to multiple systems high-level operating systems, each comprising one or more app- applications (App30, App31; App50, App51), wherein said volatile memory comprises: at least a first part (PRAM30; PRAMS50) reserved for execution data of a first application (App30; App50) of a first operating system; and at least one second part intended to store data execution of at least one second application (App31; App51) of a second operating system, the execution data of the first application remaining in the volatile memory if this is disabled or put into sleep mode first application and execution of said at least one second app- plication.
3. The method of claim 2, wherein the execution data of several applications are simultaneously present in volatile memory {12).
4. A method according to claim 2 or 3, wherein a function or unit memory management (115) executed by the operating system low-level prevents access to an application's runtime data other applications.
5. A method according to claim 4, wherein the function or unit of memory management adapts the size of the first and second parts of volatile memory according to the needs of different applications.
6. A method according to any one of claims 2 to 5, wherein execution data of one or more tasks of an application are transferred, in whole or in part, by the base operating system level, from said volatile memory (12) to a non-volatile memory (13, WM) when the execution of said task is interrupted by the execution of at least one task of another application.
7. The method of claim 6, wherein the non-volatile memory is external to the on-board electronic system.
8. The method of claim 7, wherein a code for executing a application is transferred to volatile memory (12) for execution.
9. The method of claim 6, wherein the non-volatile memory is internal to the on-board electronic system. |Claim 10] A method according to claim 9, wherein a code for executing a application remains in non-volatile memory (13) when executing a stain.
11. A method according to any one of claims 6 to 10, wherein High-level operating systems manage a virtual image of the memories in which volatile and non-volatile memories do not that one.
12. A method according to any one of claims 6 to 10, wherein a volatile memory area is allocated to the second application then that it is not executed, the execution data of this second app- plication being transferred to non-volatile memory if the size of available volatile memory is not sufficient to execute a third application.
13. A method according to any one of claims 2 to 12, wherein, when executed, a main task of an application is seen allocate a volatile memory area.
14. A method according to any one of claims 2 to 13, wherein applications of a high-level operating system do not have access to areas of volatile memory allocated to applications of a other high-level operating system.
15. | System according to claim 1, configured for implementing the method according to any one of claims 2 to 14
16. Embedded secure element, configured for the implementation of the method according to any one of claims 2 to 14.
