[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CALRJROAKxEP4Dw93CoUS7SPdq=n5zDg7nbOwTW_bYdFhRREOcA@mail.gmail.com>
Date: Thu, 30 Jun 2022 21:54:31 +0000
From: Ariel Cabello Mateos <080ariel@...il.com>
To: linux-efi@...r.kernel.org, ardb@...nel.org,
linux-kernel@...r.kernel.org
Subject: [Question] efi: First 512 bytes of image oddity.
Hello:
I am not able to understand why the function efi_pe_entry in
drivers/firmware/efi/libstub/x86-stub.c
(which if im not mistaken its the first function executed in a efistub
kernel) does not copy the part of setup_header which is in the first
512 bytes of the kernel image.
There is a comment that says:
/*
* Fill out some of the header fields ourselves because the
* EFI firmware loader doesn't load the first sector.
*/
But from what I understood about the uefi spec, the boot firmware
should do a loadImage() which in turn does a OpenEx() in the file to
load it. It does not mention anything about not loading the 512 first
bytes of the image so... why does the stub do that?
Thanks in advance,
Ariel.
Powered by blists - more mailing lists