diff options
author | Julius Werner <jwerner@chromium.org> | 2020-04-29 17:36:12 -0700 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2020-04-30 01:57:05 +0000 |
commit | 6c1a669b444fc7e6d7542ff910deca1a606d4c29 (patch) | |
tree | dcf3f1c52a45e534cd5eaa86e33b5bbe9ff23aa3 /src/mainboard/google/volteer | |
parent | 6f028e7993aaca3a7557f096fa36c0b848e42016 (diff) |
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>
Diffstat (limited to 'src/mainboard/google/volteer')
0 files changed, 0 insertions, 0 deletions