grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 3/7] efi: implemented LoadFile2 initrd loading protocol fo


From: Heinrich Schuchardt
Subject: Re: [PATCH v2 3/7] efi: implemented LoadFile2 initrd loading protocol for Linux
Date: Tue, 5 Oct 2021 16:57:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2



On 10/5/21 12:05, Andreas Schwab wrote:
On Okt 05 2021, Heinrich Schuchardt wrote:

Do you think this problem is RISC-V specific

No, I don't think so.

and related to the series?

Since network download of the kernel works, this seems to be related to
the use of the LoadFile2 protocol.

Andreas.


Which firmware did you use? U-Boot or EDK II? Which version?

I have appended a log for U-Boot v2021.10-rc4 on the Unmatched board below.

Before the 'boot' command the communication via TFTP seems to work fine.
The init command can identify which file exists on the TFTP server.

The boot command calls ShutDown() and Stop() on the SNP protocol and
closes it. And then tries to open it again for the LOAD_FILE2 protocol.

The question remains why the protocol cannot be reopened. It is unclear
if this is a GRUB or a U-Boot issue.

Best regards

Heinrich

=> load mmc 0:f $fdt_addr_r sifive/hifive-unmatched-a00.dtb
9740 bytes read in 15 ms (633.8 KiB/s)
=> load mmc 0:f $kernel_addr_r grubriscv64.efi
1306624 bytes read in 1193 ms (1 MiB/s)
=> bootefi $kernel_addr_r $fdt_addr_r

grub> debug=linux,loader,fdt
grub> net_dhcp
net/drivers/efi/efinet.c:155: Trying to reopen SNP exclusively
grub> linux (tftp,192.168.0.3)/riscv64/vmlinuz
loader/efi/linux.c:70: UEFI stub kernel:
loader/efi/linux.c:71: PE/COFF header @ 00000040
loader/efi/linux.c:85: LoadFile2 initrd loading enabled
loader/efi/linux.c:430: kernel file size: 29496832
loader/efi/linux.c:432: kernel numpages: 7202
loader/efi/linux.c:449: kernel @ 0xdd040000
grub> initrd (tftp,192.168.0.3)/risv64/initrd
error: File not found.
grub> initrd (tftp,192.168.0.3)/riscv64/initrd
loader/efi/linux.c:368: LoadFile2 initrd loading protocol installed
grub> boot
net/drivers/efi/efinet.c:214: Closing the SNP protocol
loader/efi/linux.c:168: linux command line:
'BOOT_IMAGE=(tftp,192.168.0.3)/riscv64/vmlinuz'
loader/efi/linux.c:183: starting image 0xff745320
EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
loader/efi/linux.c:320: Providing initrd via LOAD_FILE2_PROTOCOL
net/drivers/efi/efinet.c:155: Trying to reopen SNP exclusively
net/drivers/efi/efinet.c:162: Failed to open SNP protocol!
net/drivers/efi/efinet.c:79: Transmit() returned: 8000000000000013
error: couldn't send network packet.
net/drivers/efi/efinet.c:79: Transmit() returned: 8000000000000013
error: couldn't send network packet.
...
EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Exiting boot services and installing virtual address map...
[    0.000000] Linux version 5.13.0-1004-generic
(buildd@riscv64-qemu-lcy01-074) (gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0,
GNU ld (GNU Binutils for Ubuntu) 2.37) #4-Ubuntu SMP Thu Sep 30 05:02:57
UTC 2021 (Ubuntu 5.13.0-1004.4-generic 5.13.14)
[    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[    0.000000] Machine model: SiFive HiFive Unmatched A00
[    0.000000] efi: EFI v2.80 by Das U-Boot
[    0.000000] efi: RTPROP=0xfe6fb040 SMBIOS=0xfe6f7000
MEMRESERVE=0xd2b92040
[    0.000000] secureboot: Secure boot disabled
...
[    3.001432] ---[ end Kernel panic - not syncing: No working init
found.  Try passing init= option to kernel. See Linux
Documentation/admin-guide/init.rst for guidance. ]-



reply via email to

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