When qemu aarch64 is configured as NUMA, the EDK2 boot fail. Below is my test command: ``` qemu-system-aarch64 \ -nographic \ -serial tcp:localhost:54320 -serial tcp:localhost:54321 \ -smp 4 \ -s -S -machine virt,secure=on,mte=off,gic-version=3,virtualization=false \ -cpu max,sve=off \ -d unimp -semihosting-config enable=on,target=native \ -m 2048 \ -bios bl1.bin\ -initrd rootfs.cpio.gz \ -kernel Image -no-acpi \ -append 'console=ttyAMA0,38400 keep_bootcon root=/dev/vda2 ' \ -machine virt,iommu=smmuv3 -device virtio-scsi-pci,disable-legacy=on,id=scsi0,iommu_platform=on,addr=0x2 \ -object memory-backend-ram,id=mem0,size=1G \ -object memory-backend-ram,id=mem1,size=1G \ -numa node,memdev=mem0,cpus=0-1,nodeid=0 \ -numa node,memdev=mem1,cpus=2-3,nodeid=1 ```
Then I found that ArmVirtPkg always take the first memory node as system memory, but when I configure qemu, the memory node in qemu dtb is as following. ``` memory@80000000 { numa-node-id = <0x01>; reg = <0x00 0x80000000 0x00 0x40000000>; device_type = "memory"; }; memory@40000000 { numa-node-id = <0x00>; reg = <0x00 0x40000000 0x00 0x40000000>; device_type = "memory"; }; ``` Then edk2 use 'memory@80000000' as system memory which is NUMA node 1. And the memory node order is implement in qemu: arm_load_dtb() which add memory from node 0 to N. https://gitlab.com/qemu-project/qemu/-/blob/master/hw/arm/boot.c#L618 As I understand it, loader should take node 0. Should I modify ArmVirtPkg/PrePi/FdtParser.c: FindMemnode() for the NUMA case ? -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#91074): https://edk2.groups.io/g/devel/message/91074 Mute This Topic: https://groups.io/mt/92198841/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-