bug-hurd
[Top][All Lists]
Advanced

[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



reply via email to

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