bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/6 gnumach] i386/cpuboot: Write gs selector correctly


From: Samuel Thibault
Subject: Re: [PATCH 3/6 gnumach] i386/cpuboot: Write gs selector correctly
Date: Mon, 9 Dec 2024 22:30:37 +0100

Damien Zammit via Bug reports for the GNU Hurd, le lun. 09 déc. 2024 12:17:37 
+0000, a ecrit:
> To make selectors work reliably, we need to
> write zero to it before writing its final value.

$PERCPU_DS is different from $KERNEL_DS, so we don't need to switch
through 0.

> ---
>  i386/i386/cpuboot.S | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/i386/i386/cpuboot.S b/i386/i386/cpuboot.S
> index 09855864..f549a2bc 100644
> --- a/i386/i386/cpuboot.S
> +++ b/i386/i386/cpuboot.S
> @@ -182,6 +182,8 @@ apboot_jmp_offset:
>       shr     $8, %ax
>       movb    %al, apboot_percpu_high
>  
> +     xorl    %ebx, %ebx
> +     movw    %bx, %gs
>       movw    $PERCPU_DS, %ax
>       movw    %ax, %gs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]