WO2020252791A1 - 一种集成芯片及数据处理方法 - Google Patents

一种集成芯片及数据处理方法 Download PDF

Info

Publication number
WO2020252791A1
WO2020252791A1 PCT/CN2019/092414 CN2019092414W WO2020252791A1 WO 2020252791 A1 WO2020252791 A1 WO 2020252791A1 CN 2019092414 W CN2019092414 W CN 2019092414W WO 2020252791 A1 WO2020252791 A1 WO 2020252791A1
Authority
WO
WIPO (PCT)
Prior art keywords
processor
security
read
data
storage controller
Prior art date
Application number
PCT/CN2019/092414
Other languages
English (en)
French (fr)
Inventor
高长剑
刘宇
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201980097716.9A priority Critical patent/CN114041133A/zh
Priority to EP19933645.4A priority patent/EP3975018A4/en
Priority to PCT/CN2019/092414 priority patent/WO2020252791A1/zh
Publication of WO2020252791A1 publication Critical patent/WO2020252791A1/zh
Priority to US17/558,431 priority patent/US20220114111A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/74Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information operating in dual or compartmented mode, i.e. at least one secure mode
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • G06F12/1458Protection against unauthorised use of memory or access to memory by checking the subject access rights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • G06F12/1416Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights
    • G06F12/1425Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights the protection being physical, e.g. cell, word, block
    • G06F12/1441Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights the protection being physical, e.g. cell, word, block for a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • G06F3/0622Securing storage systems in relation to access
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device

Definitions

  • the processor in the integrated chip has a three-level security architecture, that is, on the basis of the non-secure/secure two-level security architecture of the original integrated chip, a security architecture with a higher level of security is added (ie, enhanced security). ).
  • the processor in the integrated chip may have three security attributes, among which the enhanced security attribute has the highest security level, the general security attribute is the second, and the non-security attribute has the lowest security level.
  • the security processor with enhanced security attributes has an independent hardware architecture and a storage area (enhanced security read-write area) that is not shared with other processors with security attributes. Therefore, the security processor can form a secure space that is difficult to be accessed by malicious code.
  • the user's key data is protected, and the user's key data is stored in the enhanced security read-write area, which can ensure the safety of the user's key data.
  • an embodiment of the present application provides an integrated chip, the integrated chip includes: a bus including a first signal line and a second signal line, the first signal line is used to transmit enhanced security indication information, and the second signal line is used to Transmit general security indication information; a security processor, configured to send a first read instruction to the storage controller via the bus in the enhanced security mode, and the enhanced security instruction information contained in the first read instruction is transmitted through the first signal line; The application processor is configured to send a second read instruction to the storage controller via the bus in the common security mode, and the common security indication information contained in the second read instruction is transmitted via the second signal line.
  • FIG. 1 is a schematic diagram of an interaction process between an application processor and a security processor provided in the prior art
  • FIG. 7 is a schematic structural diagram of a third integrated chip provided by an embodiment of the application.
  • FIG. 9 is a schematic diagram of an authentication process of a storage controller provided by an embodiment of this application.
  • the embodiments of the present application provide an integrated chip and a data processing method to enhance the security of the system and improve the service processing efficiency of the system.
  • the off-chip memory can be understood as a memory located outside the die where the application processor and the security processor are located. That is, the off-chip memory and the integrated chip shown in FIG. 2 belong to different dies. When the chip is packaged, the die where the off-chip memory is located and the die where the integrated chip is located can be packaged in different chips, or in the same die. Among the chips, FIG. 2 only takes the two packages in different chips as an example for illustration. In the integrated chip shown in Figure 2, the memory controller is responsible for data access and control of the off-chip memory.
  • DRAM can be used to store dynamic data during the operation of the integrated chip; since Flash can also store data after the system is powered off, it can be used to store image programs and data that can be saved after the program is powered off.
  • the off-chip memory may also be other memories, for example, it may be a synchronous dynamic random access memory (SDRAM), which is not specifically limited in the embodiment of the present application.
  • SDRAM synchronous dynamic random access memory
  • the data stored in the storage area of common security attributes can only be accessed by processors in the common security mode. Other processors in the integrated chip (such as security The processor) cannot access the storage area of the common security attribute.
  • the storage area of the common security attribute may be referred to as a common secure read/write area (secure W/R area).
  • the normal safe read/write/enhanced safe read area is called storage area A
  • the enhanced safe read/write/normal safe read area is called storage area B.
  • the application processor is transmitting to the safe processor
  • the data can be written to storage area A, and then the security processor can be notified to read the data from storage area A; when the security processor transmits data to the application processor, the data can be written to storage area B, Then notify the application processor to read the data from the storage area B. Therefore, the data interaction between the security processor and the application processor can be realized through the storage area A and the storage area B.
  • an access instruction (for example, a read instruction or a write instruction) issued by the application processor is transmitted through the bus, and the general safety indication information in the access instruction is transmitted through the safety signal line in FIG. 5.
  • the storage controller determines that the general security indication information transmitted on the security signal line is "1", and then determines that the processor sending the access instruction is in the general security mode; or, the storage controller After the access instruction, it is determined that the general security instruction information is "0", and then it is determined that the processor sending the access instruction is in the non-secure mode.
  • the access instruction issued by the security processor is transmitted through the bus, and the enhanced security indication information in the access instruction is transmitted through the enhanced security signal line in FIG. 5.
  • the storage controller determines that the enhanced security indication information transmitted on the enhanced security signal line is "1", and then determines that the processor sending the access instruction is in the enhanced security mode.
  • EPS the CPU and encryption and decryption engine modules are connected through the EPS internal bus.
  • the EPS internal bus can use the same signal line configuration as the integrated chip bus, that is, the EPS internal bus also contains enhanced security signals for transmitting enhanced security instructions. Line and safety signal line used to transmit general safety instructions.
  • the EPS internal bus is connected to the integrated chip bus to transfer data and configuration parameters.
  • the embodiment of the present application does not specifically limit the type of integrated chip, and the integrated chip may be SoC, electronic control unit (ECU), Internet of things (IoT) chips, etc. It can also be other chips in the terminal.
  • SoC SoC
  • ECU electronic control unit
  • IoT Internet of things
  • the processor in the embodiment of the present application has a three-level security architecture, and the security level of enhanced security attributes is the highest.
  • the application processor usually interacts with the security processor in the normal security mode, and the application processor is in the non-secure mode. It usually does not interact with the security processor to prevent the user's critical data from being stolen in the non-secure mode.
  • the security mode of the application processor 701 is not limited, that is, the application processor 701 can work in the non-secure mode and the normal security mode in a time-sharing mode when performing other operations.
  • the processor 702 only needs to be in the normal safe mode when performing data interaction.
  • the application processor 701 may notify the security processor 702 to read the first data in an interrupt manner.
  • the security processor 702 may send the first read instruction after receiving the notification from the application processor 701.
  • the security processor 702 after the security processor 702 processes the first data, it can also write the processed data into the off-chip memory in a manner similar to that used by the application processor 701 to transmit the first data, and then notify via interruption.
  • the application processor 701 triggers the application processor 701 to read the data obtained after the processing.
  • the application processor 701 may send a second read instruction to the storage controller 703 in the normal security mode to request to read the data obtained after the processing; then, the storage controller 703 may control the application processor 701 from the chip Read the data obtained after this processing from the external memory.
  • the security processor 702 can also write the second data in the off-chip memory through the memory controller 703 in the enhanced security mode, where the second data is off-chip.
  • the address in the memory is the third address.
  • the security processor 702 may specifically adopt the following method: in the enhanced security mode, send the third read instruction to the storage controller 703, the third read instruction Used to request to read the second data under the third address; then, the security processor 702 reads the second data from the off-chip memory through the memory controller 703; finally, it compares the first data with the second data, and The result of the comparison is the data obtained after processing.
  • the processing process of the security processor 702 above is only an example, and in actual applications, the security processor 702 may process the first data in multiple ways.
  • a possible interaction manner among the application processor 701, the security processor 702, and the storage controller 703 may be as shown in FIG. 8.
  • the security processor 702 sends the second data to the storage controller 703 in the enhanced security mode to request to write the second data in the off-chip memory.
  • the address of the second data in the off-chip memory is the third address.
  • the first read instruction is used to request to read the first data under the first address.
  • the storage controller 703 controls the security processor 702 to read the first data from the off-chip memory.
  • the storage controller 703 controls the security processor 702 to read the second data from the off-chip memory.
  • the security processor 702 compares the first data with the second data in the enhanced security mode, and uses the comparison result as the processed data.
  • the security processor 702 sends the processed data to the storage controller 703 in the enhanced security mode to request to write the processed data in the off-chip memory.
  • the second read instruction is used to request to read the data obtained after the processing.
  • the first data may be fingerprint data collected on the terminal device where the integrated chip 700 is located
  • the second data may be a fingerprint template pre-stored by the security processor 702 in the enhanced security read-write area.
  • the security processor 702 stores the fingerprint template in the off-chip memory through the storage controller 703; by executing S803-S804, the application processor 701 stores the collected fingerprint data in the off-chip memory through the storage controller 703;
  • the security processor 702 reads the fingerprint template and the collected fingerprint data from different storage areas of the off-chip memory, and compares the fingerprint template with the collected fingerprint data by executing S809, and compares the compared The result is the processed data; by executing S810 ⁇ S811, the security processor 702 writes the processed data in the off-chip memory; by executing S812 ⁇ S813, the application processor 701 can read the processed data The data.
  • the storage controller 703 can authenticate the read instruction or the write instruction sent by the processor, and if the authentication is passed, the storage controller 703 responds to the instruction, and if the authentication fails, the storage controller 703 can store The controller 703 will reject the processor's access request.
  • the storage controller 703 determines that the first read instruction is authenticated, it can use the following method: the storage controller 703 determines that the first address belongs to the first storage area of the off-chip memory, and the first storage area is configured as The processor in the normal security mode is allowed to perform read and write operations, and the processor in the enhanced security mode is allowed to perform read operations; the storage controller 703 determines that the security processor 702 is in the enhanced security mode and the first read instruction is a read instruction.
  • the first storage area may be regarded as a storage area for the application processor 701 and the security processor 702 to interact.
  • the application processor 701 in the normal security mode can read data and write data
  • the security processor 702 in the enhanced security mode can read data, so the application processor 701 can pass through the first storage area.
  • Data transmission is performed to the security processor 702.
  • the first storage area can be regarded as the aforementioned normal safe read/write/enhanced safe read area.
  • the storage controller 703 authenticates the read instruction sent by the processor, it first determines which storage area of the off-chip memory the address requested by the read instruction belongs to by querying the local register. Then, the storage controller 703 first determines the security attribute of the processor that sent the read instruction, and then determines whether the processor with the security attribute has the permission to perform the read operation in the storage area. In the above example, the storage controller 703 determines by querying the local register that the first address requested by the first read instruction belongs to allowing the processor in the normal security mode to perform read and write operations, and allows the processor in the enhanced security mode to perform read operations.
  • the storage controller 703 determines that the secure processor 702 sending the first read instruction is in the enhanced security mode, the first storage area allows the processor in the enhanced security mode to perform the read operation, and the first The read instruction happens to be a read instruction, so the first read instruction can pass the authentication of the storage controller 703.
  • the authentication of the storage controller 703 on the read instruction may also fail the authentication. For example, if the storage controller 703 receives a read instruction sent by the application processor 701, it requests to read the data stored in the enhanced security read-write area. The storage controller 703 determines that the address requested by the read instruction belongs to the enhanced security read-write area by querying the local register. At the same time, the storage controller 703 determines that the application processor 701 that sends the read instruction is in the normal security mode, while the normal security mode The lower processor is not allowed to read the data stored in the enhanced security read-write area, so the storage controller 703 determines that the read instruction authentication fails.
  • the security processor 702 when the security processor 702 writes the processed data to the off-chip memory through the storage controller 703, it can be implemented in the following manner: the security processor 702 sends the first write to the storage controller 703 in the enhanced security mode
  • the first write instruction is used to request to write the processed data under the second address; the storage controller 703 is also used to: determine that the first write instruction is authenticated; write the processed data The second address.
  • the storage controller 703 will respond to the request of the first write instruction only when the authentication of the first write instruction is passed. If the authentication of the first write instruction is not passed, the storage controller 703 will reject the request of the first write instruction and return a bus error indication to the security processor 702.
  • the manner in which the storage controller 703 authenticates the first write instruction described above is only a specific example. In actual applications, when the storage controller 703 receives any write instruction for writing data in the off-chip memory, it needs to authenticate the write instruction. Exemplarily, in the interactive process shown in FIG. 8, when the storage controller 703 executes S802 to control the security processor 702 to write the second data in the off-chip memory, it also needs to write the second data sent by the security processor 702.
  • the above descriptions are based on the case where the write command authentication is passed as an example.
  • the authentication of the storage controller 703 on the write instruction may also fail the authentication. For example, if the storage controller 703 receives a write instruction sent by the application processor 701, it requests to write data in the second storage area.
  • the storage controller 703 determines by querying the local register that the address requested by the write instruction belongs to the second storage area, which allows the processor in the enhanced security mode to perform read and write operations, and the processor in the normal security mode to perform read operations; The storage controller 703 determines that the application processor 701 that sends the write instruction is in the normal security mode, and the processor in the normal security mode is not allowed to write data in the second storage area, so the storage controller 703 determines the The write command authentication failed.
  • the firewall in the storage controller 703 can be used to perform the above-mentioned authentication operation on the access instruction.
  • the firewall performs authentication it needs to determine which storage area the address requested by the access instruction belongs to.
  • the off-chip memory is configured with multiple storage areas. Therefore, when the firewall in the storage controller 703 receives the access instruction sent by the processor, it needs to confirm whether the address requested by the access instruction belongs to a certain storage area. Assuming that the off-chip memory adopts the storage area configuration method shown in FIG. 4, the specific process of the firewall in the storage controller 703 when authenticating the received access instruction may be as shown in FIG. 9.
  • the access address corresponding to the access instruction does not belong to the enhanced security read/write area, then determine whether the access address belongs to the enhanced security read/write/normal security read area, if it belongs to the enhanced secure read/write/common security read area, then determine whether the access address is Whether the enhanced security indication information is "1", or whether the general security indication information is "1" and the access instruction requests a read operation.
  • the general safety indication information is "1", which means that the processor is in the general safety mode.
  • the access command passes the authentication of the firewall, and the storage controller 703 sends the access command to the off-chip memory to complete data reading and writing; if the above two conditions are not met, If the access command fails the firewall authentication, the storage controller 703 returns a bus error indication.
  • the access address corresponding to the access instruction does not belong to the enhanced security read/write/common security read area, it is determined whether the access address belongs to the general security read/write/enhanced security read area. If it belongs to the general security read/write/enhanced security read zone, it is determined whether the general security indication information in the access command is "1", or whether the enhanced security indication information is "1" and the access command requests a read operation. If any one of the above two conditions is met, the access instruction passes the firewall authentication; if the above two conditions are not met, the access instruction does not pass the firewall authentication.
  • the access address corresponding to the access instruction does not belong to the ordinary safe read/write/enhanced safe read area, it is determined whether the access address belongs to the ordinary safe read/write area. If it belongs to the general security read-write area, it is determined whether the general security instruction information in the access instruction is "1". If it is "1", it means that the processor sending the access instruction is in the normal security mode, and the access instruction passes through the firewall. Authentication: If the general security indication information is "0", it means that the processor that sent the access command is not in the general security mode, and the access command has not passed firewall authentication.
  • the security processor 702 is further configured to configure the first storage area as a storage area that allows the processor in the normal security mode to perform read and write operations, and allows the processor in the enhanced security mode to perform read operations.
  • the security processor 702 may send first configuration information to the storage controller 703.
  • the first configuration information is used to instruct the first storage area to allow the processor in the normal security mode to perform read and write operations, and to allow the processor in the enhanced security mode.
  • the processor performs a read operation.
  • the storage controller 703 saves the first configuration information.
  • the security processor 702 may send the foregoing first configuration information and the second configuration information to the storage controller 703 in one configuration message, or may send the foregoing first configuration information and the second configuration information respectively.
  • the secure processor 702 and the application processor 701 can configure other storage areas in the off-chip memory, such as configuring enhanced secure read/write areas, common secure read/write areas, non-secure read/write/common secure read areas, etc.
  • the configuration process is similar to the configuration process of the first storage area and the second storage area described above, and will not be repeated here.
  • storage areas related to enhanced security attributes are all configured by the security processor 702.
  • the security processor 702 configures the enhanced secure read/write area, enhanced secure read/write/normal secure read area, and common secure read/write/enhanced secure read area.
  • the storage controller 703 may also be used to determine that the security processor 702 is in the enhanced security mode when the enhanced security indication information in the first read instruction is the first designated value.
  • the enhanced security indication information is transmitted through the signal line on the internal bus of the integrated chip.
  • the first designated value may be “1”.
  • only the security processor 702 can set the enhanced security indication information to the first specified value. Therefore, when the storage controller 703 has the enhanced security indication information in the first read instruction as the first specified value, It can be determined that the processor that sent the first read instruction is in the enhanced security mode.
  • the storage controller 703 may also determine the normal security mode and the non-secure mode of the processor according to the enhanced security indication information and the common security indication information.
  • the enhanced security indication information is "1" it means that the processor that sent the access instruction is in the enhanced security mode; if the enhanced security indication information is "0" and the general security indication information is “1”, it means that The processor of the access instruction is in the normal security mode; if the enhanced security indication information is "0" and the general security indication information is "0”, it means that the processor that sends the access instruction is in the non-secure mode.
  • the processing procedure of the enhanced security application in the embodiment of the present application will be introduced.
  • the operation flow of the SoC may be as shown in FIG. 10.
  • the CPU in the EPS configures the enhanced safety-related area of the DMC.
  • the enhanced security related area includes an enhanced security read/write area, an enhanced security read/write/normal security read area, and an ordinary security read/write/enhanced security read area.
  • storage areas related to the read and write permissions of processors with enhanced security attributes can all be regarded as enhanced security related areas; the enhanced security related areas are configured by the CPU in the EPS.
  • the encryption and decryption engine module in EPS decrypts and verifies the enhanced security applications and data stored in Flash, and stores them in the enhanced security read-write area in DRAM.
  • the decrypted and verified data is stored in the enhanced security read-write area. These data can only be accessed by processors with enhanced security attributes, such as the CPU or encryption and decryption engine modules in the EPS.
  • the EPS can read the data written by the AP in the normal security read/write/enhanced security read area.
  • the EPS After the CPU in the EPS receives the interrupt, the EPS reads and calculates the data output from the AP to the DRAM, and all intermediate data is written in the enhanced security read-write area of the DRAM.
  • the intermediate data refers to the intermediate data generated during the operation of the EPS. These intermediate data are stored in the enhanced security read-write area and can only be accessed by processors with enhanced security attributes (such as the CPU or encryption engine module in the EPS). .
  • the AP can read the final result written by the EPS in the enhanced security read/write/common security read area.
  • the AP After the AP receives the interrupt, it reads the final result of the EPS operation from the enhanced security read/write/common security read area of the DRAM.
  • processing process shown in FIG. 10 is only a specific example of the interaction process between the application processor and the security processor in the embodiment of the present application, and the implementation manner not described in detail in the processing process shown in FIG. 10 may be See the related description in the integrated chip 700 shown in FIG. 7.
  • the interaction scheme can improve the efficiency of information interaction, especially when processing big data stream services, data interaction through off-chip memory can greatly reduce the business processing time, thereby improving the business processing efficiency.
  • the security processor 702 with enhanced security attributes has an independent hardware architecture and a storage area (enhanced security read-write area) that is not shared with processors with other security attributes, so the secure processor 702 can form code that is difficult to be malicious Access to the safe space, thereby protecting the user's key data at the hardware level, and storing the user's key data in the enhanced security read-write area, which can ensure the safety of the user's key data.
  • the integrated chip 1100 includes a bus 1101 including a first signal line and a second signal line.
  • the first signal line is used to transmit enhanced safety indication information
  • the second signal line is used to transmit general safety indication information
  • a security processor 1102 configured to send a first read instruction to the storage controller through the bus 1101 in the enhanced security mode, and the enhanced security indication information contained in the first read instruction is transmitted through the first signal line
  • the application processor 1103 is configured to In the common security mode, a second read instruction is sent to the storage controller through the bus, and the common security indication information contained in the second read instruction is transmitted through the second signal line.
  • the first signal line may be an enhanced secure signal line in the signal line configuration of the bus shown in FIG. 5, and the second signal line may be a secure (secure) signal line in the signal line configuration of the bus shown in FIG. ) Signal line.
  • the integrated chip 1100 may further include: a storage controller, configured to determine that the security processor 1102 is in the enhanced security mode when the enhanced security indication information contained in the first read instruction is the first specified value .
  • the first designated value may be "1".
  • the security processor 1102 can set the enhanced security indication information to the first specified value. Therefore, when the enhanced security indication information in the first read instruction is the first specified value, the storage controller may It is determined that the processor that sent the first read instruction is in the enhanced security mode.
  • the second designated value may be “1"
  • the third designated value may be “0”.
  • the memory controller determines that the enhanced security indication information in the second read instruction is not the first specified value, then the memory controller can determine the sender of the second read instruction The application processor 1103 does not have enhanced security attributes.
  • the storage controller further judges the general security indication information in the second read instruction. If the general security indication information is the second specified value, it determines that the application processor 1103 is in the general security mode; if the general security indication information is the third Specify the value to determine that the application processor 1103 is in the non-secure mode.
  • the integrated chip 1100 and the integrated chip 700 are both integrated chips provided in the embodiment of the present application, and the implementation manners of the two can be referred to each other, and will not be repeated here.
  • the embodiment of the present application also provides a data processing method.
  • the data processing method includes the following steps.
  • the first read instruction is used to request to read the first data under the first address in the off-chip memory.
  • S1202 The storage controller determines that the authentication of the first read instruction is passed.
  • the storage controller reads the first data from the off-chip memory, and sends the first data to the security processor.
  • the storage controller determines that the first read instruction is authenticated, which can be specifically implemented in the following manner: the storage controller determines that the first address belongs to the first storage area of the off-chip memory by querying the local register, and the first storage area is It is configured to allow the processor in the normal security mode to perform read and write operations, and to allow the processor in the enhanced security mode to perform read operations; the storage controller determines that the security processor is in the enhanced security mode and the first read instruction is a read instruction.
  • the storage controller determines that the security processor is in the enhanced security mode, which can be specifically implemented in the following manner: the storage controller determines the security processing when the enhanced security indication information in the first read instruction is the first specified value The device is in enhanced security mode.
  • the data processing method shown in FIG. 12 further includes: the storage controller receives first configuration information sent by the security processor, the first configuration information is used to instruct the first storage area to allow the processor in the normal security mode to perform read and write operations , And allow the processor in the enhanced security mode to perform read operations; the storage controller saves the first configuration information in the local register.
  • the data processing method shown in FIG. 12 further includes: after the storage controller sends the first data to the security processor, receiving a first write instruction sent by the security processor, where the first write instruction is used to request Write the processed data under the second address, and the processed data is obtained after the security processor processes the first data; the storage controller determines that the first write instruction is authenticated; the storage controller will process the The obtained data is written to the second address.
  • the storage controller determines that the authentication of the first write instruction is passed, which can be implemented in the following manner: the storage controller determines that the second address belongs to the second storage area of the off-chip memory by querying the local register, and the second storage area is configured To allow the processor in the enhanced security mode to perform read and write operations, and to allow the processor in the normal security mode to perform read operations; the storage controller determines that the security processor is in the enhanced security mode.
  • the data processing method shown in FIG. 12 further includes: after the storage controller writes the processed data to the second address, it may also receive a second read instruction sent by the application processor, and the second read The instruction is used to request to read the processed data; the storage controller determines that the second read instruction is authenticated; then, the storage controller reads the processed data, and sends the processed data to the application processor .
  • the storage controller determines that the second read instruction is authenticated.
  • the specific method may be: the storage controller determines that the second address belongs to the second storage area; the storage controller determines that the application processor is in the normal security mode and the second read The fetch instruction is a read instruction.
  • the storage controller determines that the application processor is in the normal security mode.
  • the specific method may be: when the normal security indication information in the second read instruction is the second specified value, the storage controller determines that the application processor is in the normal security mode. Under normal safe mode.
  • the data processing method shown in FIG. 12 is a specific example of the authentication process of the storage controller 703 in the integrated chip 700 shown in FIG. 7, and the implementation of the data processing method shown in FIG. 12 is not described in detail.
  • the manner and its technical effects please refer to the related description in the integrated chip 700 shown in FIG. 7.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Storage Device Security (AREA)

Abstract

一种集成芯片及数据处理方法,用以增强系统的安全性、提高系统的业务处理效率。集成芯片包括:应用处理器,用于在普通安全模式下通过存储控制器在片外存储器中写入第一数据,其中,第一数据在片外存储器中的地址为第一地址;安全处理器,用于在增强安全模式下向存储控制器发送第一读取指令,第一读取指令用于请求读取第一地址下的第一数据;存储控制器,用于控制安全处理器从片外存储器中读取第一数据。

Description

一种集成芯片及数据处理方法 技术领域
本申请涉及芯片技术领域,尤其涉及一种集成芯片及数据处理方法。
背景技术
随着智能终端的发展以及互联网应用的普及,智能终端的功能越来越多。在许多应用场景下,对智能终端的安全性要求也越来越高,例如移动支付场景、手机屏幕解锁场景等。
为了提高系统的安全性,现有片上系统(system on chip,SoC)通常采用TrustZone架构。在该架构中,应用处理器(application processor,AP)分时工作在非安全(non-secure)模式和安全(secure)模式下。AP工作在non-secure模式下时处理一般的应用程序;AP工作在secure模式下时处理需要安全处理的程序。但是,目前存在很多攻击模型和实例使得AP从non-secure模式到secure模式的越权发生,因而TrustZone架构的安全性难以保证。
一种增强系统安全性的处理方式是:在TrustZone架构基础上,增加独立的安全处理器。即,SoC中集成有AP和一个独立的安全处理器,安全处理器内部可以包括处理器和其他安全部件。安全处理器在SoC中是一个独立的安全域,安全处理器和AP之间不能直接访问,而是通过中断的方式进行信息交互。如图1所示,AP向安全处理器传输数据时,先将数据传输至收件箱(Inbox),当Inbox接收到数据时,触发安全处理器发生中断,安全处理器从Inbox读取数据。安全处理器向AP传输数据时,先将数据传输至发件箱(Outbox),当Outbox接收到数据时,向中断控制器发送中断消息,中断控制器在接收到中断消息时触发AP中断,AP从Outbox中读取数据。
采用图1所示的信息交互方案时,邮箱包括Inbox和Outbox,Inbox和Outbox一般是SoC的片内缓冲区(buffer),该缓冲区与SoC制作在同一裸片(die)中。由于缓冲区的存储空间有限,使得AP和安全处理器间信息交互的效率较低,尤其是在处理大数据流业务时,采用上述方案会使得业务处理时间大大增加,影响业务处理效率。
发明内容
本申请实施例提供了一种集成芯片及数据处理方法,用以增强系统的安全性、提高系统的业务处理效率。
第一方面,本申请实施例提供一种集成芯片,该集成芯片包括:应用处理器,用于在普通安全模式下通过存储控制器在片外存储器中写入第一数据,其中,第一数据在片外存储器中的地址为第一地址;安全处理器,用于在增强安全模式下向存储控制器发送第一读取指令,第一读取指令用于请求读取第一地址下的第一数据;存储控制器,用于控制安全处理器从片外存储器中读取第一数据。
采用第一方面提供的集成芯片,应用处理器用于在普通安全模式下通过存储控制器在片外存储器中写入第一数据后,安全处理器可以在增强安全模式下通过存储控制器读取该第一数据。采用上述方案,可以实现应用处理器向安全处理器传输第一数据。在第一方面提供的集成芯片中,应用处理器与安全处理器可以在存储控制器的控制下通过片外存储器实现数据交互。与现有技术中应用处理器与安全处理器通过邮箱(Inbox和Outbox)的方 式进行交互的方案相比,由于片外存储器的存储空间和传输带宽均较大,因而采用第一方面提供的交互方案可以提高信息交互的效率,尤其是在处理大数据流业务时,通过片外存储器进行数据交互可以使得业务处理时间大大减小,从而提高业务处理效率。
在一种可能的设计中,安全处理器还用于:在增强安全模式下对读取的第一数据进行处理,并将处理后得到的数据通过存储控制器写入片外存储器;应用处理器还用于:在普通安全模式下通过存储控制器从片外存储器中读取处理后得到的数据。
采用上述方案,安全处理器对第一数据进行处理后,也可以通过片外存储器向应用处理器传输处理后得到的数据。
进一步地,应用处理器在通过存储控制器从片外存储器中读取处理后得到的数据时,可以通过如下方式:在普通安全模式下向存储控制器发送第二读取指令,第二读取指令用于请求读取处理后得到的数据;存储控制器,还用于:控制应用处理器从片外存储器中读取处理后得到的数据。
也就是说,应用处理器在读取上述处理后得到的数据时,可以在存储控制器的控制下读取。
此外,安全处理器还用于:在将处理后得到的数据通过存储控制器写入片外存储器之后,通过中断方式通知应用处理器读取处理后得到的数据。
采用上述方案,安全处理器可以通过中断方式通知应用处理器读取处理后得到的数据。
在一种可能的设计中,应用处理器还用于:在通过存储控制器在片外存储器中写入第一数据之后,通过中断方式通知安全处理器读取第一数据。
在一种可能的设计中,存储控制器在控制安全处理器从片外存储器中读取第一数据时,可以通过如下方式实现:存储控制器确定第一读取指令鉴权通过;存储控制器读取第一数据,并将第一数据发送给安全处理器。
采用上述方案,存储控制器仅在第一读取指令鉴权通过的情况下才会响应第一读取请求,因而可以保证第一数据的安全。
具体地,存储控制器在确定第一读取指令鉴权通过时,具体用于:存储控制器确定第一地址属于片外存储器的第一存储区域,第一存储区域被配置为允许普通安全模式下的处理器进行读写操作,以及允许增强安全模式下的处理器进行读操作;存储控制器确定安全处理器处于增强安全模式下且第一读取指令为读指令。
采用上述方案,片外存储器中配置有不同安全属性的存储区域,以供处于不同安全模式下的处理器与片外存储器进行数据交互。第一存储区域可以视为用于应用处理器与安全处理器进行交互的存储区域。在第一存储区域中,处于普通安全模式的应用处理器可以读取数据和写入数据,处于增强安全模式的安全处理器可以读取数据,因而应用处理器可通过第一存储区域向安全处理器进行数据传输。
此外,安全处理器还用于:将第一存储区域配置成允许普通安全模式下的处理器进行读写操作,允许增强安全模式下的处理器进行读操作的存储区域。
具体地,安全处理器可以向存储控制器发送第一配置信息,第一配置信息用于指示第一存储区域允许普通安全模式下的处理器进行读写操作,以及允许增强安全模式下的处理器进行读操作。然后,存储控制器保存该第一配置信息。
采用上述方案,仅有安全处理器才可以对增强安全模式下的处理器的操作权限相关的存储区域进行配置,从而增强系统的安全性。
在一种可能的设计中,安全处理器在将处理后得到的数据通过存储控制器写入片外存储器时,具体用于:安全处理器在增强安全模式下向存储控制器发送第一写入指令,第一写入指令用于请求在第二地址下写入处理后得到的数据;存储控制器还用于:确定第一写入指令鉴权通过;将处理后得到的数据写入第二地址。
采用上述方案,存储控制器仅在第一写入指令鉴权通过的情况下才会响应第一写入指令,因而可以保证第二地址中的数据的安全性。
其中,存储控制器在确定第一写入指令鉴权通过时,具体用于:存储控制器确定第二地址属于片外存储器的第二存储区域,第二存储区域被配置为允许增强安全模式下的处理器进行读写操作,以及允许普通安全模式下的处理器进行读操作;存储控制器确定安全处理器处于增强安全模式下。
采用上述方案,片外存储器中配置有不同安全属性的存储区域,以供处于不同安全模式下的处理器与片外存储器进行数据交互。第二存储区域可以视为用于应用处理器与安全处理器进行交互的存储区域。在第二存储区域中,处于增强安全模式的安全处理器可以读取数据和写入数据,处于普通安全模式的应用处理器可以读取数据,因而安全处理器可通过第二存储区域向应用处理器进行数据传输。
在一种可能的设计中,安全处理器还用于:将第二存储区域配置成允许增强安全模式下的处理器进行读写操作,以及允许普通安全模式下的处理器进行读操作的存储区域。
具体地,安全处理器可以向存储控制器发送第二配置信息,第二配置信息用于指示第二存储区域允许增强安全模式下的处理器进行读写操作,以及允许普通安全模式下的处理器进行读操作。然后,存储控制器保存该第二配置信息。
采用上述方案,仅有安全处理器才可以对增强安全模式下的处理器的操作权限相关的存储区域进行配置,从而增强系统的安全性。
在一种可能的设计中,安全处理器还用于:在对读取的第一数据进行处理之前,在增强安全模式下通过存储控制器在片外存储器中写入第二数据,其中,第二数据在片外存储器中的地址为第三地址;安全处理器在增强安全模式下对读取的第一数据进行处理时,具体用于:在增强安全模式下向存储控制器发送第三读取指令,第三读取指令用于请求读取第三地址下的第二数据;通过存储控制器从片外存储器中读取第二数据;将第一数据与第二数据进行比较,将比较结果作为处理后得到的数据。
采用上述方案,安全处理器对第一数据进行处理时,可以将第一数据和之前存储在片外存储器中的第二数据进行比较,并将比较结果作为处理后得到的数据。其中,第二数据可以存储在片外存储器中的增强安全读写区域,该存储区域中的数据只有处于增强安全模式下的处理器可以访问,因而第二数据的安全性可以得到保证。
在一种可能的设计中,存储控制器还用于:在第一读取指令中的增强安全指示信息为第一指定数值的情况下,确定安全处理器处于增强安全模式下。
采用上述方案,由于只有安全处理器可以将增强安全指示信息设置为第一指定数值,因而存储控制器在第一读取指令中的增强安全指示信息为第一指定数值的情况下,可以确定发送第一读取指令的处理器处于增强安全模式下。
此外,前述增强安全指示信息通过集成芯片内部总线上的信号线传输。
也就是说,增强安全指示信息可以通过内部总线上的一条独立的信号线进行传输,因而可以从硬件层面将增强安全数据与普通安全数据隔离开,从而保证系统的安全性。
在一种可能的设计中,应用处理器还用于:分时工作在非安全模式和普通安全模式。
采用上述方案,集成芯片中的处理器具有三级安全架构,即在原有集成芯片的非安全/安全这一二级安全架构的基础上,增加一级安全级别更高的安全架构(即增强安全)。集成芯片中的处理器可以具有三种安全属性,其中,增强安全属性的安全级别最高,普通安全属性次之,非安全属性安全级别最低。具有增强安全属性的安全处理器具有独立的硬件架构以及不与其他安全属性的处理器共享的存储区域(增强安全读写区域),因而安全处理器可以形成难以被恶意代码访问的安全空间,从而在硬件层面对用户的关键数据进行保护,将用户的关键数据存储在增强安全读写区域,可以保证用户关键数据的安全。
第二方面,本申请实施例提供一种集成芯片,该集成芯片包括:包含第一信号线和第二信号线的总线,第一信号线用于传输增强安全指示信息,第二信号线用于传输普通安全指示信息;安全处理器,用于在增强安全模式下通过总线向存储控制器发送第一读取指令,第一读取指令中包含的增强安全指示信息通过第一信号线进行传输;应用处理器,用于在普通安全模式下通过总线向存储控制器发送第二读取指令,第二读取指令中包含的普通安全指示信息通过第二信号线进行传输。
采用上述方案,在集成芯片中,安全处理器、应用处理器和存储控制器通过总线连接。安全处理器和应用处理器通过总线发出的访问指令(包括第一读取指令和第二读取指令)中包含增强安全指示信息和普通安全指示信息,增强安全指示信息通过总线中的第一信号线传输,普通安全指示信息通过总线中的第二信号线传输。存储控制器可以根据接收到的增强安全指示信息和普通安全指示信息确定发送访问指令的处理器的安全属性。
在一种可能的设计中,第二方面提供的集成芯片中还可以包括存储控制器,用于在第一读取指令中包含的增强安全指示信息为第一指定数值的情况下,确定安全处理器处于增强安全模式下。
采用上述方案,提供了一种根据第一信号线中传输的增强安全指示信息确定处理的安全模式的具体实现方式。
在一种可能的设计中,存储控制器还用于:在第二读取指令中的普通安全指示信息为第二指定数值的情况下,确定应用处理器处于普通安全模式下;在第二读取指令中的普通安全指示信息为第三指定数值的情况下,确定应用处理器处于非安全模式下。
采用上述方案,提供了一种根据第二信号线中传输的普通安全指示信息确定处理的安全模式的具体实现方式。
第三方面,本申请实施例提供一种数据处理方法,该方法包括如下步骤:存储控制器接收安全处理器发送的第一读取指令,第一读取指令用于请求读取片外存储器中第一地址下的第一数据;存储控制器确定第一读取指令鉴权通过;存储控制器从片外存储器中读取第一数据,并将第一数据发送给安全处理器。
在一种可能的设计中,存储控制器确定第一读取指令鉴权通过,包括:存储控制器通过查询本地寄存器确定第一地址属于片外存储器的第一存储区域,第一存储区域被配置为允许普通安全模式下的处理器进行读写操作,以及允许增强安全模式下的处理器进行读操作;存储控制器确定安全处理器处于增强安全模式下且第一读取指令为读指令。
在一种可能的设计中,存储控制器确定安全处理器处于增强安全模式下,包括:存储控制器在第一读取指令中的增强安全指示信息为第一指定数值的情况下,确定安全处理器处于增强安全模式下。
在一种可能的设计中,该方法还包括:存储控制器接收安全处理器发送的第一配置信息,第一配置信息用于指示第一存储区域允许普通安全模式下的处理器进行读写操作,以及允许增强安全模式下的处理器进行读操作;存储控制器在本地寄存器中保存第一配置信息。
在一种可能的设计中,该方法还包括:存储控制器在将第一数据发送给安全处理器之后,接收安全处理器发送的第一写入指令,第一写入指令用于请求在第二地址下写入处理后得到的数据,处理后得到的数据由安全处理器对第一数据进行处理后得到;存储控制器确定第一写入指令鉴权通过;存储控制器将处理后得到的数据写入第二地址。
在一种可能的设计中,存储控制器确定第一写入指令鉴权通过,包括:存储控制器通过查询本地寄存器确定第二地址属于片外存储器的第二存储区域,第二存储区域被配置为允许增强安全模式下的处理器进行读写操作,以及允许普通安全模式下的处理器进行读操作;存储控制器确定安全处理器处于增强安全模式下。
在一种可能的设计中,该方法还包括:存储控制器接收安全处理器发送的第二配置信息,第二配置信息用于指示第二存储区域允许增强安全模式下的处理器进行读写操作,以及允许普通安全模式下的处理器进行读操作;存储控制器在本地寄存器中保存第二配置信息。
在一种可能的设计中,该方法还包括:存储控制器在将处理后得到的数据写入第二地址之后,接收应用处理器发送的第二读取指令,第二读取指令用于请求读取处理后得到的数据;存储控制器确定第二读取指令鉴权通过;存储控制器读取处理后得到的数据,并将处理后得到的数据发送给应用处理器。
在一种可能的设计中,该方法还包括:存储控制器确定第二读取指令鉴权通过,可以通过如下方式实现:存储控制器确定第二地址属于第二存储区域;存储控制器确定应用处理器处于普通安全模式下且第二读取指令为读指令。
其中,存储控制器确定应用处理器处于普通安全模式下,可以通过如下方式实现:存储控制器在第二读取指令中的普通安全指示信息为第二指定数值的情况下,确定应用处理器处于普通安全模式下。
另外,第二方面至第三方面中任一种可能设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。
附图说明
图1为现有技术提供的一种应用处理器与安全处理器交互的流程示意图;
图2为本申请实施例提供的第一种集成芯片的结构示意图;
图3为本申请实施例提供的第二种集成芯片的结构示意图;
图4为本申请实施例提供的一种片外存储器的存储区域划分示意图;
图5为本申请实施例提供的一种总线的信号线配置的示意图;
图6为本申请实施例提供的一种安全处理器的结构示意图;
图7为本申请实施例提供的第三种集成芯片的结构示意图;
图8为本申请实施例提供的一种集成芯片中各器件的交互流程示意图;
图9为本申请实施例提供的一种存储控制器的鉴权流程示意图;
图10为本申请实施例提供的一种SoC所执行操作的流程示意图;
图11为本申请实施例提供的第四种集成芯片的结构示意图;
图12为本申请实施例提供的一种数据处理方法的流程示意图。
具体实施方式
本申请实施例提供了一种集成芯片及数据处理方法,用以增强系统的安全性、提高系统的业务处理效率。
下面,首先对本申请实施例的应用场景加以介绍。
本申请实施例可以应用于集成芯片中,具体地,如图2所示,该集成芯片包括通过总线连接的应用处理器、安全处理器以及存储控制器。其中,应用处理器负责运行操作系统以及进行相关应用的处理;安全处理器用于对集成芯片中的安全数据进行处理;存储控制器与片外存储器连接,用于控制集成芯片中的处理器(例如安全处理器或应用处理器)与片外存储器进行数据交互。通过存储控制器控制应用处理器与片外存储器进行数据交互以及控制安全处理器与片外存储器进行数据交互,集成芯片中的应用处理器与安全处理器可以实现数据交互。
其中,片外存储器可以理解为位于应用处理器和安全处理器所在裸片(die)之外的存储器。即,片外存储器与图2所示的集成芯片分属于不同的die,在进行芯片封装时,片外存储器所在的die与集成芯片所在的die可以封装在不同的芯片中,也可以封装在同一芯片中,图2中仅以二者封装在不同的芯片中为例进行示意。在图2所示的集成芯片中,存储控制器负责片外存储器的数据访问及控制。示例性地,若片外存储器为动态随机存取存储器(dynamic random access memory,DRAM),则存储控制器可以为动态随机存取存储器控制器(DRAM controller,DMC),DMC负责DRAM的数据访问和控制;若片外存储器为闪存(Flash),则存储控制器可以为闪存控制器(flash controller,FC),FC负责Flash的数据访问和控制。
其中,DRAM可用于存储集成芯片运行期间的动态数据;由于Flash在系统下电后还可以保存数据,因而可以用于保存希望在程序下电后还可以继续保存的镜像程序和数据。当然,片外存储器也可以是其他存储器,例如可以是同步动态随机存取存储(synchronous dynamic random access memory,SDRAM),本申请实施例对此不做具体限定。
此外,本申请实施例对集成芯片中的存储控制器的数量以及与集成芯片连接的片外存储器的数量不做具体限定。示例性地,若集成芯片中包含上述DMC和FC,图2所示的集成芯片的结构可以如图3所示。在图3所示的集成芯片中,DMC与DRAM连接,FC与Flash连接,集成芯片中的应用处理器与安全处理器可以在DMC的控制下通过DRAM实现数据交互,或者,集成芯片中的应用处理器与安全处理器可以在FC的控制下通过Flash实现数据交互。
与TrustZone架构中的应用处理器类似,本申请实施例中的应用处理器可以分时工作在非安全模式和安全模式下。此外,在本申请实施例提供的集成芯片中还设有安全处理器,该安全处理器工作在安全级别更高的安全模式下。为了对两种安全模式加以区分,本申请实施例中将应用处理器的安全模式称为“普通安全模式”,将安全处理器的安全模式称为“增强安全模式”。
在本申请实施例的描述中,应用处理器处于非安全模式,也可以称为应用处理器具有非安全属性,此时应用处理器可以发出非安全属性的操作;应用处理器处于普通安全模式, 也可以称为应用处理器具有普通安全属性,此时应用处理器可以发出普通安全属性的操作;安全处理器处于增强安全模式,也可以称为安全处理器具有增强安全属性,此时安全处理器可以发出增强安全属性的操作。
不难看出,本申请实施例中,处理器具有三级安全架构,即处理器具有三个级别的安全属性:非安全属性、普通安全属性和增强安全属性。其中,增强安全属性的安全级别比普通安全属性的安全级别更高,使得具有增强安全属性的安全处理器可以形成一个难以被恶意代码访问的隔离、封闭、安全的空间,从而保证该空间中用户关键数据的安全。
相应地,本申请实施例中,根据安全级别的不同,可以在片外存储器中配置不同安全属性的存储区域,以供处于不同安全模式下的处理器与片外存储器进行数据交互。比如,可以在片外存储器中配置增强安全属性的存储区域,增强安全属性的存储区域中存储的数据只能被处于增强安全模式下的处理器访问,集成芯片中的其他处理器(例如应用处理器)无法访问增强安全属性的存储区域,在本申请实施例的描述中,该增强安全属性的存储区域可以称为增强安全读写区域(enhanced_secure W/R区)。再比如,可以在片外存储器中配置普通安全属性的存储区域,普通安全属性的存储区域中存储的数据只能被处于普通安全模式下的处理器访问,集成芯片中的其他处理器(例如安全处理器)无法访问该普通安全属性的存储区域,在本申请实施例的描述中,该普通安全属性的存储区域可以称为普通安全读写区域(secure W/R区)。
通过在片外存储器中配置不同安全属性的存储区域,可以在物理上将集成芯片中的非安全数据、安全数据以及增强安全数据隔离,使得安全处理器形成一个难以被应用处理器上运行的第三方应用程序以及操作系统中可能带有的恶意代码所访问到的隔离、封闭、安全的空间。在这样的空间下执行的代码以及保存的数据具有更高的安全级别,难以被攻击者攻击,因而可以保证用户关键数据的安全。
此外,为了实现安全处理器与应用处理器之间的数据交互,片外存储器中还可以配置有可供普通安全模式下的处理器读写数据、增强安全模式下的处理器读数据的存储区域,同时,还可配置有可供普通安全模式下的处理器读数据、增强安全模式下的处理器读写数据的存储区域。在本申请实施例的描述中,可以将普通安全模式下的处理器读写数据、增强安全模式下的处理器读数据的存储区域称为普通安全读写/增强安全读区域(secure W/R enhanced_secure R区),可以将普通安全模式下的处理器读数据、增强安全模式下的处理器读写数据的存储区域称为增强安全读写/普通安全读区域(enhanced_secure W/R secure R区)。
在一个具体的示例中,将普通安全读写/增强安全读区域称为存储区域A,将增强安全读写/普通安全读区域称为存储区域B,那么,应用处理器在向安全处理器传输数据时,可以将该数据写入存储区域A,然后通知安全处理器从存储区域A中读取该数据;安全处理器在向应用处理器传输数据时,可以将该数据写入存储区域B,然后通知应用处理器从存储区域B中读取该数据。因而,通过存储区域A和存储区域B可以实现安全处理器与应用处理器之间的数据交互。
示例性地,片外存储器中的存储区域划分可以如图4所示。在图4的示例中,片外存储器可以划分为五个存储区域,从0x0000到0x3FFF是非安全属性的读写空间,且处于普通安全模式的处理器可以从该存储区域读取数据,该存储区域可以称为非安全读写/普通安全读区域;从0x4000到0x5FFF是普通安全属性的读写空间,只有普通安全属性的处理器 可以在该区域中读写数据;从0x6000到0x7FFF是用于增强安全属性的处理器与普通安属性的处理器进行数据交换的存储区域,其中,从0x6000到0x6FFF是普通安全读写/增强安全读区域;从0x7000到0x7FFF是增强安全读写/普通安全读区域;最后,从0x8000到0xBFFF是增强安全属性的读写空间,只有增强安全属性的处理器可以在该存储区域中读写数据。
需要说明的是,上述片外存储器的存储区域划分仅为具体示例,实际应用中,存储区域的空间大小和读写权限等可以根据需求进行灵活配置,本申请实施例中对此不做具体限定。
在图2所示的集成芯片中,总线(Interconnect)负责将各个子系统(例如安全处理器、应用处理器、存储控制器)连接起来,保证总线协议的正常执行。该总线可以是菊花链(Daisy Chain)总线、星型(Ring)总线、交换开关(Crossbar)总线或者其他任何类型的总线。此外,总线也可以分为配置总线和数据总线。
现有技术中,由于应用处理器可以分时工作在非安全模式和普通安全模式,因而在配置总线中可以通过自定义信号线中传递的1比特数据来指示应用处理器的安全模式,本申请中将该1比特数据称为普通安全指示信息;示例性地,普通安全指示信息为“1”时,表示应用处理器处于普通安全模式;普通安全指示信息为“0”时,表示应用处理器处于非安全模式。
此外,由于本申请实施例提供的集成芯片中还包含有处于增强安全模式下的安全处理器,因而还可以通过另一自定义信号线中传递的1比特数据来指示处理器是否工作在增强安全模式下,本申请中将该1比特数据称为增强安全指示信息;示例性地,在增强安全指示信息为“1”时,表示该处理器处于增强安全模式;在增强安全指示信息为“0”时,表示该处理器不处于增强安全模式。在本申请实施例提供的集成芯片中,只有安全处理器可以将增强安全指示信息置“1”,即只有安全处理器可以向配置总线发出增强安全属性的操作,其他处理器不能向配置总线发出增强安全属性的操作。
示例性地,本申请实施例中,总线(Interconnect)的信号线配置可以如图5所示。从图5可以看出,在总线上传输的信号除了总线标准要求的数据(data)信号、地址(address)和控制(control)信号以外,还存在自定义(reserved)信号,用于传递用户自定义的信号。在本申请实施例中,可以通过自定义信号线上的安全(secure)信号线传递普通安全指示信息,通过增强安全(enhanced secure)信号线传递增强安全指示信息。
通过上述总线的硬件连接方式,处理器的非安全属性、安全属性和增强安全属性在总线上被传递,存储控制器可以根据这些属性对处理器的数据访问进行鉴权,从而在硬件层面对安全数据和增强安全数据进行保护。
示例性地,应用处理器发出的访问指令(例如可以是读取指令或者写入指令)通过总线传输,该访问指令中的普通安全指示信息通过图5中的安全信号线传输。存储控制器在接收到该访问指令后,确定安全信号线上传输的普通安全指示信息为“1”,进而确定发送该访问指令的处理器处于普通安全模式下;或者,存储控制器在接收到该访问指令后,确定普通安全指示信息为“0”,进而确定发送该访问指令的处理器处于非安全模式下。
示例性地,安全处理器发出的访问指令通过总线传输,该访问指令中的增强安全指示信息通过图5中的增强安全信号线传输。存储控制器在接收到该访问指令后,确定增强安全信号线上传输的增强安全指示信息为“1”,进而确定发送该访问指令的处理器处于增强 安全模式下。
实际应用中,上述鉴权操作可以由存储控制器的防火墙(firewall)执行。具体地,存储控制器中的防火墙有两个作用:一、在存储控制器的本地寄存器中保存片外存储器的存储区域配置信息;二、在处理器(例如安全处理器或应用处理器)通过存储控制器访问片外存储器时,对处理器发出的访问指令进行鉴权。
示例性地,应用处理器向存储控制器发送数据写入指令,请求在增强安全属性的存储区域中写入数据。存储控制器中的防火墙接收到该数据写入指令后,确定安全信号线上传输的普通安全指示信息为“1”,从而确定发送该数据写入指令的处理器处于普通安全模式下;此外,存储控制器中的防火墙接收到该数据写入指令后,通过查询本地寄存器中存储的存储区域配置信息后确定该数据写入指令请求的地址属于增强安全读写区域,而发送该数据写入指令的处理器不具有增强安全属性,因而该数据写入指令未通过防火墙的鉴权,防火墙向应用处理器返回指令错误的指示。
示例地,安全处理器向存储控制器发送数据读取指令,请求读取普通安全读写/增强安全读区域中的数据。存储控制器中的防火墙接收到该数据读取指令后,确定增强安全信号线上传输的增强安全指示信息为“1”,从而确定发送该数据读取指令的处理器处于增强安全模式下;此外,存储控制器中的防火墙接收到该数据读取指令后,通过查询本地寄存器存储的存储区域配置信息后确定该数据读取指令请求的地址属于普通安全读写/增强安全读区域,而发送该数据读取指令的处理器具有增强安全属性且该指令为读指令,因而该数据读取指令通过防火墙的鉴权,存储控制器将该数据读取指令发送到片外存储器以完成数据读取。
本申请实施例中,安全处理器也可以称为增强安全处理器(enhanced processor for security,EPS)。EPS可以视为集成芯片中的安全子系统,是除应用处理器之外的一个独立的处理器。如图6所示,在EPS中可以包含独立的中央处理器(central processing unit,CPU)以及防物理攻击的加解密引擎(Crypto)模块,EPS中的CPU和加解密引擎模块均具有增强安全属性。此外,本申请实施例中,EPS中的CPU还可以将加解密引擎模块配置在普通安全模式下,使得EPS外部的处理器(例如应用处理器)也可以使用该加解密引擎模块进行相关密码学操作。
在图6所示的EPS中,CPU也可以称为安全核或者安全CPU(secure CPU)。具体地,安全核中还可以包括只能被增强安全属性的处理器访问的只读存储器(read only memory,ROM)、随机存储器(random access memory,RAM)、一级缓存(L1 cache)和二级缓存(L2 cache)等。
在图6所示的EPS中,加解密引擎模块中可以包括各种加解密引擎,这些加解密引擎所使用的加解密算法包括但不限于李维斯特-萨莫尔-阿德曼(Rivest Shamir Adleman,RSA)加密算法、椭圆加密(elliptic curve cryptography,ECC)算法、高级加密标准(advanced encryption standard,AES)算法、数据加密标准(data encryption standard,DES)算法、安全哈希算法(secure hash algorithm,SHA)。
在EPS中,CPU和加解密引擎模块等通过EPS的内部总线连接,EPS内部总线可以与集成芯片总线采用相同的信号线配置,即EPS内部总线也包含用于传输增强安全指示信息的增强安全信号线和用于传输普通安全指示信息的安全信号线。EPS内部总线连接到集成芯片总线上,进行数据和配置参数的传递。
在本申请实施例中,EPS可用于实现集成芯片中对安全级别要求较高的操作,例如实现根秘钥的存储、秘钥派生、加解密算法的加速运行,以及实现防物理攻击能力、防侧信道攻击能力、底层驱动软件、安全操作系统(operating system,OS)、安全应用和安全协议等应用场景的支持。其中,安全应用包括但不限于指纹识别、人脸识别等。
需要说明的是,本申请实施例对集成芯片的类型不做具体限定,该集成芯片可以是SoC、电子控制单元(electronic control unit,ECU)、物联网(internet of things,IoT)芯片等芯片,也可以是终端中的其他芯片。
下面,结合附图对本申请实施例作进一步地详细描述。
需要说明的是,本申请实施例中,多个是指两个或两个以上。另外,需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。
参见图7,为本申请实施例提供的一种集成芯片的结构示意图。图7所示的集成芯片700包括应用处理器701、安全处理器702和存储控制器703。
其中,应用处理器701用于在普通安全模式下通过存储控制器703在片外存储器中写入第一数据,其中,第一数据在片外存储器中的地址为第一地址;安全处理器702用于在增强安全模式下向存储控制器703发送第一读取指令,第一读取指令用于请求读取第一地址下的第一数据;存储控制器703用于控制安全处理器702从片外存储器中读取第一数据。
应用处理器701通过以上方式与安全处理器702进行交互,可以实现应用处理器701向安全处理器702传输第一数据。具体地,应用处理器701向安全处理器702传输第一数据时,不像现有技术那样通过邮箱(Inbox和Outbox)进行数据传输,而是将需要传输的第一数据写入片外存储器,然后,由安全处理器702在片外存储器中读取第一数据。采用这种数据传输方式,与采用邮箱方式相比,由于片外存储器的存储空间和传输带宽均较大,因而可以提高应用处理器701与安全处理器702的信息交互效率,尤其是在处理大数据流业务时,通过片外存储器进行数据交互可以使得业务处理时间大大减小,从而提高业务处理效率。
需要说明的是,本申请实施例中的处理器具有三级安全架构,增强安全属性的安全级别最高。为了使得具有增强安全属性的安全处理器形成难以被恶意代码访问的安全空间,本申请实施例中,应用处理器通常在普通安全模式下与安全处理器进行数据交互,应用处理器处于非安全模式时通常不与安全处理器进行数据交互,从而避免用户的关键数据在非安全模式下被窃取。当然,本申请实施例中,对应用处理器701的安全模式不做限定,即应用处理器701在执行其他操作时可以分时工作在非安全模式和普通安全模式,应用处理器701在与安全处理器702进行数据交互时处于普通安全模式即可。
应用处理器701在通过存储控制器703写入第一数据之后,进一步地,应用处理器701可以通过中断方式通知安全处理器702读取第一数据。安全处理器702可以在接收到应用处理器701的通知后发送第一读取指令。
也就是说,本申请实施例中,应用处理器701向安全处理器702发送第一数据时,可以先将第一数据存储至片外存储器,然后通过中断方式通知安全处理器702读取第一数据,触发安全处理器702发送第一读取指令;存储控制器703在接收到第一读取指令后,控制安全处理器702从片外存储器中读取第一数据。采用这种方案,虽然应用处理器701和安 全处理器702也需要通过中断的方式进行交互,但是通过中断方式传输的数据仅用于通知安全处理器702读取第一数据,其传输的数据量较小,不会对业务处理效率产生较大影响。
此外,安全处理器702在读取第一数据后,可以对读取的第一数据进行处理,并将处理后得到的数据通过存储控制器703写入片外存储器;然后,应用处理器701可以在普通安全模式下通过存储控制器703从片外存储器中读取该处理后得到的数据。
同样地,安全处理器702在将处理后得到的数据通过存储控制器703写入片外存储器之后,也可以通过中断方式通知应用处理器701读取处理后得到的数据。
也就是说,安全处理器702对第一数据进行处理后,也可以采用与应用处理器701传输第一数据所类似的方式,将处理后得到的数据写入片外存储器,然后通过中断方式通知应用处理器701,触发应用处理器701读取该处理后得到的数据。
具体地,应用处理器701可以在普通安全模式下向存储控制器703发送第二读取指令,以请求读取该处理后得到的数据;然后,存储控制器703可以控制应用处理器701从片外存储器中读取该处理后得到的数据。
进一步地,在对读取的第一数据进行处理之前,安全处理器702还可在增强安全模式下通过存储控制器703在片外存储器中写入第二数据,其中,第二数据在片外存储器中的地址为第三地址。那么,安全处理器702在增强安全模式下对读取的第一数据进行处理时,具体可通过如下方式:在增强安全模式下向存储控制器703发送第三读取指令,第三读取指令用于请求读取第三地址下的第二数据;然后,安全处理器702通过存储控制器703从片外存储器中读取第二数据;最后,将第一数据与第二数据进行比较,将比较结果作为处理后得到的数据。
也就是说,安全处理器702对第一数据进行处理时,可以将第一数据和之前存储在片外存储器中的第二数据进行比较,并将比较结果作为处理后得到的数据。其中,第二数据可以存储在片外存储器中的增强安全读写区域,该存储区域中的数据只有处于增强安全模式下的处理器可以访问,因而第二数据的安全性可以得到保证。示例性地,第二数据可以是用户的指纹模板、人脸识别模板以及支付密码等对安全性要求较高的数据。
当然,以上安全处理器702的处理过程仅为示例,实际应用中安全处理器702对第一数据的处理方式可以有多种。
结合以上描述,应用处理器701、安全处理器702和存储控制器703之间的一种可能的交互方式可以如图8所示。
S801:安全处理器702在增强安全模式下向存储控制器703发送第二数据,以请求在片外存储器中写入第二数据。
其中,第二数据在片外存储器中的地址为第三地址。
S802:存储控制器703控制安全处理器702在片外存储器中写入第二数据。
具体地,安全处理器702可以在片外存储器中的增强安全读写区域中写入第二数据,该存储区域中的数据只有处于增强安全模式的处理器可以读写,不具有增强安全属性的处理器不具备访问该存储区域中的数据的权限,从而保证该存储区域中的数据的安全。
S803:应用处理器701在普通安全模式下向存储控制器703发送第一数据,以请求在片外存储器中写入第一数据。
其中,第一数据在片外存储器中的地址为第一地址。
S804:存储控制器703控制应用处理器701在片外存储器中写入第一数据。
具体地,应用处理器701可以在片外存储器中的普通安全读写/增强安全读区域中写入第一数据。
S805:安全处理器702在接收到应用处理器701发送的中断消息后,在增强安全模式下向存储控制器703发送第一读取指令。
其中,第一读取指令用于请求读取第一地址下的第一数据。
S806:存储控制器703控制安全处理器702从片外存储器中读取第一数据。
S807:安全处理器702在增强安全模式下向存储控制器703发送第三读取指令。
其中,第三读取指令用于请求读取第三地址下的第二数据。
S808:存储控制器703控制安全处理器702从片外存储器中读取第二数据。
S809:安全处理器702在增强安全模式下将第一数据与第二数据进行比较,将比较结果作为处理后得到的数据。
S810:安全处理器702在增强安全模式下向存储控制器703发送该处理后得到的数据,以请求在片外存储器中写入该处理后得到的数据。
S811:存储控制器703控制安全处理器702在片外存储器中写入上述处理后得到的数据。
具体地,安全处理器702可以在片外存储器中的增强安全读写/普通安全读区域中写入第一数据。
S812:应用处理器701在接收到安全处理器702发送的中断消息后,在普通安全模式下向存储控制器703发送第二读取指令。
其中,第二读取指令用于请求读取该处理后得到的数据。
S813:存储控制器703控制应用处理器701从片外存储器中读取该处理后得到的数据。
在一个具体示例中,第一数据可以是集成芯片700所在的终端设备上采集到的指纹数据,第二数据可以是安全处理器702预先存储在增强安全读写区域中的指纹模板。通过执行S801~S802,安全处理器702通过存储控制器703在片外存储器中存储指纹模板;通过执行S803~S804,应用处理器701通过存储控制器703在片外存储器中存储采集的指纹数据;通过执行S805~S808,安全处理器702分别从片外存储器的不同存储区域中读取上述指纹模板和采集的指纹数据,并通过执行S809将指纹模板和采集的指纹数据进行比较,将比较后的结果作为处理后得到的数据;通过执行S810~S811,安全处理器702在片外存储器中写入该处理后得到的数据;通过执行S812~S813,应用处理器701可以读取到上述处理后得到的数据。若比较结果指示终端设备当前采集的指纹数据与指纹模板匹配,那么应用处理器701在接收到该处理后得到的数据后,可以进行指纹解锁处理或者支付处理等处理;若比较结果指示终端设备当前采集的指纹数据与指纹模板不匹配,则应用处理器701可以执行拒绝指纹解锁或者拒绝支付等处理。
通过前面的介绍不难看出,在本申请实施例中,处理器(比如应用处理器701或者安全处理器702)在请求访问片外存储器时,需要在存储控制器703的控制下进行。具体地,存储控制器703可以对处理器发送的读取指令或写入指令进行鉴权,在鉴权通过的情况下存储控制器703对该指令进行响应,在鉴权不通过的情况下存储控制器703则会拒绝该处理器的访问请求。
下面,分别介绍存储控制器703对读取指令和写入指令的鉴权过程。
一、读取指令的鉴权
具体地,存储控制器703在控制安全处理器702从片外存储器中读取第一数据时,可以通过如下方式实现:存储控制器703确定第一读取指令鉴权通过;存储控制器703读取第一数据,并将第一数据发送给安全处理器702。
不难看出,只有在第一读取指令鉴权通过的情况下,存储控制器703才会响应第一读取指令的请求。若第一读取指令鉴权不通过,则存储控制器703会拒绝第一读取指令的请求,向安全处理器702返回总线错误指示。
具体实现时,存储控制器703在确定第一读取指令鉴权通过时,可通过如下方式:存储控制器703确定第一地址属于片外存储器的第一存储区域,第一存储区域被配置为允许普通安全模式下的处理器进行读写操作,以及允许增强安全模式下的处理器进行读操作;存储控制器703确定安全处理器702处于增强安全模式下且第一读取指令为读指令。
如前所述,片外存储器中配置有不同安全属性的存储区域,以供处于不同安全模式下的处理器与片外存储器进行数据交互。这里,第一存储区域可以视为用于应用处理器701与安全处理器702进行交互的存储区域。在第一存储区域中,处于普通安全模式的应用处理器701可以读取数据和写入数据,处于增强安全模式的安全处理器702可以读取数据,因而应用处理器701可通过第一存储区域向安全处理器702进行数据传输。第一存储区域可以视为前述普通安全读写/增强安全读区域。
一般地,存储控制器703在对处理器发送的读取指令进行鉴权时,先通过查询本地寄存器确定该读取指令所请求的地址属于片外存储器的哪一存储区域。然后,存储控制器703先确定发送该读取指令的处理器的安全属性,再确定具有该安全属性的处理器是否具有在该存储区域进行读取操作的权限。在上述示例中,存储控制器703通过查询本地寄存器确定第一读取指令请求的第一地址属于允许普通安全模式下的处理器进行读写操作,以及允许增强安全模式下的处理器进行读操作的第一存储区域,然后,存储控制器703确定发送第一读取指令的安全处理器702处于增强安全模式,第一存储区域允许处于增强安全模式下的处理器进行读取操作,且第一读取指令恰好为读指令,因此第一读取指令可以通过存储控制器703的鉴权。
以上介绍的存储控制器703对第一读取指令进行鉴权的方式仅为一种具体示例。实际应用中,存储控制器703在接收到任一读取片外存储器中的数据的读取指令时,均需要对该读取指令进行鉴权。示例性地,在图8所示的交互流程中,存储控制器703在执行S808控制安全处理器702从片外存储器中读取第二数据时,也需要对安全处理器702发送的第三读取指令进行鉴权;存储控制器703在执行S813控制应用处理器701从片外存储器中读取处理后得到的数据时,也需要对应用处理器701发送的第二读取指令进行鉴权。上述对第三读取指令和第二读取指令进行鉴权的方式与对第一读取指令的鉴权方式类似,此处不再赘述。
当然,以上均以读取指令鉴权通过的情形为例进行示意。实际应用中,存储控制器703对读取指令的鉴权也存在鉴权不通过的情况。例如,若存储控制器703接收到应用处理器701发送的读取指令,请求读取增强安全读写区域中存储的数据。存储控制器703通过查询本地寄存器确定该读取指令请求的地址属于增强安全读写区域,同时,存储控制器703确定发送该读取指令的应用处理器701处于普通安全模式下,而普通安全模式下的处理器不允许读取增强安全读写区域中存储的数据,因而存储控制器703确定该读取指令鉴权不通过。
二、写入指令的鉴权
具体地,安全处理器702在将处理后得到的数据通过存储控制器703写入片外存储器时,可通过如下方式实现:安全处理器702在增强安全模式下向存储控制器703发送第一写入指令,第一写入指令用于请求在第二地址下写入处理后得到的数据;存储控制器703还用于:确定第一写入指令鉴权通过;将处理后得到的数据写入第二地址。
不难看出,只有在第一写入指令鉴权通过时,存储控制器703才会响应第一写入指令的请求。若第一写入指令鉴权不通过,则存储控制器703会拒绝第一写入指令的请求,向安全处理器702返回总线错误指示。
具体实现时,存储控制器703在确定第一写入指令鉴权通过时,具体可通过如下方式:存储控制器703确定第二地址属于片外存储器的第二存储区域,第二存储区域被配置为允许增强安全模式下的处理器进行读写操作,以及允许普通安全模式下的处理器进行读操作;存储控制器703确定安全处理器702处于增强安全模式下。
如前所述,片外存储器中配置有不同安全属性的存储区域,以供处于不同安全模式下的处理器与片外存储器进行数据交互。这里,第二存储区域可以视为用于应用处理器701与安全处理器702进行交互的存储区域。在第二存储区域中,处于增强安全模式的安全处理器702可以读取数据和写入数据,处于普通安全模式的应用处理器701可以读取数据,因而安全处理器702可通过第二存储区域向应用处理器701进行数据传输。第二存储区域可以视为前述增强安全读写/普通安全读区域。
一般地,存储控制器703在对处理器发送的写入指令进行鉴权时,先通过查询本地寄存器确定该写入指令所请求的地址属于片外存储器的哪一存储区域。然后,存储控制器703先确定发送该写入指令的处理器的安全属性,再确定具有该安全属性的处理器是否具有在该存储区域进行写入操作的权限。在上述示例中,存储控制器703通过查询本地寄存器确定第一写入指令请求的第二地址属于允许增强安全模式下的处理器进行读写操作,以及允许普通安全模式下的处理器进行读操作的第二存储区域,然后,存储控制器703确定发送第一写入指令的安全处理器702处于增强安全模式,第二存储区域允许处于增强安全模式下的处理器进行写入操作和读取操作,因此第一写入指令可以通过存储控制器703的鉴权。
以上介绍的存储控制器703对第一写入指令进行鉴权的方式仅为一种具体示例。实际应用中,存储控制器703在接收到任一在片外存储器中写入数据的写入指令时,均需要对该写入指令进行鉴权。示例性地,在图8所示的交互流程中,存储控制器703在执行S802控制安全处理器702在片外存储器中写入第二数据时,也需要对安全处理器702发送的写入第二数据的写入指令进行鉴权;存储控制器703在执行S804控制应用处理器701在片外存储器中写入第一数据时,也需要对应用处理器701发送的写入第一数据的写入指令进行鉴权;存储控制器703在执行S811控制安全处理器702在片外存储器中写入处理后得到的数据时,也需要对安全处理器702发送的写入处理后得到的数据的写入指令进行鉴权。以上列举的对写入指令进行鉴权的方式与对第一写入指令进行鉴权的方式类似,此处不再赘述。
当然,以上均以写入指令鉴权通过的情形为例进行示意。实际应用中,存储控制器703对写入指令的鉴权也存在鉴权不通过的情况。例如,若存储控制器703接收到应用处理器701发送的写入指令,请求在第二存储区域写入数据。存储控制器703通过查询本地寄存器确定该写入指令请求的地址属于第二存储区域,该存储区域允许增强安全模式下的处理 器进行读写操作、普通安全模式下的处理器进行读操作;同时,存储控制器703确定发送该写入指令的应用处理器701处于普通安全模式下,而普通安全模式下的处理器是不允许在第二存储区域写入数据的,因而存储控制器703确定该写入指令鉴权不通过。
前面提到过,存储控制器703中的防火墙可以用于执行上述对访问指令的鉴权操作,防火墙在进行鉴权时,需要对访问指令请求的地址属于哪一存储区域进行判断。片外存储器中配置有多种存储区域,因而存储控制器703中的防火墙在接收到处理器发送的访问指令时,需要对访问指令请求的地址是否属于某一存储区域进行逐一确认。假设片外存储器采用图4所示的存储区域配置方式,那么,存储控制器703中的防火墙在对接收到的访问指令进行鉴权时,具体流程可以如图9所示。
具体地,存储控制器703在接收到访问片外存储器的访问指令后,先判断访问指令对应的访问地址是否属于增强安全读写区域;若属于增强安全读写区域,则判断访问指令中的增强安全指示信息是否为“1”,若为“1”,则代表发送该访问指令的处理器处于增强安全模式,该访问指令通过防火墙的鉴权,存储控制器703将该访问指令发送到片外存储器以完成数据读写;若为“0”,则代表发送该访问指令的处理器不处于增强安全模式,该访问指令未通过防火墙鉴权,存储控制器703返回总线错误指示。
若访问指令对应的访问地址不属于增强安全读写区域,则判断该访问地址是否属于增强安全读写/普通安全读区域,若属于增强安全读写/普通安全读区域,则判断访问指令中的增强安全指示信息是否为“1”,或者判断普通安全指示信息是否为“1”且访问指令请求的是读操作。其中,普通安全指示信息为“1”,代表该处理器处于普通安全模式。若符合上述两个条件中的任一种,则该访问指令通过防火墙的鉴权,存储控制器703将该访问指令发送到片外存储器以完成数据读写;若上述两个条件均不符合,则访问指令未通过防火墙鉴权,存储控制器703返回总线错误指示。
若访问指令对应的访问地址不属于增强安全读写/普通安全读区域,则判断该访问地址是否属于普通安全读写/增强安全读区域。若属于普通安全读写/增强安全读区域,则判断访问指令中的普通安全指示信息是否为“1”,或者判断增强安全指示信息是否为“1”且访问指令请求的是读操作。若符合上述两个条件中的任一种,则该访问指令通过防火墙的鉴权;若上述两个条件均不符合,则访问指令未通过防火墙鉴权。
若访问指令对应的访问地址不属于普通安全读写/增强安全读区域,则判断该访问地址是否属于普通安全读写区域。若属于普通安全读写区域,则判断访问指令中的普通安全指示信息是否为“1”,若为“1”,则代表发送该访问指令的处理器处于普通安全模式,该访问指令通过防火墙的鉴权;若普通安全指示信息为“0”,则代表发送该访问指令的处理器不处于普通安全模式,该访问指令未通过防火墙鉴权。
若访问指令对应的访问地址不属于普通安全读写区域,则表示该访问地址属于非安全读写/普通安全读区域。在这种情况下,可以判断增强安全指示信息和普通安全指示信息是否均为“0”,或者判断普通安全指示信息是否为“1”且访问指令请求的是读操作。若符合上述两个条件中的任一种,则该访问指令通过防火墙的鉴权;若上述两个条件均不符合,则访问指令未通过防火墙鉴权。
从以上对防火墙的鉴权流程的介绍可以看出,防火墙在鉴权时需要对访问指令请求的地址是否属于某一存储区域进行逐一确认,在确定了访问地址属于某一存储区域后,再判断发送该访问指令的处理器的安全属性以及访问指令的读写属性是否符合该存储区域的 要求,若符合则该访问指令鉴权通过,若不符合则该访问指令鉴权不通过。
当然,以上鉴权流程仅为一种示意,该流程以片外存储器的存储区域配置采用图4所示方式为例。若片外存储器的存储区域配置采用其他方式,则鉴权流程也会根据存储器的存储区域配置进行相应调整。此外,在图9所示的鉴权流程中,需要对访问地址所属的存储区域进行逐一确认,实际应用中,确认存储区域的顺序并不限定为图9所示的方式。
本申请实施例中,存储控制器703在对访问指令进行鉴权时需要根据片外存储器的存储区域配置信息确认访问地址对应的存储区域。如前所述,片外存储器的存储区域配置信息可以保存在存储控制器703的本地寄存器中。具体实现时,可以由安全处理器702和应用处理器701进行存储区域的配置。
示例性地,安全处理器702还用于:将第一存储区域配置成允许普通安全模式下的处理器进行读写操作,以及允许增强安全模式下的处理器进行读操作的存储区域。
具体地,安全处理器702可以向存储控制器703发送第一配置信息,第一配置信息用于指示第一存储区域允许普通安全模式下的处理器进行读写操作,以及允许增强安全模式下的处理器进行读操作。然后,存储控制器703保存该第一配置信息。
示例性地,安全处理器702还用于:将第二存储区域配置成允许增强安全模式下的处理器进行读写操作,以及允许普通安全模式下的处理器进行读操作的存储区域。
具体地,安全处理器702可以向存储控制器703发送第二配置信息,第二配置信息用于指示第二存储区域允许增强安全模式下的处理器进行读写操作,以及允许普通安全模式下的处理器进行读操作。然后,存储控制器703保存该第二配置信息。
其中,安全处理器702可以将上述第一配置信息和第二配置信息在一条配置消息中发送给存储控制器703,也可以分别发送上述第一配置信息和第二配置信息。
以上仅对片外存储器的第一存储区域和第二存储区域的配置进行介绍。实际应用中,安全处理器702和应用处理器701可以对片外存储器中的其他存储区域进行配置,例如配置增强安全读写区域、普通安全读写区域、非安全读写/普通安全读区域等,其配置过程与上述对第一存储区域和第二存储区域的配置过程类似,此处不再赘述。
需要说明的是,本申请实施例中,为了增强系统的安全性,增强安全属性相关的存储区域均由安全处理器702进行配置。例如,对于图4所示的片外存储器的存储区域配置,增强安全读写区域、增强安全读写/普通安全读区域、普通安全读写/增强安全读区域均由安全处理器702进行配置。
此外,从以上对防火墙的鉴权流程的介绍可以看出,防火墙在鉴权时除了需要判断访问地址所属的存储区域,还需要对发送访问指令的处理器的安全属性进行判断。在前面的介绍中曾提到,可以通过配置总线中的安全信号线来传递应用处理器701的安全属性信息(即普通安全指示信息),用配置总线中的增强安全信号线来传递安全处理器702的安全属性信息(即增强安全指示信息)。存储控制器703在接收到访问指令后,可以通过这两个自定义信号线中传输的增强安全指示信息和普通安全指示信息来判断发送该访问指令的处理器的安全属性。
那么,存储控制器703还可用于:在第一读取指令中的增强安全指示信息为第一指定数值的情况下,确定安全处理器702处于增强安全模式下。其中,增强安全指示信息通过集成芯片内部总线上的信号线传输。
具体应用中,第一指定数值可以为“1”。
本申请实施例中,只有安全处理器702可以将增强安全指示信息设置为第一指定数值,因而存储控制器703在第一读取指令中的增强安全指示信息为第一指定数值的情况下,可以确定发送第一读取指令的处理器处于增强安全模式下。
除了上述判断增强安全模式的方式以外,存储控制器703还可以根据增强安全指示信息和普通安全指示信息对处理器的普通安全模式和非安全模式进行判断。
示例性地,若增强安全指示信息为“1”,则表示发送该访问指令的处理器处于增强安全模式;若增强安全指示信息为“0”、普通安全指示信息为“1”,则表示发送该访问指令的处理器处于普通安全模式;若增强安全指示信息为“0”、普通安全指示信息为“0”,则表示发送该访问指令的处理器处于非安全模式。
下面,以集成芯片为SoC、该SoC采用图3所示结构为例,对本申请实施例中的增强安全应用的处理过程进行介绍。具体地,SoC的操作流程可以如图10所示。
1、开始增强安全应用。
2、SoC启动后,EPS中的CPU配置DMC的增强安全相关区域。
其中,增强安全相关区域包含增强安全读写区域、增强安全读写/普通安全读区域以及普通安全读写/增强安全读区域。也就是说,和具有增强安全属性的处理器的读写权限有关的存储区域均可以视为增强安全相关区域;增强安全相关区域由EPS中的CPU配置。
3、EPS中的加解密引擎模块对Flash中保存的增强安全应用程序和数据进行解密、验签,并保存在DRAM中的增强安全读写区域。
解密和验签后的数据保存在增强安全读写区域,这些数据只能被具有增强安全属性的处理器访问,例如只能被EPS中的CPU或者加解密引擎模块访问。
4、AP遇到需EPS处理的应用,将需EPS处理的原始数据写到DRAM中的普通安全读写/增强安全读区域,并向EPS中的CPU发出中断。
AP发出中断后,EPS可以读取AP在普通安全读写/增强安全读区域中写入的数据。
5、EPS中的CPU收到中断后,EPS对AP输出到DRAM的数据进行读取和运算,所有中间数据都写在DRAM的增强安全读写区域。
其中,中间数据是指EPS进行运算时所产生的中间数据,这些中间数据保存在增强安全读写区域,只能被具有增强安全属性的处理器(例如EPS中的CPU或加解密引擎模块)访问。
6、EPS运算结束后,将最终结果写入DRAM的增强安全读写/普通安全读区域,并向AP发出中断。
EPS发出中断后,AP可以读取EPS在增强安全读写/普通安全读区域中写入的最终结果。
7、AP收到中断后,从DRAM的增强安全读写/普通安全读区域读取EPS运算的最终结果。
8、结束增强安全应用。
需要说明的是,图10所示的处理过程仅为本申请实施例中应用处理器与安全处理器的交互流程的一个具体示例,在图10所示的处理流程中未详尽描述的实现方式可以参见图7所示的集成芯片700中的相关描述。
综上,采用本申请实施例提供的集成芯片700,应用处理器701用于在普通安全模式 下通过存储控制器703在片外存储器中写入第一数据后,安全处理器702可以在增强安全模式下通过存储控制器703读取该第一数据。采用上述方案,可以实现应用处理器701向安全处理器702传输第一数据。在集成芯片700中,应用处理器701与安全处理器702可以在存储控制器703的控制下通过片外存储器实现数据交互。与现有技术中应用处理器与安全处理器通过邮箱(Inbox和Outbox)的方式进行交互的方案相比,由于片外存储器的存储空间和传输带宽均较大,因而采用本申请实施例提供的交互方案可以提高信息交互的效率,尤其是在处理大数据流业务时,通过片外存储器进行数据交互可以使得业务处理时间大大减小,从而提高业务处理效率。
此外,本申请实施例中的处理器具有三级安全架构,即在原有集成芯片的非安全/安全这一二级安全架构的基础上,增加一级安全级别更高的安全架构(即增强安全)。集成芯片中的处理器可以具有三种安全属性,其中,增强安全属性的安全级别最高,普通安全属性次之,非安全属性安全级别最低。具体实现时,具有增强安全属性的安全处理器702具有独立的硬件架构以及不与其他安全属性的处理器共享的存储区域(增强安全读写区域),因而安全处理器702可以形成难以被恶意代码访问的安全空间,从而在硬件层面对用户的关键数据进行保护,将用户的关键数据存储在增强安全读写区域,可以保证用户关键数据的安全。
基于同一发明构思,本申请实施例还提供一种集成芯片。参见图11,该集成芯片1100包括包含第一信号线和第二信号线的总线1101,第一信号线用于传输增强安全指示信息,第二信号线用于传输普通安全指示信息;安全处理器1102,用于在增强安全模式下通过总线1101向存储控制器发送第一读取指令,第一读取指令中包含的增强安全指示信息通过第一信号线进行传输;应用处理器1103,用于在普通安全模式下通过总线向存储控制器发送第二读取指令,第二读取指令中包含的普通安全指示信息通过第二信号线进行传输。
其中,第一信号线可以是图5所示的总线的信号线配置中的增强安全(enhanced secure)信号线,第二信号线可以是图5所示的总线的信号线配置中的安全(secure)信号线。
在集成芯片1100中,安全处理器1102、应用处理器1103和存储控制器通过总线1101连接。安全处理器1102和应用处理器1103通过总线1101发出的访问指令(包括第一读取指令和第二读取指令)中包含增强安全指示信息和普通安全指示信息,增强安全指示信息通过总线1101中的第一信号线传输,普通安全指示信息通过总线1101中的第二信号线传输。存储控制器可以根据接收到的增强安全指示信息和普通安全指示信息确定发送访问指令的处理器的安全属性。
具体地,集成芯片1100还可以包括:存储控制器,存储控制器用于在第一读取指令中包含的增强安全指示信息为第一指定数值的情况下,确定安全处理器1102处于增强安全模式下。
示例性地,第一指定数值可以为“1”。本申请实施例中,只有安全处理器1102可以将增强安全指示信息设置为第一指定数值,因而存储控制器在第一读取指令中的增强安全指示信息为第一指定数值的情况下,可以确定发送第一读取指令的处理器处于增强安全模式下。
此外,存储控制器还用于:在第二读取指令中的普通安全指示信息为第二指定数值的情况下,确定应用处理器1103处于普通安全模式下;在第二读取指令中的普通安全指示信 息为第三指定数值的情况下,确定应用处理器1103处于非安全模式下。
示例性地,第二指定数值可以为“1”,第三指定数值可以为“0”。
在集成芯片1100中,存储控制器在接收到第二读取指令后,确定第二读取指令中的增强安全指示信息不是第一指定数值,那么存储控制器可以确定发送第二读取指令的应用处理器1103不具有增强安全属性。此时,存储控制器进一步判断第二读取指令中的普通安全指示信息,若普通安全指示信息为第二指定数值,则确定应用处理器1103处于普通安全模式;若普通安全指示信息为第三指定数值,则确定应用处理器1103处于非安全模式。
应理解,在集成芯片1100中,存储控制器在接收到读取指令后,会根据读取指令中的增强安全指示信息和普通安全指示信息判断发送该读取指令的处理器的安全属性;同样地,存储控制器在接收到写入指令后,同样也会根据写入指令中的增强安全指示信息和普通安全指示信息判断发送该写入指令的处理器的安全属性,判断方式与前述判断读取指令的方式相同,此处不再赘述。
需要说明的是,集成芯片1100和集成芯片700均为本申请实施例提供的集成芯片,二者的实现方式可以相互参见,此处不再赘述。
基于同一发明构思,本申请实施例还提供一种数据处理方法。参见图12,该数据处理方法包括如下步骤。
S1201:存储控制器接收安全处理器发送的第一读取指令。
其中,第一读取指令用于请求读取片外存储器中第一地址下的第一数据。
S1202:存储控制器确定第一读取指令鉴权通过。
S1203:存储控制器从片外存储器中读取第一数据,并将第一数据发送给安全处理器。
可选地,存储控制器确定第一读取指令鉴权通过,具体可通过如下方式实现:存储控制器通过查询本地寄存器确定第一地址属于片外存储器的第一存储区域,第一存储区域被配置为允许普通安全模式下的处理器进行读写操作,以及允许增强安全模式下的处理器进行读操作;存储控制器确定安全处理器处于增强安全模式下且第一读取指令为读指令。
进一步地,存储控制器确定安全处理器处于增强安全模式下,具体可通过如下方式实现:存储控制器在第一读取指令中的增强安全指示信息为第一指定数值的情况下,确定安全处理器处于增强安全模式下。
此外,图12所示的数据处理方法还包括:存储控制器接收安全处理器发送的第一配置信息,第一配置信息用于指示第一存储区域允许普通安全模式下的处理器进行读写操作,以及允许增强安全模式下的处理器进行读操作;存储控制器在本地寄存器中保存第一配置信息。
可选地,图12所示的数据处理方法还包括:存储控制器在将第一数据发送给安全处理器之后,接收安全处理器发送的第一写入指令,第一写入指令用于请求在第二地址下写入处理后得到的数据,处理后得到的数据由安全处理器对第一数据进行处理后得到;存储控制器确定第一写入指令鉴权通过;存储控制器将处理后得到的数据写入第二地址。
可选地,存储控制器确定第一写入指令鉴权通过,可以通过如下方式实现:存储控制器通过查询本地寄存器确定第二地址属于片外存储器的第二存储区域,第二存储区域被配置为允许增强安全模式下的处理器进行读写操作,以及允许普通安全模式下的处理器进行读操作;存储控制器确定安全处理器处于增强安全模式下。
进一步地,存储控制器还可接收安全处理器发送的第二配置信息,第二配置信息用于指示第二存储区域允许增强安全模式下的处理器进行读写操作,以及允许普通安全模式下的处理器进行读操作;存储控制器在本地寄存器中保存第二配置信息。
其中,安全处理器在发送第一配置信息和第二配置信息时,可以在同一条消息中发送,也可以分别发送。
可选地,图12所示的数据处理方法还包括:存储控制器在将处理后得到的数据写入第二地址之后,还可接收应用处理器发送的第二读取指令,第二读取指令用于请求读取处理后得到的数据;存储控制器确定第二读取指令鉴权通过;然后,存储控制器读取处理后得到的数据,并将处理后得到的数据发送给应用处理器。
具体地,存储控制器确定第二读取指令鉴权通过,具体方式可以是:存储控制器确定第二地址属于第二存储区域;存储控制器确定应用处理器处于普通安全模式下且第二读取指令为读指令。
具体地,存储控制器确定应用处理器处于普通安全模式下,具体方式可以是:存储控制器在第二读取指令中的普通安全指示信息为第二指定数值的情况下,确定应用处理器处于普通安全模式下。
需要说明的是,图12所示的数据处理方法为图7所示的集成芯片700中的存储控制器703的鉴权流程的具体示例,图12所示的数据处理方法中未详尽描述的实现方式及其技术效果可以参见图7所示的集成芯片700中的相关描述。
显然,本领域的技术人员可以对本申请实施例进行各种改动和变型而不脱离本申请实施例的范围。这样,倘若本申请实施例的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (28)

  1. 一种集成芯片,其特征在于,包括:
    应用处理器,用于在普通安全模式下通过存储控制器在片外存储器中写入第一数据,其中,所述第一数据在所述片外存储器中的地址为第一地址;
    安全处理器,用于在增强安全模式下向所述存储控制器发送第一读取指令,所述第一读取指令用于请求读取所述第一地址下的所述第一数据;
    所述存储控制器,用于控制所述安全处理器从所述片外存储器中读取所述第一数据。
  2. 如权利要求1所述的集成芯片,其特征在于,所述安全处理器,还用于:在所述增强安全模式下对读取的所述第一数据进行处理,并将处理后得到的数据通过所述存储控制器写入所述片外存储器;
    所述应用处理器,还用于:在所述普通安全模式下通过所述存储控制器从所述片外存储器中读取所述处理后得到的数据。
  3. 如权利要求2所述的集成芯片,其特征在于,所述应用处理器在通过所述存储控制器从所述片外存储器中读取所述处理后得到的数据时,具体用于:
    在所述普通安全模式下向所述存储控制器发送第二读取指令,所述第二读取指令用于请求读取所述处理后得到的数据;
    所述存储控制器,还用于:控制所述应用处理器从所述片外存储器中读取所述处理后得到的数据。
  4. 如权利要求2或3所述的集成芯片,其特征在于,所述安全处理器还用于:
    在将所述处理后得到的数据通过所述存储控制器写入所述片外存储器之后,通过中断方式通知所述应用处理器读取所述处理后得到的数据。
  5. 如权利要求1-4任一所述的集成芯片,其特征在于,所述应用处理器还用于:
    在通过所述存储控制器在所述片外存储器中写入所述第一数据之后,通过中断方式通知所述安全处理器读取所述第一数据。
  6. 如权利要求1-5任一所述的集成芯片,其特征在于,所述存储控制器在控制所述安全处理器从所述片外存储器中读取所述第一数据时,具体用于:
    所述存储控制器确定所述第一读取指令鉴权通过;
    所述存储控制器读取所述第一数据,并将所述第一数据发送给所述安全处理器。
  7. 如权利要求6所述的集成芯片,其特征在于,所述存储控制器在确定所述第一读取指令鉴权通过时,具体用于:
    所述存储控制器确定所述第一地址属于所述片外存储器的第一存储区域,所述第一存储区域被配置为允许所述普通安全模式下的处理器进行读写操作,以及允许所述增强安全模式下的处理器进行读操作;
    所述存储控制器确定所述安全处理器处于所述增强安全模式下且所述第一读取指令为读指令。
  8. 如权利要求7所述的集成芯片,其特征在于,所述安全处理器还用于:
    将所述第一存储区域配置成允许所述普通安全模式下的处理器进行读写操作,允许所述增强安全模式下的处理器进行读操作的存储区域。
  9. 如权利要求2-8任一所述的集成芯片,其特征在于,所述安全处理器在将所述处理后得到的数据通过所述存储控制器写入所述片外存储器时,具体用于:
    所述安全处理器在所述增强安全模式下向所述存储控制器发送第一写入指令,所述第一写入指令用于请求在第二地址下写入所述处理后得到的数据;
    所述存储控制器还用于:
    确定所述第一写入指令鉴权通过;
    将所述处理后得到的数据写入所述第二地址。
  10. 如权利要求9所述的集成芯片,其特征在于,所述存储控制器在确定所述第一写入指令鉴权通过时,具体用于:
    所述存储控制器确定所述第二地址属于所述片外存储器的第二存储区域,所述第二存储区域被配置为允许所述增强安全模式下的处理器进行读写操作,以及允许所述普通安全模式下的处理器进行读操作;
    所述存储控制器确定所述安全处理器处于所述增强安全模式下。
  11. 如权利要求10所述的集成芯片,其特征在于,所述安全处理器还用于:
    将所述第二存储区域配置成允许所述增强安全模式下的处理器进行读写操作,以及允许所述普通安全模式下的处理器进行读操作的存储区域。
  12. 如权利要求2-11任一所述的集成芯片,其特征在于,所述安全处理器还用于:
    在对读取的所述第一数据进行处理之前,在所述增强安全模式下通过所述存储控制器在所述片外存储器中写入第二数据,其中,所述第二数据在所述片外存储器中的地址为第三地址;
    所述安全处理器在所述增强安全模式下对读取的所述第一数据进行处理时,具体用于:
    在所述增强安全模式下向所述存储控制器发送第三读取指令,所述第三读取指令用于请求读取所述第三地址下的所述第二数据;
    通过所述存储控制器从所述片外存储器中读取所述第二数据;
    将所述第一数据与所述第二数据进行比较,将比较结果作为所述处理后得到的数据。
  13. 如权利要求7-12任一所述的集成芯片,其特征在于,所述存储控制器还用于:
    在所述第一读取指令中的增强安全指示信息为第一指定数值的情况下,确定所述安全处理器处于所述增强安全模式下。
  14. 如权利要求13所述的集成芯片,其特征在于,所述增强安全指示信息通过所述集成芯片内部总线上的信号线传输。
  15. 如权利要求1-14任一所述的集成芯片,其特征在于,所述应用处理器还用于:
    分时工作在非安全模式和所述普通安全模式。
  16. 一种集成芯片,其特征在于,包括:
    包含第一信号线和第二信号线的总线,所述第一信号线用于传输增强安全指示信息,所述第二信号线用于传输普通安全指示信息;
    安全处理器,用于在增强安全模式下通过所述总线向存储控制器发送第一读取指令,所述第一读取指令中包含的增强安全指示信息通过所述第一信号线进行传输;
    应用处理器,用于在普通安全模式下通过所述总线向所述存储控制器发送第二读取指令,所述第二读取指令中包含的普通安全指示信息通过所述第二信号线进行传输。
  17. 如权利要求16所述的集成芯片,其特征在于,还包括:
    存储控制器,用于在所述第一读取指令中包含的增强安全指示信息为第一指定数值的情况下,确定所述安全处理器处于所述增强安全模式下。
  18. 如权利要求17所述的集成芯片,其特征在于,所述存储控制器还用于:
    在所述第二读取指令中的普通安全指示信息为第二指定数值的情况下,确定所述应用处理器处于所述普通安全模式下;在所述第二读取指令中的普通安全指示信息为第三指定数值的情况下,确定所述应用处理器处于非安全模式下。
  19. 一种数据处理方法,其特征在于,包括:
    存储控制器接收安全处理器发送的第一读取指令,所述第一读取指令用于请求读取片外存储器中第一地址下的第一数据;
    所述存储控制器确定所述第一读取指令鉴权通过;
    所述存储控制器从所述片外存储器中读取所述第一数据,并将所述第一数据发送给所述安全处理器。
  20. 如权利要求19所述的方法,其特征在于,所述存储控制器确定所述第一读取指令鉴权通过,包括:
    所述存储控制器通过查询本地寄存器确定所述第一地址属于所述片外存储器的第一存储区域,所述第一存储区域被配置为允许普通安全模式下的处理器进行读写操作,以及允许增强安全模式下的处理器进行读操作;
    所述存储控制器确定所述安全处理器处于所述增强安全模式下且所述第一读取指令为读指令。
  21. 如权利要求20所述的方法,其特征在于,所述存储控制器确定所述安全处理器处于所述增强安全模式下,包括:
    所述存储控制器在所述第一读取指令中的增强安全指示信息为第一指定数值的情况 下,确定所述安全处理器处于所述增强安全模式下。
  22. 如权利要求20或21所述的方法,其特征在于,还包括:
    所述存储控制器接收所述安全处理器发送的第一配置信息,所述第一配置信息用于指示所述第一存储区域允许所述普通安全模式下的处理器进行读写操作,以及允许所述增强安全模式下的处理器进行读操作;
    所述存储控制器在所述本地寄存器中保存所述第一配置信息。
  23. 如权利要求19-22任一所述的方法,其特征在于,还包括:
    所述存储控制器在将所述第一数据发送给所述安全处理器之后,接收所述安全处理器发送的第一写入指令,所述第一写入指令用于请求在第二地址下写入处理后得到的数据,所述处理后得到的数据由所述安全处理器对所述第一数据进行处理后得到;
    所述存储控制器确定所述第一写入指令鉴权通过;
    所述存储控制器将所述处理后得到的数据写入所述第二地址。
  24. 如权利要求23所述的方法,其特征在于,所述存储控制器确定所述第一写入指令鉴权通过,包括:
    所述存储控制器通过查询本地寄存器确定所述第二地址属于所述片外存储器的第二存储区域,所述第二存储区域被配置为允许所述增强安全模式下的处理器进行读写操作,以及允许所述普通安全模式下的处理器进行读操作;
    所述存储控制器确定所述安全处理器处于所述增强安全模式下。
  25. 如权利要求24所述的方法,其特征在于,还包括:
    所述存储控制器接收所述安全处理器发送的第二配置信息,所述第二配置信息用于指示所述第二存储区域允许所述增强安全模式下的处理器进行读写操作,以及允许所述普通安全模式下的处理器进行读操作;
    所述存储控制器在所述本地寄存器中保存所述第二配置信息。
  26. 如权利要求23-25任一所述的方法,其特征在于,还包括:
    所述存储控制器在将所述处理后得到的数据写入所述第二地址之后,接收所述应用处理器发送的第二读取指令,所述第二读取指令用于请求读取所述处理后得到的数据;
    所述存储控制器确定所述第二读取指令鉴权通过;
    所述存储控制器读取所述处理后得到的数据,并将所述处理后得到的数据发送给所述应用处理器。
  27. 如权利要求26所述的方法,其特征在于,所述存储控制器确定所述第二读取指令鉴权通过,包括:
    所述存储控制器确定所述第二地址属于所述第二存储区域;
    所述存储控制器确定所述应用处理器处于所述普通安全模式下且所述第二读取指令为读指令。
  28. 如权利要求27所述的方法,其特征在于,所述存储控制器确定所述应用处理器处于所述普通安全模式下,包括:
    所述存储控制器在所述第二读取指令中的普通安全指示信息为第二指定数值的情况下,确定所述应用处理器处于所述普通安全模式下。
PCT/CN2019/092414 2019-06-21 2019-06-21 一种集成芯片及数据处理方法 WO2020252791A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201980097716.9A CN114041133A (zh) 2019-06-21 2019-06-21 一种集成芯片及数据处理方法
EP19933645.4A EP3975018A4 (en) 2019-06-21 2019-06-21 INTEGRATED CHIP AND DATA PROCESSING METHOD
PCT/CN2019/092414 WO2020252791A1 (zh) 2019-06-21 2019-06-21 一种集成芯片及数据处理方法
US17/558,431 US20220114111A1 (en) 2019-06-21 2021-12-21 Integrated chip and data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/092414 WO2020252791A1 (zh) 2019-06-21 2019-06-21 一种集成芯片及数据处理方法

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/558,431 Continuation US20220114111A1 (en) 2019-06-21 2021-12-21 Integrated chip and data processing method

Publications (1)

Publication Number Publication Date
WO2020252791A1 true WO2020252791A1 (zh) 2020-12-24

Family

ID=74037632

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/092414 WO2020252791A1 (zh) 2019-06-21 2019-06-21 一种集成芯片及数据处理方法

Country Status (4)

Country Link
US (1) US20220114111A1 (zh)
EP (1) EP3975018A4 (zh)
CN (1) CN114041133A (zh)
WO (1) WO2020252791A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103119602A (zh) * 2010-08-06 2013-05-22 英特尔公司 在安全环境中提供快速非易失性储存器
CN104981815A (zh) * 2013-03-14 2015-10-14 英特尔公司 用于用安全属性限制cpu事务的方法、装置和系统
CN107851138A (zh) * 2015-08-07 2018-03-27 高通股份有限公司 用于图形处理单元的硬件强制内容保护
CN109314705A (zh) * 2016-07-14 2019-02-05 英特尔公司 使用组加密密钥的用于大规模可伸缩动态多点虚拟私有网络的系统、装置和方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7209998B2 (en) * 2004-02-04 2007-04-24 Qualcomm Incorporated Scalable bus structure
US8775757B2 (en) * 2012-09-25 2014-07-08 Apple Inc. Trust zone support in system on a chip having security enclave processor
KR101952226B1 (ko) * 2014-08-21 2019-02-26 후아웨이 테크놀러지 컴퍼니 리미티드 보안 인터렉션 방법 및 장치
US9547778B1 (en) * 2014-09-26 2017-01-17 Apple Inc. Secure public key acceleration
KR102429906B1 (ko) * 2015-10-13 2022-08-05 삼성전자주식회사 스토리지 장치, 상기 스토리지 장치와 통신하는 호스트 및 상기 스토리지 장치를 포함하는 전자 장치
US10289871B2 (en) * 2015-11-02 2019-05-14 Nxp Usa, Inc. Integrated circuit lifecycle security with redundant and overlapping crosschecks

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103119602A (zh) * 2010-08-06 2013-05-22 英特尔公司 在安全环境中提供快速非易失性储存器
CN104981815A (zh) * 2013-03-14 2015-10-14 英特尔公司 用于用安全属性限制cpu事务的方法、装置和系统
CN107851138A (zh) * 2015-08-07 2018-03-27 高通股份有限公司 用于图形处理单元的硬件强制内容保护
CN109314705A (zh) * 2016-07-14 2019-02-05 英特尔公司 使用组加密密钥的用于大规模可伸缩动态多点虚拟私有网络的系统、装置和方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3975018A4 *

Also Published As

Publication number Publication date
EP3975018A4 (en) 2022-10-19
US20220114111A1 (en) 2022-04-14
EP3975018A1 (en) 2022-03-30
CN114041133A (zh) 2022-02-11

Similar Documents

Publication Publication Date Title
JP6998435B2 (ja) メモリ動作の暗号化
US11423171B2 (en) Protection of privacy and data on smart edge devices
US11848753B2 (en) Securing audio communications
US10360369B2 (en) Securing sensor data
US10225247B2 (en) Bidirectional cryptographic IO for data streams
US20240143802A1 (en) Protection of communications between trusted execution environment and hardware accelerator utilizing enhanced end-to-end encryption and inter-context security
TW201411405A (zh) 保護多安全cpu之計算系統及其方法
EP4168913B1 (en) Securely signing configuration settings
WO2020029254A1 (zh) 一种SoC芯片及总线访问控制方法
US20090064273A1 (en) Methods and systems for secure data entry and maintenance
US20030191943A1 (en) Methods and arrangements to register code
JP2007310601A (ja) マイクロコンピュータおよびそのソフトウェア保護方法
TWI549020B (zh) 運算裝置、方法與系統
WO2020252791A1 (zh) 一种集成芯片及数据处理方法
CN116226870B (zh) 安全增强系统及方法
WO2022236037A1 (en) Systems and methods for enabling accelerator-based secure execution zones

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19933645

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019933645

Country of ref document: EP

Effective date: 20211223