Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2673
-gerrit
commit 6bb8525518ef836b35f948c104dd923aa6068127
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Wed Dec 12 12:32:43 2012 -0600
baskingridge: zero out alt_gp_smi_en in devicetree
The baskingridge has a non-zero alt_gp_smi_en value in the
devicetree.cb file. It has just to be determined which GPI
pins should trigger an SMI on basking ridge. Without this change
the board would hang during boot (presumably through a SMI flood).
No more hangs once the value is zero.
Change-Id: I9704071bb7966bd3d0bbbc4aafede3f42d829b17
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/mainboard/intel/baskingridge/devicetree.cb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mainboard/intel/baskingridge/devicetree.cb b/src/mainboard/intel/baskingridge/devicetree.cb
index 737de1c..c74767a 100644
--- a/src/mainboard/intel/baskingridge/devicetree.cb
+++ b/src/mainboard/intel/baskingridge/devicetree.cb
@@ -47,7 +47,7 @@ chip northbridge/intel/haswell
# 2 SCI (if corresponding GPIO_EN bit is also set)
register "gpi1_routing" = "1"
register "gpi14_routing" = "2"
- register "alt_gp_smi_en" = "0x0002"
+ register "alt_gp_smi_en" = "0x0000"
register "gpe0_en" = "0x4000"
register "ide_legacy_combined" = "0x0"
Patrick Georgi (patrick(a)georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2662
-gerrit
commit fc2976167726e066d16c1cd8c920d6df90144848
Author: Nico Huber <nico.huber(a)secunet.com>
Date: Fri Mar 8 12:36:04 2013 +0100
amdk8: Increase limits for MMIO to TOLM..MMCONF
ACPI tells the OS that TOLM..MMCONF is safe to use for device's
MMIO regions. Unfortunately we never told the chipset, but gave
it only the region that our own resource assignment used.
With this change, devices that are configured by the OS (for
whatever reason: PCIe hotplug, because the OS feels like it, or
as in our case, a bug in the coreboot resource allocator that
leaves devices unallocated) actually work (assuming that there
are no other bugs)
Change-Id: Ib63c05484739d84198a9f10352be2055c6f14385
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
Signed-off-by: Patrick Georgi <patrick.georgi(a)secunet.com>
---
src/northbridge/amd/amdk8/northbridge.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c
index 5c1d97a..da8cf48 100644
--- a/src/northbridge/amd/amdk8/northbridge.c
+++ b/src/northbridge/amd/amdk8/northbridge.c
@@ -33,6 +33,8 @@
#include <cpu/amd/amdk8_sysconf.h>
+#include <southbridge/amd/rs690/rs690.h>
+
struct amdk8_sysconf_t sysconf;
#define MAX_FX_DEVS 8
@@ -531,6 +533,10 @@ static void amdk8_set_resources(device_t dev)
struct bus *bus;
struct resource *res;
+ struct resource *mem_lowest = NULL, *mem_highest = NULL;
+
+ const uint32_t topmem = (uint32_t)bsp_topmem();
+
/* Find the nodeid */
nodeid = amdk8_nodeid(dev);
@@ -559,6 +565,29 @@ static void amdk8_set_resources(device_t dev)
res->index = index;
amdk8_set_resource(dev, res, nodeid);
+
+ if (res->flags & IORESOURCE_MEM) {
+ if (!mem_lowest || (res->base > topmem &&
+ res->base < mem_lowest->base))
+ mem_lowest = res;
+ if (!mem_highest ||
+ (res->base + res->size) >
+ (mem_highest->base + mem_highest->size))
+ mem_highest = res;
+ }
+ }
+
+ if (mem_lowest && mem_lowest->base > topmem) {
+ mem_lowest->size += mem_lowest->base - topmem;
+ mem_lowest->base = topmem;
+ mem_lowest->flags &= ~IORESOURCE_STORED;
+ amdk8_set_resource(dev, mem_lowest, nodeid);
+ }
+ if (mem_highest && (mem_highest->base + mem_highest->size) <
+ EXT_CONF_BASE_ADDRESS) {
+ mem_highest->size = EXT_CONF_BASE_ADDRESS - mem_highest->base;
+ mem_highest->flags &= ~IORESOURCE_STORED;
+ amdk8_set_resource(dev, mem_highest, nodeid);
}
compact_resources(dev);
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2670
-gerrit
commit 571fa2ec65e2de9afd57c22611144d13599ac91b
Author: Gabe Black <gabeblack(a)google.com>
Date: Wed Mar 6 04:46:00 2013 -0800
libpayload: Don't do unaligned accesses during LZMA decompression
Use memcpy to access a uint32_t that's inherently unaligned due to the layout
of the LZMA header format.
Built and booted on Daisy and saw a data abort go away. Built and booted
into developer mode on Link and verified that bitmaps were
decompressed/displayed correctly.
Change-Id: Id3ae746c04d23bcb0345cb71797bfa219479cc8f
Signed-off-by: Gabe Black <gabeblack(a)google.com>
---
payloads/libpayload/liblzma/lzma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/payloads/libpayload/liblzma/lzma.c b/payloads/libpayload/liblzma/lzma.c
index 73c499a..0b97213 100644
--- a/payloads/libpayload/liblzma/lzma.c
+++ b/payloads/libpayload/liblzma/lzma.c
@@ -26,7 +26,7 @@ unsigned long ulzma(const unsigned char * src, unsigned char * dst)
unsigned char scratchpad[15980];
memcpy(properties, src, LZMA_PROPERTIES_SIZE);
- outSize = *(UInt32 *)(src + LZMA_PROPERTIES_SIZE);
+ memcpy(&outSize, src + LZMA_PROPERTIES_SIZE, sizeof(outSize));
if (LzmaDecodeProperties(&state.Properties, properties, LZMA_PROPERTIES_SIZE) != LZMA_RESULT_OK) {
printf("lzma: Incorrect stream properties.\n");
return 0;
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2669
-gerrit
commit eec503dcc4bbedc5e9da50a1a3f043c8d782d367
Author: Gabe Black <gabeblack(a)google.com>
Date: Tue Feb 26 23:18:24 2013 -0800
libpayload: Add size_t and ssize_t types for ARM and x86
Some new TPM drivers in depthcharge require that type. I added it to
arch/types.h which seemed appropriate, but I'm not sure that's exactly the
right header to use, or in other words if you'd get that type from libpayload
the same way you'd get it if you were building a standard Linux program.
Also, I attempted to determine what underlying types gcc would use, and while
I think I picked the right ones I'm not 100% certain of that either.
Change-Id: Ic5c0b4173c8565ede3bfce8870976d596d69e51d
Signed-off-by: Gabe Black <gabeblack(a)google.com>
---
payloads/libpayload/include/armv7/arch/types.h | 3 +++
payloads/libpayload/include/x86/arch/types.h | 3 +++
2 files changed, 6 insertions(+)
diff --git a/payloads/libpayload/include/armv7/arch/types.h b/payloads/libpayload/include/armv7/arch/types.h
index 1bd815b..d6f4aa8 100644
--- a/payloads/libpayload/include/armv7/arch/types.h
+++ b/payloads/libpayload/include/armv7/arch/types.h
@@ -53,6 +53,9 @@ typedef signed long long s64;
typedef long time_t;
typedef long suseconds_t;
+typedef unsigned int size_t;
+typedef int ssize_t;
+
#ifndef NULL
#define NULL ((void *)0)
#endif
diff --git a/payloads/libpayload/include/x86/arch/types.h b/payloads/libpayload/include/x86/arch/types.h
index 1bd815b..d6f4aa8 100644
--- a/payloads/libpayload/include/x86/arch/types.h
+++ b/payloads/libpayload/include/x86/arch/types.h
@@ -53,6 +53,9 @@ typedef signed long long s64;
typedef long time_t;
typedef long suseconds_t;
+typedef unsigned int size_t;
+typedef int ssize_t;
+
#ifndef NULL
#define NULL ((void *)0)
#endif
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2668
-gerrit
commit f5443f112f7d039a20fe2af9e9f73fbb3ff5776e
Author: Gabe Black <gabeblack(a)google.com>
Date: Tue Feb 26 19:08:28 2013 -0800
libpayload: Move over to the payload's stack during startup
Don't keep using the coreboot stack on ARMv7.
Change-Id: I734c5d77f8584e30ee0c720d41e21e3040f56db4
Signed-off-by: Gabe Black <gabeblack(a)google.com>
---
payloads/libpayload/arch/armv7/head.S | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/payloads/libpayload/arch/armv7/head.S b/payloads/libpayload/arch/armv7/head.S
index e1b5737..7a706e3 100644
--- a/payloads/libpayload/arch/armv7/head.S
+++ b/payloads/libpayload/arch/armv7/head.S
@@ -31,14 +31,21 @@
.text
.align 4
+1:
+.word _stack
+
/*
* Our entry point
*/
_entry:
/* TODO: disable interrupts */
+
/* TODO: Clear BSS */
- /* TODO: Setup new stack */
+
+ /* Setup new stack */
+ ldr sp, 1b
+
/* TODO: Save old stack pointer */
/* Let's rock. */
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2666
-gerrit
commit ab3c4451ea496cce5f79bd8bd74a7ec8d1ca1122
Author: Gabe Black <gabeblack(a)google.com>
Date: Fri Feb 1 20:19:27 2013 -0800
libpayload: Add usb_generic_(create|remove) functions for unrecognized devices
It might be useful to provide a USB driver in the payload itself instead of in
libpayload. For example there are multiple payloads being built and linked
against the same libpayload, and they might not need or even want to have the
same set of drivers installed.
This change adds two new functions, usb_generic_create and usb_generic_remove,
which behave like the usbdisk_create and usbdisk_remove functions which are
defined for USB mass storage devices. If a USB device isn't recognized and
claimed by one of the built in USB class drivers (currently hub, hid, and msc)
and the create function is defined, then it will be called to give the payload
a chance to use the device. Once it's removed, if usb_generic_remove is
defined it will be called, effectively giving the payload notice.
Built and booted depthcharge on Link. Built depthcharge for Daisy. Built
a netbooting payload, called usb_poll() with those functions implemented, and
verified that they were called and that the devices they were told about were
reasonable and the same as what was reported by lsusb in the booted system.
Change-Id: Ief7c0a513b60849fbf2986ef4ae5c9e7825fef16
Signed-off-by: Gabe Black <gabeblack(a)google.com>
---
payloads/libpayload/drivers/usb/usb.c | 20 ++++++++++++++++++++
payloads/libpayload/include/usb/usb.h | 19 +++++++++++++++++++
2 files changed, 39 insertions(+)
diff --git a/payloads/libpayload/drivers/usb/usb.c b/payloads/libpayload/drivers/usb/usb.c
index ff67e0c..0448d38 100644
--- a/payloads/libpayload/drivers/usb/usb.c
+++ b/payloads/libpayload/drivers/usb/usb.c
@@ -402,6 +402,7 @@ set_address (hci_t *controller, int speed, int hubport, int hubaddr)
usb_debug ("HID\n");
#ifdef CONFIG_USB_HID
controller->devices[adr]->init = usb_hid_init;
+ return adr;
#else
usb_debug ("NOTICE: USB HID support not compiled in\n");
#endif
@@ -419,6 +420,7 @@ set_address (hci_t *controller, int speed, int hubport, int hubaddr)
usb_debug ("MSC\n");
#ifdef CONFIG_USB_MSC
controller->devices[adr]->init = usb_msc_init;
+ return adr;
#else
usb_debug ("NOTICE: USB MSC support not compiled in\n");
#endif
@@ -427,6 +429,7 @@ set_address (hci_t *controller, int speed, int hubport, int hubaddr)
usb_debug ("hub\n");
#ifdef CONFIG_USB_HUB
controller->devices[adr]->init = usb_hub_init;
+ return adr;
#else
usb_debug ("NOTICE: USB hub support not compiled in.\n");
#endif
@@ -456,6 +459,7 @@ set_address (hci_t *controller, int speed, int hubport, int hubaddr)
usb_debug("unsupported class %x\n", class);
break;
}
+ controller->devices[adr]->init = usb_generic_init;
return adr;
}
@@ -491,3 +495,19 @@ usb_attach_device(hci_t *controller, int hubaddress, int port, int speed)
return controller->devices[newdev] ? newdev : -1;
}
+static void
+usb_generic_destroy (usbdev_t *dev)
+{
+ if (usb_generic_remove)
+ usb_generic_remove(dev);
+}
+
+void
+usb_generic_init (usbdev_t *dev)
+{
+ dev->data = NULL;
+ dev->destroy = usb_generic_destroy;
+
+ if (usb_generic_create)
+ usb_generic_create(dev);
+}
diff --git a/payloads/libpayload/include/usb/usb.h b/payloads/libpayload/include/usb/usb.h
index d862182..d82ce27 100644
--- a/payloads/libpayload/include/usb/usb.h
+++ b/payloads/libpayload/include/usb/usb.h
@@ -238,6 +238,7 @@ void usb_nop_init (usbdev_t *dev);
void usb_hub_init (usbdev_t *dev);
void usb_hid_init (usbdev_t *dev);
void usb_msc_init (usbdev_t *dev);
+void usb_generic_init (usbdev_t *dev);
u8 *get_descriptor (usbdev_t *dev, unsigned char bmRequestType,
int descType, int descIdx, int langID);
@@ -276,4 +277,22 @@ static inline void usb_debug(const char *fmt, ...)
#endif
}
+/**
+ * To be implemented by libpayload-client. It's called by the USB stack
+ * when a new USB device is found which isn't claimed by a built in driver,
+ * so the client has the chance to know about it.
+ *
+ * @param dev descriptor for the USB device
+ */
+void __attribute__((weak)) usb_generic_create (usbdev_t *dev);
+
+/**
+ * To be implemented by libpayload-client. It's called by the USB stack
+ * when it finds out that a USB device is removed which wasn't claimed by a
+ * built in driver.
+ *
+ * @param dev descriptor for the USB device
+ */
+void __attribute__((weak)) usb_generic_remove (usbdev_t *dev);
+
#endif