Files
u-boot/arch/arm/dts/smbios_generic.dtsi
Raymond Mao 41b7a09d24 smbios: add support for dynamic generation of Type 19 table
This commit implements SMBIOS Type 19 (Memory Array Mapped Address)
generation with a hybrid approach supporting both:

1. Explicit definition via Device Tree 'smbios' node:
   Child node under '/smbios/smbios/memory-array-mapped-address' will be
   used to populate as individual Type 19 structure directly.
   - Properties follow SMBIOS field names with lowercase letters and
     hyphen-separated words (e.g., 'starting-address', 'ending-address',
     'partition-width', etc.).
   - This method supports precise platform-defined overrides and system
     descriptions.

2. Fallback to automatic DT-based discovery:
   If child node under '/smbios/smbios/memory-array-mapped-address' does
   not exist, the implementation will:
   - Scan all top-level 'memory@' nodes to populate Type 19 structure with
     inferred size and location data.
   - Scan nodes named or marked as 'memory-controller' and parse
     associated 'dimm@' subnodes (if present) to extract DIMM sizes and
     map them accordingly.

This dual-mode support enables flexible firmware SMBIOS reporting while
aligning with spec-compliant naming and runtime-detected memory topology.

Type 19 support is under GENERATE_SMBIOS_TABLE_VERBOSE to avoid
increasing rom size for those platforms which only require basic SMBIOS
support.

Signed-off-by: Raymond Mao <raymondmaoca@gmail.com>
Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2026-02-18 08:27:51 -06:00

95 lines
2.0 KiB
Plaintext

// SPDX-License-Identifier: GPL-2.0+
/*
* Default SMBIOS information for Arm64 platforms
*
* Copyright (c) 2024 Linaro Limited
* Author: Raymond Mao <raymond.mao@linaro.org>
*/
#include <config.h>
#include <smbios_def.h>
/ {
smbios {
compatible = "u-boot,sysinfo-smbios";
smbios {
system {
manufacturer = CONFIG_SYS_VENDOR;
product = CONFIG_SYS_BOARD;
version = "";
serial = "";
wakeup-type = <SMBIOS_WAKEUP_TYPE_UNKNOWN>;
sku = "";
family = "armv8";
};
baseboard {
manufacturer = CONFIG_SYS_VENDOR;
product = CONFIG_SYS_BOARD;
version = "";
serial = "";
asset-tag = "";
chassis-location = "";
feature-flags = <SMBIOS_BOARD_FEAT_HOST_BOARD>;
board-type = <SMBIOS_BOARD_TYPE_MOTHERBOARD>;
};
chassis {
manufacturer = CONFIG_SYS_VENDOR;
version = "";
serial = "";
asset-tag = "";
chassis-type = <SMBIOS_ENCLOSURE_DESKTOP>;
bootup-state = <SMBIOS_STATE_SAFE>;
power-supply-state = <SMBIOS_STATE_SAFE>;
thermal-state = <SMBIOS_STATE_SAFE>;
security-status = <SMBIOS_SECURITY_NONE>;
oem-defined = <SMBIOS_ENCLOSURE_OEM_UND>;
height = <SMBIOS_ENCLOSURE_HEIGHT_UND>;
number-of-power-cords = <SMBIOS_POWCORD_NUM_UND>;
};
processor {
version = "";
processor-type = <SMBIOS_PROCESSOR_TYPE_CENTRAL>;
processor-status = <SMBIOS_PROCESSOR_STATUS_ENABLED>;
upgrade = <SMBIOS_PROCESSOR_UPGRADE_NONE>;
family = <SMBIOS_PROCESSOR_FAMILY_EXT>;
family2 = <SMBIOS_PROCESSOR_FAMILY_ARMV8>;
socket-design = "";
serial = "";
asset-tag = "";
part-number = "";
};
cache {
l1-cache {
socket-design = "";
config = <(SMBIOS_CACHE_LEVEL_1 |
SMBIOS_CACHE_ENABLED |
SMBIOS_CACHE_OP_WB)>;
};
l2-cache {
socket-design = "";
config = <(SMBIOS_CACHE_LEVEL_2 |
SMBIOS_CACHE_ENABLED |
SMBIOS_CACHE_OP_WB)>;
};
};
system-slot {
};
memory-array {
};
memory-device {
};
memory-array-mapped-address {
};
};
};
};