UEFI: bug fix on delivering RSDP

With current code, memcpy rsdp to 0x500 maybe overwrite uefi
code/data region.

So remove the legacy BIOS deliver method of RSDP, which need copy
the RSDP to EBDA space which is addressed by the 16bit pointer
at 0x40E or upper memory BIOS space 0xe0000-0xfffff. And just
deliver the pointer of RSDP, which is already saved in UEFI system
table, to hypervisor.

Create a function named efi_init() to separate efi initialize code.

Signed-off-by: Zheng, Gen <gen.zheng@intel.com>
This commit is contained in:
Zheng, Gen
2018-03-24 14:17:23 +08:00
committed by Jack Ren
parent 8d67f292ef
commit 1f3acb3dd9
5 changed files with 43 additions and 16 deletions

View File

@@ -37,9 +37,10 @@ typedef struct {
} __attribute__((packed)) dt_addr_t;
struct efi_ctx {
void* entry;
void* handle;
void* table;
void *entry;
void *handle;
void *table;
void *rsdp;
dt_addr_t gdt;
dt_addr_t idt;
uint16_t tr_sel;
@@ -59,4 +60,6 @@ struct efi_ctx {
uint64_t efer;
}__attribute__((packed));
void *get_rsdp_from_uefi(void);
#endif /* UEFI_H*/