Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11194
-gerrit
commit 7c4fdfc9f24f1ada3c9abf7dffb1d699a48febee
Author: Julius Werner <jwerner(a)chromium.org>
Date: Fri Aug 7 15:29:41 2015 -0700
libpayload: usb: xhci: Fix list of cleared port change bits
The xhci_rh_port_status_changed() function tries to always clear all
port status bits, even though most of them don't interest us. This is
generally a smart thing to do since not clearing a status bit may cause
the controller to not generate any more Port Status Change Events.
However, the bitmask we currently use doesn't cover bit 23 (Port Config
Error Change) and instead covers bit 16 (Port Link State Write Strobe)
which is not really related to this and not a W1C bit. Probably a typo,
so let's fix that.
BRANCH=None
BUG=None
TEST=Plugged/unplugged a bunch of USB devices on an XHCI Falco.
Original-Change-Id: Ia83f5b72cce094859c0f0e730752d7b5cfa6e1c6
Original-Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/291842
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Change-Id: I11f5fe38cb70055daf6e866a8ee84ca80488e3bf
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
---
payloads/libpayload/drivers/usb/xhci_rh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/payloads/libpayload/drivers/usb/xhci_rh.c b/payloads/libpayload/drivers/usb/xhci_rh.c
index bcb01ac..d7ba82c 100644
--- a/payloads/libpayload/drivers/usb/xhci_rh.c
+++ b/payloads/libpayload/drivers/usb/xhci_rh.c
@@ -53,7 +53,7 @@ xhci_rh_port_status_changed(usbdev_t *const dev, const int port)
const int changed = !!(*portsc & (PORTSC_CSC | PORTSC_PRC));
/* always clear all the status change bits */
- *portsc = (*portsc & PORTSC_RW_MASK) | 0x00ef0000;
+ *portsc = (*portsc & PORTSC_RW_MASK) | 0x00fe0000;
return changed;
}
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11189
-gerrit
commit f827e9b800463597b3dafdd0b2edbb0573ad640c
Author: Julius Werner <jwerner(a)chromium.org>
Date: Fri Aug 7 13:14:20 2015 -0700
libpayload: usb: xhci: Count new Max Scratchpad Bufs bits from XHCI 1.1
The 1.1 revision of the XHCI specification added an extra 5 bits to the
Max Scratchpad Bufs field of HCSPARAMS2 that newer controllers make use
of. Not honoring these bits means we're not allocating as many
scratchpad buffers as the controller expects, which means it will
interpret some uninitialized values from the end of the pointer array as
scratchpad buffer pointers, which obviously doesn't end well. Let's fix
that.
BRANCH=none
BUG=chrome-os-partner:42279
TEST=Makes a USB-related memory corruption issue disappear.
Original-Change-Id: I7c907492339262bda31cdd2b5c0b588de7df8544
Original-Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/291681
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Change-Id: Iba1007bfebffe1f564f78bb875fff9ba0fe11a38
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
---
payloads/libpayload/drivers/usb/xhci.c | 6 ++++--
payloads/libpayload/drivers/usb/xhci_private.h | 5 +++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/payloads/libpayload/drivers/usb/xhci.c b/payloads/libpayload/drivers/usb/xhci.c
index 315efb7..71272c7 100644
--- a/payloads/libpayload/drivers/usb/xhci.c
+++ b/payloads/libpayload/drivers/usb/xhci.c
@@ -227,7 +227,8 @@ xhci_init (unsigned long physical_bar)
* Let dcbaa[0] point to another array of pointers, sp_ptrs.
* The pointers therein point to scratchpad buffers (pages).
*/
- const size_t max_sp_bufs = xhci->capreg->Max_Scratchpad_Bufs;
+ const size_t max_sp_bufs = xhci->capreg->Max_Scratchpad_Bufs_Hi << 5 |
+ xhci->capreg->Max_Scratchpad_Bufs_Lo;
xhci_debug("max scratchpad bufs: 0x%zx\n", max_sp_bufs);
if (max_sp_bufs) {
const size_t sp_ptrs_size = max_sp_bufs * sizeof(u64);
@@ -417,7 +418,8 @@ xhci_shutdown(hci_t *const controller)
#endif
if (xhci->sp_ptrs) {
- const size_t max_sp_bufs = xhci->capreg->Max_Scratchpad_Bufs;
+ size_t max_sp_bufs = xhci->capreg->Max_Scratchpad_Bufs_Hi << 5 |
+ xhci->capreg->Max_Scratchpad_Bufs_Lo;
for (i = 0; i < max_sp_bufs; ++i) {
if (xhci->sp_ptrs[i])
free(phys_to_virt(xhci->sp_ptrs[i]));
diff --git a/payloads/libpayload/drivers/usb/xhci_private.h b/payloads/libpayload/drivers/usb/xhci_private.h
index 05cf195..f644425 100644
--- a/payloads/libpayload/drivers/usb/xhci_private.h
+++ b/payloads/libpayload/drivers/usb/xhci_private.h
@@ -348,9 +348,10 @@ typedef struct xhci {
struct {
unsigned long IST:4;
unsigned long ERST_Max:4;
- unsigned long:18;
+ unsigned long:13;
+ unsigned long Max_Scratchpad_Bufs_Hi:5;
unsigned long SPR:1;
- unsigned long Max_Scratchpad_Bufs:5;
+ unsigned long Max_Scratchpad_Bufs_Lo:5;
} __attribute__ ((packed));
} __attribute__ ((packed));
union {
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11188
-gerrit
commit b63c4c9e8fe525d5577e0f4fa584c558890cec1c
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Thu Aug 6 14:08:55 2015 -0700
libpayload: Do not gate USB_DWC2 on USB_HID
This forward-ports the change from CL:277155 since the Kconfig file
was renamed from Config.in.
BUG=chrome-os-partner:41416
BRANCH=none
TEST=built and booted on Mickey, keyboard works at dev screen
Original-Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
Original-Change-Id: Ibffa5188df51ecd7b8bdd631d4b767ec64130819
Original-Reviewed-on: https://chromium-review.googlesource.com/291138
Original-Commit-Ready: David Hendricks <dhendrix(a)chromium.org>
Original-Tested-by: David Hendricks <dhendrix(a)chromium.org>
Original-Reviewed-by: Julius Werner <jwerner(a)chromium.org>
Change-Id: Iebb1da6ec8c7886a6eb9ebcc67b59d617496c555
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
---
payloads/libpayload/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/payloads/libpayload/Kconfig b/payloads/libpayload/Kconfig
index 5da4f92..64289b3 100644
--- a/payloads/libpayload/Kconfig
+++ b/payloads/libpayload/Kconfig
@@ -514,7 +514,7 @@ config USB_XHCI_MTK_QUIRK
config USB_DWC2
bool "Support for USB DesignWare HCD controllers"
- depends on USB && !USB_HID
+ depends on USB
help
Select this option if you want to use DesignWare USB 2.0 host controller
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11185
-gerrit
commit cec20ffb42baf4963b74144a2aec5035a6e9ba9c
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue Aug 4 15:33:23 2015 -0500
skylake: fix invalid GNVS base address
Leaving a sentinel 0xC0DEBABE and fixing it up is
is the old way of setting the correct base address
for GNVS. One just needs to reference NVSA which is
already filled in by the skylake ACPI code.
BUG=chrome-os-partner:43611
BUG=chrome-os-partner:43522
BRANCH=None
TEST=Built and booted glados. /sys/firmware/log shows
up as well as ramoops using the correct address.
Original-Change-Id: I1d4979b1bb65faa76316a4ec4c551a7b9b9eed32
Original-Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/290338
Original-Reviewed-by: Duncan Laurie <dlaurie(a)chromium.org>
Change-Id: I25efea73a383215f9365ce91230f79516b0201a6
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/soc/intel/skylake/acpi/globalnvs.asl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/soc/intel/skylake/acpi/globalnvs.asl b/src/soc/intel/skylake/acpi/globalnvs.asl
index 3df40cd..5d07be7 100644
--- a/src/soc/intel/skylake/acpi/globalnvs.asl
+++ b/src/soc/intel/skylake/acpi/globalnvs.asl
@@ -30,7 +30,8 @@ Name (\PICM, 0) // IOAPIC/8259
* we have to fix it up in coreboot's ACPI creation phase.
*/
-OperationRegion (GNVS, SystemMemory, 0xC0DEBABE, 0x2000)
+External(NVSA)
+OperationRegion (GNVS, SystemMemory, NVSA, 0x2000)
Field (GNVS, ByteAcc, NoLock, Preserve)
{
/* Miscellaneous */