Source-Changes-D archive

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

Re: CVS commit: src/sys/arch/amd64



Le 26/12/2019 à 17:55, Emmanuel Dreyfus a écrit :
> On Wed, Dec 25, 2019 at 05:05:11PM +0900, Masanobu SAITOH wrote:
>>>> After this change, amd64 kernel does not boot on my HP Spectre x360
>>>> 13-inch ae019TU laptop with pure UEFI boot mode.
>>  I have a UEFI boot machine and it also doesn't boot well.
> 
> Please try the attached patch.
> 
> It adds the -n flag to ld, which disable auto-alignment of sections
> in the file. I undestand alignement is highly desirable for userland
> programs that may be mapped from file, but useless for the kernel,
> which is just readen once by the bootloader.
> 
> Without auto-alignement, the .text segment starts right after the
> ELF headers. This means the multiboot header can go in .text and
> stay below 32k (as required by the multiboot specification). There
> is no need for a multiboot section for that, and therefore no 
> need to modify the linker script.
> 
> A side effect is that the kernel file shrinks of 2 MB, because there
> is not an alignement hole between ELF headers and the .text section
> anymore.
> 
> My patch also enable the MULTIBOOT option so that we can check
> nothing gets broken with it. You can also try with the option
> disabled, of course.

Please stop with the nonsense... In this patch you are making the multiboot
header executable, and putting it in a section shared with userland under
SVS. Neither should be required; more than that, both are absolutely _not_
wanted.

Instead of trying to patch-work the thing over and over, you should
probably revert it all, take an hour to peacefully write it correctly, and
then submit it again. Given the way multiboot was written so far I don't
see how we can accept to enable it by default.

Maxime


Home | Main Index | Thread Index | Old Index