hv: remove CONFIG_PLATFORM_[SBL|UEFI] and UEFI_STUB

ACRN now has unified the way to handle SBL and UEFI.
so just remove corresponding macros in Kconfig.
BTW, default configuration in Kconfig is for UEFI boards.

Tracked-On: #2708
Signed-off-by: Tw <wei.tan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Tw 2019-03-01 15:19:40 +08:00 committed by wenlingz
parent 334382f9ef
commit ce387084ed
5 changed files with 18 additions and 45 deletions

View File

@ -296,7 +296,7 @@ endif
.PHONY: all .PHONY: all
all: lib $(HV_OBJDIR)/$(HV_FILE).32.out $(HV_OBJDIR)/$(HV_FILE).bin 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 install: lib $(HV_OBJDIR)/$(HV_FILE).32.out
ifeq ($(BOARD),apl-up2) ifeq ($(BOARD),apl-up2)
install -D $(HV_OBJDIR)/$(HV_FILE).32.out $(DESTDIR)/usr/lib/acrn/$(HV_FILE).apl-up2.sbl install -D $(HV_OBJDIR)/$(HV_FILE).32.out $(DESTDIR)/usr/lib/acrn/$(HV_FILE).apl-up2.sbl

View File

@ -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 choice
prompt "Hypervisor mode" prompt "Hypervisor mode"
default SHARING_MODE default SHARING_MODE
@ -32,7 +13,6 @@ config SHARING_MODE
config PARTITION_MODE config PARTITION_MODE
bool "Partition mode" bool "Partition mode"
depends on PLATFORM_SBL
help help
In partition mode, every VM owns part of the physical resources In partition mode, every VM owns part of the physical resources
exclusively and runs with minimal interference from the others. The VM exclusively and runs with minimal interference from the others. The VM
@ -70,8 +50,7 @@ config MAX_VM_NUM
config MAX_VCPUS_PER_VM config MAX_VCPUS_PER_VM
int "Maximum number of VCPUs per VM" int "Maximum number of VCPUs per VM"
range 1 8 range 1 8
default 4 if PLATFORM_SBL default 8
default 8 if PLATFORM_UEFI
help help
The maximum number of virtual CPUs the hypervisor can support in a The maximum number of virtual CPUs the hypervisor can support in a
single VM. single VM.
@ -228,8 +207,7 @@ config LOW_RAM_SIZE
config HV_RAM_START config HV_RAM_START
hex "2M-aligned Start physical address of the RAM region used by the hypervisor" hex "2M-aligned Start physical address of the RAM region used by the hypervisor"
default 0x6e000000 if PLATFORM_SBL default 0x00400000
default 0x00400000 if PLATFORM_UEFI
help help
A 64-bit integer indicating the base physical address where the A 64-bit integer indicating the base physical address where the
hypervisor should be loaded. If RELOC is disabled, the bootloader hypervisor should be loaded. If RELOC is disabled, the bootloader
@ -243,8 +221,7 @@ config HV_RAM_START
config HV_RAM_SIZE config HV_RAM_SIZE
hex "Size of the RAM region used by the hypervisor" hex "Size of the RAM region used by the hypervisor"
default 0x08000000 if PLATFORM_SBL default 0x0b800000
default 0x0b800000 if PLATFORM_UEFI
help help
A 64-bit integer indicating the size of RAM used by the hypervisor. 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 It is ensured at link time that the footprint of the hypervisor
@ -252,24 +229,21 @@ config HV_RAM_SIZE
config PLATFORM_RAM_SIZE config PLATFORM_RAM_SIZE
hex "Size of the physical platform RAM" hex "Size of the physical platform RAM"
default 0x200000000 if PLATFORM_SBL default 0x400000000
default 0x400000000 if PLATFORM_UEFI
help help
A 64-bit integer indicating the size of the physical platform RAM A 64-bit integer indicating the size of the physical platform RAM
(MMIO not included). (MMIO not included).
config SOS_RAM_SIZE config SOS_RAM_SIZE
hex "Size of the Service OS (SOS) RAM" hex "Size of the Service OS (SOS) RAM"
default 0x200000000 if PLATFORM_SBL default 0x400000000
default 0x400000000 if PLATFORM_UEFI
help help
A 64-bit integer indicating the size of the Service OS RAM (MMIO not A 64-bit integer indicating the size of the Service OS RAM (MMIO not
included). included).
config UOS_RAM_SIZE config UOS_RAM_SIZE
hex "Size of the User OS (UOS) RAM" hex "Size of the User OS (UOS) RAM"
default 0x100000000 if PLATFORM_SBL default 0x200000000
default 0x200000000 if PLATFORM_UEFI
help help
A 64-bit integer indicating the size of the User OS RAM (MMIO not 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. included). Now we assume each UOS uses same amount of RAM size.
@ -285,8 +259,7 @@ config CONSTANT_ACPI
config DMAR_PARSE_ENABLED config DMAR_PARSE_ENABLED
bool "Enable ACPI DMA Remapping tables parsing" bool "Enable ACPI DMA Remapping tables parsing"
default n if PLATFORM_SBL default y
default y if PLATFORM_UEFI
help help
Whether to parse the ACPI DMA Remapping tables at runtime. Whether to parse the ACPI DMA Remapping tables at runtime.
@ -327,8 +300,7 @@ config MAX_IR_ENTRIES
config IOMMU_BUS_NUM config IOMMU_BUS_NUM
hex "Highest PCI bus ID used during IOMMU initialization" hex "Highest PCI bus ID used during IOMMU initialization"
default 0x10 if PLATFORM_SBL default 0x100
default 0x100 if PLATFORM_UEFI
help help
Any BDF with a bus ID smaller than this number is mapped to Any BDF with a bus ID smaller than this number is mapped to
the IOMMU domain of the first VM. the IOMMU domain of the first VM.

View File

@ -3,3 +3,10 @@ CONFIG_BOARD="apl-mrb"
CONFIG_SERIAL_PCI=y CONFIG_SERIAL_PCI=y
CONFIG_COM_BASE=0x3e8 CONFIG_COM_BASE=0x3e8
CONFIG_COM_IRQ=6 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

View File

@ -4,3 +4,4 @@ CONFIG_SERIAL_PCI=y
CONFIG_SERIAL_PCI_BDF="0:18.0" CONFIG_SERIAL_PCI_BDF="0:18.0"
CONFIG_COM_IRQ=6 CONFIG_COM_IRQ=6
CONFIG_DMAR_PARSE_ENABLED=y CONFIG_DMAR_PARSE_ENABLED=y
CONFIG_HV_RAM_START=0x5e000000

View File

@ -29,13 +29,6 @@ override RELEASE := n
endif endif
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) -include $(HV_OBJDIR)/$(HV_CONFIG_MK)
ifeq ($(shell [ $(HV_OBJDIR)/$(HV_CONFIG) -nt $(HV_OBJDIR)/$(HV_CONFIG_MK) ] && echo 1),1) 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 # config.mk may be outdated if .config has been overwritten. To update config.mk
@ -93,7 +86,7 @@ oldconfig: $(KCONFIG_DEPS)
@BOARD=$(TARGET_BOARD) \ @BOARD=$(TARGET_BOARD) \
python3 $(KCONFIG_DIR)/silentoldconfig.py Kconfig \ python3 $(KCONFIG_DIR)/silentoldconfig.py Kconfig \
$(HV_OBJDIR)/$(HV_CONFIG) \ $(HV_OBJDIR)/$(HV_CONFIG) \
RELEASE=$(RELEASE) $(OVERWRITTEN) RELEASE=$(RELEASE)
# Minimize the current .config. This target can be used to generate a defconfig # Minimize the current .config. This target can be used to generate a defconfig
# for future use. # for future use.