mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
ArmPkg/ArmMmuLib: Drop buggy secure memory type check
Jake reports that the IS_ARM_MEMORY_REGION_ATTRIBUTES_SECURE() macro is no longer accurate since commit 852227a9d52e3cb9 ("ArmPkg/Mmu: Remove handling of NONSECURE memory regions"). Fortunately, it only affects the NS bit in level 1 short descriptors, which is ignored when executing in non-secure mode. And given that running UEFI in the secure world is not a use case we aim to support, let's just drop this logic altogether. Reported-by: Jake Garver <jake@nvidia.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
This commit is contained in:
parent
b7a48bed16
commit
4f4a2c3b07
@ -45,8 +45,6 @@ typedef enum {
|
|||||||
ARM_MEMORY_REGION_ATTRIBUTE_DEVICE,
|
ARM_MEMORY_REGION_ATTRIBUTE_DEVICE,
|
||||||
} ARM_MEMORY_REGION_ATTRIBUTES;
|
} ARM_MEMORY_REGION_ATTRIBUTES;
|
||||||
|
|
||||||
#define IS_ARM_MEMORY_REGION_ATTRIBUTES_SECURE(attr) ((UINT32)(attr) & 1)
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
EFI_PHYSICAL_ADDRESS PhysicalBase;
|
EFI_PHYSICAL_ADDRESS PhysicalBase;
|
||||||
EFI_VIRTUAL_ADDRESS VirtualBase;
|
EFI_VIRTUAL_ADDRESS VirtualBase;
|
||||||
|
@ -169,7 +169,6 @@ PopulateLevel2PageTable (
|
|||||||
|
|
||||||
// Overwrite the section entry to point to the new Level2 Translation Table
|
// Overwrite the section entry to point to the new Level2 Translation Table
|
||||||
*SectionEntry = (TranslationTable & TT_DESCRIPTOR_SECTION_PAGETABLE_ADDRESS_MASK) |
|
*SectionEntry = (TranslationTable & TT_DESCRIPTOR_SECTION_PAGETABLE_ADDRESS_MASK) |
|
||||||
(IS_ARM_MEMORY_REGION_ATTRIBUTES_SECURE (Attributes) ? (1 << 3) : 0) |
|
|
||||||
TT_DESCRIPTOR_SECTION_TYPE_PAGE_TABLE;
|
TT_DESCRIPTOR_SECTION_TYPE_PAGE_TABLE;
|
||||||
} else {
|
} else {
|
||||||
// We do not support the other section type (16MB Section)
|
// We do not support the other section type (16MB Section)
|
||||||
@ -192,7 +191,6 @@ PopulateLevel2PageTable (
|
|||||||
ZeroMem ((VOID *)TranslationTable, TRANSLATION_TABLE_PAGE_SIZE);
|
ZeroMem ((VOID *)TranslationTable, TRANSLATION_TABLE_PAGE_SIZE);
|
||||||
|
|
||||||
*SectionEntry = (TranslationTable & TT_DESCRIPTOR_SECTION_PAGETABLE_ADDRESS_MASK) |
|
*SectionEntry = (TranslationTable & TT_DESCRIPTOR_SECTION_PAGETABLE_ADDRESS_MASK) |
|
||||||
(IS_ARM_MEMORY_REGION_ATTRIBUTES_SECURE (Attributes) ? (1 << 3) : 0) |
|
|
||||||
TT_DESCRIPTOR_SECTION_TYPE_PAGE_TABLE;
|
TT_DESCRIPTOR_SECTION_TYPE_PAGE_TABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user