hv: refactor seed management

New component to maintain seed retrieval and derivation: seed.

1. Retrieve seed from bootloader in Hypervisor's boot stage.
2. Derive virtual seed for Guest/Trusty if need.

Tracked-On: #2724
Signed-off-by: Qi Yadong <yadong.qi@intel.com>
Reviewed-by: Zhu Bing <bing.zhu@intel.com>
This commit is contained in:
Qi Yadong
2019-03-06 13:24:55 +08:00
committed by wenlingz
parent 4d0419ed71
commit 95d1e40283
11 changed files with 572 additions and 131 deletions

View File

@@ -15,6 +15,7 @@
#include <vm.h>
#include <logmsg.h>
#include <firmware.h>
#include <seed.h>
/* Push sp magic to top of stack for call trace */
#define SWITCH_TO(rsp, to) \
@@ -70,6 +71,8 @@ static void init_primary_cpu_post(void)
init_cpu_post(BOOT_CPU_ID);
init_seed();
init_debug_post(BOOT_CPU_ID);
enter_guest_mode(BOOT_CPU_ID);