]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: Provide default SMBIOS manufacturer/product
authorSimon Glass <sjg@chromium.org>
Thu, 5 Nov 2020 13:32:17 +0000 (06:32 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Fri, 6 Nov 2020 02:25:56 +0000 (10:25 +0800)
Add a file containing defaults for these, using the existing CONFIG
options. This file must be included with #include since it needs to
be passed through the C preprocessor.

Enable the driver for all x86 boards that generate SMBIOS tables.
Disable it for coral since it has its own driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: reword the commit message a little bit]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
17 files changed:
arch/Kconfig
arch/x86/dts/bayleybay.dts
arch/x86/dts/baytrail_som-db5800-som-6867.dts
arch/x86/dts/cherryhill.dts
arch/x86/dts/chromebook_link.dts
arch/x86/dts/chromebook_samus.dts
arch/x86/dts/chromebox_panther.dts
arch/x86/dts/conga-qeval20-qa3-e3845.dts
arch/x86/dts/cougarcanyon2.dts
arch/x86/dts/crownbay.dts
arch/x86/dts/dfi-bt700.dtsi
arch/x86/dts/edison.dts
arch/x86/dts/minnowmax.dts
arch/x86/dts/qemu-x86_i440fx.dts
arch/x86/dts/qemu-x86_q35.dts
arch/x86/dts/smbios.dtsi [new file with mode: 0644]
configs/chromebook_coral_defconfig

index 3b9fcce980abea998ad5afa039e798f5df754b52..041e179256ac0c55103bfc6c71b4503609d20a4c 100644 (file)
@@ -198,6 +198,8 @@ config X86
        imply RTC_MC146818
        imply IRQ
        imply ACPIGEN if !QEMU
+       imply SYSINFO if GENERATE_SMBIOS_TABLE
+       imply SYSINFO_SMBIOS if GENERATE_SMBIOS_TABLE
 
        # Thing to enable for when SPL/TPL are enabled: SPL
        imply SPL_DM
index d0168e88dbd8d84f0c056c13950a2e6d6ed081f3..70e57984031772d1d88f9012dc2a736a44a4177c 100644 (file)
@@ -16,6 +16,8 @@
 /include/ "rtc.dtsi"
 /include/ "tsc_timer.dtsi"
 
+#include "smbios.dtsi"
+
 / {
        model = "Intel Bayley Bay";
        compatible = "intel,bayleybay", "intel,baytrail";
index 5abbc66ce98523fad0140fad45b17db69fccea88..a7dc03b6458e9fe2298578daa4e2ecac17a556e7 100644 (file)
@@ -16,6 +16,8 @@
 /include/ "rtc.dtsi"
 /include/ "tsc_timer.dtsi"
 
+#include "smbios.dtsi"
+
 / {
        model = "Advantech SOM-DB5800-SOM-6867";
        compatible = "advantech,som-db5800-som-6867", "intel,baytrail";
index 37146fde2ba93aff7b03f94e52930b8ed90fe23d..2ce7f1aa91ae9ff340c742781e08c19be9331f87 100644 (file)
@@ -14,6 +14,8 @@
 /include/ "rtc.dtsi"
 /include/ "tsc_timer.dtsi"
 
+#include "smbios.dtsi"
+
 / {
        model = "Intel Cherry Hill";
        compatible = "intel,cherryhill", "intel,braswell";
index 09488f13b583e9d6182e0ad4ae0d2dee8e0019e1..e529c4b63e08a80564ff0718469ae851d2e7da82 100644 (file)
@@ -11,6 +11,8 @@
 /include/ "rtc.dtsi"
 /include/ "tsc_timer.dtsi"
 
+#include "smbios.dtsi"
+
 / {
        model = "Google Link";
        compatible = "google,link", "intel,celeron-ivybridge";
index d8e04a669851785997c9790bc013039b40217249..adaeb1ea35581c63491c8782b1894616b461ba8f 100644 (file)
@@ -9,6 +9,8 @@
 /include/ "rtc.dtsi"
 /include/ "tsc_timer.dtsi"
 
+#include "smbios.dtsi"
+
 #ifdef CONFIG_CHROMEOS_VBOOT
 #include "chromeos-x86.dtsi"
 #include "flashmap-x86-ro.dtsi"
index bcd4c4d9c1bd25efa20b0798ff13882da511296e..77b6ac9ab96267090de3f8a5b460a4ab23a53a9d 100644 (file)
@@ -6,6 +6,8 @@
 /include/ "rtc.dtsi"
 /include/ "tsc_timer.dtsi"
 
+#include "smbios.dtsi"
+
 / {
        model = "Google Panther";
        compatible = "google,panther", "intel,haswell";
index 70b8c045193c47254e5dbbfd29f7835eda493776..bbea99da2c9fbea26ee2be6b019c758c7392ca5f 100644 (file)
@@ -16,6 +16,8 @@
 /include/ "rtc.dtsi"
 /include/ "tsc_timer.dtsi"
 
+#include "smbios.dtsi"
+
 / {
        model = "congatec-QEVAL20-QA3-E3845";
        compatible = "congatec,qeval20-qa3-e3845", "intel,baytrail";
index c6ba811e059e58b5a1594174db83c7e912035f17..602523333e3eacc425b08c8de92ed8c506616e63 100644 (file)
@@ -14,6 +14,8 @@
 /include/ "rtc.dtsi"
 /include/ "tsc_timer.dtsi"
 
+#include "smbios.dtsi"
+
 / {
        model = "Intel Cougar Canyon 2";
        compatible = "intel,cougarcanyon2", "intel,chiefriver";
index f492c35875b65c39a43e155b0b449da8ecd54a4e..a7166a974916249410d5693553bf6150e171f024 100644 (file)
@@ -15,6 +15,8 @@
 /include/ "rtc.dtsi"
 /include/ "tsc_timer.dtsi"
 
+#include "smbios.dtsi"
+
 / {
        model = "Intel Crown Bay";
        compatible = "intel,crownbay", "intel,queensbay";
index e9930cb04363e2440245d693f618664eda29169f..7d7b8357d9244684504ac178f3434563fa1cef2c 100644 (file)
@@ -13,6 +13,8 @@
 #include "rtc.dtsi"
 #include "tsc_timer.dtsi"
 
+#include "smbios.dtsi"
+
 / {
        config {
                silent_console = <0>;
index e2f9469de32295fccb5ef632ef4c41935396bbbf..bc84bc892e7163cf532716137d9a009722fba70a 100644 (file)
@@ -12,6 +12,8 @@
 /include/ "rtc.dtsi"
 /include/ "tsc_timer.dtsi"
 
+#include "smbios.dtsi"
+
 / {
        model = "Intel Edison";
        compatible = "intel,edison";
index f4cdb2c3cd2ca3707158ddc17ffbaef1fa30986e..133d55bc20fb58c9f92b1538af82a702cd13df33 100644 (file)
@@ -15,6 +15,8 @@
 /include/ "rtc.dtsi"
 /include/ "tsc_timer.dtsi"
 
+#include "smbios.dtsi"
+
 / {
        model = "Intel Minnowboard Max";
        compatible = "intel,minnowmax", "intel,baytrail";
index 2e5210d4ee6bf46601f3f5260ae8117a801e456e..c33a11d593f5721185a6aad601d6fb6d55ee9bfb 100644 (file)
@@ -14,6 +14,8 @@
 /include/ "rtc.dtsi"
 /include/ "tsc_timer.dtsi"
 
+#include "smbios.dtsi"
+
 / {
        model = "QEMU x86 (I440FX)";
        compatible = "qemu,x86";
index e8f55b19a26291b5e51ebc70fbcd655fe0fd1693..9faae7fb5693783b5384535419543a0bcdb81e75 100644 (file)
@@ -24,6 +24,8 @@
 /include/ "rtc.dtsi"
 /include/ "tsc_timer.dtsi"
 
+#include "smbios.dtsi"
+
 / {
        model = "QEMU x86 (Q35)";
        compatible = "qemu,x86";
diff --git a/arch/x86/dts/smbios.dtsi b/arch/x86/dts/smbios.dtsi
new file mode 100644 (file)
index 0000000..9fa8c63
--- /dev/null
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Default SMBIOS information. Include this in your board .dts file if you want
+ * these defaults.
+ *
+ * Copyright 2020 Google LLC
+ */
+
+#include <config.h>
+
+/ {
+       smbios: smbios {
+               compatible = "u-boot,sysinfo-smbios";
+
+               smbios {
+                       system {
+                               manufacturer = CONFIG_SYS_VENDOR;
+                               product = CONFIG_SYS_BOARD;
+                       };
+
+                       baseboard {
+                               manufacturer = CONFIG_SYS_VENDOR;
+                               product = CONFIG_SYS_BOARD;
+                       };
+
+                       chassis {
+                               manufacturer = CONFIG_SYS_VENDOR;
+                               /* chassis product is not set by default */
+                       };
+               };
+       };
+};
index d960793d9a915c2610bff5ab147d0459720c7d24..51f892fb13d47ea188ad9bfc2ee6efd4cb638a4d 100644 (file)
@@ -99,7 +99,7 @@ CONFIG_SOUND_MAX98357A=y
 CONFIG_SOUND_RT5677=y
 CONFIG_SPI=y
 CONFIG_ICH_SPI=y
-CONFIG_SYSINFO=y
+# CONFIG_SYSINFO_SMBIOS is not set
 CONFIG_TPL_SYSRESET=y
 # CONFIG_TPM_V1 is not set
 CONFIG_TPM2_CR50_I2C=y