coreboot-kgpe-d16/payloads/libpayload/drivers/usb
Julius Werner 6c1a669b44 libpayload: xhci: Do not memcpy registers
memcpy() is meant to be used on normal memory and often implemented with
architecture-specific optimizations to make that as performant as
possible. MMIO registers often have special access restrictions that may
be incompatible with whatever memcpy() does. For example, on arm64 it
uses the LDP (load pair) to load 16 bytes at a time, which makes 4-byte
MMIO registers unhappy.

This patch removes the caching of the XHCI capreg registers and changes
it back to a pointer. The CAP_GET() macro is still accessing a full
(non-bitfield) uint32_t at the end so this should still generate a
4-byte access (which was the goal of the original change in CB:39838).

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Id058c8813087a8e8cb85f570399e07fb8a597108
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40895
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2020-04-30 01:57:05 +00:00
..
Kconfig
TODO
dwc2.c payloads: Fix typos 2020-02-17 16:01:50 +00:00
dwc2.h
dwc2_private.h
dwc2_rh.c
ehci.c treewide: capitalize 'USB' 2020-02-26 17:06:40 +00:00
ehci.h
ehci_private.h
ehci_rh.c payloads: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-07 17:15:30 +00:00
generic_hub.c
generic_hub.h
ohci.c payloads: Fix typos 2020-02-17 16:01:50 +00:00
ohci.h
ohci_private.h
ohci_rh.c
quirks.c
uhci.c libpayload/usb: Increase USB request timeout to 5 s 2019-07-02 17:42:18 +00:00
uhci.h
uhci_private.h
uhci_rh.c
usb.c treewide: capitalize 'USB' 2020-02-26 17:06:40 +00:00
usb_dev.c
usbhid.c payloads: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-07 17:15:30 +00:00
usbhub.c payloads: Fix typos 2020-02-17 16:01:50 +00:00
usbinit.c payloads: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-07 17:15:30 +00:00
usbmsc.c treewide: capitalize 'USB' 2020-02-26 17:06:40 +00:00
xhci.c libpayload: xhci: Do not memcpy registers 2020-04-30 01:57:05 +00:00
xhci.h
xhci_commands.c
xhci_debug.c
xhci_devconf.c libpayload/xhci: Fix MPS handling in set_address 2020-02-05 09:56:26 +00:00
xhci_events.c libpayload/usb: Increase USB request timeout to 5 s 2019-07-02 17:42:18 +00:00
xhci_private.h libpayload: xhci: Do not memcpy registers 2020-04-30 01:57:05 +00:00
xhci_rh.c lp/drivers/usb: Work around QEMU XHCI register issue 2020-04-14 09:47:22 +00:00