the following patch was just integrated into master:
commit d1da74ff9d61f42432eb78e76a11903afcf68b7b
Author: Martin Roth <gaumless(a)gmail.com>
Date: Sun Jun 21 12:06:28 2015 -0600
buildgcc: Add list of valid platform to the help text.
Change-Id: Ic48a08d1067c850555cf04ad29e65e9bdb7c4243
Signed-off-by: Martin Roth <gaumless(a)gmail.com>
Reviewed-on: http://review.coreboot.org/10619
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc.jones(a)se-eng.com>
See http://review.coreboot.org/10619 for details.
-gerrit
the following patch was just integrated into master:
commit 7403e059ec8cf1407b5f79c5665f7be99d195d77
Author: Martin Roth <gaumless(a)gmail.com>
Date: Fri Jun 5 21:01:59 2015 -0600
Remove incorrect Kconfig expressions
The symbols used in these expressions were not correct and would never
evaluate as true.
Change-Id: Ia20177f41505473b14bc7b8e4b6fb16de36cc295
Signed-off-by: Martin Roth <gaumless(a)gmail.com>
Reviewed-on: http://review.coreboot.org/10437
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See http://review.coreboot.org/10437 for details.
-gerrit
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10637
-gerrit
commit 76d63478c1c0bf7d73767c7cb637c5256eb88649
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Mon Jun 22 21:10:34 2015 +0200
acpi: bring back ability to link DSDT into ramstage
Bring back the ability to link in the DSDT. This is to help Chrome OS to
switch over to a new upstream quickly (because some of the custom built
mechanisms are a pain with tons of files).
This is supposed to be temporary (famous last words), but I'd rather fix the
lack of CBFS awareness in CrOS bit for good in the time I usually spend on
keeping upstream and CrOS branches close.
Change-Id: I7fa5540bbf5c568c4adca56a09c83b6c7e358ad5
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
---
src/arch/x86/Kconfig | 4 ++++
src/arch/x86/Makefile.inc | 17 +++++++++++++++++
src/arch/x86/boot/acpi.c | 7 +++++++
3 files changed, 28 insertions(+)
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig
index 1e35846..88b2592 100644
--- a/src/arch/x86/Kconfig
+++ b/src/arch/x86/Kconfig
@@ -134,3 +134,7 @@ config HPET_ADDRESS
config ID_SECTION_OFFSET
hex
default 0x80
+
+config COMPILE_IN_DSDT
+ bool "compile in DSDT and use that over DSDT in CBFS"
+ default n
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 4c00162..68c5ac4 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -245,6 +245,23 @@ endif # CONFIG_ARCH_ROMSTAGE_X86_32 / CONFIG_ARCH_ROMSTAGE_X86_64
ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32)$(CONFIG_ARCH_RAMSTAGE_X86_64),y)
+ifeq ($(CONFIG_COMPILE_IN_DSDT),y)
+ramstage-srcs += $(obj)/dsdt.aml
+
+ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y)
+target-objcopy=-O elf32-i386 -B i386
+endif
+ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_64),y)
+target-objcopy=-O elf64-x86_64 -B x86_64
+endif
+
+define ramstage-objs_aml_template
+$(call src-to-obj,ramstage,$(1).aml): $(1).aml
+ @printf " OBJCOPY $$(subst $$(obj)/,,$$(@))\n"
+ cd $$(dir $$@) && $$(OBJCOPY_ramstage) -I binary $$(target-objcopy) $$(notdir $$<) $$(notdir $$@)
+endef
+endif
+
ramstage-srcs += $(wildcard src/mainboard/$(MAINBOARDDIR)/mainboard.c)
ifeq ($(CONFIG_GENERATE_MP_TABLE),y)
ifneq ($(wildcard src/mainboard/$(MAINBOARDDIR)/mptable.c),)
diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c
index 208411e..cf33e40 100644
--- a/src/arch/x86/boot/acpi.c
+++ b/src/arch/x86/boot/acpi.c
@@ -757,9 +757,16 @@ unsigned long write_acpi_tables(unsigned long start)
if (fw)
return fw;
+#if CONFIG_COMPILE_IN_DSDT
+ extern char _binary_dsdt_aml_start;
+ extern char _binary_dsdt_aml_end;
+ dsdt_file = (acpi_header_t *)&_binary_dsdt_aml_start;
+ dsdt_size = (size_t)(&_binary_dsdt_aml_end - &_binary_dsdt_aml_start);
+#else
dsdt_file = cbfs_boot_map_with_leak(
CONFIG_CBFS_PREFIX "/dsdt.aml",
CBFS_TYPE_RAW, &dsdt_size);
+#endif
if (!dsdt_file) {
printk(BIOS_ERR, "No DSDT file, skipping ACPI tables\n");
return current;
Patrick Rudolph (siro(a)das-labor.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10636
-gerrit
commit 98d2b0efe57a63e64bda027edf177d4f3976c0de
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Mon Jun 22 19:46:34 2015 +0200
ddr3: add missing newline
Add missing newline to SPD CRC verification error message.
Verified by testing this code on Intel IvyBridge and Gigabyte GA-B75M-D3H.
Change-Id: Id1a0a2329507975c3f66ab884f6e26d99003318e
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
src/device/dram/ddr3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/device/dram/ddr3.c b/src/device/dram/ddr3.c
index c10741b..e1bb873 100644
--- a/src/device/dram/ddr3.c
+++ b/src/device/dram/ddr3.c
@@ -133,7 +133,7 @@ int spd_decode_ddr3(dimm_attr * dimm, spd_raw_data spd)
spd_crc = (spd[127] << 8) + spd[126];
/* Verify the CRC is correct */
if (crc != spd_crc) {
- printram("ERROR: SPD CRC failed!!!");
+ printram("ERROR: SPD CRC failed!!!\n");
ret = SPD_STATUS_CRC_ERROR;
};
Patrick Rudolph (siro(a)das-labor.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10629
-gerrit
commit 172821bb83387ea0e9b59526098b9bc5439600ec
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Mon Jun 22 19:32:53 2015 +0200
ddr3: Fix SPD CRC calculation
Use the correct SPD size for crc calculation. sizeof(*spd) returns 4
while sizeof(spd_raw_data) returns the expected value of 256.
Fixes erroneous printing of "ERROR: SPD CRC failed!!!" in raminit log.
Verified by testing this code on Intel IvyBridge and Gigabyte GA-B75M-D3H.
Change-Id: Iba305c69debd64fa921e08e00ec0a3531c80f56f
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
src/device/dram/ddr3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/device/dram/ddr3.c b/src/device/dram/ddr3.c
index 8170ae1..c10741b 100644
--- a/src/device/dram/ddr3.c
+++ b/src/device/dram/ddr3.c
@@ -128,7 +128,7 @@ int spd_decode_ddr3(dimm_attr * dimm, spd_raw_data spd)
dimm->dram_type = SPD_MEMORY_TYPE_SDRAM_DDR3;
dimm->dimm_type = spd[3] & 0xf;
- crc = spd_ddr3_calc_crc(spd, sizeof(*spd));
+ crc = spd_ddr3_calc_crc(spd, sizeof(spd_raw_data));
/* Compare with the CRC in the SPD */
spd_crc = (spd[127] << 8) + spd[126];
/* Verify the CRC is correct */
Patrick Rudolph (siro(a)das-labor.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10629
-gerrit
commit 7400cd88379a158ede0581c181290dcdd5548a7e
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Mon Jun 22 19:32:53 2015 +0200
ddr3: Fix SPD CRC calculation
Use the correct SPD size for crc calculation. sizeof(*spd) returns 4
while sizeof(spd_raw_data) returns the expected value of 256.
Change-Id: Iba305c69debd64fa921e08e00ec0a3531c80f56f
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
src/device/dram/ddr3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/device/dram/ddr3.c b/src/device/dram/ddr3.c
index 8170ae1..c10741b 100644
--- a/src/device/dram/ddr3.c
+++ b/src/device/dram/ddr3.c
@@ -128,7 +128,7 @@ int spd_decode_ddr3(dimm_attr * dimm, spd_raw_data spd)
dimm->dram_type = SPD_MEMORY_TYPE_SDRAM_DDR3;
dimm->dimm_type = spd[3] & 0xf;
- crc = spd_ddr3_calc_crc(spd, sizeof(*spd));
+ crc = spd_ddr3_calc_crc(spd, sizeof(spd_raw_data));
/* Compare with the CRC in the SPD */
spd_crc = (spd[127] << 8) + spd[126];
/* Verify the CRC is correct */
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10627
-gerrit
commit 47781ddd92f882eb36c44438aeb963f649daf124
Author: Stephen Barber <smbarber(a)chromium.org>
Date: Fri Jun 19 12:56:34 2015 -0700
chromeos: vpd: properly null terminate values
VPD strings are not null terminated, so we can't use strcpy
on them in cros_vpd_gets.
BUG=none
BRANCH=none
TEST=add serial_number followed by cam_calib_data to VPD on smaug;
make sure that smaug boots and serial number matches exactly (no garbage)
Change-Id: Id72885517b3d0b1934ba329c1ef0d89a67bd2bb4
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 56bbe6688b11043360a046a250d1ea93db4d9f0e
Original-Change-Id: I811dfc2f0830a91410eb69961a6565080ff78267
Original-Signed-off-by: Stephen Barber <smbarber(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/280836
Original-Reviewed-by: David Hendricks <dhendrix(a)chromium.org>
Original-Reviewed-by: Benson Leung <bleung(a)chromium.org>
---
src/vendorcode/google/chromeos/cros_vpd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/vendorcode/google/chromeos/cros_vpd.c b/src/vendorcode/google/chromeos/cros_vpd.c
index fed1d82..f9aec88 100644
--- a/src/vendorcode/google/chromeos/cros_vpd.c
+++ b/src/vendorcode/google/chromeos/cros_vpd.c
@@ -132,7 +132,8 @@ char *cros_vpd_gets(const char *key, char *buffer, int size)
return NULL;
if (size > (string_size + 1)) {
- strcpy(buffer, string_address);
+ memcpy(buffer, string_address, string_size);
+ buffer[string_size] = '\0';
} else {
memcpy(buffer, string_address, size - 1);
buffer[size - 1] = '\0';