EDK2: new support for ASRock Rack ALTRAD8UD-1L2T / ALTRAD8UD2-1L2Q and build improvements for Mt Jade and COM-HPC-ALT

This makefile has far more entries.

I use it to build EDK2, TF-A, ArmCpuInfo, BSA/SBSA/PC-BSA ACS binaries etc. For SBSA Reference Platform and for ASrockRack.

Was easier to write it as Makefile than as shell script.

2 Likes

Hi,

I got EDK2 crash with latest version, any idea what happen ?
Only two NVME disk on PCIe bus, no other devices.

InstallProtocolInterface: 605DAB50-E046-4300-ABB6-3DD810DD8B23 F6E51360
FSOpen: Open ‘\EFI\BOOT\fbaa64.efi’ Success
FSOpen: Open ‘\EFI\BOOT\fbaa64.efi’ Success
SetMemoryAttributes: BaseAddress == 0xF6F0E000, Length == 0x1A000, Attributes == 0x4000
ClearMemoryAttributes: BaseAddress == 0xF6F0E000, Length == 0x1A000, Attributes == 0x22000

Synchronous Exception at 0x00000000F6F12000
PC 0x0000F6F12000
PC 0x0000F6DBE288
PC 0x0000F6DBE338
PC 0x0000F6DBF1B4
PC 0x0000F6DBC030
PC 0x0000BF943108 (0x0000BF93B000+0x00008108) [ 1] DxeCore.dll
PC 0x0000F81AA0C8 (0x0000F8198000+0x000120C8) [ 2] BdsDxe.dll
PC 0x0000F819A884 (0x0000F8198000+0x00002884) [ 2] BdsDxe.dll
PC 0x0000F81A2420 (0x0000F8198000+0x0000A420) [ 2] BdsDxe.dll
PC 0x0000BF946374 (0x0000BF93B000+0x0000B374) [ 3] DxeCore.dll
[ 1] /nvme/tianocore3/Build/Altra1L2T/DEBUG_GCC/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll
[ 2] /nvme/tianocore3/Build/Altra1L2T/DEBUG_GCC/AARCH64/MdeModulePkg/Universal/BdsDxe/BdsDxe/DEBUG/BdsDxe.dll
[ 3] /nvme/tianocore3/Build/Altra1L2T/DEBUG_GCC/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll

X0 0x00000000F795FE18 X1 0x00000000FFFD0018 X2 0x00000000F6F12000 X3 0x0000000000000000
X4 0x00000000F9DEE0C8 X5 0x0000000000000001 X6 0x00000000F6DC48C8 X7 0x0000000000000000
X8 0x00000000F6F0E000 X9 0x000000000000F6F0 X10 0x00000000F6F41018 X11 0x0000000000000000
X12 0x0000000000000002 X13 0x0000000000000002 X14 0x0000000000000001 X15 0x0000000000000002
X16 0x00000000F9DE6238 X17 0x000000001EA68734 X18 0x0000000000000011 X19 0x00000000F6E3D000
X20 0x0000000000000000 X21 0x00000000F795FE18 X22 0x00000000F6E512F0 X23 0x0000000000000001
X24 0x00000000F6E51000 X25 0x00000000F6E513B8 X26 0x00000000F6E513C0 X27 0x00000000F6E513C8
X28 0x00000000F6E513D0 FP 0x00000000BF93A930 LR 0x00000000F6DBE288

V0 0xAFAFAFAFAFAFAFAF AFAFAFAFAFAFAFAF V1 0xFFFFFF80FFFFFFD0 00000000BF93A7D0
V2 0x4C41003635324148 535F4D43475F3832 V3 0x0000000000000000 0010000000000000
V4 0x0000000000000000 0000000000000000 V5 0x4010040140100401 4010040140100401
V6 0x0000000000001000 0000000000001000 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 0x00000000BF93A930 ELR 0x00000000F6F12000 SPSR 0x60000209 FPSR 0x00000010
ESR 0x8600000F FAR 0x00000000F6F12000

ESR : EC 0x21 IL 0x1 ISS 0x0000000F

Instruction abort: Permission fault, third level

Stack dump:
00000BF93A830: 0000000000000001 00000000F6E51000 00000000F6E513B8 00000000F6E513C0
00000BF93A850: 00000000F6E513C8 00000000F6E513D0 00000000BF93A8A0 00000000F6F281F0
00000BF93A870: 00000000BF93A978 00000000F6F1D000 00000000F6F1D009 00000000F6E2B62A
00000BF93A890: 00000000F6F26000 00000000000000DF 00000000BF93A8C0 D31AAEC05D36E324
00000BF93A8B0: EB867F1A51BB14DB 000000006CA176BC ABA93E539C790EF5 2852AEF3743D7964
00000BF93A8D0: A2F2674AB971207B 1125D02FD20A3F40 0000000000000000 0000000000019000
00000BF93A8F0: 0000000000004000 0000000000000400 000010000007A930 00000000F6F281A0
00000BF93A910: 00000000F6F28148 00000000F6F28140 0000000000000010 00000000F6F28098

00000BF93A930: 00000000BF93A990 00000000F6DBE338 0000000000000000 00000000F6E27000
00000BF93A950: 00000000F6E3D000 00000000F795FE18 00017F90BF93A990 00000000F6F12000
00000BF93A970: 00000000F6F0E000 000000000000001A 00000000F6F5DC18 00000000F6F28018
00000BF93A990: 00000000BF93A9F0 00000000F6DBF1B4 0000000000000000 00000000F6DBC428
00000BF93A9B0: 00000000F6E5139F 00000000F795FE18 00000000BF93AA60 00000000F6E51000
00000BF93A9D0: 00000000F795E040 00000000F7933030 00000000F6F6F520 00000000F795E2A0
00000BF93A9F0: 00000000BF93AA90 00000000F6DBC030 00000000BF961000 0000000000000000
00000BF93AA10: 00000000F81B59C0 0000000000000001 0000000000000000 00000000F81B5218

Synchronous Exception at 0x00000000F6F12000
ASSERT [ArmCpuDxe] /nvme/tianocore3/edk2/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c(339): ((BOOLEAN)(0==1))

1 Like

BTW - what needs to be built to not have to use OpenBMC each time I have firmware to update?

Sorry, I don’t know what’s going wrong there. The output doesn’t provide enough information to debug it.

If you’re using the same signing keys for each build, you can upgrade using CapsuleApp.efi or LVFS in Linux and passing the .cap file that the build generates.

1 Like
                                                   
$ ls -1
altra1l2t_rom_debug_25.11.10-80.bin
altra1l2t_rom_debug_26.01.04-82.bin
altra1l2t_tfa_uefi.bin
altra1l2t_tfa_uefi_debug_25.11.10-80.bin
altra1l2t_tfa_uefi_debug_26.01.04-82.bin
altra1l2t_tfa_uefi_debug_26.01.04-82.dbu.sig.bin
altra1l2t_uefi.bin
altra1l2t_uefi_debug_25.11.10-80.bin
altra1l2t_uefi_debug_26.01.04-82.bin
altra_atf.slim
bios.bin
DEBUG_GCC
fw-altra1l2t_uefi_debug_25.11.10-79.bin.tar
MANIFEST

Will have to work on sorting out my builds then.

Found. Capsule build is guarded by the “ && [ -f “${SCP_SLIM}” ]" block.

While SCP is not mentioned during its build.

Ah. edk2-ampere-tools/edk2-build.sh uses it.

After looking at options I think that it is a time to just hold on and wait until someone else play with 20250506 tf-a/scp and capsule updates.

CapsuleApp.efi altra1l2t_host_debug_26.01.04-86.cap prints some output and does nothing else.

fwupdmgr is a tool which I never had a chance to see working – on all my systems it always said “no updates for you” (x86-64 desktops with vendor specific flashers or thinkpads where I was updating firmware once per 3 years using their iso).

SCP_SLIM should be defined in buildfw.sh:

TFA_SLIM=${TFA_SLIM:-$PWD/altra_atf_signed_${TFA_VERSION}.slim}
SCP_SLIM=${SCP_SLIM:-$PWD/altra_scp_signed_${SCP_VERSION}.slim}

You should be able to install the update using fwupdmgr using a local file - but you’ll need to use the cab not cap file.

This is how fwupdmgr should work:

bcran@delano:~> fwupdmgr get-devices
ASRock Rack ALTRAD8UD-1L2T
│
...
├─System Firmware:
│     Device ID:          3a8d1141d644c70ae91fbf8611ac825c385ba4dc
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    27329793
│     Vendor:             ASRock Rack (DMI:EDK II)
│     Update State:       Success
│     GUID:               731cbc77-cce1-4ec2-b79a-265470b332f1
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Cryptographic hash verification is available
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
...
└─UEFI Device Firmware:
      Device ID:          fec7d4fd79d3d59a7c12b12ff6e30677aa1b66d3
      Summary:            UEFI System Resource Table device (updated via NVRAM)
      Current version:    28451200
      Minimum Version:    2
      Vendor:             DMI:EDK II
      Update State:       Success
      GUID:               3792094f-4eb9-11e2-9d5a-f9377442e311
      Device Flags:       • Internal device
                          • Updatable
                          • System requires external power source
                          • Needs a reboot after installation
                          • Device is usable for the duration of the update
      Device Requests:    • Message

bcran@delano:~> fwupdmgr get-details altra1l2t_host_debug_26.01.05-02.cab 
Decompressing…           [     \                                 ]
ASRock Rack ALTRAD8UD-1L2T
│
└─System Firmware:
      Device ID:          3a8d1141d644c70ae91fbf8611ac825c385ba4dc
      Summary:            UEFI System Resource Table device (updated via NVRAM)
      Current version:    27329793
      Vendor:             ASRock Rack (DMI:EDK II)
      Update State:       Success
      Update Error:       ->convert_version not implemented
      GUID:               731cbc77-cce1-4ec2-b79a-265470b332f1
      Device Flags:       • Internal device
                          • System requires external power source
                          • Needs a reboot after installation
                          • Cryptographic hash verification is available
                          • Device is usable for the duration of the update
                          • Updatable
      Device Requests:    • Message

bcran@delano:~> fwupdmgr install altra1l2t_host_debug_26.01.05-02.cab 
Decompressing…           [     \                                 ]
firmware signature missing or not trusted; set OnlyTrusted=false in /etc/fwupd/fwupd.conf ONLY if you are a firmware developer

bcran@delano:~> sudo fwupdmgr install altra1l2t_host_debug_26.01.05-02.cab 
Waiting…                 [***************************************]
Successfully installed firmware
An update requires a reboot to complete. Restart now? [y|N]: y

On rebooting, the update actually failed to install. I’ll debug and fix it, and try and implement support for updating both host and sys firmware at the same time:

EsrtFmpDxe: Add new image descriptor with GUID 731CBC77-CCE1-4EC2-B79A-265470B332F1 HardwareInstance:0x0
EsrtFmpDxe: Found an ESRT entry for a System Device.
EsrtFmpDxe: Add new image descriptor with GUID 3792094F-4EB9-11E2-9D5A-F9377442E311 HardwareInstance:0x0
ESRT Table Information:
+--------------------------------------------------------+
| Firmware Resource Count          : 0x00000002          |
| Firmware Resource Count Max      : 0x00000002          |
| Firmware Resource Entry Version  : 0x0000000000000001  |
+--------------------------------------------------------+
ESRT Table Entries:
+--------------------------------------+--------------+------------+------------+------------+------------+------------+
|                                      |              |            | Lowest     |            | Last       | Last       |
|                                      | Firmware     |            | Supported  | Capsule    | Attempted  | Attempted  |
| CLASS GUID                           | Type         | Version    | Version    | Flags      | Version    | Status     |
+--------------------------------------+--------------+------------+------------+------------+------------+------------+
| 731CBC77-CCE1-4EC2-B79A-265470B332F1 | System FW    | 0x01A10501 | 0x00000000 | 0x00000000 | 0x00000000 | 0x00000000 |
| 3792094F-4EB9-11E2-9D5A-F9377442E311 | Device FW    | 0x01B22180 | 0x00000002 | 0x00000000 | 0x00000000 | 0x00000000 |
+--------------------------------------+--------------+------------+------------+------------+------------+------------+
EsrtFmpDxe: Installed ESRT table. 
PROGRESS CODE: V03051001 I0
BootProgressDxe: CodeType=0x1 Value=0x3051001 Instance=0x0 CallerIdGuid=462CAA21-7614-4503-836E-8AB6F4662331 Data=0

1 Like

Idk if anyone has ran into this problem or not. When I switched over to EDK2, Firefox and many GPU accelerated programs quit working. On particular, this is an NVIDIA RTX 5070 (12GB) on an Altra M128-26. Thankfully, @bexcran was able to dig into this and found out resizable BAR is the cause. Easiest way to apply this fix is to do:

  sed -i 's/gEfiMdeModulePkgTokenSpaceGuid.PcdPcieResizableBarSupport|TRUE/gEfiMdeModulePkgTokenSpaceGuid.PcdPcieResizableBarSupport|FALSE/g' edk2-platforms/Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc

After applying this, the build has been working flawlessly for a week now. I’ve made this a default in bsp.nix so any nix user with access to the TF-A can use this and won’t run into this problem.

3 Likes

Also, note that the issue with Resizable BAR support happens on the latest Release version of the drivers: the issue is fixed in the Beta version(s).

2 Likes

To be honest, for anyone working with Ampere Altra boards, the buildfw.sh enhancements are revolutionary. Prior to this, edk2-ampere-tools’ difficult scripts and TF-A dependence were a major pain. Now that the Secure Boot key creation is clean—no more juggling test keys—you can essentially put in a platform, create UEFI alone if necessary, or go full flash. Additionally, HostFwInfo.h’s monotonic firmware versioning is quite clever for fwupdmgr procedures. This makes things much simpler and less prone to errors when working on custom builds for ALTRAD8UD-1L2T or COM-HPC-ALT. The only thing I would watch out for is ensuring sure the Renesas USB firmware is pulled in; if it isn’t, those ports won’t function until the operating system loads it.

Fans of edk2 will undoubtedly value the consistency and clarity this adds to multi-platform builds.

2 Likes

Hi,

I am trying to build a new firmware version to fix the bar issue but seriously, i am lost in all the different instructions from multiple repos.

How do we get the atf slim files ?

I will try to write a step by step guide.

KR,

Bert

@bdherouville Unfortunately to get the ATF SLIM files you need to have a signed NDA with Ampere Computing to be able to access Customer Connect.

You can also build an older EDK (I’m running a build I made in late June 2025) that doesn’t require the newer binary blobs (TF-A etc). You just need to add the resizable bar option in the configuration. I posted about that last year

Is it hard to get this NDA ?

As with most companies, they don’t normally allow individuals to sign the NDA - you have to be part of a large company.

Well, then it is definitely not an issue !

Oh it’s definitely a problem: I ran into it before joining Ampere where messages to the developer email address requesting the files went unanswered, and my request to sign the NDA was ignored. Since being with the company I’ve repeatedly asked that we make the binaries public, but progress on that front has been very slow.

1 Like