|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 6/7] x86/kexec: Pass boot params directly to new kernel
When doing kexec on an EFI image there is no purgatory and kexec_reloc.S
hands off straight to the new kernel. To facilitate this the linux
kernel boot params need to be passed through %rsi.
Signed-off-by: Kevin Lampis <klampis@xxxxxxxxxx>
---
xen/arch/x86/include/asm/machine_kexec.h | 2 +-
xen/arch/x86/machine_kexec.c | 3 ++-
xen/arch/x86/x86_64/kexec_reloc.S | 3 +++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/include/asm/machine_kexec.h
b/xen/arch/x86/include/asm/machine_kexec.h
index 3e189acf24..010e0c7046 100644
--- a/xen/arch/x86/include/asm/machine_kexec.h
+++ b/xen/arch/x86/include/asm/machine_kexec.h
@@ -7,7 +7,7 @@
extern void kexec_reloc(unsigned long reloc_code, unsigned long reloc_pt,
unsigned long ind_maddr, unsigned long entry_maddr,
- unsigned long flags);
+ unsigned long flags, unsigned long arg);
extern const char kexec_reloc_end[];
diff --git a/xen/arch/x86/machine_kexec.c b/xen/arch/x86/machine_kexec.c
index f921eec5aa..2edc1bd0af 100644
--- a/xen/arch/x86/machine_kexec.c
+++ b/xen/arch/x86/machine_kexec.c
@@ -198,7 +198,8 @@ void machine_kexec(struct kexec_image *image)
kexec_reloc(page_to_maddr(image->control_code_page),
page_to_maddr(image->aux_page),
- image->head, image->entry_maddr, reloc_flags);
+ image->head, image->entry_maddr, reloc_flags,
+ image->boot_params);
}
int machine_kexec_get(xen_kexec_range_t *range)
diff --git a/xen/arch/x86/x86_64/kexec_reloc.S
b/xen/arch/x86/x86_64/kexec_reloc.S
index b52d31a654..6a2c839b83 100644
--- a/xen/arch/x86/x86_64/kexec_reloc.S
+++ b/xen/arch/x86/x86_64/kexec_reloc.S
@@ -33,6 +33,7 @@ FUNC(kexec_reloc, PAGE_SIZE)
/* %rdx - indirection page maddr */
/* %rcx - entry maddr (%rbp) */
/* %r8 - flags */
+ /* %r9 - boot params */
movq %rcx, %rbp
@@ -71,6 +72,8 @@ FUNC(kexec_reloc, PAGE_SIZE)
movq %rdx, %rdi
call relocate_pages
+ movq %r9, %rsi /* boot params */
+
/* Need to switch to 32-bit mode? */
testq $KEXEC_RELOC_FLAG_COMPAT, %r8
jnz .L_call_32_bit
--
2.52.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |