mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 23:24:50 +00:00
arm64: rename stext to primary_entry
For historical reasons, the primary entry routine living somewhere in the inittext section is called stext(), which is confusing, given that there is also a section marker called _stext which lives at a fixed offset in the image (either 64 or 4096 bytes, depending on whether CONFIG_EFI is enabled) Let's rename stext to primary_entry(), which is a better description and reflects the secondary_entry() routine that already exists for SMP boot. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/r/20200326171423.3080-1-ardb@kernel.org Reviwed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
6a8b55ed40
commit
348a625dee
4 changed files with 13 additions and 14 deletions
|
@ -19,7 +19,7 @@ SYM_CODE_START(efi_enter_kernel)
|
||||||
* point stored in x0. Save those values in registers which are
|
* point stored in x0. Save those values in registers which are
|
||||||
* callee preserved.
|
* callee preserved.
|
||||||
*/
|
*/
|
||||||
ldr w2, =stext_offset
|
ldr w2, =primary_entry_offset
|
||||||
add x19, x0, x2 // relocated Image entrypoint
|
add x19, x0, x2 // relocated Image entrypoint
|
||||||
mov x20, x1 // DTB address
|
mov x20, x1 // DTB address
|
||||||
|
|
||||||
|
|
|
@ -70,9 +70,9 @@ _head:
|
||||||
* its opcode forms the magic "MZ" signature required by UEFI.
|
* its opcode forms the magic "MZ" signature required by UEFI.
|
||||||
*/
|
*/
|
||||||
add x13, x18, #0x16
|
add x13, x18, #0x16
|
||||||
b stext
|
b primary_entry
|
||||||
#else
|
#else
|
||||||
b stext // branch to kernel start, magic
|
b primary_entry // branch to kernel start, magic
|
||||||
.long 0 // reserved
|
.long 0 // reserved
|
||||||
#endif
|
#endif
|
||||||
le64sym _kernel_offset_le // Image load offset from start of RAM, little-endian
|
le64sym _kernel_offset_le // Image load offset from start of RAM, little-endian
|
||||||
|
@ -98,14 +98,13 @@ pe_header:
|
||||||
* primary lowlevel boot path:
|
* primary lowlevel boot path:
|
||||||
*
|
*
|
||||||
* Register Scope Purpose
|
* Register Scope Purpose
|
||||||
* x21 stext() .. start_kernel() FDT pointer passed at boot in x0
|
* x21 primary_entry() .. start_kernel() FDT pointer passed at boot in x0
|
||||||
* x23 stext() .. start_kernel() physical misalignment/KASLR offset
|
* x23 primary_entry() .. start_kernel() physical misalignment/KASLR offset
|
||||||
* x28 __create_page_tables() callee preserved temp register
|
* x28 __create_page_tables() callee preserved temp register
|
||||||
* x19/x20 __primary_switch() callee preserved temp registers
|
* x19/x20 __primary_switch() callee preserved temp registers
|
||||||
* x24 __primary_switch() .. relocate_kernel()
|
* x24 __primary_switch() .. relocate_kernel() current RELR displacement
|
||||||
* current RELR displacement
|
|
||||||
*/
|
*/
|
||||||
SYM_CODE_START(stext)
|
SYM_CODE_START(primary_entry)
|
||||||
bl preserve_boot_args
|
bl preserve_boot_args
|
||||||
bl el2_setup // Drop to EL1, w0=cpu_boot_mode
|
bl el2_setup // Drop to EL1, w0=cpu_boot_mode
|
||||||
adrp x23, __PHYS_OFFSET
|
adrp x23, __PHYS_OFFSET
|
||||||
|
@ -121,7 +120,7 @@ SYM_CODE_START(stext)
|
||||||
mov x0, #ARM64_CPU_BOOT_PRIMARY
|
mov x0, #ARM64_CPU_BOOT_PRIMARY
|
||||||
bl __cpu_setup // initialise processor
|
bl __cpu_setup // initialise processor
|
||||||
b __primary_switch
|
b __primary_switch
|
||||||
SYM_CODE_END(stext)
|
SYM_CODE_END(primary_entry)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Preserve the arguments passed by the bootloader in x0 .. x3
|
* Preserve the arguments passed by the bootloader in x0 .. x3
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#ifdef CONFIG_EFI
|
#ifdef CONFIG_EFI
|
||||||
|
|
||||||
__efistub_kernel_size = _edata - _text;
|
__efistub_kernel_size = _edata - _text;
|
||||||
__efistub_stext_offset = stext - _text;
|
__efistub_primary_entry_offset = primary_entry - _text;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -72,8 +72,8 @@ jiffies = jiffies_64;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The size of the PE/COFF section that covers the kernel image, which
|
* The size of the PE/COFF section that covers the kernel image, which
|
||||||
* runs from stext to _edata, must be a round multiple of the PE/COFF
|
* runs from _stext to _edata, must be a round multiple of the PE/COFF
|
||||||
* FileAlignment, which we set to its minimum value of 0x200. 'stext'
|
* FileAlignment, which we set to its minimum value of 0x200. '_stext'
|
||||||
* itself is 4 KB aligned, so padding out _edata to a 0x200 aligned
|
* itself is 4 KB aligned, so padding out _edata to a 0x200 aligned
|
||||||
* boundary should be sufficient.
|
* boundary should be sufficient.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue