restruct boot and bsp dir for firmware stuff
currently, ACRN hypervisor can either boot from sbl/abl or uefi, that's why we have different firmware method under bsp & boot dirs. but the fact is that we actually have two different operations based on different guest boot mode: 1. de-privilege-boot: ACRN hypervisor will boot VM0 in the same context as native(before entering hypervisor) - it means hypervisor will co-work with ACRN UEFI bootloader, restore the context env and de-privilege this env to VM0 guest. 2. direct-boot: ACRN hypervisor will directly boot different pre-launched VM(including SOS), it will setup guest env by pre-defined configuration, and prepare guest kernel image, ramdisk which fetch from multiboot modules. this patch is trying to: - rename files related with firmware, change them to guest vboot related - restruct all guest boot stuff in boot & bsp dirs into a new boot/guest dir - use de-privilege & direct boot to distinguish two different boot operations this patch is pure file movement, the rename of functions based on old assumption will be in the following patch. Changes to be committed: modified: ../efi-stub/Makefile modified: ../efi-stub/boot.c modified: Makefile modified: arch/x86/cpu.c modified: arch/x86/guest/vm.c modified: arch/x86/init.c modified: arch/x86/irq.c modified: arch/x86/trampoline.c modified: boot/acpi.c renamed: bsp/cmdline.c -> boot/cmdline.c renamed: bsp/firmware_uefi.c -> boot/guest/deprivilege_boot.c renamed: boot/uefi/uefi_boot.c -> boot/guest/deprivilege_boot_info.c renamed: bsp/firmware_sbl.c -> boot/guest/direct_boot.c renamed: boot/sbl/multiboot.c -> boot/guest/direct_boot_info.c renamed: bsp/firmware_wrapper.c -> boot/guest/vboot_wrapper.c modified: boot/include/acpi.h renamed: bsp/include/firmware_uefi.h -> boot/include/guest/deprivilege_boot.h renamed: bsp/include/firmware_sbl.h -> boot/include/guest/direct_boot.h renamed: bsp/include/firmware.h -> boot/include/guest/vboot.h modified: include/arch/x86/multiboot.h Tracked-On: #1842 Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
c336686321
commit
20f97f7559
|
@ -60,7 +60,7 @@ 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/ \
|
||||
-I../hypervisor/include/public -I../hypervisor/include/lib -I../hypervisor/boot/include/guest \
|
||||
-DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding \
|
||||
-Wall -I../fs/ -D$(ARCH) -O2 -I../hypervisor/include/arch/x86 \
|
||||
-include config.h
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "stdlib.h"
|
||||
#include "boot.h"
|
||||
#include "acrn_common.h"
|
||||
#include "firmware_uefi.h"
|
||||
#include "deprivilege_boot.h"
|
||||
#include "MpService.h"
|
||||
|
||||
EFI_SYSTEM_TABLE *sys_table;
|
||||
|
|
|
@ -116,8 +116,8 @@ INCLUDE_PATH += include/debug
|
|||
INCLUDE_PATH += include/public
|
||||
INCLUDE_PATH += include/dm
|
||||
INCLUDE_PATH += include/hw
|
||||
INCLUDE_PATH += bsp/include
|
||||
INCLUDE_PATH += boot/include
|
||||
INCLUDE_PATH += boot/include/guest
|
||||
INCLUDE_PATH += $(HV_OBJDIR)/include
|
||||
INCLUDE_PATH += arch/x86/configs/$(CONFIG_BOARD)
|
||||
INCLUDE_PATH += scenarios/$(SCENARIO_NAME)
|
||||
|
@ -155,9 +155,15 @@ ifneq (,$(wildcard scenarios/$(SCENARIO_NAME)/pt_dev.c))
|
|||
C_SRCS += scenarios/$(SCENARIO_NAME)/pt_dev.c
|
||||
endif
|
||||
|
||||
|
||||
C_SRCS += boot/acpi.c
|
||||
C_SRCS += boot/dmar_parse.c
|
||||
C_SRCS += boot/cmdline.c
|
||||
C_SRCS += boot/guest/vboot_wrapper.c
|
||||
C_SRCS += boot/guest/deprivilege_boot.c
|
||||
C_SRCS += boot/guest/deprivilege_boot_info.c
|
||||
C_SRCS += boot/guest/direct_boot.c
|
||||
C_SRCS += boot/guest/direct_boot_info.c
|
||||
|
||||
S_SRCS += arch/x86/idt.S
|
||||
C_SRCS += arch/x86/ioapic.c
|
||||
C_SRCS += arch/x86/lapic.c
|
||||
|
@ -237,15 +243,8 @@ C_SRCS += dm/vpci/pci_pt.c
|
|||
C_SRCS += dm/vpci/vmsi.c
|
||||
C_SRCS += dm/vpci/vmsix.c
|
||||
|
||||
C_SRCS += bsp/firmware_wrapper.c
|
||||
C_SRCS += bsp/firmware_sbl.c
|
||||
C_SRCS += bsp/firmware_uefi.c
|
||||
C_SRCS += bsp/cmdline.c
|
||||
C_SRCS += bsp/const_dmar.c
|
||||
|
||||
C_SRCS += boot/uefi/uefi_boot.c
|
||||
C_SRCS += boot/sbl/multiboot.c
|
||||
|
||||
# retpoline support
|
||||
ifeq (true, $(shell [ $(GCC_MAJOR) -eq 7 ] && [ $(GCC_MINOR) -ge 3 ] && echo true))
|
||||
CFLAGS += -mindirect-branch=thunk-extern -mindirect-branch-register
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <ld_sym.h>
|
||||
#include <logmsg.h>
|
||||
#include <cat.h>
|
||||
#include <firmware.h>
|
||||
#include <vboot.h>
|
||||
|
||||
#define CPU_UP_TIMEOUT 100U /* millisecond */
|
||||
#define CPU_DOWN_TIMEOUT 100U /* millisecond */
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <pgtable.h>
|
||||
#include <mmu.h>
|
||||
#include <logmsg.h>
|
||||
#include <firmware.h>
|
||||
#include <vboot.h>
|
||||
#include <board.h>
|
||||
|
||||
vm_sw_loader_t vm_sw_loader;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <vmx.h>
|
||||
#include <vm.h>
|
||||
#include <logmsg.h>
|
||||
#include <firmware.h>
|
||||
#include <vboot.h>
|
||||
#include <seed.h>
|
||||
|
||||
/* Push sp magic to top of stack for call trace */
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <ioapic.h>
|
||||
#include <lapic.h>
|
||||
#include <softirq.h>
|
||||
#include <firmware.h>
|
||||
#include <vboot.h>
|
||||
#include <dump.h>
|
||||
#include <logmsg.h>
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <per_cpu.h>
|
||||
#include <trampoline.h>
|
||||
#include <reloc.h>
|
||||
#include <firmware.h>
|
||||
#include <vboot.h>
|
||||
#include <ld_sym.h>
|
||||
|
||||
static uint64_t trampoline_start16_paddr;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
#include <types.h>
|
||||
#include <rtl.h>
|
||||
#include <firmware.h>
|
||||
#include <vboot.h>
|
||||
#include "acpi_priv.h"
|
||||
#include "acpi.h"
|
||||
#include <pgtable.h>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <lapic.h>
|
||||
#include <per_cpu.h>
|
||||
#include <multiboot.h>
|
||||
#include <firmware_uefi.h>
|
||||
#include <deprivilege_boot.h>
|
||||
|
||||
static struct uefi_context uefi_ctx;
|
||||
static struct lapic_regs uefi_lapic_regs;
|
|
@ -9,7 +9,7 @@
|
|||
#include <per_cpu.h>
|
||||
#include <guest/vm.h>
|
||||
#include <boot_context.h>
|
||||
#include <firmware_uefi.h>
|
||||
#include <deprivilege_boot.h>
|
||||
|
||||
static int32_t uefi_sw_loader(struct acrn_vm *vm)
|
||||
{
|
|
@ -9,7 +9,7 @@
|
|||
#include <types.h>
|
||||
#include <e820.h>
|
||||
#include <cpu.h>
|
||||
#include <firmware_sbl.h>
|
||||
#include <direct_boot.h>
|
||||
|
||||
static void sbl_init(void)
|
||||
{
|
|
@ -9,9 +9,9 @@
|
|||
#include <types.h>
|
||||
#include <pgtable.h>
|
||||
#include <acpi.h>
|
||||
#include <firmware.h>
|
||||
#include <firmware_sbl.h>
|
||||
#include <firmware_uefi.h>
|
||||
#include <vboot.h>
|
||||
#include <direct_boot.h>
|
||||
#include <deprivilege_boot.h>
|
||||
|
||||
static struct firmware_operations *firmware_ops;
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#define FIRMWARE_UEFI_H
|
||||
|
||||
#include <firmware.h>
|
||||
#include <vboot.h>
|
||||
|
||||
struct uefi_context {
|
||||
struct acrn_vcpu_regs vcpu_regs;
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#define FIRMWARE_SBL_H
|
||||
|
||||
#include <firmware.h>
|
||||
#include <vboot.h>
|
||||
|
||||
struct firmware_operations* sbl_get_firmware_operations(void);
|
||||
int32_t sbl_init_vm_boot_info(struct acrn_vm *vm);
|
|
@ -32,4 +32,6 @@ void *firmware_get_rsdp(void);
|
|||
void firmware_init_irq(void);
|
||||
int32_t firmware_init_vm_boot_info(struct acrn_vm *vm);
|
||||
|
||||
int32_t parse_hv_cmdline(void);
|
||||
|
||||
#endif /* end of include guard: FIRMWARE_H */
|
|
@ -84,9 +84,6 @@ struct multiboot_module {
|
|||
uint32_t mm_reserved;
|
||||
};
|
||||
|
||||
int32_t parse_hv_cmdline(void);
|
||||
int32_t init_vm_boot_info(struct acrn_vm *vm);
|
||||
|
||||
/* boot_regs store the multiboot header address */
|
||||
extern uint32_t boot_regs[2];
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue