NetBSD Problem Report #59558

From martin@aprisoft.de  Sun Jul 27 11:02:27 2025
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 013D31A923C
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 27 Jul 2025 11:02:27 +0000 (UTC)
Message-Id: <20250727110144.B18375CC794@emmas.aprisoft.de>
Date: Sun, 27 Jul 2025 13:01:44 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: can not boot aarch64-eb image via UEFI on QEMU
X-Send-Pr-Version: 3.95

>Number:         59558
>Category:       port-arm
>Synopsis:       can not boot aarch64-eb image via UEFI on QEMU
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-arm-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 27 11:05:00 +0000 2025
>Last-Modified:  Mon Jul 28 09:05:01 +0000 2025
>Originator:     Martin Husemann
>Release:        NetBSD 10.99.15
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD martins.aprisoft.de 10.99.15 NetBSD 10.99.15 (GENERIC) #278: Sat Jul 26 10:04:19 CEST 2025 martin@martins.aprisoft.de:/home/martin/current/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:

Trying to boot a aarch64 big endian image on QEMU, nearly identical to 
the instrucstions in the wiki at

https://wiki.netbsd.org/ports/evbarm/qemu_arm/

with the QEMU_EFI.fd for arm64 linked there (but I used the latest
available newer version 5552).

Running

qemu-system-aarch64 -M virt -cpu cortex-a53 -smp 4 -m 4g \
    -drive if=none,file=arm64be.img,id=hd0 -device virtio-blk-device,drive=hd0 \
    -netdev type=user,id=net0 -device \
	virtio-net-device,netdev=net0,mac=00:11:22:33:44:55 \
    -bios QEMU_EFI.fd \
    -device virtio-rng-pci \
    -device virtio-gpu -nographic


gives me:

  \\-__,------,___.
   \\        __,---`  NetBSD/evbarm efiboot (arm64)
    \\       `---,_.  Revision 2.15 (Sat Jul 26 13:28:13 UTC 2025)
     \\-,_____,.---`
      \\
       \\
        \\

Press return to boot now, any other key for boot prompt
booting netbsd - starting in 0 seconds.     
8824032+3902472+3683820+1740500 [982536+731968]=0x14cf958


Synchronous Exception at 0x00000001384DB2F0



>How-To-Repeat:
s/a

>Fix:
n/a

>Audit-Trail:
From: matthew green <mrg@eterna23.net>
To: gnats-bugs@netbsd.org
Cc: port-arm-maintainer@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org
Subject: re: port-arm/59558: can not boot aarch64-eb image via UEFI on QEMU
Date: Mon, 28 Jul 2025 18:09:09 +1000

 arm64-eb and UEFI is an unsupported combination.  the acpica code
 is ... not ready.  it may have been once, but ACPI_BIG_ENDIAN
 does not work last we tried.. though this:

 > Synchronous Exception at 0x00000001384DB2F0

 seems worse than i remember.  (perhaps it regressed even more?)

 Rin?  you tried this recently?


 .mrg.

From: Rin Okuyama <rokuyama.rk@gmail.com>
To: matthew green <mrg@NetBSD.org>, gnats-bugs@netbsd.org
Cc: port-arm-maintainer@netbsd.org, gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org
Subject: Re: port-arm/59558: can not boot aarch64-eb image via UEFI on QEMU
Date: Mon, 28 Jul 2025 17:45:47 +0900

 On 2025/07/28 17:09, matthew green wrote:
 > arm64-eb and UEFI is an unsupported combination.  the acpica code
 > is ... not ready.  it may have been once, but ACPI_BIG_ENDIAN
 > does not work last we tried.. though this:
 > 
 >> Synchronous Exception at 0x00000001384DB2F0
 > 
 > seems worse than i remember.  (perhaps it regressed even more?)
 > 
 > Rin?  you tried this recently?

 This is because FDT blob is not present; EDK2-based UEFI firmwares
 no longer expose FDT blob when ACPI is enabled:

 https://github.com/tianocore/edk2/commit/110316a995

 Therefore, "-machine acpi=off" or "-no-acpi" should be explicitly
 passed to qemu if arm/aarch64-eb kernel is used with UEFI firmware:

 https://mail-index.netbsd.org/port-arm/2025/06/30/msg009253.html

 Due to this "regression", big-endian kernels do not work on most
 virtualization platforms, where ACPI cannot be turned off.

 Thanks,
 rin

 > 
 > 
 > .mrg.
 > 

From: Martin Husemann <martin@duskware.de>
To: Rin Okuyama <rokuyama.rk@gmail.com>
Cc: matthew green <mrg@NetBSD.org>, gnats-bugs@netbsd.org
Subject: Re: port-arm/59558: can not boot aarch64-eb image via UEFI on QEMU
Date: Mon, 28 Jul 2025 11:02:25 +0200

 On Mon, Jul 28, 2025 at 05:45:47PM +0900, Rin Okuyama wrote:
 > Due to this "regression", big-endian kernels do not work on most
 > virtualization platforms, where ACPI cannot be turned off.

 I have booted it at least halfway on a netcup.de instance:

 	https://netbsd.org/~martin/arm64_be.png

 However, due to the performance hit that I expect this to have even if
 it would boot completely (for virtualization on a LE host) I won't push
 this any further (and I have not seen any virtualization providers that
 offer aarch64 VPS on a big endian host).

 Martin

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.