[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
- [PATCH 0/6 gnumach] Preparation for parallel SMP init, Damien Zammit, 2024/12/09
- [PATCH 1/6 gnumach] i386/cpuboot: Simplify for legibility, Damien Zammit, 2024/12/09
- [PATCH 2/6 gnumach] i386/cpuboot: Dont use CPU_NUMBER_NO_STACK() early, Damien Zammit, 2024/12/09
- [PATCH 3/6 gnumach] i386/cpuboot: Write gs selector correctly, Damien Zammit, 2024/12/09
- Re: [PATCH 3/6 gnumach] i386/cpuboot: Write gs selector correctly,
Samuel Thibault <=
- [PATCH 4/6 gnumach] pmap: Separate temporary_mapping from set_page_dir, Damien Zammit, 2024/12/09
- [PATCH 5/6 gnumach] smp: Use logical destination not physical apic id, Damien Zammit, 2024/12/09
- [PATCH 6/6 gnumach] i386/apic: Fix condition on non-BSP, Damien Zammit, 2024/12/09