| CPC G06F 21/64 (2013.01) [G06F 21/572 (2013.01); G06F 21/71 (2013.01)] | 11 Claims |

|
1. A method for implementing a firmware root-of-trust, wherein the method comprises: setting a storage-medium for storing state-data of the firmware root-of-trust; integrating a processing-logic of an instruction of the firmware root-of-trust into a system-firmware; initializing the firmware root-of-trust, according to the state-data of the firmware root-of-trust and a startup-command of the firmware root-of-trust; creating a node of a device-tree for the firmware root-of-trust, for an operating-system to load a driver-program corresponding to the firmware root-of-trust; and registering an instruction-interface of the firmware root-of-trust into an interface-list; and wherein the initializing the firmware root-of-trust according to the state-data of the firmware root-of-trust and the startup-command of the firmware root-of-trust, comprises: obtaining the state-data of the firmware root-of-trust from the storage-medium; configuring an operating-state of the firmware root-of-trust according to the state-data of the firmware root-of-trust; loading persistent-data stored in the firmware root-of-trust from a user; and executing the startup-command of the firmware root-of-trust, to initialize internal data of the firmware root-of-trust;
wherein the method further comprises: executing the instruction of the firmware root-of-trust through the driver-program, and obtaining a processing-result of the instruction of the firmware root-of-trust; and wherein the executing the instruction of the firmware root-of-trust through the driver-program and obtaining the processing-result of the instruction of the firmware root-of-trust, comprises: receiving an access-request for the firmware root-of-trust indicating that the instruction of the firmware root-of-trust input from the user is received, through an operating-interface of the firmware root-of-trust provided by the operating-system; storing current states of a stack and a register; calling the instruction-interface to process the instruction of the firmware root-of-trust; obtaining a processing-result of the instruction-interface; restoring states of the stack and the register; and returning the processing-result of the instruction of the firmware root-of-trust.
|