From 2e5544302c20e9f67992b1890d361a5388c55c64 Mon Sep 17 00:00:00 2001 From: Maurizio Lombardi Date: Thu, 14 Feb 2013 23:07:31 +0100 Subject: [PATCH] bootloader: fix the pte_level0_descriptor_t structure The first level descriptor has only 3 permission bits (AP[1:0] and AP[2]), the fourth is the "shareable" bit. --- boot/arch/arm32/include/mm.h | 3 ++- boot/arch/arm32/src/mm.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/boot/arch/arm32/include/mm.h b/boot/arch/arm32/include/mm.h index a5261999e..9389f7308 100644 --- a/boot/arch/arm32/include/mm.h +++ b/boot/arch/arm32/include/mm.h @@ -80,7 +80,8 @@ typedef struct { unsigned int should_be_zero_1 : 1; unsigned int access_permission_0 : 2; unsigned int tex : 3; - unsigned int access_permission_1 : 2; + unsigned int access_permission_1 : 1; + unsigned int shareable : 1; unsigned int non_global : 1; unsigned int should_be_zero_2 : 1; unsigned int non_secure : 1; diff --git a/boot/arch/arm32/src/mm.c b/boot/arch/arm32/src/mm.c index c584ad7a6..082773f63 100644 --- a/boot/arch/arm32/src/mm.c +++ b/boot/arch/arm32/src/mm.c @@ -102,6 +102,7 @@ static void init_ptl0_section(pte_level0_section_t* pte, pte->access_permission_0 = PTE_AP_USER_NO_KERNEL_RW; pte->tex = 0; pte->access_permission_1 = 0; + pte->shareable = 0; pte->non_global = 0; pte->should_be_zero_2 = 0; pte->non_secure = 0; -- 2.11.4.GIT