On 2018-05-07 17:24, Ralf Ramsauer wrote:
> 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 | 9 ++++-----
>  inmates/lib/x86/header.S    | 9 ++++-----
>  2 files changed, 8 insertions(+), 10 deletions(-)
> 
> diff --git a/inmates/lib/x86/header-32.S b/inmates/lib/x86/header-32.S
> index 6ea8da38..306a3671 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
> @@ -115,11 +119,6 @@ call_entry:
>       mov $stack_top,%esp
>       call *%ebx
>  
> -stop:        cli
> -     hlt
> -     jmp stop
> -
> -
>       .pushsection ".data"
>  
>       .globl ap_entry
> diff --git a/inmates/lib/x86/header.S b/inmates/lib/x86/header.S
> index 1df4345b..2552ecd6 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
> @@ -122,11 +126,6 @@ call_entry:
>       mov $stack_top,%rsp
>       callq *%rbx

Can now become a jmp, just like on ARM

Jan

>  
> -stop:        cli
> -     hlt
> -     jmp stop
> -
> -
>       .pushsection ".data"
>  
>       .globl ap_entry
> 

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

-- 
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.

Reply via email to