On Tue, 14 Jan 2025 at 16:34, Ard Biesheuvel <ardb@xxxxxxxxxx> wrote: > > On Tue, 14 Jan 2025 at 16:08, Guenter Roeck <linux@xxxxxxxxxxxx> wrote: > > > > On 1/14/25 03:40, Ard Biesheuvel wrote: > > > On Tue, 14 Jan 2025 at 08:33, Ard Biesheuvel <ardb@xxxxxxxxxx> wrote: > > >> > > >> On Tue, 14 Jan 2025 at 01:31, Guenter Roeck <linux@xxxxxxxxxxxx> wrote: > > >>> > > >>> Hi, > > >>> > > >>> On Wed, Dec 18, 2024 at 04:03:17PM +0100, Ard Biesheuvel wrote: > > >>>> From: Ard Biesheuvel <ardb@xxxxxxxxxx> > > >>>> > > >>>> Remove the dependency on the decompression wrappers used by the legacy > > >>>> decompressor, which do some odd things like providing a barebones > > >>>> malloc() implementation. Instead, implement GZIP deflate and ZSTD > > >>>> decompression in terms of the underlying libraries. > > >>>> > > >>>> Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx> > > >>> > > >>> With this patch in linux-next, my loongarch boot tests with qemu > > >>> no longer boot. Log message is: > > >>> > > >>> qemu log: > > >>> EFI stub: Decompressing Linux Kernel... > > >>> EFI stub: EFI_RNG_PROTOCOL unavailable > > >>> EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path > > >>> EFI stub: Exiting boot services > > >>> > > >>> ... and then there is nothing until I abort the emulation. > > >>> > > >>> Reverting this patch results in a build failure, so I awas not able to > > >>> test it. Bisect results are atatched for reference. > > >>> > > >> > > >> Thanks for the report - I'll drop the patch for now, and try again next cycle. > > > > > > Mind sharing your config/firmware/command line details? I'm failing to > > > reproduce the issue. > > > > qemu-system-loongarch64 -M virt -cpu \ > > la464 -kernel arch/loongarch/boot/vmlinuz.efi -smp 2 \ > > -no-reboot -m 4G -initrd rootfs.cpio \ > > -bios QEMU_EFI-loongarch64.fd \ > > --append "panic=-1 kunit.stats_enabled=2 kunit.filter=speed>slow rdinit=/sbin/init console=ttyS0,115200 earlycon=uart8250,mmio,0x1fe001e0,115200n8" \ > > -nographic -serial stdio -monitor none > > > > qemu version is 9.1. The EFI image is at > > https://github.com/groeck/linux-build-test/blob/master/rootfs/firmware/QEMU_EFI-loongarch64.fd > > and the initrd is at > > https://github.com/groeck/linux-build-test/blob/master/rootfs/loongarch/rootfs.cpio.gz > > > > Configuration is defconfig with various debug options enabled. > > > > I'll be happy to make a test directory available with all information needed > > if that helps. Please let me know. > > > > Everything works fine with my distro QEMU: > > $ qemu-system-loongarch64 --version > QEMU emulator version 8.2.4 (Debian 1:8.2.4+ds-1+build1) > Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers > > and it doesn't matter if I use your firmware or my own (grabbed > randomly from [0]) > > When I build QEMU from source (stable-9.2), things still work happily > if I use that same firmware. With your firmware, my QEMU 9.2 is > completely dead. > > Where did you find that image? I tried rebuilding it myself from a > recent EDK2 base, but that doesn't work at all either. > > [0] https://github.com/AOSC-Dev/LoongArchQemuVirtFirmware ... actually, turns out I built the wrong platform. If I build OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc from the EDK2 repository, I can boot the kernel with my change applied, using your command line. Perhaps I should try your .config as well?