1 def b(x
): # byte-reverse function
2 return int.from_bytes(x
.to_bytes(8, byteorder
='little'),
3 byteorder
='big', signed
=False)
6 0x10000: # PARTITION_TABLE_2
7 # PATB_GR=1 PRTB=0x1000 PRTS=0xb
10 0x30000: # RADIX_ROOT_PTE
11 # V = 1 L = 0 NLB = 0x400 NLS = 9
12 b(0x8000000000040009),
14 0x40000: # RADIX_SECOND_LEVEL
15 # V = 1 L = 1 SW = 0 RPN = 0
16 # R = 1 C = 1 ATT = 0 EAA 0x3
17 b(0xc000000000000183),
19 0x1000000: # PROCESS_TABLE_3
20 # RTS1 = 0x2 RPDB = 0x300 RTS2 = 0x5 RPDS = 13
21 b(0x40000000000300ad),
28 # executable permission is barred here (EAA=0x2)
30 0x10000: # PARTITION_TABLE_2
31 # PATB_GR=1 PRTB=0x1000 PRTS=0xb
32 b(0x800000000100000b),
34 0x30000: # RADIX_ROOT_PTE
35 # V = 1 L = 0 NLB = 0x400 NLS = 9
36 b(0x8000000000040009),
38 0x40000: # RADIX_SECOND_LEVEL
39 # V = 1 L = 1 SW = 0 RPN = 0
40 # R = 1 C = 1 ATT = 0 EAA 0x2
41 b(0xc000000000000182),
43 0x1000000: # PROCESS_TABLE_3
44 # RTS1 = 0x2 RPDB = 0x300 RTS2 = 0x5 RPDS = 13
45 b(0x40000000000300ad),
52 # microwatt mmu.bin first part of test 3. PRTBL must be set to 0x12000, PID to 1
54 0x10000: 0x0930010000000080, # leaf node
55 0x12010: 0x0a00010000000000, # page table
56 0x8108: 0x0000000badc0ffee, # memory to be looked up