mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
This commit introduces support for generating SMBIOS Type 9 (System Slot)
tables using a hybrid approach:
1. Explicit Device Tree definitions:
Child node under '/smbios/smbios/system-slot' will be interpreted as
individual slot definitions.
- Each child represents a slot (e.g., isa, pcmcia, etc.).
- Properties follow the SMBIOS specification using lowercase
hyphen-separated names such as 'slot-type', 'slot-id',
'segment-group-number', 'bus-number', 'slot-information', etc.
- This approach allows full customization of each system slot and is
especially suitable for platforms with well-defined slot topology.
2. Automatic detection fallback:
If child node under '/smbios/smbios/system-slot' does not exist, the
implementation will scan the entire device tree for nodes whose
'device_type' matches known slot-related types ("pci", "isa", "pcmcia",
etc.).
- When a match is found, default values or heuristics are applied to
populate to the System Slot table.
- This mode is useful for platforms that lack explicit SMBIOS nodes
but still expose slot topology via standard DT conventions.
Together, two approaches ensure that SMBIOS Type 9 entries are available
whether explicitly described or automatically derived.
Signed-off-by: Raymond Mao <raymondmaoca@gmail.com>
Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
86 lines
1.9 KiB
Plaintext
86 lines
1.9 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 {
|
|
};
|
|
};
|
|
};
|
|
};
|