Patrick Georgi (pgeorgi@google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13914
-gerrit
commit 8dd3dc3c4b803eca6c76f1615be30b48d697f6a8 Author: huang lin hl@rock-chips.com Date: Thu Mar 3 15:29:34 2016 +0800
libpayload: mmu: Initialize the base 4GiB as device memory
This allows to accommodate different platforms' default configurations, memory configuration is fine tuned later during boot process.
BUG=chrome-os-partner:51537 BRANCH=none TEST=none yet, the full stack of patches boots fine on EVB
Change-Id: I39da4ce247422f67451711ac0ed5a5e1119ed836 Signed-off-by: Patrick Georgi pgeorgi@chromium.org Original-Commit-Id: 97a9a71ade4df8a501043f9ae58463a3135e2a4f Original-Change-Id: I39da4ce247422f67451711ac0ed5a5e1119ed836 Original-Signed-off-by: huang lin hl@rock-chips.com Original-Signed-off-by: Vadim Bendebury vbendeb@chromium.org Original-Reviewed-on: https://chromium-review.googlesource.com/332384 Original-Reviewed-by: Furquan Shaikh furquan@chromium.org --- payloads/libpayload/arch/arm64/mmu.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/payloads/libpayload/arch/arm64/mmu.c b/payloads/libpayload/arch/arm64/mmu.c index f07e4c4..553b2d5 100644 --- a/payloads/libpayload/arch/arm64/mmu.c +++ b/payloads/libpayload/arch/arm64/mmu.c @@ -260,7 +260,7 @@ void mmu_config_range(void *start, size_t size, uint64_t tag) * Desc : Initialize mmu based on the mmu_memrange passed. ttb_buffer is used as * the base address for xlat tables. TTB_DEFAULT_SIZE defines the max number of * tables that can be used - * Assuming that memory 0-2GiB is device memory. + * Assuming that memory 0-4GiB is device memory. */ uint64_t mmu_init(struct mmu_ranges *mmu_ranges) { @@ -275,7 +275,14 @@ uint64_t mmu_init(struct mmu_ranges *mmu_ranges) printf("Libpayload ARM64: TTB_BUFFER: 0x%p Max Tables: %d\n", (void*)xlat_addr, max_tables);
- mmu_config_range(NULL, 0x80000000, TYPE_DEV_MEM); + /* + * To keep things simple we start with mapping the entire base 4GB as + * device memory. This accommodates various architectures' default + * settings (for instance rk3399 mmio starts at 0xf8000000); it is + * fine tuned (e.g. mapping DRAM areas as write-back) later in the + * boot process. + */ + mmu_config_range(NULL, 0x100000000, TYPE_DEV_MEM);
for (; i < mmu_ranges->used; i++) mmu_config_range((void *)mmu_ranges->entries[i].base,