diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2017-03-01 16:31:40 +0000 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2017-03-07 09:38:08 +0100 |
commit | 521f3cedac4574c1431a3ad852ad160d9f849358 (patch) | |
tree | f318bb06ea25e963712333951554efe3c8863090 /ArmPkg/Include | |
parent | f49ea03de77d9928d2917e2594585919a51f6cff (diff) | |
download | edk2-521f3cedac4574c1431a3ad852ad160d9f849358.tar.gz edk2-521f3cedac4574c1431a3ad852ad160d9f849358.tar.bz2 edk2-521f3cedac4574c1431a3ad852ad160d9f849358.zip |
ArmPkg: move ARM version of SetMemoryAttributes to ArmMmuLib
... where it belongs, since AARCH64 already keeps it there, and
non DXE users of ArmMmuLib (such as DxeIpl, for the non-executable
stack) may need its functionality as well.
While at it, rename SetMemoryAttributes to ArmSetMemoryAttributes,
and make any functions that are not exported STATIC. Also, replace
an explicit gBS->AllocatePages() call [which is DXE specific] with
MemoryAllocationLib::AllocatePages().
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ArmPkg/Include')
-rw-r--r-- | ArmPkg/Include/Chipset/ArmV7Mmu.h | 6 | ||||
-rw-r--r-- | ArmPkg/Include/Library/ArmMmuLib.h | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/ArmPkg/Include/Chipset/ArmV7Mmu.h b/ArmPkg/Include/Chipset/ArmV7Mmu.h index 549a5cd7d4..4d913824b4 100644 --- a/ArmPkg/Include/Chipset/ArmV7Mmu.h +++ b/ArmPkg/Include/Chipset/ArmV7Mmu.h @@ -229,6 +229,12 @@ TT_DESCRIPTOR_PAGE_AP_RW_RW | \
TT_DESCRIPTOR_PAGE_CACHE_POLICY_NON_CACHEABLE)
+// First Level Descriptors
+typedef UINT32 ARM_FIRST_LEVEL_DESCRIPTOR;
+
+// Second Level Descriptors
+typedef UINT32 ARM_PAGE_TABLE_ENTRY;
+
UINT32
ConvertSectionAttributesToPageAttributes (
IN UINT32 SectionAttributes,
diff --git a/ArmPkg/Include/Library/ArmMmuLib.h b/ArmPkg/Include/Library/ArmMmuLib.h index c1d43872d5..d3a302fa81 100644 --- a/ArmPkg/Include/Library/ArmMmuLib.h +++ b/ArmPkg/Include/Library/ArmMmuLib.h @@ -62,4 +62,12 @@ ArmReplaceLiveTranslationEntry ( IN UINT64 Value
);
+EFI_STATUS
+ArmSetMemoryAttributes (
+ IN EFI_PHYSICAL_ADDRESS BaseAddress,
+ IN UINT64 Length,
+ IN UINT64 Attributes,
+ IN EFI_PHYSICAL_ADDRESS VirtualMask
+ );
+
#endif
|