mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-08 20:29:40 +00:00
modularization: boot component
Boot component prepares the very basic platform boot env. It finally call into platform initilization entries: - bsp_boot_init & cpu_secondary_init for start up - or restore_s3_context for wakeup this patch is the final one, it did some code clean up and move some definition from vm0_boot.h to boot_context.h. after this patch, the boot component include files: arch/x86/boot/cpu_primary.S arch/x86/boot/trampoline.S arch/x86/boot/cpu_save_boot_ctx.S arch/x86/boot/idt.S boot/reloc.c boot/include/reloc.h include/arch/x86/boot/idt.h include/arch/x86/boot/boot_context.h Tracked-On: #1842 Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <hypervisor.h>
|
||||
#include <multiboot.h>
|
||||
#include <boot_context.h>
|
||||
#include <vm0_boot.h>
|
||||
|
||||
#ifdef CONFIG_EFI_STUB
|
||||
@@ -36,7 +37,7 @@ int uefi_sw_loader(struct acrn_vm *vm)
|
||||
{
|
||||
int ret = 0;
|
||||
struct acrn_vcpu *vcpu = get_primary_vcpu(vm);
|
||||
struct acrn_vcpu_regs *vcpu_regs = &vm0_boot_context;
|
||||
struct acrn_vcpu_regs *vcpu_regs = &boot_context;
|
||||
|
||||
ASSERT(vm != NULL, "Incorrect argument");
|
||||
|
||||
@@ -47,8 +48,8 @@ int uefi_sw_loader(struct acrn_vm *vm)
|
||||
/* For UEFI platform, the bsp init regs come from two places:
|
||||
* 1. saved in efi_boot: gpregs, rip
|
||||
* 2. saved when HV started: other registers
|
||||
* We copy the info saved in efi_boot to vm0_boot_context and
|
||||
* init bsp with vm0_boot_context.
|
||||
* We copy the info saved in efi_boot to boot_context and
|
||||
* init bsp with boot_context.
|
||||
*/
|
||||
memcpy_s(&(vcpu_regs->gprs), sizeof(struct acrn_gp_regs),
|
||||
&(efi_ctx->vcpu_regs.gprs), sizeof(struct acrn_gp_regs));
|
||||
|
Reference in New Issue
Block a user