4K Granule, 48bits OA, 40bits IPS

Table Descriptor (L0~2)

[63:59]     Attributes[4:0]
    -63     NSTable
    -62:61  APTable (see AP)
    -60     UXNTable / XNTable
    -59     PXNTable

[58:51]     IGNORED
[50:48]     RES0
[47:12]     Addr[47:12] of next level descriptor
[11:2 ]     INORED
[1    ]     1 (table)
[0    ]     1 (valid)

Block Descriptor (L1 and L2)

[63:50]     Upper Attributes (Block & Page)
[49:48]     RES0
[47:n ]     Output Address[47:n]  n=30 for L1, n=21 for L2
[n-1:17]    RES0
[16   ]     nT (FEAT-BBM)
[15:12]     RES0
[11:2 ]     Lower Attributes (Block & Page)
[1    ]     0 (block)
[0    ]     1 (valid)

Page Descriptor

[63:50]     Upper Attributes (Block & Page)
[49:48]     RES0
[47:12]     Output Address[47:n]  n=30 for L1, n=21 for L2
[11:2 ]     Lower Attributes (Block & Page)
[1    ]     1 (block)
[0    ]     1 (valid)

Descriptor [63:50] : Block & Page Upper Attributes

[63   ]     IGNORED
[62:59]     PBHA (FEAT_HPDS2)
[58:55]     SW Defined
[54   ]     UXN / XN
[53   ]     PXN
[52   ]     Contiguous
[51   ]     DBM (FEAT_HAFDBS)

Descriptor [11:2] : Block & Page Lower Attributes

[11 ]       NSE / NG
[10 ]       AF
[9:8]       SH[1:0]
[7:6]       AP[1:0] (see AP)
[5  ]       NS (Realm)
[4:2]       AttrIdx

AP[1:0] Access Permission

    EL1+    EL0
-----------------
00  RW      None
01  RW      RW
10  RO      None
11  RO      RO

Memory Type per MAIR_EL1 encoding.

AttrIdx     MemType
--------------------------
000         Device nGnRnE
001         Device nGnRE
010         Device GRE
011         Normal NC
100         Normal
101         Normal_WT
110         undefined
111         undefined