We will never return from c_entry. Make it clear on x86 by moving the stop label to the top of the assembly code.
Signed-off-by: Ralf Ramsauer <[email protected]> --- inmates/lib/x86/header-32.S | 11 +++++------ inmates/lib/x86/header.S | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/inmates/lib/x86/header-32.S b/inmates/lib/x86/header-32.S index 6ea8da38..468b1752 100644 --- a/inmates/lib/x86/header-32.S +++ b/inmates/lib/x86/header-32.S @@ -62,6 +62,10 @@ __reset_entry: .code32 +stop: cli + hlt + jmp stop + start32: mov %cr4,%eax or $X86_CR4_PSE,%eax @@ -113,12 +117,7 @@ start32: call_entry: mov $stack_top,%esp - call *%ebx - -stop: cli - hlt - jmp stop - + jmp *%ebx .pushsection ".data" diff --git a/inmates/lib/x86/header.S b/inmates/lib/x86/header.S index 1df4345b..ec0025b7 100644 --- a/inmates/lib/x86/header.S +++ b/inmates/lib/x86/header.S @@ -89,6 +89,10 @@ start32: ljmpl $INMATE_CS64,$start64 .code64 +stop: cli + hlt + jmp stop + start64: xor %rbx,%rbx xchg ap_entry,%rbx @@ -120,12 +124,7 @@ start64: call_entry: mov $stack_top,%rsp - callq *%rbx - -stop: cli - hlt - jmp stop - + jmp *%rbx .pushsection ".data" -- 2.17.0 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
