summaryrefslogtreecommitdiff
path: root/src/vendorcode/amd/opensil/genoa_poc
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2023-07-13 16:58:55 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-11-28 13:17:13 +0000
commit791ce58e6e1f0ff2b1f6df824ca08475e87cf03a (patch)
treec4a3ce1d4e9fa09979f1e6c28b799700996cfa8f /src/vendorcode/amd/opensil/genoa_poc
parent1d6eeff17137d86a09673b589ea5c1fba174a02b (diff)
vendorcode/amd: Hook up opensil
OpenSIL has a native buildsystem using meson and configuration mechanism using kconfiglib. To be able to use the coreboot toolchain with opensil, meson crossfiles are used, which get generated by coreboot makefiles. Configuration of opensil is done in a similar fashion with a template defconfig after which kconfiglib is called to generate headers. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Signed-off-by: Martin Roth <gaumless@gmail.com> Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ide2d181914116119dfd37b1511d89ea965729141 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76511 Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Diffstat (limited to 'src/vendorcode/amd/opensil/genoa_poc')
-rw-r--r--src/vendorcode/amd/opensil/genoa_poc/meson_cross.template34
-rw-r--r--src/vendorcode/amd/opensil/genoa_poc/opensil_config.template5
2 files changed, 39 insertions, 0 deletions
diff --git a/src/vendorcode/amd/opensil/genoa_poc/meson_cross.template b/src/vendorcode/amd/opensil/genoa_poc/meson_cross.template
new file mode 100644
index 0000000000..b457c802ab
--- /dev/null
+++ b/src/vendorcode/amd/opensil/genoa_poc/meson_cross.template
@@ -0,0 +1,34 @@
+[binaries]
+c = '##COMPILER##'
+ar = '##AR##'
+nasm = '##NASM##'
+
+[built-in options]
+c_args = ['-nostdinc',
+ '-I##OBJPATH##',
+ '-I##COREBOOT_DIR##/src/include',
+ '-I##COREBOOT_DIR##/src/arch/x86/include',
+ '-I##COREBOOT_DIR##/src/commonlib/include',
+ '-I##COREBOOT_DIR##/src/commonlib/bsd/include',
+ '-include', '##COREBOOT_DIR##/src/include/kconfig.h',
+ '-include', '##OBJPATH##/config.h',
+ '-include', '##COREBOOT_DIR##/src/commonlib/bsd/include/commonlib/bsd/compiler.h',
+ '-DHAS_STRING_H=1',
+ # openSIL isn't compatible with coreboot's assert implementation, so use special case
+ '-D_PORTING_H_=1',
+ '-DSIL_DEBUG_ENABLE=##SIL_DEBUG_ENABLE##',
+ # openSIL uses coreboot assert which uses printk which warns about unused-param
+ '-Wno-unused-parameter',
+ # ubiquitous problem in openSIL
+ '-Wno-missing-field-initializers',
+ ##CLANG_ARGS##
+ ]
+
+[host_machine]
+system = 'linux'
+cpu_family = '##CPU_FAMILY##'
+cpu = '##CPU##'
+endian = 'little'
+
+[properties]
+is32bit = ##IS32BIT##
diff --git a/src/vendorcode/amd/opensil/genoa_poc/opensil_config.template b/src/vendorcode/amd/opensil/genoa_poc/opensil_config.template
new file mode 100644
index 0000000000..2ddd3b4ec1
--- /dev/null
+++ b/src/vendorcode/amd/opensil/genoa_poc/opensil_config.template
@@ -0,0 +1,5 @@
+CONFIG_PLAT_APOB_ADDRESS=##APOB_BASE##
+CONFIG_PSP_BIOS_BIN_BASE=##BIOS_ENTRY_BASE##
+CONFIG_PSP_BIOS_BIN_SIZE=##BIOS_ENTRY_SIZE##
+CONFIG_PLAT_NUMBER_SOCKETS=1
+CONFIG_SOC_F19M10=y