coreboot-kgpe-d16/src/soc
Jianjun Wang f1b5b0dfa6 soc/mediatek: PCI: Fix translation window
Dojo fails to boot from NVMe with CONFIG_RESOURCE_ALLOCATION_TOP_DOWN
enabled. The root cause is using __fls() will get a smaller value when
the size is not a power of 2, for example, __fls(0x3000000) = 25. Hence
the PCIe translation window size is set to 0x2000000. Accessing
addresses higher than 0x2300000 will fail.

Fix translation window by splitting the MMIO space to multiple tables if
its size is not a power of 2.

Resolves: https://ticket.coreboot.org/issues/508.

TEST=Build pass and boot up to kernel successfully via SSD on Dojo
board, it can boot with and without the
CONFIG_RESOURCE_ALLOCATION_TOP_DOWN option.

BUS=b:298255933
BRANCH=cherry

Change-Id: I42b0f0bf9222d284dee0c29f1a6ed6366d6e6689
Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78044
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-09 13:59:16 +00:00
..
amd soc/amd/common/vboot: Fix PSP verstage timestamps after TSC adoption 2023-10-09 13:56:22 +00:00
cavium soc/cavium: Use weak over attrbute__((weak)) 2023-09-14 14:40:37 +00:00
example/min86 soc: Remove SOC_SPECIFIC_OPTIONS 2023-08-21 23:45:43 +00:00
intel soc/intel/meteorlake: Reserve IOE P2SB MMIO correctly 2023-10-09 13:42:01 +00:00
mediatek soc/mediatek: PCI: Fix translation window 2023-10-09 13:59:16 +00:00
nvidia soc/nvidia: Remove space between function name and '(' 2023-09-11 15:51:44 +00:00
qualcomm qualcomm/common: Remove carriage returns from QcLib log 2023-09-14 23:53:54 +00:00
rockchip cbmem_top_chipset: Change the return value to uintptr_t 2022-11-18 16:00:45 +00:00
samsung soc/samsung/exynos5250/clock: Remove space before semicolon 2023-08-20 22:00:03 +00:00
sifive/fu540 soc/sifive/fu540: Remove space after a cast 2023-09-19 13:13:27 +00:00
ti src/soc/ti: Remove unnecessary space after casts 2022-11-22 13:42:28 +00:00
ucb/riscv cbmem_top_chipset: Change the return value to uintptr_t 2022-11-18 16:00:45 +00:00