diff options
author | Christoffer Dall <c.dall@virtualopensystems.com> | 2013-01-20 18:43:10 -0500 |
---|---|---|
committer | Christoffer Dall <c.dall@virtualopensystems.com> | 2013-01-23 13:29:09 -0500 |
commit | 9e9a367c29cebd25a356d53414612e115efdadcf (patch) | |
tree | cca8b98c33597179e5cbc50118b1cf86e6299ed0 /arch/arm/include | |
parent | cc577c26e2e9740b046591a72e77213c556bff19 (diff) |
ARM: Section based HYP idmap
Add a method (hyp_idmap_setup) to populate a hyp pgd with an
identity mapping of the code contained in the .hyp.idmap.text
section.
Offer a method to drop this identity mapping through
hyp_idmap_teardown.
Make all the above depend on CONFIG_ARM_VIRT_EXT and CONFIG_ARM_LPAE.
Reviewed-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/idmap.h | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/pgtable-3level-hwdef.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/include/asm/idmap.h b/arch/arm/include/asm/idmap.h index bf863edb517d..1a66f907e5cc 100644 --- a/arch/arm/include/asm/idmap.h +++ b/arch/arm/include/asm/idmap.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #define __idmap __section(.idmap.text) noinline notrace | 8 | #define __idmap __section(.idmap.text) noinline notrace |
9 | 9 | ||
10 | extern pgd_t *idmap_pgd; | 10 | extern pgd_t *idmap_pgd; |
11 | extern pgd_t *hyp_pgd; | ||
11 | 12 | ||
12 | void setup_mm_for_reboot(void); | 13 | void setup_mm_for_reboot(void); |
13 | 14 | ||
diff --git a/arch/arm/include/asm/pgtable-3level-hwdef.h b/arch/arm/include/asm/pgtable-3level-hwdef.h index d7952824c5c4..a2d404ed1ade 100644 --- a/arch/arm/include/asm/pgtable-3level-hwdef.h +++ b/arch/arm/include/asm/pgtable-3level-hwdef.h | |||
@@ -44,6 +44,7 @@ | |||
44 | #define PMD_SECT_XN (_AT(pmdval_t, 1) << 54) | 44 | #define PMD_SECT_XN (_AT(pmdval_t, 1) << 54) |
45 | #define PMD_SECT_AP_WRITE (_AT(pmdval_t, 0)) | 45 | #define PMD_SECT_AP_WRITE (_AT(pmdval_t, 0)) |
46 | #define PMD_SECT_AP_READ (_AT(pmdval_t, 0)) | 46 | #define PMD_SECT_AP_READ (_AT(pmdval_t, 0)) |
47 | #define PMD_SECT_AP1 (_AT(pmdval_t, 1) << 6) | ||
47 | #define PMD_SECT_TEX(x) (_AT(pmdval_t, 0)) | 48 | #define PMD_SECT_TEX(x) (_AT(pmdval_t, 0)) |
48 | 49 | ||
49 | /* | 50 | /* |