]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mach-k3: Do not map ATF and OPTEE regions in MMU
authorAndrew Davis <afd@ti.com>
Tue, 28 Nov 2023 17:05:26 +0000 (11:05 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 15 Dec 2023 20:27:48 +0000 (15:27 -0500)
ATF and OPTEE regions may be firewalled from non-secure entities. To
prevent access to this area we leave a hole there in the MMU map. This
is the same idea as [0] but we complete that patch by adding the same
for AM65, J721e, J7200, and J721s2 here.

[0] commit 0688ff3ae23c ("arm: mach-k3: arm64-mmu: do not map ATF and OPTEE regions in A53 MMU")

Signed-off-by: Andrew Davis <afd@ti.com>
arch/arm/mach-k3/arm64-mmu.c

index d872ed714c44470acc932b3e1acfaf7ca6da5955..5c858ae0f84e7ca5881e6e6d95bb0c9f8d124f66 100644 (file)
@@ -24,7 +24,7 @@ struct mm_region am654_mem_map[] = {
        }, {
                .virt = 0x80000000UL,
                .phys = 0x80000000UL,
-               .size = 0x20000000UL,
+               .size = 0x1e780000UL,
                .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
                         PTE_BLOCK_INNER_SHARE
        }, {
@@ -75,7 +75,7 @@ struct mm_region j7200_mem_map[] = {
        }, {
                .virt = 0x80000000UL,
                .phys = 0x80000000UL,
-               .size = 0x20000000UL,
+               .size = 0x1e780000UL,
                .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
                         PTE_BLOCK_INNER_SHARE
        }, {
@@ -123,7 +123,7 @@ struct mm_region j721e_mem_map[] = {
        }, {
                .virt = 0x80000000UL,
                .phys = 0x80000000UL,
-               .size = 0x20000000UL,
+               .size = 0x1e780000UL,
                .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
                         PTE_BLOCK_INNER_SHARE
        }, {
@@ -180,7 +180,13 @@ struct mm_region j721s2_mem_map[] = {
        }, {
                .virt = 0x80000000UL,
                .phys = 0x80000000UL,
-               .size = 0x80000000UL,
+               .size = 0x1e780000UL,
+               .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+                        PTE_BLOCK_INNER_SHARE
+       }, {
+               .virt = 0xa0000000UL,
+               .phys = 0xa0000000UL,
+               .size = 0x60000000UL,
                .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
                         PTE_BLOCK_INNER_SHARE
        }, {