Skip to content

Commit

Permalink
morello: Use non-capability br/blr for the benchmark ABI kernel.
Browse files Browse the repository at this point in the history
  • Loading branch information
qwattash committed May 3, 2024
1 parent 657111b commit 10c03e6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sys/arm64/arm64/efirt_support.S
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ ENTRY(efi_rt_arch_call_nofault)
mov x10, #20
sub x8, x10, x8, lsl #2
add c9, c9, x8, uxtx
#ifdef __ARM_MORELLO_PURECAP_BENCHMARK_ABI
sub x9, x9, #1
br x9
#else
br c9
#endif

/* Load the arguments into registers */
0: ldr x4, [c0, #EC_ARG5]
Expand Down Expand Up @@ -103,7 +108,11 @@ ENTRY(efi_rt_arch_call_nofault)
bx #4
.arch_extension noc64
.arch_extension a64c
#ifdef __ARM_MORELLO_PURECAP_BENCHMARK_ABI
blr x6
#else
blr c6
#endif
bx #4
.arch_extension c64

Expand Down
8 changes: 8 additions & 0 deletions sys/arm64/arm64/exception.S
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@
ldr PTR(1), [PTR(18), #PC_SSBD]
cbz x1, 1f
mov w0, #1
#ifdef __ASM_MORELLO_PURECAP_BENCHMARK_ABI
blr x1
#else
blr PTR(1)
#endif
1:

#ifdef PAC
Expand Down Expand Up @@ -135,7 +139,11 @@
ldr PTR(1), [PTR(18), #PC_SSBD]
cbz x1, 1f
mov w0, #0
#ifdef __ARM_MORELLO_PURECAP_BENCHMARK_ABI
blr x1
#else
blr PTR(1)
#endif
1:
.endif
ldp CAP(18), CAPN(lr), [PTRN(sp), #(TF_SP)]
Expand Down

0 comments on commit 10c03e6

Please sign in to comment.