mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-14 13:30:01 +00:00
trusty: implement hypercall to initialize trusty
UOS_Loader will trigger boot of Trusty-OS by HC_INITIALIZE_TRUSTY. UOS_Loader will load trusty image and alloc runtime memory for trusty. UOS_Loader will transfer these information include trusty runtime memory base address, entry address and memory size to hypervisor by trusty_boot_param structure. In hypervisor, once HC_INITIALIZE_TRUSTY received, it will create EPT for Secure World, save Normal World vCPU context, init Secure World vCPU context and switch World state to Secure World. Signed-off-by: Qi Yadong <yadong.qi@intel.com>
This commit is contained in:
@@ -95,7 +95,7 @@
|
||||
|
||||
/* Trusty */
|
||||
#define HC_ID_TRUSTY_BASE 0x70UL
|
||||
#define HC_LAUNCH_TRUSTY _HC_ID(HC_ID, HC_ID_TRUSTY_BASE + 0x00)
|
||||
#define HC_INITIALIZE_TRUSTY _HC_ID(HC_ID, HC_ID_TRUSTY_BASE + 0x00)
|
||||
#define HC_WORLD_SWITCH _HC_ID(HC_ID, HC_ID_TRUSTY_BASE + 0x01)
|
||||
#define HC_GET_SEC_INFO _HC_ID(HC_ID, HC_ID_TRUSTY_BASE + 0x02)
|
||||
|
||||
@@ -226,6 +226,26 @@ struct hc_api_version {
|
||||
uint32_t minor_version;
|
||||
} __aligned(8);
|
||||
|
||||
/**
|
||||
* Trusty boot params, used for HC_INITIALIZE_TRUSTY
|
||||
*/
|
||||
struct trusty_boot_param {
|
||||
/** sizeof this structure */
|
||||
uint32_t size_of_this_struct;
|
||||
|
||||
/** version of this structure */
|
||||
uint32_t version;
|
||||
|
||||
/** trusty runtime memory base address */
|
||||
uint32_t base_addr;
|
||||
|
||||
/** trusty entry point */
|
||||
uint32_t entry_point;
|
||||
|
||||
/** trusty runtime memory size */
|
||||
uint32_t mem_size;
|
||||
} __aligned(8);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
Reference in New Issue
Block a user