coreboot-kgpe-d16/payloads
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
..
coreinfo payloads: Fix typos 2020-02-17 16:01:50 +00:00
external payloads/tianocore: Allow custom boot splash for UefiPayloadPkg 2020-04-28 08:01:24 +00:00
libpayload libpayload: xhci: Do not memcpy registers 2020-04-30 01:57:05 +00:00
linuxcheck Makefile.inc, payloads: Enable -Wvla 2019-08-20 20:57:01 +00:00
nvramcui Makefile.inc, payloads: Enable -Wvla 2019-08-20 20:57:01 +00:00
Kconfig payloads/nvramcui: Select USE_OPTION_TABLE 2020-04-09 15:27:30 +00:00
Makefile.inc payloads/external: Add yabits payload 2018-09-16 13:10:17 +00:00