Skip to content

Commit d456847

Browse files
committed
tests: Add tests for AArch64 Linux address translation
Note that the OS init for Linux on AArch64 does not currently use the dump data, taking only VMCOREINFO symbols into account. Consequently, only *.sym files are needed for the test cases. Signed-off-by: Petr Tesarik <[email protected]>
1 parent 620faa9 commit d456847

10 files changed

+174
-0
lines changed

tests/Makefile.am

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ test_scripts = \
228228
xlat-os-s390x-4l \
229229
xlat-os-s390x-5l \
230230
xlat-os-x86_64-none \
231+
xlat-linux-aarch64-5.2-va39 \
232+
xlat-linux-aarch64-5.8-va39 \
233+
xlat-linux-aarch64-5.8-va48 \
231234
xlat-linux-ia32 \
232235
xlat-linux-ia32-pae \
233236
xlat-linux-ppc64-64k \
@@ -327,6 +330,12 @@ dist_check_DATA = \
327330
xlat-os-s390x-5l.data \
328331
xlat-os-s390x-5l.expect \
329332
xlat-os-x86_64-none.expect \
333+
xlat-linux-aarch64-5.2-va39.expect \
334+
xlat-linux-aarch64-5.2-va39.sym \
335+
xlat-linux-aarch64-5.8-va39.expect \
336+
xlat-linux-aarch64-5.8-va39.sym \
337+
xlat-linux-aarch64-5.8-va48.expect \
338+
xlat-linux-aarch64-5.8-va48.sym \
330339
xlat-linux-ia32.data \
331340
xlat-linux-ia32.expect \
332341
xlat-linux-ia32-pae.data \

tests/xlat-linux-aarch64-5.2-va39

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#! /bin/sh
2+
3+
#
4+
# Check Linux 5.2 AArch64 translation with 39-bit virtual addresses
5+
# using data from VMCOREINFO.
6+
#
7+
8+
arch=aarch64
9+
ostype=1
10+
osver=0x050200
11+
opts=
12+
13+
. "$srcdir"/xlat-os-common
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@rootpgt: PGT
2+
target_as=MACHPHYSADDR
3+
root=KPHYSADDR:0x40b82000
4+
pte_mask=0x0
5+
pte_format=aarch64
6+
fields=12,9,9,9
7+
8+
@machphys_kphys: LINEAR
9+
target_as=KPHYSADDR
10+
off=0x0
11+
12+
@kphys_machphys: LINEAR
13+
target_as=MACHPHYSADDR
14+
off=0x0
15+
16+
KV -> HW:
17+
0-7fffffffff: @rootpgt
18+
8000000000-ffffff7fffffffff: NONE
19+
ffffff8000000000-ffffffffffffffff: @rootpgt
20+
21+
KV -> PHYS:
22+
0-7fffffffff: @rootpgt
23+
8000000000-ffffff7fffffffff: NONE
24+
ffffff8000000000-ffffffffffffffff: @rootpgt
25+
26+
KPHYS -> DIRECT:
27+
28+
MACHPHYS -> KPHYS:
29+
0-fffffffffffff: @machphys_kphys
30+
10000000000000-ffffffffffffffff: NONE
31+
32+
KPHYS -> MACHPHYS:
33+
0-fffffffffffff: @kphys_machphys
34+
10000000000000-ffffffffffffffff: NONE
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@VALUE(swapper_pg_dir)
2+
ffffff8010b82000
3+
@NUMBER(VA_BITS)
4+
27
5+
@NUMBER(kimage_voffset)
6+
ffffff7fd0000000
7+
@NUMBER(PHYS_OFFSET)
8+
40000000

tests/xlat-linux-aarch64-5.8-va39

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#! /bin/sh
2+
3+
#
4+
# Check Linux 5.8 AArch64 translation with 39-bit virtual addresses
5+
# using data from VMCOREINFO.
6+
#
7+
8+
arch=aarch64
9+
ostype=1
10+
osver=0x050800
11+
opts=
12+
13+
. "$srcdir"/xlat-os-common
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@rootpgt: PGT
2+
target_as=MACHPHYSADDR
3+
root=KPHYSADDR:0x40f11000
4+
pte_mask=0x0
5+
pte_format=aarch64
6+
fields=12,9,9,9
7+
8+
@machphys_kphys: LINEAR
9+
target_as=KPHYSADDR
10+
off=0x0
11+
12+
@kphys_machphys: LINEAR
13+
target_as=MACHPHYSADDR
14+
off=0x0
15+
16+
KV -> HW:
17+
0-7fffffffff: @rootpgt
18+
8000000000-ffffff7fffffffff: NONE
19+
ffffff8000000000-ffffffffffffffff: @rootpgt
20+
21+
KV -> PHYS:
22+
0-7fffffffff: @rootpgt
23+
8000000000-ffffff7fffffffff: NONE
24+
ffffff8000000000-ffffffffffffffff: @rootpgt
25+
26+
KPHYS -> DIRECT:
27+
28+
MACHPHYS -> KPHYS:
29+
0-fffffffffffff: @machphys_kphys
30+
10000000000000-ffffffffffffffff: NONE
31+
32+
KPHYS -> MACHPHYS:
33+
0-fffffffffffff: @kphys_machphys
34+
10000000000000-ffffffffffffffff: NONE
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@VALUE(swapper_pg_dir)
2+
ffffffe1b8911000
3+
@NUMBER(VA_BITS)
4+
27
5+
@NUMBER(kimage_voffset)
6+
ffffffe177a00000
7+
@NUMBER(PHYS_OFFSET)
8+
ffffffe3c0000000

tests/xlat-linux-aarch64-5.8-va48

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#! /bin/sh
2+
3+
#
4+
# Check Linux 5.8 AArch64 translation with 48-bit virtual addresses
5+
# using data from VMCOREINFO.
6+
#
7+
8+
arch=aarch64
9+
ostype=1
10+
osver=0x050800
11+
opts=
12+
13+
. "$srcdir"/xlat-os-common
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@rootpgt: PGT
2+
target_as=MACHPHYSADDR
3+
root=KPHYSADDR:0x40f11000
4+
pte_mask=0x0
5+
pte_format=aarch64
6+
fields=12,9,9,9,9
7+
8+
@machphys_kphys: LINEAR
9+
target_as=KPHYSADDR
10+
off=0x0
11+
12+
@kphys_machphys: LINEAR
13+
target_as=MACHPHYSADDR
14+
off=0x0
15+
16+
KV -> HW:
17+
0-ffffffffffff: @rootpgt
18+
1000000000000-fffeffffffffffff: NONE
19+
ffff000000000000-ffffffffffffffff: @rootpgt
20+
21+
KV -> PHYS:
22+
0-ffffffffffff: @rootpgt
23+
1000000000000-fffeffffffffffff: NONE
24+
ffff000000000000-ffffffffffffffff: @rootpgt
25+
26+
KPHYS -> DIRECT:
27+
28+
MACHPHYS -> KPHYS:
29+
0-fffffffffffff: @machphys_kphys
30+
10000000000000-ffffffffffffffff: NONE
31+
32+
KPHYS -> MACHPHYS:
33+
0-fffffffffffff: @kphys_machphys
34+
10000000000000-ffffffffffffffff: NONE
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@VALUE(swapper_pg_dir)
2+
ffffd4c459111000
3+
@NUMBER(VA_BITS)
4+
30
5+
@NUMBER(kimage_voffset)
6+
ffffd4c418200000
7+
@NUMBER(PHYS_OFFSET)
8+
ffff804f80000000

0 commit comments

Comments
 (0)