Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfbc81ec

Browse files
committed
efi/arm: set HSCTLR Thumb2 bit correctly for HVC calls from HYP
Commitdb227c1 ("ARM: 8985/1: efi/decompressor: deal with HYP mode boot gracefully")updated the EFI entry code to permit firmware to invoke the EFI stubloader in HYP mode, with the MMU either enabled or disabled, neitherof which is permitted by the EFI spec, but which does happen in thefield.In the MMU on case, we remain in HYP mode as configured by the firmware,and rely on the fact that any HVC instruction issued in this mode willbe dispatched via the SVC slot in the HYP vector table. However, thisslot will point to a Thumb2 symbol if the kernel is built in Thumb2mode, and so we have to configure HSCTLR to ensure that the exceptionhandlers are invoked in Thumb2 mode as well.Fixes:db227c1 ("ARM: 8985/1: efi/decompressor: deal with HYP mode boot gracefully")Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
1 parent3650b22 commitfbc81ec

File tree

1 file changed

+3
-0
lines changed
  • arch/arm/boot/compressed

1 file changed

+3
-0
lines changed

‎arch/arm/boot/compressed/head.S‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,6 +1472,9 @@ ENTRY(efi_enter_kernel)
14721472
@ issued from HYP mode take us to the correct handler code. We
14731473
@ will disable the MMU before jumping to the kernel proper.
14741474
@
1475+
ARM(bicr1, r1, #(1 <<30)) @ clear HSCTLR.TE
1476+
THUMB(orrr1, r1, #(1 <<30)) @ set HSCTLR.TE
1477+
mcrp15,4, r1, c1, c0,0
14751478
adrr0, __hyp_reentry_vectors
14761479
mcrp15,4, r0, c12, c0,0@ set HYP vector base (HVBAR)
14771480
isb

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp