ArmPkg/ArmMmuLib ARM: Split off XN page descriptor bit from type field
With large page support out of the picture, we can treat bits 1 and 0 of the page descriptor as individual valid and XN bits, instead of treating XN as a page type. Doing so aligns the handling of the attribute with the section descriptor layout, as well as the XN handling on AArch64, and this is beneficial for maintainability. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
This commit is contained in:
committed by
mergify[bot]
parent
82ccaaf8e7
commit
3b76284883
@@ -54,11 +54,9 @@
|
||||
#define TT_DESCRIPTOR_SECTION_TYPE_IS_PAGE_TABLE(Desc) (((Desc) & 3UL) == TT_DESCRIPTOR_SECTION_TYPE_PAGE_TABLE)
|
||||
|
||||
// Translation table descriptor types
|
||||
#define TT_DESCRIPTOR_PAGE_TYPE_MASK (3UL << 0)
|
||||
#define TT_DESCRIPTOR_PAGE_TYPE_FAULT (0UL << 0)
|
||||
#define TT_DESCRIPTOR_PAGE_TYPE_PAGE (2UL << 0)
|
||||
#define TT_DESCRIPTOR_PAGE_TYPE_PAGE_XN (3UL << 0)
|
||||
#define TT_DESCRIPTOR_PAGE_TYPE_LARGEPAGE (1UL << 0)
|
||||
#define TT_DESCRIPTOR_PAGE_TYPE_MASK (1UL << 1)
|
||||
#define TT_DESCRIPTOR_PAGE_TYPE_FAULT (0UL << 1)
|
||||
#define TT_DESCRIPTOR_PAGE_TYPE_PAGE (1UL << 1)
|
||||
|
||||
// Section descriptor definitions
|
||||
#define TT_DESCRIPTOR_SECTION_SIZE (0x00100000)
|
||||
|
Reference in New Issue
Block a user