Secure resource access method and device of integrated circuit and electronic equipment

By running secure and non-secure operating systems in the operating system domain of the integrated circuit and restricting their access rights, the problem of unfavorable resource isolation between multiple operating system domains is solved, the security of the system is enhanced, and the impact of failures is prevented. Secure resource access from other operating system domains.

CN118734304APending Publication Date: 2024-10-01HORIZON JOURNEY (HANGZHOU) ARTIFICIAL INTELLIGENCE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410748667.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In integrated circuits, multiple non-secure operating systems can access all secure resources in the secure operating system, resulting in unfavorable resource isolation. Once the secure operating system fails, all non-secure operating systems cannot request secure resources normally. .

Method used

By running the secure or non-secure operating system in each operating system domain on the processor core corresponding to each operating system domain, and ensuring that the secure operating system in each operating system domain can only process non-secure operating systems in the operating system domain. The secure resource access request of the secure operating system is implemented to achieve resource isolation, and when the secure operating system in any operating system domain fails, it does not affect the secure resource access of other operating system domains.

Benefits of technology

It realizes resource isolation between different operating system domains, enhances the security of multiple operating systems, and ensures that when the secure operating system in any operating system domain fails, it will not affect the security resources of other operating system domains. access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734304A_ABST
    Figure CN118734304A_ABST
Patent Text Reader

Abstract

The invention discloses a secure resource access method and device of an integrated circuit and electronic equipment, and relates to the technical field of integrated circuits, and the method comprises the following steps: determining a processor core corresponding to each operating system domain in a plurality of operating system domains on the integrated circuit; running a first preset state operating system or a second preset state operating system in the operating system domain through a processor core corresponding to the operating system domain; and processing a security resource access request of a second preset state operating system in the operating system domain based on the first preset state operating system in the operating system domain. According to the technical scheme, it can be ensured that resources between different operating system domains are relatively isolated, and when the first preset state operating system in any operating system domain breaks down, access behaviors of security resources in other operating system domains are not affected, so that the security of the multiple operating systems is greatly enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of integrated circuits, and in particular to a method, device and electronic device for secure resource access to an integrated circuit. Background Art

[0002] With the development of semiconductor technology, integrated circuits (System on Chip, SoC) can contain multiple processor cores. In order to take advantage of multiple processor cores, different operating systems (Operating System, OS) can be run on different processor cores, so that multiple operating systems can be run on the integrated circuit.

[0003] To improve the security of integrated circuits, a secure state operating system (such as Secure World OS) and multiple non-secure state operating systems are usually run on the integrated circuit. When the non-secure state operating system needs to access the secure resources in the secure state operating system, a secure monitoring program (such as Secure monitor) deployed on the integrated circuit can send a secure access request to the secure state operating system, and the secure monitoring program will feed back the access result returned by the secure state operating system to the non-secure state operating system. Summary of the invention

[0004] When multiple non-secure operating systems can access all secure resources in a secure operating system, it is disadvantageous for resource isolation; and once a secure operating system fails, all non-secure operating systems cannot normally request secure resources.

[0005] In order to solve the above technical problems, the present disclosure provides a method, device and electronic device for accessing secure resources of an integrated circuit, which can solve the problem that all non-secure operating systems cannot normally request secure resources due to a failure of the secure operating system.

[0006] A first aspect of the present disclosure provides a method for secure resource access of an integrated circuit, comprising: determining a processor core corresponding to each of a plurality of operating system domains on the integrated circuit; running a first preset-state operating system or a second preset-state operating system in the operating system domain through the processor core corresponding to the operating system domain; and processing a secure resource access request of the second preset-state operating system in the operating system domain based on the first preset-state operating system in the operating system domain.

[0007] According to a second aspect of the present disclosure, a secure resource access device for an integrated circuit is provided, comprising: a determination module for determining a processor core corresponding to each of a plurality of operating system domains on the integrated circuit; an operation module for running a first preset state operating system or a second preset state operating system in the operating system domain through the processor core corresponding to the operating system domain; and a processing module for processing a secure resource access request of the second preset state operating system in the operating system domain based on the first preset state operating system in the operating system domain.

[0008] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program for executing the integrated circuit security resource access method provided in the first aspect.

[0009] The fourth aspect of the present disclosure provides an electronic device, which includes: a processor; a memory for storing processor executable instructions; a processor, configured to read executable instructions from the memory and execute the instructions to implement the integrated circuit security resource access method provided in the first aspect above.

[0010] A fifth aspect of the present disclosure provides a computer program product. When instructions in the computer program product are executed by a processor, the integrated circuit security resource access method provided in the first aspect is executed.

[0011] Based on the security resource access method for integrated circuits provided by the present invention, each operating system domain is run on the processor core corresponding to each operating system domain, and the first preset state operating system in each operating system domain can only process the security resource access request of the second preset state operating system in the operating system domain, so that the resources between different operating system domains can be isolated; when the first preset state operating system in any operating system domain fails, it will not affect the access behavior of security resources in other operating system domains, thereby greatly enhancing the security of multiple operating systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 4 is a software architecture diagram of a system on chip provided by an exemplary embodiment of the present disclosure.

[0013] Figure 2A is an architectural diagram of an integrated circuit provided by an exemplary embodiment of the present disclosure.

[0014] Figure 2B is an architectural diagram of an integrated circuit provided by another exemplary embodiment of the present disclosure.

[0015] Figure 3 is an architectural diagram of an integrated circuit provided by yet another exemplary embodiment of the present disclosure.

[0016] Figure 4 It is a flowchart of a secure resource access method for an integrated circuit provided by an exemplary embodiment of the present disclosure.

[0017] Figure 5 It is a flowchart of a secure resource access method for an integrated circuit provided by another exemplary embodiment of the present disclosure.

[0018] Figure 6 It is a flowchart of a secure resource access method of an integrated circuit provided by another exemplary embodiment of the present disclosure.

[0019] Figure 7 It is a flowchart of a secure resource access method of an integrated circuit provided by another exemplary embodiment of the present disclosure.

[0020] Figure 8 It is a flowchart of a secure resource access method of an integrated circuit provided by another exemplary embodiment of the present disclosure.

[0021] Fig. 9 It is a flowchart of a secure resource access method of an integrated circuit provided by another exemplary embodiment of the present disclosure.

[0022] Fig.10 It is a flowchart of a secure resource access method of an integrated circuit provided by another exemplary embodiment of the present disclosure.

[0023] Fig.11 It is a schematic diagram of the structure of a secure resource access device for an integrated circuit provided by an exemplary embodiment of the present disclosure.

[0024] Fig.12 It is a schematic diagram of the structure of a secure resource access device for an integrated circuit provided by another exemplary embodiment of the present disclosure.

[0025] Fig.13 It is a schematic diagram of the structure of a secure resource access device for an integrated circuit provided by another exemplary embodiment of the present disclosure.

[0026] Fig.14 It is a schematic diagram of the structure of a secure resource access device for an integrated circuit provided by another exemplary embodiment of the present disclosure.

[0027] Fig.15 It is a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] To explain the present disclosure, example embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. It should be understood that the present disclosure is not limited to the example embodiments.

[0029] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.

[0030] Application Overview

[0031] As chip functions become more powerful, multiple operating systems can be run on integrated circuits (such as System on Chip (SoC)), and these multiple operating systems can run on different processor cores of SoC. In order to improve the security of SoC, the hardware and software resources of SoC can be divided into a secure world (Secure World) and a non-secure world (Normal World). Security-related operations can be performed in the secure world (such as fingerprint recognition, password processing, data encryption and decryption, security authentication, etc.), and other operations not involving security can be performed in the non-secure world. The secure world and the non-secure world can be switched through a security monitoring program (such as Secure monitor).

[0032] Typically, multiple operating systems can run on a SoC, including a secure world OS and a non-secure world OS. The secure world OS runs in the secure world, and the non-secure world OS runs in the non-secure world. When the non-secure world OS needs to access secure resources in the secure world, a secure resource access request can be sent to the secure world OS through a secure monitoring program (such as a secure monitor) deployed on the SoC, and the secure monitoring program feeds back the access result returned by the secure world OS to the non-secure world OS. The non-secure world can also be called the normal world, and the non-secure world OS can also be called the normal operating system.

[0033] Figure 1 FIG. 1 is a software architecture diagram of a system on a chip provided by an exemplary embodiment of the present disclosure. Figure 1 As shown in the figure, the system on chip runs two non-secure operating systems OS 0 and OS1, a secure operating system Secure World OS and a secure monitoring program Secure Monitor. When OS 0 or OS1 needs to request resources from the secure world, it needs to send a secure resource access request to the Secure World OS through SecureMonitor, and Secure Monitor switches the non-secure world to the secure world, and after accessing the resources of the secure world, it switches the secure world to the non-secure world.

[0034] However, using the above architecture, Figure 1 Both OS 0 and OS1 in the secure world can access all secure resources in the Secure World OS, which is not conducive to resource isolation. Moreover, once the Secure World OS fails, all non-secure operating systems (such as OS 0 and OS1) cannot request secure resources normally.

[0035] In order to solve the above technical problems, an embodiment of the present disclosure provides a secure resource access method for an integrated circuit. The method runs a secure state operating system or a non-secure state operating system in each operating system domain on a processor core corresponding to each operating system domain, and the secure state operating system in each operating system domain can only process the secure resource access requests of the non-secure state operating system in the operating system domain. Therefore, it can ensure that the resources between different operating system domains are relatively isolated, and when the secure state operating system in one operating system domain fails, it will not affect the secure resource access in other operating system domains, thereby enhancing system security.

[0036] Exemplary Systems

[0037] The present disclosure provides an integrated circuit, such as Figure 2A As shown, the integrated circuit includes multiple processor cores 10, and multiple operating system domains 20 can be run on the integrated circuit. Each operating system domain 20 in the multiple operating system domains 20 includes a first preset state operating system 21 and a second preset state operating system 22. The multiple operating system domains 20 can run on different processor cores respectively.

[0038] In some embodiments, the first preset state operating system 21 includes a secure state operating system, the second preset state operating system 22 includes a non-secure state operating system, and each operating system domain 20 may include a secure state operating system and at least one non-secure state operating system. When an operating system domain includes multiple non-secure state operating systems, each non-secure state operating system in the operating system domain can access the secure resources in the secure state operating system in the operating system domain. That is, the secure state operating system in the operating system domain can process the security resource access requests of each non-secure state operating system in the operating system domain. The embodiments of the present disclosure do not limit the number of non-secure state operating systems included in the operating system domain. The following embodiments are illustrative examples of the operating system domain including one non-secure state operating system.

[0039] Figure 2B The structure diagram of the integrated circuit provided by an exemplary embodiment of the present disclosure is shown in FIG. Figure 2BAs shown, the integrated circuit includes multiple processor cores, namely cpu11 to cpu 1(N+M). Take the case where two operating system domains, namely operating system domain 20A and operating system domain 20B, are run on the integrated circuit as an example, wherein the processor cores corresponding to operating system domain 20A are cpu 11 to cpu 1N, and the processor cores corresponding to operating system domain 20B are cpu 1(N+1) to cpu 1(N+M). Operating system domain 20A includes a secure world operating system Secure world OS21A and a non-secure world operating system OS22A, and operating system domain 20B includes a secure world operating system Secure world OS21B and a non-secure world operating system OS22B.

[0040] like Figure 2B As shown, Secureworld OS21A or OS22A in operating system domain 20A can be run through processor cores cpu11 to cpu1N, and Secureworld OS21B or OS22B in operating system domain 20B can be run through processor cores cpu1(N+1) to cpu1(N+M). When OS22A in operating system domain 20A needs to access secure world resources, the secure resource access request of OS22A in operating system domain 20A can be processed through Secureworld OS21A in operating system domain 20A. When OS22B in operating system domain 20B needs to access secure world resources, the secure resource access request of OS22B in operating system domain 20B can be processed through Secureworld OS21B in operating system domain 20B.

[0041] In some embodiments, when a first preset-state operating system in an operating system domain processes security resource access requests of each second preset-state operating system in the operating system domain, it can switch the second preset-state operating system running on the processor core corresponding to the operating system domain to the first preset-state operating system based on a security monitoring program (such as Secure Monitor) corresponding to the operating system domain, and process the security resource access requests of the second preset-state operating system based on the first preset-state operating system.

[0042] In some examples, the security monitoring program is used to ensure secure communication and secure interaction between the non-secure world and the secure world to maintain the overall security of the system. Multiple operating system domains can correspond to the same security monitoring program, or each operating system domain in the multiple operating system domains can also correspond to a security monitoring program.

[0043] like Figure 2BAs shown, taking the operating system domain 20A and the operating system domain 20B corresponding to the same Secure Monitor 30 as an example, when OS22A in the operating system domain 20A needs to access the secure resources of the secure world, it can send a secure resource access request to the Secure world OS 21A in the operating system domain 20A through the Secure Monitor 30, and the Secure Monitor 30 feeds back the access result returned by the Secure world OS21A to OS22A. Similarly, the Secure world OS 21B in the operating system domain 20B can also process the secure resource access request of OS22B through the Secure Monitor 30.

[0044] like Figure 3 As shown, it is taken that the operating system domain 20A and the operating system domain 20B correspond to different Secure Monitors, wherein the operating system domain 20A corresponds to the Secure Monitor 30A, and the operating system domain 20B corresponds to the Secure Monitor 30B. When OS22A in the operating system domain 20A needs to access the secure resources of the secure world, it can send a secure resource access request to the Secure world OS21A in the operating system domain 20A through the Secure Monitor 30A, and the Secure Monitor 30A feeds back the access result returned by the Secure world OS21A to OS22A. Similarly, the Secure world OS21B in the operating system domain 20B can process the secure resource access request of OS22B through the Secure Monitor 30B.

[0045] It is understandable that when multiple operating system domains correspond to the same security monitoring program, if the security monitoring program crashes, then all non-secure operating systems will be unable to access secure resources. When multiple operating system domains correspond to different security monitoring programs, if the security monitoring program corresponding to one operating system domain crashes, it will not affect the access to secure resources of other operating system domains, thus further enhancing system security.

[0046] In some embodiments, Figure 2B and Figure 3As shown, the integrated circuit also includes hardware modules such as an interrupt controller (Generic Interrupt Controller, GIC) and a firewall. In the initialization phase, by flexibly configuring the connection relationship between the GIC and the processor core, the secure state operating system or the non-secure state operating system in the operating system domain can be run on the processor core corresponding to each operating system domain. Through the firewall, different memory spaces can also be configured for each operating system domain, so that the operating system in each operating system domain can only access specific memory spaces, thereby realizing memory isolation between different operating system domains.

[0047] Exemplary Methods

[0048] Figure 4 FIG. 1 is a flow chart of a method for accessing a secure resource of an integrated circuit provided by an exemplary embodiment of the present disclosure. This embodiment can be applied to electronic devices, such as Figure 4 As shown, the method includes the following steps 401 to 403.

[0049] Step 401: Determine, on an integrated circuit, a processor core corresponding to each of a plurality of operating system domains.

[0050] Exemplarily, the integrated circuit may include multiple processor cores (such as CPU cores), and the multiple processor cores may run a first preset state operating system or a second preset state operating system in multiple operating system domains. The embodiments of the present disclosure do not limit the number of processor cores included in the integrated circuit and the number of operating system domains that can be run on the integrated circuit.

[0051] In some examples, each operating system domain includes a first preset state operating system and at least one second preset state operating system. The first preset state operating system may be an operating system running in a secure world, which may also be referred to as a secure state operating system; the second preset state operating system may be an operating system running in a non-secure world, which may also be referred to as a non-secure state operating system. Each operating system domain may include one non-secure state operating system or may include multiple non-secure state operating systems. The embodiments of the present disclosure do not limit the number of non-secure state operating systems included in each operating system domain.

[0052] Exemplarily, the number of non-secure operating systems included in different operating system domains in multiple operating system domains may be the same or different, and the embodiments of the present disclosure do not limit this. The following embodiments are exemplified by taking the case where the number of non-secure operating systems included in multiple operating system domains is the same.

[0053] Since an integrated circuit may include multiple processor cores, before running an operating system on the integrated circuit, it is necessary to first determine the processor core corresponding to each operating system domain on the integrated circuit. The processor core corresponding to each operating system domain is used to run the secure state operating system or the non-secure state operating system in the operating system domain.

[0054] Exemplarily, each operating system domain may correspond to one or more processor cores; the number of processor cores corresponding to different operating system domains may be the same or different, and the embodiments of the present disclosure do not limit the number of processor cores corresponding to each operating system domain.

[0055] In some embodiments, different operating system domains may correspond to different processor cores. That is, operating systems in different operating system domains may run on different processor cores, so that when an abnormality occurs in a processor core running one operating system domain, the normal operation of other operating system domains will not be affected. By running operating systems in different operating system domains on different processor cores, the hardware resources running different operating system domains can be isolated, thereby improving system security.

[0056] In some examples, an integrated circuit may include multiple interrupt controllers corresponding to multiple operating system domains. Based on the connection relationship between each interrupt controller and each processor core on the integrated circuit, the processor core running the operating system in the operating system domain corresponding to each interrupt controller can be determined; the processor core corresponding to each operating system domain can also be determined based on a software configuration program. The embodiments of the present disclosure do not limit the specific method of determining the processor core corresponding to each operating system domain.

[0057] Step 402: Run the first preset state operating system or the second preset state operating system in the operating system domain through the processor core corresponding to the operating system domain.

[0058] Exemplarily, after the processor core corresponding to each operating system domain is determined, the secure state operating system or the non-secure state operating system in the operating system domain may be run on the processor core corresponding to the operating system domain.

[0059] In some examples, the processor core corresponding to the operating system domain can run the secure state operating system and the non-secure state operating system in the operating system domain in a time-sharing manner. For example, when there is no need to access secure resources, the non-secure state operating system is run on the processor core corresponding to the operating system domain; when there is a need to access secure resources, the non-secure state operating system can be switched to the secure state operating system to access the secure resources.

[0060] Step 403: Processing a security resource access request of a second preset-state operating system in the operating system domain based on the first preset-state operating system in the operating system domain.

[0061] Exemplarily, when a non-secure state operating system needs to access a secure resource, the secure resource access request of the non-secure state operating system in the operating system domain may be processed based on the secure state operating system in the operating system domain.

[0062] In some embodiments, when multiple operating system domains are running on an integrated circuit, the first preset operating system in one operating system domain can only process the security resource access request of the second preset operating system in the operating system domain, and cannot process the security resource access request of the second preset operating system in other operating system domains, so as to ensure that the resources between the multiple operating system domains are isolated from each other. In this way, when the first preset operating system in any operating system domain fails, it will only affect the access behavior of the security resources in the operating system domain, and will not affect the access behavior of the security resources in other operating system domains, so that the security of multiple operating systems can be greatly enhanced.

[0063] For example, Figure 2B As shown, taking the operating system domain 20A corresponding to the processor cores cpu11 to cpu 1N, and the operating system domain 20B corresponding to the processor cores cpu 1(N+1) to cpu 1(N+M) as an example, the Secure world OS21A in the operating system domain 20A can only process the security resource access request of OS22A in the operating system domain 20A, but cannot process the security resource access request of OS22B in the operating system domain 20B. In this way, it can be ensured that the resources of the operating system domain 20A and the operating system domain 20B are relatively isolated. Once the Secure world OS21A in the operating system domain 20A fails, it will only affect the security resource access of OS22A in the operating system domain 20A, and will not affect the security resource access of OS22B in the operating system domain 20B. The security resource access request of OS22B in the operating system domain 20B can still be processed by the Secure world OS21B in the operating system domain 20B.

[0064] The secure resource access method provided by the embodiment of the present disclosure can ensure that the hardware resources corresponding to different operating system domains are isolated from each other by determining the processor core corresponding to each operating system domain on an integrated circuit; and can ensure that the resources between different operating system domains are relatively isolated by processing the secure resource access request of the second preset state operating system in the operating system domain by the first preset state operating system in each operating system domain. Therefore, when the first preset state operating system in any operating system domain fails, it will not affect the access behavior of secure resources in other operating system domains, which can greatly enhance the security of multiple operating systems.

[0065] In some embodiments, Figure 5 As shown in the above Figure 4Based on the illustrated embodiment, the above step 401 may include steps 4011 and 4012.

[0066] Step 4011: Determine a connection relationship between each of a plurality of interrupt controllers of the integrated circuit and a plurality of processor cores of the integrated circuit.

[0067] Exemplarily, the integrated circuit may include multiple interrupt controllers, and the embodiments of the present disclosure do not limit the number of interrupt controllers included in the integrated circuit. In some examples, the number of interrupt controllers included in the integrated circuit is the same as the number of operating system domains that can be run on the integrated circuit.

[0068] Each interrupt controller on the integrated circuit can be connected to at least one processor core, and different interrupt controllers are connected to different processor cores, that is, one processor core can be connected to one interrupt controller.

[0069] For example, Figure 2B As shown, taking the integrated circuit including two interrupt controllers, namely GIC 40A and GIC 40B, GIC 40A is the interrupt controller corresponding to the operating system domain 20A, and GIC 40B is the interrupt controller corresponding to the operating system domain 20B as an example, it can be determined that the connection relationship of GIC 40A is that GIC 40A is connected with cpu11 to cpu 1 (N+M), and the connection relationship of GIC 40B is that GIC 40B is connected with cpu1 (N+1) to cpu 1 (N+M).

[0070] In some examples, the integrated circuit may further include at least one selector, each selector being disposed between a processor core and each interrupt controller, through which the interrupt controller corresponding to each operating system domain may be connected to which processor cores on the integrated circuit may be selected.

[0071] In some embodiments, the connection relationship between each interrupt controller and the processor core can be configured by software or hardware. For example, the connection relationship between the interrupt controller and the processor core can be configured during the startup of the security monitoring program. After the connection relationship between the interrupt controller and the processor core is configured, the processor core corresponding to each operating system domain can be determined according to the connection relationship.

[0072] Step 4012: Based on the connection relationship, determine the processor core corresponding to each operating system domain.

[0073] Wherein, the processor core corresponding to the operating system domain is connected to the corresponding interrupt controller.

[0074] Exemplarily, since one interrupt controller corresponds to one operating system domain, after determining a group of processor cores connected to the interrupt controller according to the connection relationship between the interrupt controller and the processor core, the group of processor cores connected to the interrupt controller can be determined as processor cores corresponding to one operating system domain. That is, the group of processor cores connected to the interrupt controller corresponding to the operating system domain is used to run the secure state operating system or the non-secure state operating system in the operating system domain.

[0075] For example, Figure 2B As shown, taking the case where two interrupt controllers are included on the integrated circuit, namely GIC 40A and GIC 40B, GIC 40A can be connected to cpu11 to cpu 1N through a selector, and GIC 40B can be connected to cpu 1(N+1) to cpu 1(N+M) through a selector. Since GIC 40A and GIC 40B correspond to operating system domain 20A and operating system domain 20B, respectively, after determining that a group of processor cores connected to GIC 40A are cpu11 to cpu 1N, the processor cores cpu11 to cpu1N can be determined as the processor cores corresponding to operating system domain 20A, so that Secure World OS21A or OS22A in operating system domain 20A can be run on cpu11 to cpu 1N. After determining that a group of processor cores connected to GIC 40B are cpu 1(N+1) to cpu 1(N+M), cpu 1(N+1) to cpu 1(N+M) can be determined as the processor cores corresponding to the operating system domain 20B, so that Secure world OS21B or OS22B in the operating system domain 20B can be run on cpu 1(N+1) to cpu 1(N+M).

[0076] The secure resource access method provided by the embodiment of the present disclosure determines the processor core corresponding to each operating system domain according to the connection relationship between the interrupt controller and the processor core, so that the first preset state operating system and the second preset state operating system in each operating system domain can be run on the processor core corresponding to each operating system domain. Moreover, since different interrupt controllers are connected to different processor cores, operating systems in different operating system domains can be run on different processor cores, thereby ensuring that the hardware resources corresponding to different operating system domains are isolated from each other, further improving system security.

[0077] In some embodiments, Figure 6 As shown in the above Figure 4 Based on the illustrated embodiment, the above step 403 may include step 4031 and step 4032.

[0078] Step 4031: Based on the security monitoring program corresponding to the operating system domain, switch the second preset state operating system running on the processor core corresponding to the operating system domain to the first preset state operating system.

[0079] For example, when a non-secure operating system needs to access secure resources, it can issue a secure resource access request to the corresponding secure monitoring program (Secure Monitor). After receiving the secure resource access request, the Secure Monitor can perform verification to confirm the legitimacy of the request. After the verification is passed, the Secure Monitor can switch the non-secure world to the secure world, and in the secure world, the secure operating system can process the secure resource access request.

[0080] In some embodiments, the multiple operating system domains running on the integrated circuit may correspond to the same security monitoring program or may correspond to different security monitoring programs. When the multiple operating system domains correspond to different security monitoring programs, each of the multiple operating system domains may correspond to a security monitoring program.

[0081] When multiple operating system domains correspond to the same security monitoring program, the security monitoring program can switch the second preset state operating system running on the processor core corresponding to each operating system domain to the first preset state operating system.

[0082] For example, Figure 2B As shown, the operating system domain 20A and the operating system domain 20B correspond to the same Secure monitor 30. Through the Secure monitor 30, the OS22A in the operating system domain 20A running on cpu11 to cpu 1N can be switched to the Secure world OS21A; through the Secure monitor 30, the OS22B in the operating system domain 20B running on cpu 1(N+1) to cpu 1(N+M) can also be switched to the Secure world OS21B.

[0083] When each of the multiple operating system domains corresponds to a security monitoring program, the security monitoring program corresponding to each operating system domain may switch the second preset state operating system running on the processor core corresponding to the operating system domain to the first preset state operating system.

[0084] For example, Figure 3As shown, operating system domain 20A corresponds to Secure monitor 30A, and operating system domain 20B corresponds to Secure monitor 30B. Through Secure monitor 30A, OS22A in operating system domain 20A running on cpu11 to cpu 1N can be switched to Secure world OS21A; through Secure monitor 30B, OS22B in operating system domain 20B running on cpu 1(N+1) to cpu 1(N+M) can be switched to Secure world OS21B.

[0085] It can be understood that compared with multiple operating system domains corresponding to the same security monitoring program, when multiple operating system domains correspond to different security monitoring programs, if the security monitoring program corresponding to one operating system domain crashes, it will not affect the security resource access of other operating system domains, thereby further enhancing system security.

[0086] Step 4032: Process the security resource access request of the second preset state operating system based on the first preset state operating system.

[0087] For example, after the Secure Monitor switches the non-secure world to the secure world, in the secure world, the first preset state operating system (such as the secure state operating system) can process the secure resource access request (such as performing encryption and decryption, security authentication, etc.), and feed back the access result to the second preset state operating system (such as the non-secure state operating system) through the Secure Monitor. When the access result is passed to the second preset state operating system, the secure world can be switched back to the non-secure world through the Secure Monitor, and the second preset state operating system performs other operations not involving security in the non-secure world.

[0088] The security resource access method provided by the embodiment of the present disclosure can switch the second preset state operating system running on the processor core corresponding to the operating system domain to the first preset state operating system through the security monitoring program corresponding to the operating system domain, so as to process the security resource access request. Since different operating system domains can correspond to different security monitoring programs, when the security monitoring program corresponding to one operating system domain crashes, it will not affect the security resource access of other operating system domains, thereby further improving the system security.

[0089] In some embodiments, Figure 7 As shown in the above Figure 4 Based on the illustrated embodiment, the above integrated circuit security resource access method may further include steps 701 and 702.

[0090] Step 701: Start a first security monitoring program corresponding to a first operating system domain among multiple operating system domains, and in the process of starting the first security monitoring program, initialize a hardware configuration module of the integrated circuit.

[0091] Exemplarily, the multiple operating system domains may include a first operating system domain and a second operating system domain. For example, the first operating system domain and the second operating system domain correspond to different security monitoring programs, respectively. The first operating system domain may correspond to a first security monitoring program, and the second operating system domain may correspond to a second security monitoring program. The first operating system domain may be any operating system domain among the multiple operating system domains.

[0092] In some examples, the multiple operating system domains running on the integrated circuit may include a master operating system domain and at least one slave operating system domain, the first operating system domain may be the master operating system domain, and the second operating system domain may be the slave operating system domain.

[0093] When the integrated circuit is started, the first security monitoring program and the second security monitoring program can be loaded into different locations of the memory respectively, and during the startup process of a Secure Monitor (such as the first security monitoring program), the hardware configuration module of the integrated circuit is initialized through the Secure Monitor, and then another Secure Monitor (such as the second security monitoring program) is started. It can be understood that when starting multiple Secure Monitors, it is only necessary to initialize the common hardware (such as the hardware configuration module) during the startup process of the first Secure Monitor, and the Secure Monitor started later does not need to initialize the common hardware.

[0094] Exemplarily, the hardware configuration module may include modules such as a hardware firewall, an interrupt controller, etc.

[0095] Step 702: Start a second security monitoring program corresponding to a second operating system domain among the multiple operating system domains.

[0096] Exemplarily, when starting the Secure Monitor corresponding to the second operating system domain among multiple operating system domains, there is no need to initialize the hardware configuration module of the integrated circuit again, thereby avoiding the repeated initialization of hardware resources by the Secure Monitor started later, thereby improving the startup efficiency.

[0097] In some embodiments, Figure 8 As shown in the above Figure 7 Based on the illustrated embodiment, step 701 may include steps 7011 and 7012.

[0098] Step 7011: start a first security monitoring program corresponding to a first operating system domain among multiple operating system domains, and during the startup of the first security monitoring program, configure different memory spaces for each operating system domain through the firewall in the hardware configuration module.

[0099] Exemplarily, during the startup of the first security monitoring program, the memory space accessible to each operating system domain in the multiple operating system domains can be configured. In some examples, the memory space accessible to different operating system domains can be different, for example, the memory space accessible to different operating system domains can overlap partially or not at all. When the memory space accessible to different operating system domains does not overlap at all, memory isolation between different operating system domains can be achieved, thereby further improving system security.

[0100] In some embodiments, after configuring the memory space accessible to each operating system domain through the hardware firewall, the configuration information of the firewall can be locked to ensure that the memory space accessible to each operating system domain that has been configured cannot be modified.

[0101] Step 7012: During the startup of the first security monitoring program, the connection relationship between each interrupt controller and the processor core is configured through the interrupt selector in the hardware configuration module.

[0102] Exemplarily, during the startup of the first security monitoring program, the connection relationship between each interrupt controller and the processor core can be configured. For example, the connection relationship between each interrupt controller and the processor core can be configured through an interrupt selector in an integrated circuit.

[0103] In some examples, when an interrupt selector is used to configure the connection relationship between each interrupt controller and the processor core, one processor core can be connected to only one interrupt controller, thereby ensuring that the operating system domain corresponding to each interrupt controller can run on a different processor core, thereby achieving hardware resource isolation between multiple operating system domains.

[0104] The security resource access method provided by the embodiment of the present disclosure can achieve memory isolation between different operating system domains by configuring different memory spaces for each operating system domain during the startup of the first security monitoring program; and can achieve hardware resource isolation between multiple operating system domains by configuring the connection relationship between each interrupt controller and the processor core, thereby further improving system security.

[0105] In some embodiments, Fig. 9 As shown in the above Figure 4 Based on the illustrated embodiment, the above integrated circuit security resource access method may further include steps 901 to 903.

[0106] Step 901: Write data to be transmitted into a shared memory space between the first operating system domain and the second operating system domain via a second preset operating system in the first operating system domain.

[0107] For example, taking the memory space accessible to the first operating system domain of the firewall configuration as the first memory space, the memory space accessible to the second operating system domain as the second memory space, and the second memory space being a partial memory space of the first memory space, the intersection memory space of the first memory space and the second memory space can be called a shared memory space, which is a memory space that can be accessed by both the first operating system domain and the second operating system domain.

[0108] When implementing inter-core communication between different operating system domains, the data to be transmitted can be written into the shared memory space by the second preset operating system in the first operating system domain. Exemplarily, the first operating system domain can be the main operating system domain, and the second preset operating system in the first operating system domain can be the main OS.

[0109] Step 902: Transmit notification information to the second preset state operating system in the second operating system domain through the second preset state operating system in the first operating system domain.

[0110] The notification information is used to indicate that data readable by the second preset-state operating system in the second operating system domain is stored in the shared memory space.

[0111] Exemplarily, the first operating system domain and the second operating system domain can communicate through a hardware mailbox. After the second preset-state operating system in the first operating system domain writes the data to be transmitted in the shared memory space, a notification message can be generated and transmitted to the second preset-state operating system in the second operating system domain through the mailbox to inform the second preset-state operating system in the second operating system domain that there is readable data stored in the shared memory space.

[0112] For example, Figure 3 As shown, OS22A in operating system domain 20A can write data to be transmitted in a shared memory space accessible to both operating system domain 20A and operating system domain 20B, and generate a notification message; then, OS22A sends the notification message to OS22B in operating system domain 20B via a mailbox to inform OS22B that there is readable data stored in the shared memory space. That is, communication between the second preset operating system in the first operating system domain and the second preset operating system in the second operating system domain can be achieved based on the mailbox.

[0113] In some examples, the second preset operating system in the first operating system domain can access actual physical devices, while the second preset operating system in the second operating system domain cannot access actual physical devices but can only access simulated devices.

[0114] Step 903: In response to the notification information, the second preset state operating system in the second operating system domain reads the data to be transmitted in the shared memory space.

[0115] Exemplarily, after receiving the notification information, the second preset-state operating system in the second operating system domain may read the data to be transmitted in the shared memory based on the notification information.

[0116] The secure resource access method provided by the embodiment of the present disclosure writes the data to be transmitted in the shared memory through the second preset operating system in the first operating system domain, and sends the notification information indicating that the shared memory space stores readable data to the second preset operating system in the second operating system domain through the mailbox, so that the second preset operating system in the second operating system domain can read the data in the shared memory. In this way, inter-core communication between different operating system domains can be realized, solving the problem that inter-core communication cannot be performed between multiple OSs in a scenario without a hypervisor.

[0117] In some embodiments, Fig.10 As shown in the above Figure 4 Based on the illustrated embodiment, the above integrated circuit security resource access method may further include steps 1001 and 1002.

[0118] Step 1001: Receive an interrupt request through an interrupt controller corresponding to each operating system domain.

[0119] For example, one operating system domain corresponds to one interrupt controller, so interrupt requests can be received through the interrupt controller corresponding to each operating system domain. Moreover, the operating system in each operating system domain can only process the interrupt requests received by the interrupt controller corresponding to each operating system domain, and cannot process the interrupt requests received by the interrupt controller corresponding to other operating system domains, thereby ensuring that the interrupt processing between different operating system domains does not interfere with each other, further improving system security.

[0120] Step 1002: Based on the interrupt request, the interrupt controller corresponding to each operating system domain controls the first preset state operating system or the second preset state operating system in the operating system domain to execute the interrupt processing program.

[0121] Exemplarily, after receiving an interrupt request, the interrupt controller can only process the interrupt through the secure state operating system or the non-secure state operating system in the operating system domain corresponding to the interrupt controller.

[0122] For example, Figure 3 As shown, after GIC 40A corresponding to operating system domain 20A receives interrupt request a, OS 22A or Secure world OS 21A in operating system domain 20A processes interrupt request a received by GIC 40A, and OS 22B or Secure world OS 21B in operating system domain 20B does not perceive interrupt request a. In other words, the secure state operating system or non-secure state operating system in each operating system domain can only process interrupt requests received by the interrupt controller corresponding to the operating system domain, and does not perceive interrupt requests received by interrupt controllers corresponding to other operating system domains.

[0123] In some examples, if the interrupt request received by the interrupt controller is an interrupt request from the secure world, the secure state operating system in the operating system domain corresponding to the interrupt controller processes the interrupt request. If the interrupt request received by the interrupt controller is an interrupt request from the non-secure world, the non-secure state operating system in the operating system domain corresponding to the interrupt controller processes the interrupt request.

[0124] The secure resource access method provided by the embodiment of the present disclosure processes the interrupt request received by the interrupt controller through the secure state operating system or the non-secure state operating system in the operating system domain corresponding to each interrupt controller, thereby ensuring that the interrupt processing between different operating system domains does not interfere with each other, thereby further improving the system security.

[0125] Exemplary Devices

[0126] Fig.11 A secure resource access device for an integrated circuit provided in an embodiment of the present disclosure, such as Fig.11 As shown, the secure resource access device 1100 includes a determination module 1101 , an operation module 1102 , and a processing module 1103 .

[0127] The determination module 1101 is used to determine a processor core corresponding to each operating system domain in a plurality of operating system domains on an integrated circuit.

[0128] The running module 1102 is used to run the first preset state operating system or the second preset state operating system in the operating system domain through the processor core corresponding to the operating system domain.

[0129] The processing module 1103 is configured to process a security resource access request of a second preset-state operating system in the operating system domain based on the first preset-state operating system in the operating system domain.

[0130] In some embodiments, Fig.12 As shown, the determination module 1101 includes a first sub-determination module 11011 and a second sub-determination module 11012 .

[0131] The first sub-determining module 11011 is used to determine the connection relationship between each of the multiple interrupt controllers of the integrated circuit and the multiple processor cores of the integrated circuit.

[0132] The second sub-determination module 11012 determines the processor core corresponding to each operating system domain based on the connection relationship; wherein the processor core corresponding to the operating system domain is connected to the corresponding interrupt controller.

[0133] In some embodiments, the processing module 1103 is used to switch the second preset state operating system running on the processor core corresponding to the operating system domain to the first preset state operating system based on the security monitoring program corresponding to the operating system domain; and process the security resource access request of the second preset state operating system based on the first preset state operating system.

[0134] In some examples, multiple operating system domains correspond to the same security monitoring program, or each operating system domain in the multiple operating system domains corresponds to a security monitoring program.

[0135] In some embodiments, Fig.13 As shown, the secure resource access device 1100 also includes an initialization module 1104 and a startup module 1105 .

[0136] The startup module 1105 is used to start the first security monitoring program corresponding to the first operating system domain among multiple operating system domains; the initialization module 1104 is used to initialize the hardware configuration module of the integrated circuit during the process of the startup module 1105 starting the first security monitoring program.

[0137] The startup module 1105 is further configured to start a second security monitoring program corresponding to a second operating system domain among the multiple operating system domains.

[0138] In some embodiments, the startup module 1105 is used to configure different memory spaces for each operating system domain through the firewall in the hardware configuration module during the startup of the first security monitoring program; during the startup of the first security monitoring program, the connection relationship between each interrupt controller and the processor core is configured through the interrupt selector in the hardware configuration module.

[0139] In some embodiments, Fig.14 As shown, the secure resource access device 1100 also includes a data writing module 1106 , a transmission module 1107 and a data reading module 1108 .

[0140] The data writing module 1106 is configured to write the data to be transmitted in the shared memory space of the first operating system domain and the second operating system domain through the second preset operating system in the first operating system domain.

[0141] The transmission module 1107 is used to transmit notification information to the second preset operating system in the second operating system domain through the second preset operating system in the first operating system domain; the notification information is used to indicate that data readable by the second preset operating system in the second operating system domain is stored in the shared memory space.

[0142] The data reading module 1108 is used to read the data to be transmitted in the shared memory space through the second preset state operating system in the second operating system domain in response to the notification information.

[0143] In some embodiments, Fig.14 As shown, the secure resource access device 1100 also includes an interrupt processing module 1109 .

[0144] The interrupt processing module 1109 is used to receive an interrupt request through the interrupt controller corresponding to each operating system domain; based on the interrupt request, the interrupt controller corresponding to each operating system domain controls the first preset state operating system or the second preset state operating system in the operating system domain to execute an interrupt processing program.

[0145] The beneficial technical effects corresponding to the exemplary embodiment of the secure resource access device 1100 can be found in the corresponding beneficial technical effects of the exemplary method section above, which will not be repeated here.

[0146] Exemplary Electronic Devices

[0147] Fig.15 A structural diagram of an electronic device 150 provided in an embodiment of the present disclosure includes at least one processor 151 and a memory 152 .

[0148] The processor 151 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 150 to perform desired functions.

[0149] The memory 152 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on a computer-readable storage medium, and the processor 151 may execute one or more computer program instructions to implement the method and / or other desired functions of the reinforcement learning model of each embodiment of the present disclosure above.

[0150] In one example, the electronic device 150 may further include: an input device 153 and an output device 154 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0151] The input device 153 may also include, for example, a keyboard, a mouse, etc.

[0152] The output device 154 can output various information to the outside, and may include, for example, a display, a speaker, a printer, a communication network and its connected remote output device, etc.

[0153] Of course, to simplify, Fig.15 Only some of the components related to the present disclosure in the electronic device 150 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 150 may also include any other appropriate components.

[0154] Exemplary computer program products and computer-readable storage media

[0155] In addition to the above-mentioned methods and devices, embodiments of the present disclosure may also provide a computer program product, including computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the secure resource access method for an integrated circuit of various embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section.

[0156] The computer program product may be written in any combination of one or more programming languages ​​to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0157] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps in the secure resource access method for an integrated circuit of various embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section.

[0158] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium is, for example, but not limited to, a system, device or device including electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0159] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and cannot be considered as necessary for each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, rather than limitation, and the above details do not limit the present disclosure to being implemented by adopting the above specific details.

[0160] Those skilled in the art may make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the present claims and their equivalents, the present disclosure is also intended to include these modifications and variations.

Claims

1. A method for accessing secure resources of an integrated circuit, comprising: Determining, on the integrated circuit, a processor core corresponding to each of a plurality of operating system domains; Running the first preset state operating system or the second preset state operating system in the operating system domain through the processor core corresponding to the operating system domain; A security resource access request of the second preset-state operating system in the operating system domain is processed based on the first preset-state operating system in the operating system domain.

2. The method according to claim 1, wherein: The step of determining, on the integrated circuit, a processor core corresponding to each of the plurality of operating system domains comprises: Determining a connection relationship between each of the plurality of interrupt controllers of the integrated circuit and the plurality of processor cores of the integrated circuit; Based on the connection relationship, the processor core corresponding to each of the operating system domains is determined; wherein the processor core corresponding to the operating system domain is connected to the corresponding interrupt controller.

3. The method according to claim 1, wherein: The processing of the security resource access request of the second preset-state operating system in the operating system domain based on the first preset-state operating system in the operating system domain includes: Based on the security monitoring program corresponding to the operating system domain, switching the second preset state operating system running on the processor core corresponding to the operating system domain to the first preset state operating system; A security resource access request of the second preset-state operating system is processed based on the first preset-state operating system.

4. The method according to claim 3, wherein: The multiple operating system domains correspond to the same security monitoring program, or each of the multiple operating system domains corresponds to a security monitoring program.

5. The method according to claim 3, further comprising: Starting a first security monitoring program corresponding to a first operating system domain among the multiple operating system domains, and in the process of starting the first security monitoring program, initializing a hardware configuration module of the integrated circuit; A second security monitoring program corresponding to a second operating system domain among the multiple operating system domains is started.

6. The method according to claim 5, wherein during the process of starting the first security monitoring program, initializing the hardware configuration module of the integrated circuit comprises: During the startup of the first security monitoring program, different memory spaces are configured for each operating system domain through the firewall in the hardware configuration module; During the startup of the first security monitoring program, the connection relationship between each interrupt controller and the processor core is configured through the interrupt selector in the hardware configuration module.

7. The method according to any one of claims 1 to 6, further comprising: Writing data to be transmitted into a shared memory space between the first operating system domain and the second operating system domain through a second preset operating system in the first operating system domain; transmitting notification information to the second preset state operating system in the second operating system domain through the second preset state operating system in the first operating system domain; The notification information is used to indicate that data readable by the second preset-state operating system in the second operating system domain is stored in the shared memory space; In response to the notification information, the data to be transmitted is read in the shared memory space by a second preset operating system in the second operating system domain.

8. The method according to any one of claims 1 to 6, further comprising: Receiving an interrupt request through an interrupt controller corresponding to each of the operating system domains; Based on the interrupt request, the interrupt controller corresponding to each of the operating system domains controls the first preset state operating system or the second preset state operating system in the operating system domain to execute an interrupt processing program.

9. A secure resource access device for an integrated circuit, comprising: A determination module, configured to determine, on the integrated circuit, a processor core corresponding to each of the plurality of operating system domains; An operating module, configured to operate the first preset state operating system or the second preset state operating system in the operating system domain through a processor core corresponding to the operating system domain; A processing module is used to process a security resource access request of the second preset-state operating system in the operating system domain based on the first preset-state operating system in the operating system domain.

10. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the integrated circuit security resource access method according to any one of claims 1 to 8.

11. An electronic device, comprising: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the integrated circuit security resource access method described in any one of claims 1-8.