mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 08:50:27 +00:00
UEFI: change the acrn boot flow on uefi platform
With current code, the acrn.efi is inserted between cl bootloader.efi and bzImage.efi that destroyed the chain relationship of cl bootloader and cl bzImage.efi. And the following is current boot flow: UEFI -> cl bootloader.efi -> acrn.efi -> bzImage.efi The purpose of this patch is resume above chain relationship, and make uefi vm return to efi stub context once launched, then continue to call the UEFI API(LoadImage/StartImage) to launch cl bootloader or other bootloaders. So the boot flow will change to be as below: UEFI -> acrn.efi -> cl bootloader.efi -> bzImage.efi After applying this patch, the code related to loading bzImage.efi and getting pe_entry is unnecessary due to the bzImage.efi will not be launched by acrn.efi directly, so it is removed. Signed-off-by: Zheng, Gen <gen.zheng@intel.com>
This commit is contained in:
@@ -37,9 +37,7 @@ typedef struct {
|
||||
} __attribute__((packed)) dt_addr_t;
|
||||
|
||||
struct efi_ctx {
|
||||
void *entry;
|
||||
void *handle;
|
||||
void *table;
|
||||
uint64_t rip;
|
||||
void *rsdp;
|
||||
dt_addr_t gdt;
|
||||
dt_addr_t idt;
|
||||
@@ -56,8 +54,23 @@ struct efi_ctx {
|
||||
uint16_t ds_sel;
|
||||
uint16_t fs_sel;
|
||||
uint16_t gs_sel;
|
||||
uint64_t rsp;
|
||||
uint64_t efer;
|
||||
uint64_t rax;
|
||||
uint64_t rbx;
|
||||
uint64_t rcx;
|
||||
uint64_t rdx;
|
||||
uint64_t rdi;
|
||||
uint64_t rsi;
|
||||
uint64_t rsp;
|
||||
uint64_t rbp;
|
||||
uint64_t r8;
|
||||
uint64_t r9;
|
||||
uint64_t r10;
|
||||
uint64_t r11;
|
||||
uint64_t r12;
|
||||
uint64_t r13;
|
||||
uint64_t r14;
|
||||
uint64_t r15;
|
||||
}__attribute__((packed));
|
||||
|
||||
void *get_rsdp_from_uefi(void);
|
||||
|
Reference in New Issue
Block a user