diff --git a/hypervisor/Makefile b/hypervisor/Makefile index 41ededdb3..369edf141 100644 --- a/hypervisor/Makefile +++ b/hypervisor/Makefile @@ -296,7 +296,7 @@ endif .PHONY: all all: lib $(HV_OBJDIR)/$(HV_FILE).32.out $(HV_OBJDIR)/$(HV_FILE).bin -ifeq ($(CONFIG_PLATFORM_SBL),y) +ifeq ($(FIRMWARE),sbl) install: lib $(HV_OBJDIR)/$(HV_FILE).32.out ifeq ($(BOARD),apl-up2) install -D $(HV_OBJDIR)/$(HV_FILE).32.out $(DESTDIR)/usr/lib/acrn/$(HV_FILE).apl-up2.sbl diff --git a/hypervisor/arch/x86/Kconfig b/hypervisor/arch/x86/Kconfig index 976252c4e..f2742a51f 100644 --- a/hypervisor/arch/x86/Kconfig +++ b/hypervisor/arch/x86/Kconfig @@ -1,22 +1,3 @@ -choice - prompt "Type of boot firmware (BIOS) on the target platform" - default PLATFORM_SBL - help - The boot firmware (BIOS) used on the target board. - -config PLATFORM_UEFI - bool "UEFI" - select EFI_STUB - help - Select this if the target board uses UEFI. - -config PLATFORM_SBL - bool "SBL" - help - Select this if the target board uses Slim Bootloader. - -endchoice - choice prompt "Hypervisor mode" default SHARING_MODE @@ -32,7 +13,6 @@ config SHARING_MODE config PARTITION_MODE bool "Partition mode" - depends on PLATFORM_SBL help In partition mode, every VM owns part of the physical resources exclusively and runs with minimal interference from the others. The VM @@ -70,8 +50,7 @@ config MAX_VM_NUM config MAX_VCPUS_PER_VM int "Maximum number of VCPUs per VM" range 1 8 - default 4 if PLATFORM_SBL - default 8 if PLATFORM_UEFI + default 8 help The maximum number of virtual CPUs the hypervisor can support in a single VM. @@ -228,8 +207,7 @@ config LOW_RAM_SIZE config HV_RAM_START hex "2M-aligned Start physical address of the RAM region used by the hypervisor" - default 0x6e000000 if PLATFORM_SBL - default 0x00400000 if PLATFORM_UEFI + default 0x00400000 help A 64-bit integer indicating the base physical address where the hypervisor should be loaded. If RELOC is disabled, the bootloader @@ -243,8 +221,7 @@ config HV_RAM_START config HV_RAM_SIZE hex "Size of the RAM region used by the hypervisor" - default 0x08000000 if PLATFORM_SBL - default 0x0b800000 if PLATFORM_UEFI + default 0x0b800000 help A 64-bit integer indicating the size of RAM used by the hypervisor. It is ensured at link time that the footprint of the hypervisor @@ -252,24 +229,21 @@ config HV_RAM_SIZE config PLATFORM_RAM_SIZE hex "Size of the physical platform RAM" - default 0x200000000 if PLATFORM_SBL - default 0x400000000 if PLATFORM_UEFI + default 0x400000000 help A 64-bit integer indicating the size of the physical platform RAM (MMIO not included). config SOS_RAM_SIZE hex "Size of the Service OS (SOS) RAM" - default 0x200000000 if PLATFORM_SBL - default 0x400000000 if PLATFORM_UEFI + default 0x400000000 help A 64-bit integer indicating the size of the Service OS RAM (MMIO not included). config UOS_RAM_SIZE hex "Size of the User OS (UOS) RAM" - default 0x100000000 if PLATFORM_SBL - default 0x200000000 if PLATFORM_UEFI + default 0x200000000 help A 64-bit integer indicating the size of the User OS RAM (MMIO not included). Now we assume each UOS uses same amount of RAM size. @@ -285,8 +259,7 @@ config CONSTANT_ACPI config DMAR_PARSE_ENABLED bool "Enable ACPI DMA Remapping tables parsing" - default n if PLATFORM_SBL - default y if PLATFORM_UEFI + default y help Whether to parse the ACPI DMA Remapping tables at runtime. @@ -327,8 +300,7 @@ config MAX_IR_ENTRIES config IOMMU_BUS_NUM hex "Highest PCI bus ID used during IOMMU initialization" - default 0x10 if PLATFORM_SBL - default 0x100 if PLATFORM_UEFI + default 0x100 help Any BDF with a bus ID smaller than this number is mapped to the IOMMU domain of the first VM. diff --git a/hypervisor/arch/x86/configs/apl-mrb.config b/hypervisor/arch/x86/configs/apl-mrb.config index ad53b50f6..85bdab064 100644 --- a/hypervisor/arch/x86/configs/apl-mrb.config +++ b/hypervisor/arch/x86/configs/apl-mrb.config @@ -3,3 +3,10 @@ CONFIG_BOARD="apl-mrb" CONFIG_SERIAL_PCI=y CONFIG_COM_BASE=0x3e8 CONFIG_COM_IRQ=6 +CONFIG_HV_RAM_START=0x6e000000 +CONFIG_HV_RAM_SIZE=0x07800000 +CONFIG_PLATFORM_RAM_SIZE=0x200000000 +CONFIG_SOS_RAM_SIZE=0x200000000 +CONFIG_UOS_RAM_SIZE=0x100000000 +CONFIG_DMAR_PARSE_ENABLED=n +CONFIG_IOMMU_BUS_NUM=0x10 diff --git a/hypervisor/arch/x86/configs/apl-up2.config b/hypervisor/arch/x86/configs/apl-up2.config index 0025c0ab1..66a47c2a7 100644 --- a/hypervisor/arch/x86/configs/apl-up2.config +++ b/hypervisor/arch/x86/configs/apl-up2.config @@ -4,3 +4,4 @@ CONFIG_SERIAL_PCI=y CONFIG_SERIAL_PCI_BDF="0:18.0" CONFIG_COM_IRQ=6 CONFIG_DMAR_PARSE_ENABLED=y +CONFIG_HV_RAM_START=0x5e000000 diff --git a/hypervisor/scripts/kconfig/kconfig.mk b/hypervisor/scripts/kconfig/kconfig.mk index 0792c814c..613280416 100644 --- a/hypervisor/scripts/kconfig/kconfig.mk +++ b/hypervisor/scripts/kconfig/kconfig.mk @@ -29,13 +29,6 @@ override RELEASE := n endif endif -OVERWRITTEN := "" -ifeq ($(FIRMWARE),sbl) -OVERWRITTEN += "PLATFORM_SBL=y" -else ifeq ($(FIRMWARE),uefi) -OVERWRITTEN += "PLATFORM_UEFI=y" -endif - -include $(HV_OBJDIR)/$(HV_CONFIG_MK) ifeq ($(shell [ $(HV_OBJDIR)/$(HV_CONFIG) -nt $(HV_OBJDIR)/$(HV_CONFIG_MK) ] && echo 1),1) # config.mk may be outdated if .config has been overwritten. To update config.mk @@ -93,7 +86,7 @@ oldconfig: $(KCONFIG_DEPS) @BOARD=$(TARGET_BOARD) \ python3 $(KCONFIG_DIR)/silentoldconfig.py Kconfig \ $(HV_OBJDIR)/$(HV_CONFIG) \ - RELEASE=$(RELEASE) $(OVERWRITTEN) + RELEASE=$(RELEASE) # Minimize the current .config. This target can be used to generate a defconfig # for future use.