Philipp Deppenwiese has submitted this change. ( https://review.coreboot.org/c/coreboot/+/42747 )
Change subject: smbios: Add option VPD_SMBIOS_VERSION that reads BIOS version from a VPD variable
......................................................................
smbios: Add option VPD_SMBIOS_VERSION that reads BIOS version from a VPD variable
If VPD_SMBIOS_VERSION is selected, it would read VPD_RO variable that can
override SMBIOS type 0 version.
One special scenario of using this feature is to assign a BIOS version to
a coreboot image without the need to rebuild from source.
VPD_SMBIOS_VERSION default is n.
Tested=On OCP Delta Lake, dmidecode -t 0 can see the version being updated
from VPD.
Change-Id: Iee62ed900095001ffac225fc629b3f2f52045e30
Signed-off-by: Johnny Lin <johnny_lin(a)wiwynn.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42029
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: insomniac <insomniac(a)slackware.it>
Reviewed-by: Julius Werner <jwerner(a)chromium.org>
(cherry picked from commit c746a748c4c5ec6421d7f9f5760717348231d091)
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42747
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
---
M src/Kconfig
M src/arch/x86/smbios.c
2 files changed, 71 insertions(+), 20 deletions(-)
Approvals:
build bot (Jenkins): Verified
Philipp Deppenwiese: Looks good to me, approved
insomniac: Looks good to me, but someone else must approve
diff --git a/src/Kconfig b/src/Kconfig
index ba9ae86..c031523 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -730,6 +730,16 @@
convertible, or tablet enclosure will be used if the appropriate
system type is selected.
+config VPD_SMBIOS_VERSION
+ bool "Populates SMBIOS type 0 version from the VPD_RO variable 'firmware_version'"
+ default n
+ depends on VPD && GENERATE_SMBIOS_TABLES
+ help
+ Selecting this option will read firmware_version from
+ VPD_RO and override SMBIOS type 0 version. One special
+ scenario of using this feature is to assign a BIOS version
+ to a coreboot image without the need to rebuild from source.
+
endmenu
source "payloads/Kconfig"
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c
index 7deac63..f23e1dc 100644
--- a/src/arch/x86/smbios.c
+++ b/src/arch/x86/smbios.c
@@ -32,6 +32,8 @@
#if CONFIG(CHROMEOS)
#include <vendorcode/google/chromeos/gnvs.h>
#endif
+#include <drivers/vpd/vpd.h>
+#include <stdlib.h>
#define update_max(len, max_len, stmt) \
do { \
@@ -381,12 +383,64 @@
return t->length + smbios_string_table_len(t->eos);
}
+#define VERSION_VPD "firmware_version"
+static const char *vpd_get_bios_version(void)
+{
+ int size;
+ const char *s;
+ char *version;
+
+ s = vpd_find(VERSION_VPD, &size, VPD_RO);
+ if (!s) {
+ printk(BIOS_ERR, "Find version from VPD %s failed\n", VERSION_VPD);
+ return NULL;
+ }
+
+ version = malloc(size + 1);
+ if (!version) {
+ printk(BIOS_ERR, "Failed to malloc %d bytes for VPD version\n", size + 1);
+ return NULL;
+ }
+ memcpy(version, s, size);
+ version[size] = '\0';
+ printk(BIOS_DEBUG, "Firmware version %s from VPD %s\n", version, VERSION_VPD);
+ return version;
+}
+
+static const char *get_bios_version(void)
+{
+ const char *s;
+
+#define SPACES \
+ " "
+
+ if (CONFIG(CHROMEOS))
+ return SPACES;
+
+ if (CONFIG(VPD_SMBIOS_VERSION)) {
+ s = vpd_get_bios_version();
+ if (s != NULL)
+ return s;
+ }
+
+ s = smbios_mainboard_bios_version();
+ if (s != NULL)
+ return s;
+
+ if (strlen(CONFIG_LOCALVERSION) != 0) {
+ printk(BIOS_DEBUG, "BIOS version set to CONFIG_LOCALVERSION: '%s'\n",
+ CONFIG_LOCALVERSION);
+ return CONFIG_LOCALVERSION;
+ }
+
+ printk(BIOS_DEBUG, "SMBIOS firmware version is set to coreboot_version: '%s'\n",
+ coreboot_version);
+ return coreboot_version;
+}
+
const char *__weak smbios_mainboard_bios_version(void)
{
- if (strlen(CONFIG_LOCALVERSION))
- return CONFIG_LOCALVERSION;
- else
- return coreboot_version;
+ return NULL;
}
static int smbios_write_type0(unsigned long *current, int handle)
@@ -400,27 +454,14 @@
t->length = len - 2;
t->vendor = smbios_add_string(t->eos, "coreboot");
-#if !CONFIG(CHROMEOS)
t->bios_release_date = smbios_add_string(t->eos, coreboot_dmi_date);
- t->bios_version = smbios_add_string(t->eos,
- smbios_mainboard_bios_version());
-#else
-#define SPACES \
- " "
- t->bios_release_date = smbios_add_string(t->eos, coreboot_dmi_date);
-#if CONFIG(HAVE_ACPI_TABLES)
+#if CONFIG(CHROMEOS) && CONFIG(HAVE_ACPI_TABLES)
u32 version_offset = (u32)smbios_string_table_len(t->eos);
-#endif
- t->bios_version = smbios_add_string(t->eos, SPACES);
-
-#if CONFIG(HAVE_ACPI_TABLES)
/* SMBIOS offsets start at 1 rather than 0 */
- chromeos_get_chromeos_acpi()->vbt10 =
- (u32)t->eos + (version_offset - 1);
+ chromeos_get_chromeos_acpi()->vbt10 = (u32)t->eos + (version_offset - 1);
#endif
-#endif /* CONFIG_CHROMEOS */
-
+ t->bios_version = smbios_add_string(t->eos, get_bios_version());
uint32_t rom_size = CONFIG_ROM_SIZE;
rom_size = MIN(CONFIG_ROM_SIZE, 16 * MiB);
t->bios_rom_size = (rom_size / 65535) - 1;
--
To view, visit https://review.coreboot.org/c/coreboot/+/42747
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: 4.11_branch
Gerrit-Change-Id: Iee62ed900095001ffac225fc629b3f2f52045e30
Gerrit-Change-Number: 42747
Gerrit-PatchSet: 3
Gerrit-Owner: Jonathan Zhang <jonzhang(a)fb.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Reviewer: insomniac <insomniac(a)slackware.it>
Gerrit-CC: Christian Walter <christian.walter(a)9elements.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: merged
Philipp Deppenwiese has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40308 )
Change subject: drivers/ocp/dmi: Add OCP_DMI driver for populating SMBIOS from IPMI FRU data
......................................................................
Patch Set 52: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/40308
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I08c958dfad83216cd12545760a19d205efc2515b
Gerrit-Change-Number: 40308
Gerrit-PatchSet: 52
Gerrit-Owner: Johnny Lin <Johnny_Lin(a)wiwynn.com>
Gerrit-Reviewer: Andrey Petrov <anpetrov(a)fb.com>
Gerrit-Reviewer: Christian Walter <christian.walter(a)9elements.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Jingle Hsu <jingle_hsu(a)wiwynn.com>
Gerrit-Reviewer: Jonathan Zhang <jonzhang(a)fb.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Maxim Polyakov <max.senia.poliak(a)gmail.com>
Gerrit-Reviewer: Morgan Jang
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Andrey Petrov <andrey.petrov(a)gmail.com>
Gerrit-CC: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Sat, 04 Jul 2020 11:19:08 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Philipp Deppenwiese has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41527 )
Change subject: mb/ocp/deltalake: Update IIO PCIe bifurcation according to different configs
......................................................................
Patch Set 20: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/41527
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I412336c32d093fe2bbdc7175f8e596923c77876f
Gerrit-Change-Number: 41527
Gerrit-PatchSet: 20
Gerrit-Owner: Johnny Lin <Johnny_Lin(a)wiwynn.com>
Gerrit-Reviewer: Andrey Petrov <anpetrov(a)fb.com>
Gerrit-Reviewer: Anjaneya "Reddy" Chagam <anjaneya.chagam(a)intel.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Jingle Hsu <jingle_hsu(a)wiwynn.com>
Gerrit-Reviewer: Jonathan Zhang <jonzhang(a)fb.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Morgan Jang
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Christian Walter <christian.walter(a)9elements.com>
Gerrit-Comment-Date: Sat, 04 Jul 2020 11:18:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Jonathan Zhang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/42947 )
Change subject: doc/mb/ocp: Add documentation for Delta Lake
......................................................................
doc/mb/ocp: Add documentation for Delta Lake
Add OCP platform Delta Lake documentation.
Signed-off-by: Jonathan Zhang <jonzhang(a)fb.com>
Change-Id: I9216c80023db071591c8d3add7c0f041e9e6b97e
---
A Documentation/mainboard/ocp/deltalake.md
1 file changed, 98 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/42947/1
diff --git a/Documentation/mainboard/ocp/deltalake.md b/Documentation/mainboard/ocp/deltalake.md
new file mode 100644
index 0000000..3af893a
--- /dev/null
+++ b/Documentation/mainboard/ocp/deltalake.md
@@ -0,0 +1,98 @@
+# OCP Delta Lake
+
+This page describes coreboot support status for the [OCP] (Open Compute Project)
+Delta Lake server platform.
+
+## Introduction
+
+OCP Delta Lake server platform is a component of multi-host server system
+Yosemite-V3. Both were announced by Facebook and Intel in [OCP virtual summit 2020].
+
+Delta Lake server is a one socket CooperLake Sacalable Processor server.
+
+Yosemite-V3 has multiple configurations. Depending on configurations, it may
+host up to 4 Delta Lake servers in one sled.
+
+Yosemite-V3 and Delta Lake are currently in DVT phase. Facebook, Intel and partners
+jointly develop FSP/coreboot/Linuxboot solution on Delta Lake as a hack project.
+
+## Required blobs
+
+This board currently requires:
+- FSP blob: The blob (Intel CooperLake Scalable Processor Firmware Support Package)
+ is not yet available to the public. It will be made public some time after the MP
+ of CooperLake Scalable Processor when the FSP is mature.
+- Microcode: Not yet available to the public.
+- ME binary: Not yet available to the public.
+
+## Payload
+- Linuxboot: This is necessary only if you use Linuxboot as coreboot payload.
+ U-root as initramfs, is used in the joint development. It can be built
+ following [All about u-root].
+
+## Flashing coreboot
+
+To do in-band FW image update, use [flashrom]:
+ flashrom -p internal:ich_spi_mode=hwseq -c "Opaque flash chip" --ifd \
+ -i bios --noverify-all -w <path to coreboot image>
+
+From OpenBMC, to update FW image:
+ fw-util slotx --update bios <path to coreboot image>
+
+To power off/on the host:
+ power-util slotx off
+ power-util slotx on
+
+To connect to console through SOL (Serial Over Lan):
+ sol-util slotx
+
+## Working features
+The solution is developed using Linuxboot payload. The Linuxboot
+kernel versions tried is 5.2.9. The initramfs image is u-root.
+- Most SMBIOS types
+- BMC integration:
+ - BMC readiness check
+ - IPMI commands
+ - watchdog timer
+ - POST complete pin acknowledgement
+- SEL record generation
+- Early serial output
+- port 80h direct to GPIO
+- ACPI tables: APIC/DSDT/FACP/FACS/HPET/MCFG/SPMI/SRAT/SLIT/SSDT
+- Skipping memory training upon subsequent reboots
+- BMC crash dump
+- Error injection through ITP
+
+## Firmware configurations
+[ChromeOS VPD] is used to store most of firmware configurations. RO_VPD
+holds default values, while RW_VPD holds customized values.
+
+VPD variables supported are:
+- firmware_version: This variable holds overall firmware version. coreboot
+ uses its value to populate smbios type 1 version field.
+
+## Known issues / feature gaps
+- Even though CPX-SP FSP is based on FSP 2.2 framework, it does not
+ support FSP_USES_CB_STACK. An IPS ticket is filed with Intel.
+- VT-d is not supported. An IPS ticket is filed with Intel.
+- PCIe bifuration is not supported. An IPS ticket is filed with Intel.
+- SMBIOS type 7 and type 17 are not populated.
+- ME based power capping.
+
+## Technology
+
+```eval_rst
++------------------------+---------------------------------------------+
+| Processor (1 socket) | Intel CooperLake Scalable Processor |
++------------------------+---------------------------------------------+
+| BMC | Aspeed AST 2500 |
++------------------------+---------------------------------------------+
+| PCH | Intel Lewisburg C621 |
++------------------------+---------------------------------------------+
+```
+
+[OCP]: https://www.opencompute.org
+[OCP virtual summit 2020]: https://www.opencompute.org/summit/virtual-summit/schedule
+[flashrom]: https://flashrom.org/Flashrom
+[All about u-root]: https://github.com/linuxboot/book/tree/master/u-root
+[ChromeOS VPD]: https://chromium.googlesource.com/chromiumos/platform/vpd/+/master/README.md
--
To view, visit https://review.coreboot.org/c/coreboot/+/42947
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9216c80023db071591c8d3add7c0f041e9e6b97e
Gerrit-Change-Number: 42947
Gerrit-PatchSet: 1
Gerrit-Owner: Jonathan Zhang <jonzhang(a)fb.com>
Gerrit-MessageType: newchange