Skip to content

Commit bce7ed1

Browse files
junjiemao1lijinxia
authored andcommitted
HV: config: add Kconfig and defconfigs for sbl & uefi
This patch converts the configuration entries (previously defined in bsp/*/include/bsp/bsp_cfg.h) to a Kconfig script. With the platform specified, the default values will be exactly those in the corresponding bsp_cfg.h. v4 -> v5: * No changes. v3 -> v4: * No changes. v2 -> v3: * No changes. v1 -> v2: * No changes. Signed-off-by: Junjie Mao <junjie.mao@intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
1 parent ce061d3 commit bce7ed1

File tree

4 files changed

+121
-0
lines changed

4 files changed

+121
-0
lines changed

hypervisor/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mainmenu "ACRN Configuration"
2+
3+
source "arch/x86/Kconfig"

hypervisor/arch/x86/Kconfig

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
choice
2+
prompt "Platform"
3+
default PLATFORM_UEFI
4+
5+
config PLATFORM_UEFI
6+
bool "UEFI"
7+
select EFI_STUB
8+
9+
config PLATFORM_SBL
10+
bool "SBL"
11+
12+
endchoice
13+
14+
config NR_IOAPICS
15+
int "Maximum number of IOAPICs supported"
16+
default 1
17+
18+
config STACK_SIZE
19+
hex "Capacity of each stack used in the hypervisor"
20+
default 0x2000
21+
22+
config LOG_BUF_SIZE
23+
hex "Capacity of logbuf"
24+
default 0x100000
25+
26+
config LOG_DESTINATION
27+
int "Bitmap of consoles where logs are printed"
28+
default 3
29+
30+
config CPU_UP_TIMEOUT
31+
int "Timeout in ms when bringing up secondary CPUs"
32+
default 100
33+
34+
choice
35+
prompt "serial IO type"
36+
default SERIAL_MMIO if PLATFORM_SBL
37+
default SERIAL_PIO if PLATFORM_UEFI
38+
39+
config SERIAL_MMIO
40+
bool "MMIO"
41+
42+
config SERIAL_PIO
43+
bool "PIO"
44+
45+
endchoice
46+
47+
config SERIAL_MMIO_BASE
48+
hex "Base address of serial MMIO region"
49+
depends on SERIAL_MMIO
50+
default 0xfc000000
51+
52+
config SERIAL_PIO_BASE
53+
hex "Base address of serial PIO region"
54+
depends on SERIAL_PIO
55+
default 0x3f8
56+
57+
config MALLOC_ALIGN
58+
int "Block size in the heap for malloc()"
59+
default 16
60+
61+
config NUM_ALLOC_PAGES
62+
hex "Capacity in pages of the heap for page_alloc()"
63+
default 0x1000
64+
65+
config HEAP_SIZE
66+
hex "Capacity of the heap for malloc()"
67+
default 0x100000
68+
69+
config CONSOLE_LOGLEVEL_DEFAULT
70+
int "Default loglevel on the serial console"
71+
default 2
72+
73+
config MEM_LOGLEVEL_DEFAULT
74+
int "Default loglevel in memory"
75+
default 4
76+
77+
config LOW_RAM_START
78+
hex "Address of the beginning of low RAM region"
79+
default 0x00001000 if PLATFORM_SBL
80+
default 0x00008000 if PLATFORM_UEFI
81+
82+
config LOW_RAM_SIZE
83+
hex "Size of the low RAM region"
84+
default 0x000cf000 if PLATFORM_SBL
85+
default 0x00010000 if PLATFORM_UEFI
86+
87+
config RAM_START
88+
hex "Address of the RAM region assigned to the hypervisor"
89+
default 0x6e000000 if PLATFORM_SBL
90+
default 0x20000000 if PLATFORM_UEFI
91+
92+
config RAM_SIZE
93+
hex "Size of the RAM region assigned to the hypervisor"
94+
default 0x02000000
95+
96+
config DMAR_PARSE_ENABLED
97+
bool
98+
default n if PLATFORM_SBL
99+
default y if PLATFORM_UEFI
100+
101+
config GPU_SBDF
102+
hex
103+
depends on DMAR_PARSE_ENABLED
104+
default 0x00000010
105+
106+
config EFI_STUB
107+
bool
108+
depends on PLATFORM_UEFI
109+
default y
110+
111+
config UEFI_OS_LOADER_NAME
112+
string "UEFI OS loader name"
113+
depends on PLATFORM_UEFI
114+
default "\\EFI\\org.clearlinux\\bootloaderx64.efi"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# CONFIG_PLATFORM_UEFI is not set
2+
CONFIG_PLATFORM_SBL=y
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CONFIG_PLATFORM_UEFI=y
2+
# CONFIG_PLATFORM_SBL is not set

0 commit comments

Comments
 (0)