mbox

[PULL,0/8] Firmware/edk2 20230918 patches

Message ID 20230918133338.2399701-1-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show

Pull-request

https://gitlab.com/kraxel/qemu.git tags/firmware/edk2-20230918-pull-request

Message

Gerd Hoffmann Sept. 18, 2023, 1:33 p.m. UTC
The following changes since commit c5ea91da443b458352c1b629b490ee6631775cb4:

  Merge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu into staging (2023-09-08 10:06:25 -0400)

are available in the Git repository at:

  https://gitlab.com/kraxel/qemu.git tags/firmware/edk2-20230918-pull-request

for you to fetch changes up to 0ec0767e59261b7a1f59e904020cf52b45380e54:

  tests/acpi: disallow virt/SSDT.memhp updates (2023-09-18 15:27:27 +0200)

----------------------------------------------------------------
edk2: update to edk2-stable202308

v2: include acpi test data updates

----------------------------------------------------------------

Gerd Hoffmann (8):
  tests/acpi: allow virt/SSDT.memhp updates
  edk2: update build script
  edk2: update build config
  edk2: workaround edk-stable202308 bug
  edk2: update submodule to edk2-stable202308
  edk2: update binaries to edk2-stable202308
  tests/acpi: update virt/SSDT.memhp
  tests/acpi: disallow virt/SSDT.memhp updates

 roms/edk2-build.py                     | 202 ++++++++++++++++---------
 pc-bios/edk2-aarch64-code.fd.bz2       | Bin 1508184 -> 1573561 bytes
 pc-bios/edk2-arm-code.fd.bz2           | Bin 1483149 -> 1560966 bytes
 pc-bios/edk2-i386-code.fd.bz2          | Bin 1695318 -> 1770410 bytes
 pc-bios/edk2-i386-secure-code.fd.bz2   | Bin 1922002 -> 2121818 bytes
 pc-bios/edk2-riscv-code.fd.bz2         | Bin 0 -> 1177402 bytes
 pc-bios/edk2-riscv-vars.fd.bz2         | Bin 0 -> 231 bytes
 pc-bios/edk2-riscv.fd.bz2              | Bin 1096418 -> 0 bytes
 pc-bios/edk2-x86_64-code.fd.bz2        | Bin 1796544 -> 1887921 bytes
 pc-bios/edk2-x86_64-microvm.fd.bz2     | Bin 1697788 -> 1782629 bytes
 pc-bios/edk2-x86_64-secure-code.fd.bz2 | Bin 1999841 -> 2200701 bytes
 roms/edk2                              |   2 +-
 roms/edk2-build.config                 |  12 +-
 tests/data/acpi/virt/SSDT.memhp        | Bin 1817 -> 1817 bytes
 14 files changed, 139 insertions(+), 77 deletions(-)
 create mode 100644 pc-bios/edk2-riscv-code.fd.bz2
 create mode 100644 pc-bios/edk2-riscv-vars.fd.bz2
 delete mode 100644 pc-bios/edk2-riscv.fd.bz2

Comments

Gerd Hoffmann Sept. 18, 2023, 1:33 p.m. UTC | #1
The edk2 update caused an address change:

 DefinitionBlock ("", "SSDT", 1, "BOCHS ", "NVDIMM", 0x00000001)
 {
     Scope (\_SB)
     {
         Device (NVDR)
         {
             Name (_HID, "ACPI0012" /* NVDIMM Root Device */)  // _HID: Hardware ID
             [ ... ]
         }
     }

-    Name (MEMA, 0x43D10000)
+    Name (MEMA, 0x43C90000)
 }

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 tests/data/acpi/virt/SSDT.memhp | Bin 1817 -> 1817 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/tests/data/acpi/virt/SSDT.memhp b/tests/data/acpi/virt/SSDT.memhp
index ef93c44464f1fe38f7e5babd5d67f345cc6363a6..31ff6ac46940a3e304a2d68efabe12bab50be0d7 100644
GIT binary patch
delta 22
dcmbQqH<OPmIM^jblAVEpaqUJfUUsIF&Hz2I1wsG-

delta 22
dcmbQqH<OPmIM^jblAVEpap^`bUUsI7&Hz1t1wsG-
Stefan Hajnoczi Sept. 19, 2023, 7:13 p.m. UTC | #2
Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes.
Akihiko Odaki Nov. 11, 2023, 5:19 p.m. UTC | #3
On 2023/09/18 22:33, Gerd Hoffmann wrote:
> The following changes since commit c5ea91da443b458352c1b629b490ee6631775cb4:
> 
>    Merge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu into staging (2023-09-08 10:06:25 -0400)
> 
> are available in the Git repository at:
> 
>    https://gitlab.com/kraxel/qemu.git tags/firmware/edk2-20230918-pull-request
> 
> for you to fetch changes up to 0ec0767e59261b7a1f59e904020cf52b45380e54:
> 
>    tests/acpi: disallow virt/SSDT.memhp updates (2023-09-18 15:27:27 +0200)
> 
> ----------------------------------------------------------------
> edk2: update to edk2-stable202308
> 
> v2: include acpi test data updates
> 
> ----------------------------------------------------------------
> 
> Gerd Hoffmann (8):
>    tests/acpi: allow virt/SSDT.memhp updates
>    edk2: update build script
>    edk2: update build config
>    edk2: workaround edk-stable202308 bug
>    edk2: update submodule to edk2-stable202308
>    edk2: update binaries to edk2-stable202308
>    tests/acpi: update virt/SSDT.memhp
>    tests/acpi: disallow virt/SSDT.memhp updates
> 
>   roms/edk2-build.py                     | 202 ++++++++++++++++---------
>   pc-bios/edk2-aarch64-code.fd.bz2       | Bin 1508184 -> 1573561 bytes
>   pc-bios/edk2-arm-code.fd.bz2           | Bin 1483149 -> 1560966 bytes
>   pc-bios/edk2-i386-code.fd.bz2          | Bin 1695318 -> 1770410 bytes
>   pc-bios/edk2-i386-secure-code.fd.bz2   | Bin 1922002 -> 2121818 bytes
>   pc-bios/edk2-riscv-code.fd.bz2         | Bin 0 -> 1177402 bytes
>   pc-bios/edk2-riscv-vars.fd.bz2         | Bin 0 -> 231 bytes
>   pc-bios/edk2-riscv.fd.bz2              | Bin 1096418 -> 0 bytes
>   pc-bios/edk2-x86_64-code.fd.bz2        | Bin 1796544 -> 1887921 bytes
>   pc-bios/edk2-x86_64-microvm.fd.bz2     | Bin 1697788 -> 1782629 bytes
>   pc-bios/edk2-x86_64-secure-code.fd.bz2 | Bin 1999841 -> 2200701 bytes
>   roms/edk2                              |   2 +-
>   roms/edk2-build.config                 |  12 +-
>   tests/data/acpi/virt/SSDT.memhp        | Bin 1817 -> 1817 bytes
>   14 files changed, 139 insertions(+), 77 deletions(-)
>   create mode 100644 pc-bios/edk2-riscv-code.fd.bz2
>   create mode 100644 pc-bios/edk2-riscv-vars.fd.bz2
>   delete mode 100644 pc-bios/edk2-riscv.fd.bz2
> 

Hi,

This apparently broke EDK2 for AArch64. I tried the following command:
build/qemu-system-aarch64 -drive 
file=build/pc-bios/edk2-aarch64-code.fd,format=raw,if=pflash,readonly=on 
-M virt -cpu max -nographic -cdrom 
Fedora-Silverblue-ostree-aarch64-37-1.7.iso

Below is the output:
BdsDxe: loading Boot0001 "UEFI Misc Device" from PciRoot(0x0)/Pci(0x2,0x0)
BdsDxe: starting Boot0001 "UEFI Misc Device" from PciRoot(0x0)/Pci(0x2,0x0)


Synchronous Exception at 0x0000000043695920
PC 0x000043695920
PC 0x000043697EE4
PC 0x00004369A514
PC 0x00004369B030
PC 0x000043C04288
PC 0x000043C04338
PC 0x000043C051B4
PC 0x000043C02030
PC 0x000047685788 (0x00004767E000+0x00007788) [ 1] DxeCore.dll
PC 0x00004732AECC (0x000047324000+0x00006ECC) [ 2] BdsDxe.dll
PC 0x00004732DFD4 (0x000047324000+0x00009FD4) [ 2] BdsDxe.dll
PC 0x00004768900C (0x00004767E000+0x0000B00C) [ 3] DxeCore.dll
[ 1] 
/home/kraxel/projects/qemu/roms/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll
[ 2] 
/home/kraxel/projects/qemu/roms/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Universal/BdsDxe/BdsDxe/DEBUG/BdsDxe.dll
[ 3] 
/home/kraxel/projects/qemu/roms/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll

   X0 0x0000000043679960   X1 0x0000000000000000   X2 0x000000000000000D 
   X3 0x00000000436A2F70
   X4 0x0000000043679920   X5 0x000000004366B000   X6 0x0000000043677000 
   X7 0x00000000436A20D0
   X8 0x00000000436A20C8   X9 0x00000000436A20D0  X10 0x00000000436A20E0 
  X11 0x00000000436A20D0
  X12 0x0000000043679FFF  X13 0x0000000000000008  X14 0x0000000000000000 
  X15 0x0000000000000000
  X16 0x00000000473962BC  X17 0x00000000E6D79577  X18 0x0000000000000011 
  X19 0x0000000043C83000
  X20 0x0000000000000000  X21 0x0000000046310C98  X22 0x0000000043C972F0 
  X23 0x0000000000000000
  X24 0x0000000043C97000  X25 0x0000000043C973B8  X26 0x0000000043C973C0 
  X27 0x0000000043C973C8
  X28 0x0000000043C973D0   FP 0x000000004767D6A0   LR 0x0000000043697EE4

   V0 0xAFAFAFAFAFAFAFAF AFAFAFAFAFAFAFAF   V1 0x0000000000000004 
0000000000000000
   V2 0x554E65213A544C55 41464544464F544E   V3 0x0000000000000000 
0010000000000000
   V4 0x0000000040000000 0000000000000000   V5 0x4010040140100401 
4010040140100401
   V6 0x0040000000001000 0040000000001000   V7 0x0000000000000000 
0000000000000000
   V8 0x0000000000000000 0000000000000000   V9 0x0000000000000000 
0000000000000000
  V10 0x0000000000000000 0000000000000000  V11 0x0000000000000000 
0000000000000000
  V12 0x0000000000000000 0000000000000000  V13 0x0000000000000000 
0000000000000000
  V14 0x0000000000000000 0000000000000000  V15 0x0000000000000000 
0000000000000000
  V16 0x0000000000000000 0000000000000000  V17 0x0000000000000000 
0000000000000000
  V18 0x0000000000000000 0000000000000000  V19 0x0000000000000000 
0000000000000000
  V20 0x0000000000000000 0000000000000000  V21 0x0000000000000000 
0000000000000000
  V22 0x0000000000000000 0000000000000000  V23 0x0000000000000000 
0000000000000000
  V24 0x0000000000000000 0000000000000000  V25 0x0000000000000000 
0000000000000000
  V26 0x0000000000000000 0000000000000000  V27 0x0000000000000000 
0000000000000000
  V28 0x0000000000000000 0000000000000000  V29 0x0000000000000000 
0000000000000000
  V30 0x0000000000000000 0000000000000000  V31 0x0000000000000000 
0000000000000000

   SP 0x000000004767D6A0  ELR 0x0000000043695920  SPSR 0x60000205  FPSR 
0x00000000
  ESR 0x9600004F          FAR 0x00000000436799D0

  ESR : EC 0x25  IL 0x1  ISS 0x0000004F

Data abort: Permission fault, third level

Stack dump:
   000004767D5A0: 0000000000000000 00000000AFAFAFAF 000000004767D6C0 
0000000043697EDC
   000004767D5C0: 41464544464F544E 554E65213A544C55 0010000000000000 
0000000000000000
   000004767D5E0: 00000000436A2F70 00000000436A2F68 0000036040100401 
00000000436A2B28
   000004767D600: 0040000000001000 0040000000001000 0000000000000000 
0000000000000000
   000004767D620: AFAFAFAFAFAFAFAF AFAFAFAFAFAFAFAF 0000000000000000 
0000000000000004
   000004767D640: 41464544464F544E 554E65213A544C55 0010000000000000 
0000000000000000
   000004767D660: 0000000000000000 0000000040000000 4010040140100401 
4010040140100401
   000004767D680: 0040000000001000 0040000000001000 0000000000000000 
0000000000000000
 > 000004767D6A0: 000000004767D6C0 0000000043697EE4 0000000043677000 
0000000043679960
   000004767D6C0: 000000004767D6F0 000000004369A514 000000000000FC18 
00000000436B2020
   000004767D6E0: 000000F700000000 0000000043679960 000000004767D710 
000000004369B030
   000004767D700: 00000000476830E0 00000000436B2018 000000004767D720 
0000000043C04288
   000004767D720: 000000004767D780 0000000043C04338 0000000000000000 
0000000043C6D000
   000004767D740: 0000000043C83000 0000000046310C98 002A5DF04767D780 
0000000043685000
   000004767D760: 0000000043684000 00000000000002A6 00000000441A1C18 
000000004392A018
   000004767D780: 000000004767D7E0 0000000043C051B4 0000000000000000 
0000000043C02428


Synchronous Exception at 0x0000000043695920
ASSERT [ArmCpuDxe] 
/home/kraxel/projects/qemu/roms/edk2/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c(343): 
((BOOLEAN)(0==1))
Gerd Hoffmann Nov. 13, 2023, 11:09 a.m. UTC | #4
> Hi,
> 
> This apparently broke EDK2 for AArch64. I tried the following command:
> build/qemu-system-aarch64 -drive
> file=build/pc-bios/edk2-aarch64-code.fd,format=raw,if=pflash,readonly=on -M
> virt -cpu max -nographic -cdrom Fedora-Silverblue-ostree-aarch64-37-1.7.iso

https://bugzilla.redhat.com/show_bug.cgi?id=2113005

tl:dr:  shim is broken, and recent edk2 starting to expose
EFI_MEMORY_ATTRIBUTE_PROTOCOL makes the bug visible (without
the protocol the buggy code path is never taken).

take care,
  Gerd
Akihiko Odaki Nov. 17, 2023, 4 p.m. UTC | #5
On 2023/11/13 20:09, Gerd Hoffmann wrote:
>> Hi,
>>
>> This apparently broke EDK2 for AArch64. I tried the following command:
>> build/qemu-system-aarch64 -drive
>> file=build/pc-bios/edk2-aarch64-code.fd,format=raw,if=pflash,readonly=on -M
>> virt -cpu max -nographic -cdrom Fedora-Silverblue-ostree-aarch64-37-1.7.iso
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=2113005
> 
> tl:dr:  shim is broken, and recent edk2 starting to expose
> EFI_MEMORY_ATTRIBUTE_PROTOCOL makes the bug visible (without
> the protocol the buggy code path is never taken).
> 
> take care,
>    Gerd
> 

That's unfortunate. Thanks for the info.

Regards,
Akihiko Odaki