summaryrefslogtreecommitdiff
path: root/ArmPkg/Library/ArmMmuLib/Arm
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2017-03-01 16:31:41 +0000
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2017-03-07 09:38:08 +0100
commitd9c0d991f769c50e69d14a006bdbaaf31986143a (patch)
tree47de1ea5443ef0d1edbb127f6dc21f0e14c736fc /ArmPkg/Library/ArmMmuLib/Arm
parent521f3cedac4574c1431a3ad852ad160d9f849358 (diff)
downloadedk2-d9c0d991f769c50e69d14a006bdbaaf31986143a.zip
edk2-d9c0d991f769c50e69d14a006bdbaaf31986143a.tar.gz
edk2-d9c0d991f769c50e69d14a006bdbaaf31986143a.tar.bz2
ArmPkg/ArmMmuLib: remove VirtualMask arg from ArmSetMemoryAttributes
We no longer make use of the ArmMmuLib 'feature' to create aliased memory ranges with mismatched attributes, and in fact, it was only wired up in the ARM version to begin with. So remove the VirtualMask argument from ArmSetMemoryAttributes()'s prototype, and remove the dead code that referred to it. 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/Library/ArmMmuLib/Arm')
-rw-r--r--ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c b/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c
index 8a472a1..351b6c0 100644
--- a/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c
+++ b/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c
@@ -471,7 +471,6 @@ UpdatePageEntries (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length,
IN UINT64 Attributes,
- IN EFI_PHYSICAL_ADDRESS VirtualMask,
OUT BOOLEAN *FlushTlbs OPTIONAL
)
{
@@ -587,11 +586,6 @@ UpdatePageEntries (
// Mask in new attributes and/or permissions
PageTableEntry |= EntryValue;
- if (VirtualMask != 0) {
- // Make this virtual address point at a physical page
- PageTableEntry &= ~VirtualMask;
- }
-
if (CurrentPageTableEntry != PageTableEntry) {
Mva = (VOID *)(UINTN)((((UINTN)FirstLevelIdx) << TT_DESCRIPTOR_SECTION_BASE_SHIFT) + (PageTableIndex << TT_DESCRIPTOR_PAGE_BASE_SHIFT));
@@ -619,8 +613,7 @@ EFI_STATUS
UpdateSectionEntries (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length,
- IN UINT64 Attributes,
- IN EFI_PHYSICAL_ADDRESS VirtualMask
+ IN UINT64 Attributes
)
{
EFI_STATUS Status = EFI_SUCCESS;
@@ -704,7 +697,6 @@ UpdateSectionEntries (
(FirstLevelIdx + i) << TT_DESCRIPTOR_SECTION_BASE_SHIFT,
TT_DESCRIPTOR_SECTION_SIZE,
Attributes,
- VirtualMask,
NULL);
} else {
// still a section entry
@@ -714,9 +706,6 @@ UpdateSectionEntries (
// mask in new attributes and/or permissions
Descriptor |= EntryValue;
- if (VirtualMask != 0) {
- Descriptor &= ~VirtualMask;
- }
if (CurrentDescriptor != Descriptor) {
Mva = (VOID *)(UINTN)(((UINTN)FirstLevelTable) << TT_DESCRIPTOR_SECTION_BASE_SHIFT);
@@ -743,8 +732,7 @@ EFI_STATUS
ArmSetMemoryAttributes (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length,
- IN UINT64 Attributes,
- IN EFI_PHYSICAL_ADDRESS VirtualMask
+ IN UINT64 Attributes
)
{
EFI_STATUS Status;
@@ -766,8 +754,7 @@ ArmSetMemoryAttributes (
"SetMemoryAttributes(): MMU section 0x%lx length 0x%lx to %lx\n",
BaseAddress, ChunkLength, Attributes));
- Status = UpdateSectionEntries (BaseAddress, ChunkLength, Attributes,
- VirtualMask);
+ Status = UpdateSectionEntries (BaseAddress, ChunkLength, Attributes);
FlushTlbs = TRUE;
} else {
@@ -787,7 +774,7 @@ ArmSetMemoryAttributes (
BaseAddress, ChunkLength, Attributes));
Status = UpdatePageEntries (BaseAddress, ChunkLength, Attributes,
- VirtualMask, &FlushTlbs);
+ &FlushTlbs);
}
if (EFI_ERROR (Status)) {