From e344fa8c23cb9e0c4becc1e2addcb6542f78a0c9 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 11 Oct 2024 14:39:01 +0200 Subject: [PATCH] base-hw: export board name in platform info We need to differentiate the board within the SoC generic platform driver. Therefore, export its name within the platform info ROM. Ref issue#5360 --- repos/base-hw/lib/mk/core-hw.inc | 2 ++ repos/base-hw/src/core/platform.cc | 3 +++ 2 files changed, 5 insertions(+) diff --git a/repos/base-hw/lib/mk/core-hw.inc b/repos/base-hw/lib/mk/core-hw.inc index 5ff6634311..8dacf55d10 100644 --- a/repos/base-hw/lib/mk/core-hw.inc +++ b/repos/base-hw/lib/mk/core-hw.inc @@ -62,6 +62,8 @@ SRC_CC += capability.cc SRC_CC += stack_area_addr.cc SRC_CC += heartbeat.cc +CC_OPT_platform += -DBOARD_NAME="\"$(BOARD)\"" + # provide Genode version information include $(BASE_DIR)/src/core/version.inc diff --git a/repos/base-hw/src/core/platform.cc b/repos/base-hw/src/core/platform.cc index 4df49e25f3..2090cf763d 100644 --- a/repos/base-hw/src/core/platform.cc +++ b/repos/base-hw/src/core/platform.cc @@ -161,6 +161,9 @@ void Platform::_init_platform_info() xml.attribute("acpi", true); xml.attribute("msi", true); }); + xml.node("board", [&] { + xml.attribute("name", BOARD_NAME); + }); _init_additional_platform_info(xml); xml.node("affinity-space", [&] { xml.attribute("width", affinity_space().width());