aarch64 baremetal svc factored out for C and asm

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-02-18 00:00:00 +00:00
parent a8b6f758ba
commit e855a262fd
17 changed files with 355 additions and 334 deletions

View File

@@ -11293,21 +11293,19 @@ output:
==== ARM exception handling
Setup a handler for `svc`, do an `svc`, and observe that the handler got called and returned:
....
./run --arch aarch64 --baremetal arch/aarch64/svc_asm
....
Source: link:baremetal/arch/aarch64/svc_asm.S[]
TODO: factor out the above, and make it also work on C:
Setup a handler for `svc`, do an `svc`, and observe that the handler got called and returned from C and assembly:
....
./run --arch aarch64 --baremetal arch/aarch64/svc
./run --arch aarch64 --baremetal arch/aarch64/svc_asm
....
Output:
Sources:
* link:baremetal/arch/aarch64/svc_asm.S[]
* link:baremetal/arch/aarch64/svc.c[]
Output for the C one:
....
daif 0x3c0
@@ -11315,8 +11313,6 @@ spsel 0x1
vbar_el1 0x0
....
Source: link:baremetal/arch/aarch64/svc.c[]
The vector table format is described on <<armarm8>> Table D1-7 "Vector offsets from vector table base address".
A good representation of the format of the vector table can also be found at <<programmers-guide-for-armv8-a>> Table 10-2 "Vector table offsets from vector table base address".
@@ -13034,7 +13030,7 @@ to the terminal, then our run scripts detect that and exit with status `1`.
This magic output string is notably used by:
* the `common_assert_fail()` function, which is used by <<baremetal-tests>>
* the `lkmc_assert_fail()` function, which is used by <<baremetal-tests>>
* link:rootfs_overlay/test_fail.sh[], which is used by <<test-userland-in-full-system>>
==== Non-automated tests