Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13468
-gerrit
commit 756edbbce03212f5c8545e65a65981d2ba29c92a
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue Jan 26 09:01:14 2016 -0600
cbfstool: provide buffer_offset()
Instead of people open coding the offset field access within a
struct buffer provide buffer_offset() so that the implementation
can change if needed without high touch in the code base.
Change-Id: I751c7145687a8529ab549d87e412b7f2d1fb90ed
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
util/cbfstool/common.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h
index 561a17a..42ae1e2 100644
--- a/util/cbfstool/common.h
+++ b/util/cbfstool/common.h
@@ -62,6 +62,11 @@ static inline size_t buffer_size(const struct buffer *b)
return b->size;
}
+static inline size_t buffer_offset(const struct buffer *b)
+{
+ return b->offset;
+}
+
/*
* Shrink a buffer toward the beginning of its previous space.
* Afterward, buffer_delete() remains the means of cleaning it up. */
@@ -125,7 +130,7 @@ static inline void *buffer_get_original_backing(const struct buffer *b)
{
if (!b)
return NULL;
- return b->data - b->offset;
+ return buffer_get(b) - buffer_offset(b);
}
/* Creates an empty memory buffer with given size.
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13467
-gerrit
commit ba8579c1e73a8c307901267e87675b1b1f79f344
Author: Julius Werner <jwerner(a)chromium.org>
Date: Thu Jan 21 11:12:38 2016 -0800
chromeos: vpd: Avoid reading uninitialized VPDs
This patch adds a check to the VPD parsing code to avoid reading the
whole thing if the first byte ('type' of the first VPD entry) is 0x00
or 0xff. These values match the TERMINATOR and IMPLICIT_TERMINATOR types
which should never occur as the first entry, so this usually means that
the VPD FMAP section has simply never been initialized correctly. This
early abort avoids wasting time to read the whole section from SPI flash
(which we'd otherwise have to since we're not going to find a Google VPD
2.0 header either).
BRANCH=None
BUG=None
TEST=Booted Oak, confirmed that VPD read times dropped from 100ms to
1.5ms.
Change-Id: I9fc473e06440aef4e1023238fb9e53d45097ee9d
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 20a726237e03941ad626a6146700170a45ee7720
Original-Change-Id: I09bfec3c24d24214fa4e9180878b58d00454f399
Original-Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/322897
Original-Reviewed-by: Hung-Te Lin <hungte(a)chromium.org>
---
src/vendorcode/google/chromeos/cros_vpd.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/vendorcode/google/chromeos/cros_vpd.c b/src/vendorcode/google/chromeos/cros_vpd.c
index e826d36..d0e2cc1 100644
--- a/src/vendorcode/google/chromeos/cros_vpd.c
+++ b/src/vendorcode/google/chromeos/cros_vpd.c
@@ -65,11 +65,21 @@ static int32_t get_vpd_size(const char *fmap_name, int32_t *base)
}
/* Try if we can find a google_vpd_info, otherwise read whole VPD. */
- if (rdev_readat(&vpd, &info, *base, sizeof(info)) == sizeof(info) &&
- memcmp(info.header.magic, VPD_INFO_MAGIC, sizeof(info.header.magic))
+ if (rdev_readat(&vpd, &info, *base, sizeof(info)) != sizeof(info)) {
+ printk(BIOS_ERR, "ERROR: Failed to read %s header.\n",
+ fmap_name);
+ return 0;
+ }
+
+ if (memcmp(info.header.magic, VPD_INFO_MAGIC, sizeof(info.header.magic))
== 0 && size >= info.size + sizeof(info)) {
*base += sizeof(info);
size = info.size;
+ } else if (info.header.tlv.type == VPD_TYPE_TERMINATOR ||
+ info.header.tlv.type == VPD_TYPE_IMPLICIT_TERMINATOR) {
+ printk(BIOS_WARNING, "WARNING: %s is uninitialized or empty.\n",
+ fmap_name);
+ size = 0;
} else {
size -= GOOGLE_VPD_2_0_OFFSET;
}
the following patch was just integrated into master:
commit 0a97d7eeba244b3a18249d07995dcfa884c14920
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Mon Jan 25 09:51:22 2016 +0100
crossgcc: Enable powerpc64-linux target without ppc64-linux headers
It may still fail on non-Linux, and the compiler may do fancy things,
but it builds.
Change-Id: If3456f5fef8d01082a49978dc7cda5450f96f5cc
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Reviewed-on: https://review.coreboot.org/13416
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich(a)gmail.com>
Reviewed-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
See https://review.coreboot.org/13416 for details.
-gerrit
Damien Zammit (damien(a)zamaudio.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13453
-gerrit
commit 9ba21041885eee6c2f281c0226f4759afa8a01c4
Author: Damien Zammit <damien(a)zamaudio.com>
Date: Tue Jan 26 13:57:17 2016 +1100
mb/intel/d510mo: Add CPU, SMI-trap and PIC to DSDT
Change-Id: I80853cadb4762d9bb34926e31d65d248c5683417
Signed-off-by: Damien Zammit <damien(a)zamaudio.com>
---
src/mainboard/intel/d510mo/acpi/platform.asl | 28 ++++++++++++++++++++++++++++
src/mainboard/intel/d510mo/dsdt.asl | 5 ++++-
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/src/mainboard/intel/d510mo/acpi/platform.asl b/src/mainboard/intel/d510mo/acpi/platform.asl
new file mode 100644
index 0000000..6c92a4e
--- /dev/null
+++ b/src/mainboard/intel/d510mo/acpi/platform.asl
@@ -0,0 +1,28 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015 Damien Zammit <damien(a)zamaudio.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+Method(_PIC, 1)
+{
+ /* Remember the OS' IRQ routing choice. */
+ Store(Arg0, PICM)
+}
+
+/* SMI I/O Trap */
+Method(TRAP, 1, Serialized)
+{
+ Store (Arg0, SMIF) /* SMI Function */
+ Store (0, TRP0) /* Generate trap */
+ Return (SMIF) /* Return value of SMI handler */
+}
diff --git a/src/mainboard/intel/d510mo/dsdt.asl b/src/mainboard/intel/d510mo/dsdt.asl
index c1f72f9..a7788bd 100644
--- a/src/mainboard/intel/d510mo/dsdt.asl
+++ b/src/mainboard/intel/d510mo/dsdt.asl
@@ -2,7 +2,7 @@
* This file is part of the coreboot project.
*
* Copyright (C) 2007-2009 coresystems GmbH
- * Copyright (C) 2015 Damien Zammit <damien(a)zamaudio.com>
+ * Copyright (C) 2015 Damien Zammit <damien(a)zamaudio.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -23,8 +23,11 @@ DefinitionBlock(
0x20090419 // OEM revision
)
{
+ #include "acpi/platform.asl"
#include <southbridge/intel/i82801gx/acpi/globalnvs.asl>
+ #include <cpu/intel/common/acpi/cpu.asl>
+
Scope (\_SB) {
Device (PCI0)
{
Damien Zammit (damien(a)zamaudio.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13455
-gerrit
commit f29578d4dd359051cf91a6b478eb68be47819ebd
Author: Damien Zammit <damien(a)zamaudio.com>
Date: Tue Jan 26 14:06:26 2016 +1100
mb/intel/d510mo: Explicitly select NIC on PCI in devicetree
Change-Id: Ic6682865dd17672c3782bfba9511cd120d1657c1
Signed-off-by: Damien Zammit <damien(a)zamaudio.com>
---
src/mainboard/intel/d510mo/devicetree.cb | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/mainboard/intel/d510mo/devicetree.cb b/src/mainboard/intel/d510mo/devicetree.cb
index c0f38de..3cfcf5f 100644
--- a/src/mainboard/intel/d510mo/devicetree.cb
+++ b/src/mainboard/intel/d510mo/devicetree.cb
@@ -43,7 +43,10 @@ chip northbridge/intel/pineview # Northbridge
register "gpe0_en" = "0x20000040"
device pci 1b.0 on end # Audio
- device pci 1c.0 on end # PCIe 1
+ device pci 1c.0 on # PCIe 1
+ device pci 0.0 on # NIC
+ end
+ end
device pci 1c.1 on end # PCIe 2
device pci 1c.2 on end # PCIe 3
device pci 1c.3 on end # PCIe 4