[coreboot] New patch to review for coreboot: 6e6e012 smbios: Don't fill out firmware version on ChromeOS
Stefan Reinauer (stefan.reinauer@coreboot.org)
gerrit at coreboot.org
Thu Apr 5 21:24:00 CEST 2012
Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/867
-gerrit
commit 6e6e0125ce79d04956ef818fcb247215aec04840
Author: Stefan Reinauer <reinauer at chromium.org>
Date: Tue Apr 3 16:02:54 2012 -0700
smbios: Don't fill out firmware version on ChromeOS
In ChromeOS we potentially have different payloads with
different versions. Since the user land tools get information
on which one of them is loaded, leave the string in smbios
empty so we can fill it out in the payload.
Also fill out system version number and serial number with
some constant values.
Change-Id: Id1fed5a54b511c730975fa83347452f1274b8504
Signed-off-by: Stefan Reinauer <reinauer at google.com>
---
src/arch/x86/boot/smbios.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/arch/x86/boot/smbios.c b/src/arch/x86/boot/smbios.c
index 2bd00c4..f39bf04 100644
--- a/src/arch/x86/boot/smbios.c
+++ b/src/arch/x86/boot/smbios.c
@@ -29,6 +29,9 @@
#include <cpu/x86/name.h>
#include <cbfs_core.h>
#include <arch/byteorder.h>
+#if CONFIG_CHROMEOS
+#include <vendorcode/google/chromeos/gnvs.h>
+#endif
static u8 smbios_checksum(u8 *p, u32 length)
{
@@ -126,8 +129,18 @@ static int smbios_write_type0(unsigned long *current, int handle)
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, COREBOOT_VERSION);
+#else
+#define SPACES \
+ " "
+ t->bios_release_date = smbios_add_string(t->eos, COREBOOT_DMI_DATE);
+ u32 version_offset = (u32)smbios_string_table_len(t->eos);
+ t->bios_version = smbios_add_string(t->eos, SPACES);
+ /* SMBIOS offsets start at 1 rather than 0 */
+ vboot_data->vbt10 = (u32)t->eos + (version_offset - 1);
+#endif
if ((hdr = get_cbfs_header()) != (struct cbfs_header *)0xffffffff)
t->bios_rom_size = (ntohl(hdr->romsize) / 65535) - 1;
@@ -160,6 +173,8 @@ static int smbios_write_type1(unsigned long *current, int handle)
t->length = len - 2;
t->manufacturer = smbios_add_string(t->eos, CONFIG_MAINBOARD_VENDOR);
t->product_name = smbios_add_string(t->eos, CONFIG_MAINBOARD_PART_NUMBER);
+ t->serial_number = smbios_add_string(t->eos, "123456789");
+ t->version = smbios_add_string(t->eos, "1.0");
len = t->length + smbios_string_table_len(t->eos);
*current += len;
return len;
More information about the coreboot
mailing list