mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-23 21:54:27 +02:00
ArmVirtPkg/ArmPlatformLibQemu: Ensure that VFP is on before running C code
Now that we build the early code without strict alignment and without suppressing the use of SIMD registers, ensure that the VFP unit is on before entering C code. While at it, simplyify the mov_i macro, which is only used for 32-bit quantities. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: dann frazier <dann.frazier@canonical.com>
This commit is contained in:
parent
717f35a9f2
commit
5ee17c5418
@ -8,9 +8,7 @@
|
|||||||
#include <AsmMacroIoLibV8.h>
|
#include <AsmMacroIoLibV8.h>
|
||||||
|
|
||||||
.macro mov_i, reg:req, imm:req
|
.macro mov_i, reg:req, imm:req
|
||||||
movz \reg, :abs_g3:\imm
|
movz \reg, :abs_g1:\imm
|
||||||
movk \reg, :abs_g2_nc:\imm
|
|
||||||
movk \reg, :abs_g1_nc:\imm
|
|
||||||
movk \reg, :abs_g0_nc:\imm
|
movk \reg, :abs_g0_nc:\imm
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ -45,10 +43,9 @@
|
|||||||
|
|
||||||
ASM_FUNC(ArmPlatformPeiBootAction)
|
ASM_FUNC(ArmPlatformPeiBootAction)
|
||||||
mrs x0, CurrentEL // check current exception level
|
mrs x0, CurrentEL // check current exception level
|
||||||
tbz x0, #3, 0f // bail if above EL1
|
tbnz x0, #3, 0f // omit early ID map if above EL1
|
||||||
ret
|
|
||||||
|
|
||||||
0:mov_i x0, mairval
|
mov_i x0, mairval
|
||||||
mov_i x1, tcrval
|
mov_i x1, tcrval
|
||||||
adrp x2, idmap
|
adrp x2, idmap
|
||||||
orr x2, x2, #0xff << 48 // set non-zero ASID
|
orr x2, x2, #0xff << 48 // set non-zero ASID
|
||||||
@ -87,7 +84,8 @@ ASM_FUNC(ArmPlatformPeiBootAction)
|
|||||||
|
|
||||||
msr sctlr_el1, x3 // enable MMU and caches
|
msr sctlr_el1, x3 // enable MMU and caches
|
||||||
isb
|
isb
|
||||||
ret
|
|
||||||
|
0:b ArmEnableVFP // enable SIMD before entering C code
|
||||||
|
|
||||||
//UINTN
|
//UINTN
|
||||||
//ArmPlatformGetCorePosition (
|
//ArmPlatformGetCorePosition (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user