diff options
author | Julius Werner <jwerner@chromium.org> | 2015-08-07 20:07:12 -0700 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2015-08-10 12:24:45 -0400 |
commit | fd318e4cdc47dec763411e1467e542939e6b7d86 (patch) | |
tree | bac3ec3595a26231f4724a75366dd9879f0d86ba /src/hw/usb-xhci.c | |
parent | 9ee2e26255661a191b0ff9fa276d545ce59845c2 (diff) | |
download | seabios-fd318e4cdc47dec763411e1467e542939e6b7d86.tar.gz |
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.
We just fixed this in libpayload and it seems to apply the same way to
SeaBIOS (I only compile-tested this, though... sorry).
Signed-off-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/hw/usb-xhci.c')
-rw-r--r-- | src/hw/usb-xhci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hw/usb-xhci.c b/src/hw/usb-xhci.c index 41a6a3f3..7fc13c48 100644 --- a/src/hw/usb-xhci.c +++ b/src/hw/usb-xhci.c @@ -465,7 +465,7 @@ configure_xhci(void *data) xhci->evts->cs = 1; reg = readl(&xhci->caps->hcsparams2); - u32 spb = reg >> 27; + u32 spb = (reg >> 21 & 0x1f) << 5 | reg >> 27; if (spb) { dprintf(3, "%s: setup %d scratch pad buffers\n", __func__, spb); u64 *spba = memalign_high(64, sizeof(*spba) * spb); |