arch: mach-k3: Fix incorrect mapping of higher DDR addresses as device memory
Subsystems (2)
PATCH 1/1 arch: mach-k3: Fix incorrect mapping of higher DDR addresses as device memory
Entry for physical address 0x500000000 in memory map table for MMU configuration is spilling over and inadvertently making DDR available at higher address (above 4GB address space) get mapped as device memory (nGnRnE).
Fix this by adjusting entry size. Tested on AM62A SK. Before this patch:
=> time crc32 0x881000000 0x20000000
crc32 for 881000000 ... 8a0ffffff ==> 7f34d7ca
time: 1 minutes, 14.716 seconds
After patch:
=> time crc32 0x881000000 0x20000000
crc32 for 881000000 ... 8a0ffffff ==> 7f34d7ca
time: 2.710 seconds
---
Applies to u-boot/next
arch/arm/mach-k3/arm64-mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-k3/arm64-mmu.c +1 -1
@@ -41,7 +41,7 @@ struct mm_region k3_mem_map[] = { }, { .virt = 0x500000000UL, .phys = 0x500000000UL, - .size =0x400000000UL , + .size =0x380000000UL , .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |PTE_BLOCK_NON_SHARE |PTE_BLOCK_PXN |PTE_BLOCK_UXN
Signature · 1 line
2.40.0
Quoted 43 lines · Sekhar Nori
Entry for physical address
0x500000000in memory map table for MMU configuration is spilling over and inadvertently making DDR available at higher address (above 4GB address space) get mapped as device memory (nGnRnE).Fix this by adjusting entry size. Tested on AM62A SK. Before this patch:
=> time crc32
0x8810000000x20000000
crc32 for 881000000 ...8a0ffffff==>7f34d7catime: 1 minutes, 14.716 seconds
After patch:
=> time crc32
0x8810000000x20000000
crc32 for 881000000 ...8a0ffffff==>7f34d7catime: 2.710 seconds
Acked-by Andrew Davis <[email protected]>Signed-off-by Sekhar Nori <[email protected]>---
Applies to u-boot/nextarch/arm/mach-k3/arm64-mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-k3/arm64-mmu.c +1
-1@@ -41,7 +41,7 @@ struct mm_region k3_mem_map[] = { }, { .virt = 0x500000000UL, .phys = 0x500000000UL, - .size =0x400000000UL , + .size =0x380000000UL , .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |PTE_BLOCK_NON_SHARE |PTE_BLOCK_PXN |PTE_BLOCK_UXN Signature · 1 line
2.40.0
Thanks.
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Quoted 14 lines · Sekhar Nori
Entry for physical address
0x500000000in memory map table for MMU configuration is spilling over and inadvertently making DDR available at higher address (above 4GB address space) get mapped as device memory (nGnRnE).Fix this by adjusting entry size. Tested on AM62A SK. Before this patch:
=> time crc32
0x8810000000x20000000
crc32 for 881000000 ...8a0ffffff==>7f34d7catime: 1 minutes, 14.716 seconds
After patch:
Quoted 8 lines
=> time crc32
0x8810000000x20000000
crc32 for 881000000 ...8a0ffffff==>7f34d7catime: 2.710 seconds
Acked-by Andrew Davis <[email protected]>Signed-off-by Sekhar Nori <[email protected]>Reviewed-by Nishanth Menon <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom