[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/6 gnumach] i386/cpuboot: Simplify for legibility
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 1/6 gnumach] i386/cpuboot: Simplify for legibility |
Date: |
Mon, 9 Dec 2024 22:18:53 +0100 |
Damien Zammit via Bug reports for the GNU Hurd, le lun. 09 déc. 2024 12:17:23
+0000, a ecrit:
> The current segmentation already adds -KERNELBASE.
> But only when accessing the memory.
I have applied this part, thanks!
> Don't forget to reload gdt.
>
> ---
> i386/i386/cpuboot.S | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/i386/i386/cpuboot.S b/i386/i386/cpuboot.S
> index 7e6c4770..9ac86845 100644
> --- a/i386/i386/cpuboot.S
> +++ b/i386/i386/cpuboot.S
> @@ -184,6 +185,11 @@ apboot_jmp_offset:
> movw $PERCPU_DS, %ax
> movw %ax, %gs
>
> + /* Reload the gdt because we changed it */
> + lgdtl apboot_gdt_descr
Ah, no, you don't need to reload gdt itself when the content of the
table has changed (and you would have to do that *before* setting %gs
above anyway).
> + ljmpl $KERNEL_CS, $2f
And the cs segment hasn't changed anyway.
Samuel
- [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
- Re: [PATCH 1/6 gnumach] i386/cpuboot: Simplify for legibility,
Samuel Thibault <=
- [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
- [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