Skip to content

Commit ce38708

Browse files
tw4452852wenlingz
authored andcommitted
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>
1 parent 334382f commit ce38708

File tree

5 files changed

+18
-45
lines changed

5 files changed

+18
-45
lines changed

hypervisor/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ endif
296296
.PHONY: all
297297
all: lib $(HV_OBJDIR)/$(HV_FILE).32.out $(HV_OBJDIR)/$(HV_FILE).bin
298298

299-
ifeq ($(CONFIG_PLATFORM_SBL),y)
299+
ifeq ($(FIRMWARE),sbl)
300300
install: lib $(HV_OBJDIR)/$(HV_FILE).32.out
301301
ifeq ($(BOARD),apl-up2)
302302
install -D $(HV_OBJDIR)/$(HV_FILE).32.out $(DESTDIR)/usr/lib/acrn/$(HV_FILE).apl-up2.sbl

hypervisor/arch/x86/Kconfig

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
choice
2-
prompt "Type of boot firmware (BIOS) on the target platform"
3-
default PLATFORM_SBL
4-
help
5-
The boot firmware (BIOS) used on the target board.
6-
7-
config PLATFORM_UEFI
8-
bool "UEFI"
9-
select EFI_STUB
10-
help
11-
Select this if the target board uses UEFI.
12-
13-
config PLATFORM_SBL
14-
bool "SBL"
15-
help
16-
Select this if the target board uses Slim Bootloader.
17-
18-
endchoice
19-
201
choice
212
prompt "Hypervisor mode"
223
default SHARING_MODE
@@ -32,7 +13,6 @@ config SHARING_MODE
3213

3314
config PARTITION_MODE
3415
bool "Partition mode"
35-
depends on PLATFORM_SBL
3616
help
3717
In partition mode, every VM owns part of the physical resources
3818
exclusively and runs with minimal interference from the others. The VM
@@ -70,8 +50,7 @@ config MAX_VM_NUM
7050
config MAX_VCPUS_PER_VM
7151
int "Maximum number of VCPUs per VM"
7252
range 1 8
73-
default 4 if PLATFORM_SBL
74-
default 8 if PLATFORM_UEFI
53+
default 8
7554
help
7655
The maximum number of virtual CPUs the hypervisor can support in a
7756
single VM.
@@ -228,8 +207,7 @@ config LOW_RAM_SIZE
228207

229208
config HV_RAM_START
230209
hex "2M-aligned Start physical address of the RAM region used by the hypervisor"
231-
default 0x6e000000 if PLATFORM_SBL
232-
default 0x00400000 if PLATFORM_UEFI
210+
default 0x00400000
233211
help
234212
A 64-bit integer indicating the base physical address where the
235213
hypervisor should be loaded. If RELOC is disabled, the bootloader
@@ -243,33 +221,29 @@ config HV_RAM_START
243221

244222
config HV_RAM_SIZE
245223
hex "Size of the RAM region used by the hypervisor"
246-
default 0x08000000 if PLATFORM_SBL
247-
default 0x0b800000 if PLATFORM_UEFI
224+
default 0x0b800000
248225
help
249226
A 64-bit integer indicating the size of RAM used by the hypervisor.
250227
It is ensured at link time that the footprint of the hypervisor
251228
does not exceed this size.
252229

253230
config PLATFORM_RAM_SIZE
254231
hex "Size of the physical platform RAM"
255-
default 0x200000000 if PLATFORM_SBL
256-
default 0x400000000 if PLATFORM_UEFI
232+
default 0x400000000
257233
help
258234
A 64-bit integer indicating the size of the physical platform RAM
259235
(MMIO not included).
260236

261237
config SOS_RAM_SIZE
262238
hex "Size of the Service OS (SOS) RAM"
263-
default 0x200000000 if PLATFORM_SBL
264-
default 0x400000000 if PLATFORM_UEFI
239+
default 0x400000000
265240
help
266241
A 64-bit integer indicating the size of the Service OS RAM (MMIO not
267242
included).
268243

269244
config UOS_RAM_SIZE
270245
hex "Size of the User OS (UOS) RAM"
271-
default 0x100000000 if PLATFORM_SBL
272-
default 0x200000000 if PLATFORM_UEFI
246+
default 0x200000000
273247
help
274248
A 64-bit integer indicating the size of the User OS RAM (MMIO not
275249
included). Now we assume each UOS uses same amount of RAM size.
@@ -285,8 +259,7 @@ config CONSTANT_ACPI
285259

286260
config DMAR_PARSE_ENABLED
287261
bool "Enable ACPI DMA Remapping tables parsing"
288-
default n if PLATFORM_SBL
289-
default y if PLATFORM_UEFI
262+
default y
290263
help
291264
Whether to parse the ACPI DMA Remapping tables at runtime.
292265

@@ -327,8 +300,7 @@ config MAX_IR_ENTRIES
327300

328301
config IOMMU_BUS_NUM
329302
hex "Highest PCI bus ID used during IOMMU initialization"
330-
default 0x10 if PLATFORM_SBL
331-
default 0x100 if PLATFORM_UEFI
303+
default 0x100
332304
help
333305
Any BDF with a bus ID smaller than this number is mapped to
334306
the IOMMU domain of the first VM.

hypervisor/arch/x86/configs/apl-mrb.config

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,10 @@ CONFIG_BOARD="apl-mrb"
33
CONFIG_SERIAL_PCI=y
44
CONFIG_COM_BASE=0x3e8
55
CONFIG_COM_IRQ=6
6+
CONFIG_HV_RAM_START=0x6e000000
7+
CONFIG_HV_RAM_SIZE=0x07800000
8+
CONFIG_PLATFORM_RAM_SIZE=0x200000000
9+
CONFIG_SOS_RAM_SIZE=0x200000000
10+
CONFIG_UOS_RAM_SIZE=0x100000000
11+
CONFIG_DMAR_PARSE_ENABLED=n
12+
CONFIG_IOMMU_BUS_NUM=0x10

hypervisor/arch/x86/configs/apl-up2.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ CONFIG_SERIAL_PCI=y
44
CONFIG_SERIAL_PCI_BDF="0:18.0"
55
CONFIG_COM_IRQ=6
66
CONFIG_DMAR_PARSE_ENABLED=y
7+
CONFIG_HV_RAM_START=0x5e000000

hypervisor/scripts/kconfig/kconfig.mk

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ override RELEASE := n
2929
endif
3030
endif
3131

32-
OVERWRITTEN := ""
33-
ifeq ($(FIRMWARE),sbl)
34-
OVERWRITTEN += "PLATFORM_SBL=y"
35-
else ifeq ($(FIRMWARE),uefi)
36-
OVERWRITTEN += "PLATFORM_UEFI=y"
37-
endif
38-
3932
-include $(HV_OBJDIR)/$(HV_CONFIG_MK)
4033
ifeq ($(shell [ $(HV_OBJDIR)/$(HV_CONFIG) -nt $(HV_OBJDIR)/$(HV_CONFIG_MK) ] && echo 1),1)
4134
# config.mk may be outdated if .config has been overwritten. To update config.mk
@@ -93,7 +86,7 @@ oldconfig: $(KCONFIG_DEPS)
9386
@BOARD=$(TARGET_BOARD) \
9487
python3 $(KCONFIG_DIR)/silentoldconfig.py Kconfig \
9588
$(HV_OBJDIR)/$(HV_CONFIG) \
96-
RELEASE=$(RELEASE) $(OVERWRITTEN)
89+
RELEASE=$(RELEASE)
9790

9891
# Minimize the current .config. This target can be used to generate a defconfig
9992
# for future use.

0 commit comments

Comments
 (0)