misc: aarch64: Remove unused enter_in_current_el() function
This commit is contained in:
parent
5f7bcc0b1d
commit
c5c43cb0fd
|
@ -95,9 +95,6 @@ noreturn void stage3_common(void);
|
|||
#if defined (__x86_64__) || defined (__i386__)
|
||||
noreturn void common_spinup(void *fnptr, int args, ...);
|
||||
#elif defined (__aarch64__)
|
||||
noreturn void enter_in_current_el(uint64_t entry, uint64_t sp, uint64_t sctlr,
|
||||
uint64_t target_x0);
|
||||
|
||||
noreturn void enter_in_el1(uint64_t entry, uint64_t sp, uint64_t sctlr,
|
||||
uint64_t mair, uint64_t tcr, uint64_t ttbr0,
|
||||
uint64_t ttbr1, uint64_t target_x0);
|
||||
|
|
|
@ -2,53 +2,6 @@
|
|||
|
||||
.section .text
|
||||
|
||||
// noreturn void enter_in_current_el(uint64_t entry, uint64_t sp, uint64_t sctlr,
|
||||
// uint64_t target_x0)
|
||||
// Configure current EL state and jump to kernel. Used for Linux hence
|
||||
// no paging register configuration (which requires SCTLR.M = 0).
|
||||
|
||||
.global enter_in_current_el
|
||||
enter_in_current_el:
|
||||
msr sp_el0, x1
|
||||
|
||||
// Sanity check that SCTLR.M = 0
|
||||
and x8, x2, #0b1
|
||||
cbnz x8, 99f
|
||||
99:
|
||||
wfi
|
||||
b 99b
|
||||
|
||||
PICK_EL x8, 0f, 1f
|
||||
0:
|
||||
msr sctlr_el1, x2
|
||||
dsb sy
|
||||
isb
|
||||
|
||||
// Enter kernel in EL1
|
||||
mov x8, #0x3c4
|
||||
msr spsr_el1, x8
|
||||
msr elr_el1, x0
|
||||
|
||||
mov x0, x3
|
||||
ZERO_REGS_EXCEPT_X0
|
||||
|
||||
eret
|
||||
|
||||
1:
|
||||
msr sctlr_el2, x2
|
||||
dsb sy
|
||||
isb
|
||||
|
||||
// Enter kernel in EL2
|
||||
mov x8, #0x3c8
|
||||
msr spsr_el2, x8
|
||||
msr elr_el2, x0
|
||||
|
||||
mov x0, x3
|
||||
ZERO_REGS_EXCEPT_X0
|
||||
|
||||
eret
|
||||
|
||||
// noreturn void enter_in_el1(uint64_t entry, uint64_t sp, uint64_t sctlr,
|
||||
// uint64_t mair, uint64_t tcr, uint64_t ttbr0,
|
||||
// uint64_t ttbr1, uint64_t target_x0)
|
||||
|
|
Loading…
Reference in New Issue