diff options
author | Huacai Chen <chenhuacai@loongson.cn> | 2022-10-03 17:08:38 +0300 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2022-10-03 17:08:38 +0300 |
commit | 1625c8cba77086a90c4a037f2ab4597ebfdce08e (patch) | |
tree | b1df5a447f9e925ab07137e4cd8ba3e474ac16f8 /arch/loongarch/kernel/head.S | |
parent | 4fe89d07dcc2804c8b562f6c7896a45643d34b2f (diff) | |
parent | d3549a938b73f203ef522562ae9f2d38aa43d234 (diff) | |
download | linux-1625c8cba77086a90c4a037f2ab4597ebfdce08e.tar.xz |
Merge tag 'efi-next-for-v6.1' into loongarch-next
LoongArch architecture changes for 6.1 depend on the efi changes to
work, so merge them to create a base.
Diffstat (limited to 'arch/loongarch/kernel/head.S')
-rw-r--r-- | arch/loongarch/kernel/head.S | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/loongarch/kernel/head.S b/arch/loongarch/kernel/head.S index 331864369e49..7e57ae8741b1 100644 --- a/arch/loongarch/kernel/head.S +++ b/arch/loongarch/kernel/head.S @@ -12,6 +12,26 @@ #include <asm/loongarch.h> #include <asm/stackframe.h> +#ifdef CONFIG_EFI_STUB + +#include "efi-header.S" + + __HEAD + +_head: + .word MZ_MAGIC /* "MZ", MS-DOS header */ + .org 0x3c /* 0x04 ~ 0x3b reserved */ + .long pe_header - _head /* Offset to the PE header */ + +pe_header: + __EFI_PE_HEADER + +SYM_DATA(kernel_asize, .long _end - _text); +SYM_DATA(kernel_fsize, .long _edata - _text); +SYM_DATA(kernel_offset, .long kernel_offset - _text); + +#endif + __REF .align 12 @@ -49,6 +69,8 @@ SYM_CODE_START(kernel_entry) # kernel entry point st.d a0, t0, 0 # firmware arguments la t0, fw_arg1 st.d a1, t0, 0 + la t0, fw_arg2 + st.d a2, t0, 0 /* KSave3 used for percpu base, initialized as 0 */ csrwr zero, PERCPU_BASE_KS |