Skip to content

Commit

Permalink
HV: config: add Kconfig and defconfigs for sbl & uefi
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
junjiemao1 authored and lijinxia committed Jun 8, 2018
1 parent ce061d3 commit bce7ed1
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hypervisor/Kconfig
@@ -0,0 +1,3 @@
mainmenu "ACRN Configuration"

source "arch/x86/Kconfig"
114 changes: 114 additions & 0 deletions hypervisor/arch/x86/Kconfig
@@ -0,0 +1,114 @@
choice
prompt "Platform"
default PLATFORM_UEFI

config PLATFORM_UEFI
bool "UEFI"
select EFI_STUB

config PLATFORM_SBL
bool "SBL"

endchoice

config NR_IOAPICS
int "Maximum number of IOAPICs supported"
default 1

config STACK_SIZE
hex "Capacity of each stack used in the hypervisor"
default 0x2000

config LOG_BUF_SIZE
hex "Capacity of logbuf"
default 0x100000

config LOG_DESTINATION
int "Bitmap of consoles where logs are printed"
default 3

config CPU_UP_TIMEOUT
int "Timeout in ms when bringing up secondary CPUs"
default 100

choice
prompt "serial IO type"
default SERIAL_MMIO if PLATFORM_SBL
default SERIAL_PIO if PLATFORM_UEFI

config SERIAL_MMIO
bool "MMIO"

config SERIAL_PIO
bool "PIO"

endchoice

config SERIAL_MMIO_BASE
hex "Base address of serial MMIO region"
depends on SERIAL_MMIO
default 0xfc000000

config SERIAL_PIO_BASE
hex "Base address of serial PIO region"
depends on SERIAL_PIO
default 0x3f8

config MALLOC_ALIGN
int "Block size in the heap for malloc()"
default 16

config NUM_ALLOC_PAGES
hex "Capacity in pages of the heap for page_alloc()"
default 0x1000

config HEAP_SIZE
hex "Capacity of the heap for malloc()"
default 0x100000

config CONSOLE_LOGLEVEL_DEFAULT
int "Default loglevel on the serial console"
default 2

config MEM_LOGLEVEL_DEFAULT
int "Default loglevel in memory"
default 4

config LOW_RAM_START
hex "Address of the beginning of low RAM region"
default 0x00001000 if PLATFORM_SBL
default 0x00008000 if PLATFORM_UEFI

config LOW_RAM_SIZE
hex "Size of the low RAM region"
default 0x000cf000 if PLATFORM_SBL
default 0x00010000 if PLATFORM_UEFI

config RAM_START
hex "Address of the RAM region assigned to the hypervisor"
default 0x6e000000 if PLATFORM_SBL
default 0x20000000 if PLATFORM_UEFI

config RAM_SIZE
hex "Size of the RAM region assigned to the hypervisor"
default 0x02000000

config DMAR_PARSE_ENABLED
bool
default n if PLATFORM_SBL
default y if PLATFORM_UEFI

config GPU_SBDF
hex
depends on DMAR_PARSE_ENABLED
default 0x00000010

config EFI_STUB
bool
depends on PLATFORM_UEFI
default y

config UEFI_OS_LOADER_NAME
string "UEFI OS loader name"
depends on PLATFORM_UEFI
default "\\EFI\\org.clearlinux\\bootloaderx64.efi"
2 changes: 2 additions & 0 deletions hypervisor/arch/x86/configs/sbl.config
@@ -0,0 +1,2 @@
# CONFIG_PLATFORM_UEFI is not set
CONFIG_PLATFORM_SBL=y
2 changes: 2 additions & 0 deletions hypervisor/arch/x86/configs/uefi.config
@@ -0,0 +1,2 @@
CONFIG_PLATFORM_UEFI=y
# CONFIG_PLATFORM_SBL is not set

0 comments on commit bce7ed1

Please sign in to comment.