Commit Graph

2 Commits

Author SHA1 Message Date
Xianglai Li fe6b6feca7 OvmfPkg/LoongArchVirt: Modify loongarch uefi firmware size
After the loongarch flash block size is changed from 128K to 256K,
qemu requires that the UEFI firmware size be aligned with the flash block size(256K).
Otherwise, the firmware cannot be loaded,
Use the following code to resolve the old firmware loading problem:
mv QEMU_EFI.fd  QEMU_EFI.fd-bak
cat QEMU_EFI.fd-bak  /dev/zero | head -c 16m > ./QEMU_EFI.fd
mv QEMU_VARS.fd  QEMU_VARS.fd-bak
cat QEMU_VARS.fd-bak /dev/zero | head -c 16m > ./QEMU_VARS.fd

For the new firmware, we refer to other architecture UEFI and
set the UEFI firmware size to align with the flash block size(256K).

So for this patch, we set the UEFI firmware size to 256K alignment.

Cc: Bibo Mao <maobibo@loongson.cn>
Cc: Chao Li <lichao@loongson.cn>
Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
2024-09-12 13:25:43 +00:00
Chao Li d6dcf621df OvmfPkg/LoongArchVirt: Add build file
Add infrastructure files to build edk2 for LoongArch QEMU virtual
machine.

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Bibo Mao <maobibo@loongson.cn>
Cc: Dongyan Qian <qiandongyan@loongson.cn>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-authored-by: Xianglai Li <lixianglai@loongson.cn>
Co-authored-by: Bibo Mao <maobibo@loongson.cn>
2024-06-18 15:02:15 +00:00