efi-stub: minor change for uefi refactor
Include these changes: - substitute efi_context with uefi_context - remove EFI_STUB from Kconfig - remove EFI_ Signed-off-by: Tw <wei.tan@intel.com>
This commit is contained in:
parent
9b24620e16
commit
334382f9ef
|
@ -60,9 +60,9 @@ LDSCRIPT := $(GNUEFI_DIR)/elf_$(ARCH)_efi.lds
|
|||
INCDIR := $(SYSROOT)/usr/include
|
||||
|
||||
CFLAGS=-I. -I.. -I../hypervisor/include/arch/x86/guest -I$(INCDIR)/efi -I$(INCDIR)/efi/$(ARCH) \
|
||||
-I../hypervisor/include/public -I../hypervisor/include/lib -I../hypervisor/bsp/include/uefi \
|
||||
-I../hypervisor/include/public -I../hypervisor/include/lib -I../hypervisor/bsp/include/ \
|
||||
-DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding \
|
||||
-Wall -I../fs/ -D$(ARCH) -O2 \
|
||||
-Wall -I../fs/ -D$(ARCH) -O2 -I../hypervisor/include/arch/x86 \
|
||||
-include config.h
|
||||
|
||||
CFLAGS += -mno-mmx -mno-sse -mno-sse2 -mno-80387 -mno-fp-ret-in-387
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "stdlib.h"
|
||||
#include "boot.h"
|
||||
#include "acrn_common.h"
|
||||
#include "uefi.h"
|
||||
#include "firmware_uefi.h"
|
||||
#include "MpService.h"
|
||||
|
||||
EFI_SYSTEM_TABLE *sys_table;
|
||||
|
@ -88,7 +88,7 @@ enable_disable_all_ap(BOOLEAN enable)
|
|||
}
|
||||
|
||||
static inline void hv_jump(EFI_PHYSICAL_ADDRESS hv_start,
|
||||
struct multiboot_info *mbi, struct efi_context *efi_ctx)
|
||||
struct multiboot_info *mbi, struct uefi_context *efi_ctx)
|
||||
{
|
||||
hv_func hf;
|
||||
|
||||
|
@ -243,7 +243,7 @@ switch_to_guest_mode(EFI_HANDLE image, EFI_PHYSICAL_ADDRESS hv_hpa)
|
|||
EFI_STATUS err;
|
||||
struct multiboot_mmap *mmap;
|
||||
struct multiboot_info *mbi;
|
||||
struct efi_context *efi_ctx;
|
||||
struct uefi_context *efi_ctx;
|
||||
struct acpi_table_rsdp *rsdp = NULL;
|
||||
int32_t i;
|
||||
EFI_CONFIGURATION_TABLE *config_table;
|
||||
|
@ -336,6 +336,7 @@ static inline EFI_STATUS isspace(CHAR8 ch)
|
|||
return ((uint8_t)ch <= ' ');
|
||||
}
|
||||
|
||||
#define DEFAULT_UEFI_OS_LOADER_NAME "\\EFI\\org.clearlinux\\bootloaderx64.efi"
|
||||
/**
|
||||
* efi_main - The entry point for the OS loader image.
|
||||
* @image: firmware-allocated handle that identifies the image
|
||||
|
@ -401,7 +402,7 @@ efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *_table)
|
|||
* bootloader name to be used. Fall back to the default bootloader
|
||||
* as specified in config.h
|
||||
*/
|
||||
bootloader_name = ch8_2_ch16(CONFIG_UEFI_OS_LOADER_NAME);
|
||||
bootloader_name = ch8_2_ch16(DEFAULT_UEFI_OS_LOADER_NAME);
|
||||
}
|
||||
|
||||
section = ".hv";
|
||||
|
|
|
@ -76,7 +76,7 @@ typedef void(*hv_func)(int32_t, struct multiboot_info*);
|
|||
#define MBOOT_MMAP_NUMS 256
|
||||
#define MBOOT_MMAP_SIZE (sizeof(struct multiboot_mmap) * MBOOT_MMAP_NUMS)
|
||||
#define MBOOT_INFO_SIZE (sizeof(struct multiboot_info))
|
||||
#define BOOT_CTX_SIZE (sizeof(struct efi_context))
|
||||
#define BOOT_CTX_SIZE (sizeof(struct uefi_context))
|
||||
#define EFI_BOOT_MEM_SIZE \
|
||||
(MBOOT_MMAP_SIZE + MBOOT_INFO_SIZE + BOOT_CTX_SIZE)
|
||||
#define MBOOT_MMAP_PTR(addr) \
|
||||
|
@ -84,7 +84,7 @@ typedef void(*hv_func)(int32_t, struct multiboot_info*);
|
|||
#define MBOOT_INFO_PTR(addr) \
|
||||
((struct multiboot_info *)((VOID *)(addr) + MBOOT_MMAP_SIZE))
|
||||
#define BOOT_CTX_PTR(addr) \
|
||||
((struct efi_context *)((VOID *)(addr) + MBOOT_MMAP_SIZE + MBOOT_INFO_SIZE))
|
||||
((struct uefi_context *)((VOID *)(addr) + MBOOT_MMAP_SIZE + MBOOT_INFO_SIZE))
|
||||
|
||||
|
||||
struct efi_info {
|
||||
|
|
|
@ -301,16 +301,6 @@ config GPU_SBDF
|
|||
00:02.0 in DRHD segment 0, this SBDF would be (0 << 16) | (0 << 8) |
|
||||
(2 << 3) | (0 << 0), i.e. 0x00000010.
|
||||
|
||||
config EFI_STUB
|
||||
bool "Enable EFI stub"
|
||||
depends on PLATFORM_UEFI
|
||||
default y
|
||||
|
||||
config UEFI_OS_LOADER_NAME
|
||||
string "UEFI OS loader name"
|
||||
depends on PLATFORM_UEFI
|
||||
default "\\EFI\\org.clearlinux\\bootloaderx64.efi"
|
||||
|
||||
config MTRR_ENABLED
|
||||
bool "Memory Type Range Registers (MTRR) enabled"
|
||||
default y
|
||||
|
|
Loading…
Reference in New Issue