[ipxe-devel] EFI_PXE_BASE_CODE_PROTOCOL

Gerd Hoffmann kraxel at redhat.com
Fri Sep 11 08:56:57 UTC 2015


> > https://ftp.fau.de/centos/7.1.1503/os/x86_64/EFI/BOOT/
> 
> That grubx64.efi binary makes no attempt to even look for an 
> EFI_PXE_BASE_CODE_PROTOCOL.  Here's the complete log of calls that it makes:

With grubx86.efi loaded via tftp I assume?

> OpenProtocol ( 
> PciRoot(0x0)/Pci(0x3,0x0)/MAC(525400123456,0x1)/grubx64.efi, 
> LoadedImage, 
> PciRoot(0x0)/Pci(0x3,0x0)/MAC(525400123456,0x1)/grubx64.efi, <NULL>, G ) 
> = 0 ( 0x3f1aac00 ) -> 0x3e90349b

... yes, seems so.

The very same grub binary boots from network and disk, so I guess here
it tries to figure how it was loaded to then go fetch the grub.cfg file
from the same location.

On a successfull boot (with EFI_DOWNGRADE_UX) I see this in the ovmf
log:

[ ... lot of stuff snipped ... ]
Booting EFI Network
InstallProtocolInterface: 245DCA21-FB7B-11D3-8F01-00A0C969723B 6FD60E0
InstallProtocolInterface: 41D94CD2-35B6-455A-8258-D4E51334AADD 7073B20
InstallProtocolInterface: 3AD9DF29-4501-478D-B1F8-7F7FE70E50F3 7074BF8
InstallProtocolInterface: F4B427BB-BA21-4F16-BC4E-43E416AB619C 70798B0
InstallProtocolInterface: 245DCA21-FB7B-11D3-8F01-00A0C969723B 6FD60E0
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 70ADB40
Loading driver at 0x00006605000 EntryPoint=0x00006605400 
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7094898
PixelBlueGreenRedReserved8BitPerColor

The guids translate to:

245DCA21-FB7B-11D3-8F01-00A0C969723B gEfiPxeBaseCodeCallbackProtocolGuid
41D94CD2-35B6-455A-8258-D4E51334AADD gEfiIp4ProtocolGuid
3AD9DF29-4501-478D-B1F8-7F7FE70E50F3 gEfiUdp4ProtocolGuid
F4B427BB-BA21-4F16-BC4E-43E416AB619C gEfiArpProtocolGuid
245DCA21-FB7B-11D3-8F01-00A0C969723B gEfiPxeBaseCodeCallbackProtocolGuid
5B1B31A1-9562-11D2-8E3F-00A0C969723B gEfiLoadedImageProtocolGuid
BC62157E-3E33-4FEC-9920-2D3B36D750DF
gEfiLoadedImageDevicePathProtocolGuid

Hmm, EfiPxeBaseCode*Callback*Protocol?

> Do you have a set of instructions (starting from "git clone 
> git://git.savannah.gnu.org/grub.git") which will allow me to rebuild 
> that grubx64.efi binary from the source?

The rpm spec file for grub2 is here:

https://git.centos.org/blob/rpms!
grub2/c695181b7bb165516116ba7c7d94805c799ae977/SPECS!grub2.spec

grubx64.efi is created with grub-mkimage:

<quote>
  ./grub-mkimage -O %{grubefiarch} -o %{grubefiname}.orig \
    -p /EFI/%{efidir} -d grub-core ${GRUB_MODULES}
</quote>

cheers,
  Gerd





More information about the ipxe-devel mailing list