forked from Mirrors/opensbi
lib: sbi_ecall: Add Kconfig option for each extension
For each SBI extension, we: - Add a Kconfig option for it - Add the extension to sbi_ecall_exts only if the extension is enabled - Add the corresponding sbi_ecall_* object file only if the extension is enabled Special cases are as follows: - The legacy extensions are lumped together as one 'big' extension, as has always been the case in OpenSBI code. - The platform-defined vendor extensions are regarded as one extension. - The Base extension cannot be disabled. - sbi_ecall_replace implements multiple extensions, so it's not easy to avoid linking it in. Enable it always, and use #ifdef to disable/enable individual extensions. Signed-off-by: Vivian Wang <dramforever@live.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
37
lib/sbi/Kconfig
Normal file
37
lib/sbi/Kconfig
Normal file
@@ -0,0 +1,37 @@
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
menu "SBI Extension Support"
|
||||
|
||||
config SBI_ECALL_TIME
|
||||
bool "Timer extension"
|
||||
default y
|
||||
|
||||
config SBI_ECALL_RFENCE
|
||||
bool "RFENCE extension"
|
||||
default y
|
||||
|
||||
config SBI_ECALL_IPI
|
||||
bool "IPI extension"
|
||||
default y
|
||||
|
||||
config SBI_ECALL_HSM
|
||||
bool "Hart State Management extension"
|
||||
default y
|
||||
|
||||
config SBI_ECALL_SRST
|
||||
bool "System Reset extension"
|
||||
default y
|
||||
|
||||
config SBI_ECALL_PMU
|
||||
bool "Performance Monitoring Unit extension"
|
||||
default y
|
||||
|
||||
config SBI_ECALL_LEGACY
|
||||
bool "SBI v0.1 legacy extensions"
|
||||
default y
|
||||
|
||||
config SBI_ECALL_VENDOR
|
||||
bool "Platform-defined vendor extensions"
|
||||
default y
|
||||
|
||||
endmenu
|
Reference in New Issue
Block a user