Skip to content

Platform/Qualcomm/NordBoardPkg: add Nord Generic board#1012

Open
b49020 wants to merge 7 commits into
tianocore:masterfrom
b49020:nord-minplat
Open

Platform/Qualcomm/NordBoardPkg: add Nord Generic board#1012
b49020 wants to merge 7 commits into
tianocore:masterfrom
b49020:nord-minplat

Conversation

@b49020

@b49020 b49020 commented Jul 14, 2026

Copy link
Copy Markdown
Member

Add the Qualcomm Nord Generic board port, built on the MinPlatform staged-boot model (PcdBootStage, Core{Common,Pei,Dxe}Lib, Stage1-4 includes, BoardInitLib, PlatformInitPei/ReportFvPei) and the QualcommPlatformPkg / QualcommSiliconPkg foundation. It runs as the TF-A BL33 payload (SEC first in a multi-FV FD at the BL33 base) and boots to the OS.

The package is named generically (NordBoardPkg) so it can host further
Qualcomm Nord-family boards.

Included:

  • NordBoardPkg.dsc/.fdf/.dec, Include/Dsc/Stage1-4 and Include/Fdf/FlashMap.
  • BoardInitLib (MinPlatform board hooks) and OemMiscLib (SMBIOS).
  • USER_PROVIDED_DTB build option with DeviceTree/ (DtPlatformDxe + the UserDTB fork); the board uses GENI UART, UFS and connect-all discovery.

The memory map needs no board-specific drivers: ArmPlatformLib describes system DRAM (including the upper banks) from the SMEM RAM partition table during PEI, and the OS reserved-memory carveouts are carried in the
device tree.

Developed in an AI assisted workflow.

(FixedPcdGet64 (PcdFdBaseAddress) + FixedPcdGet64 (PcdSystemMemorySize))
- (FixedPcdGet64 (PcdTrace32DdrBase) + FixedPcdGet64 (PcdTrace32DdrSize))
);
//

@idlethread idlethread Jul 14, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this T32 block conditional ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose you mean here to make T32 support only available in edk2 DEBUG builds, right?

@vishalo do you have any comments on this with respect to Glymur?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit: 50d3bd4 now builds t32 under debug builds only.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows us to load symbols on t32 simulator from crashdumps. We have plenty of cases where we have to debug RELEASE builds. Let's keep this.

@b49020 b49020 Jul 24, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A platform can still override this in it's own .dsc but we can't enable JTAG in the release builds by default. JTAG is also disabled by default in default secure boot policy.

@b49020 b49020 changed the title Platform/Qualcomm/Iq10EvkBoardPkg: add IQ-10 EVK board (SA8797P) Platform/Qualcomm/NordBoardPkg: add Nord Generic board Jul 15, 2026
@b49020

b49020 commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

Update: rather than IQ10 EVK specific board package, renamed it to NordBoardPkg to cover all the Nord based other board variants. The DTB for sure needs to be board specific though.

@trsoni trsoni left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we don't want to add Assisted-by AI tag?

@ricardosalveti

Copy link
Copy Markdown

so we don't want to add Assisted-by AI tag?

I don't believe the contribution guidelines for edk2 requires it at this point.

Comment thread Platform/Qualcomm/NordBoardPkg/DeviceTree/Dummy.dts
Comment thread Platform/Qualcomm/QualcommMinPlatformPkg/Include/Dsc/Stage2.dsc.inc
Comment thread Silicon/Qualcomm/QualcommSiliconPkg/Library/SmemLib/SmemLib.c Outdated
Comment thread Silicon/Qualcomm/QualcommSiliconPkg/Library/SmemLib/SmemLib.c Outdated
Comment thread Platform/Qualcomm/NordBoardPkg/DeviceTree/Dummy.dts
Comment thread Platform/Qualcomm/NordBoardPkg/NordBoardPkg.dsc Outdated
@trsoni

trsoni commented Jul 16, 2026

Copy link
Copy Markdown

so we don't want to add Assisted-by AI tag?

I don't believe the contribution guidelines for edk2 requires it at this point.

Sorry but it looks odd that Qualcomm is not declaring that anywhere in PR. It is not about policy of the project but more transparency I think could help.

@b49020

b49020 commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

so we don't want to add Assisted-by AI tag?

I don't believe the contribution guidelines for edk2 requires it at this point.

Sorry but it looks odd that Qualcomm is not declaring that anywhere in PR. It is not about policy of the project but more transparency I think could help.

Updated PR description to mention it.

@ricardosalveti

Copy link
Copy Markdown

so we don't want to add Assisted-by AI tag?

I don't believe the contribution guidelines for edk2 requires it at this point.

Sorry but it looks odd that Qualcomm is not declaring that anywhere in PR. It is not about policy of the project but more transparency I think could help.

We also have upstream projects that do ask explicitly to not add the assisted tag (expecting the submitter to completely own the work, even if done with help from AI), that is why our internal guidelines (check the guidelines from OSDO) suggests following the upstream project policies.

@b49020

b49020 commented Jul 16, 2026

Copy link
Copy Markdown
Member Author

Commit df14b8f has been added to introduce QualcommMinPlatformPkg such that the MinPlatform related stage includes can be shared.

@trsoni

trsoni commented Jul 16, 2026

Copy link
Copy Markdown

so we don't want to add Assisted-by AI tag?

I don't believe the contribution guidelines for edk2 requires it at this point.

Sorry but it looks odd that Qualcomm is not declaring that anywhere in PR. It is not about policy of the project but more transparency I think could help.

Updated PR description to mention it.

Thank you. I have also filed the github issue #1014 . I don't see much traction on the past github issues though in this project, I can send it to mailing list if that is most desired to initiate the discussion.

QcomPlatformPkg.dec only declared the UFS register-window PCDs used by
QcomUfsHcDxe. Declare them in QualcommPlatformPkg as PcdUfsHcMmioBase/Size
(UINT64), point QcomUfsHcDxe and RB3Gen2 at them, drop the unused
QcomPlatformPkg dependency from ArmPlatformLib, and delete the package.
No functional change.

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
@b49020

b49020 commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

While refactoring changes further found another duplicated package, removed that as part of this 0541364.

Comment thread Platform/Qualcomm/NordBoardPkg/NordBoardPkg.dsc Outdated
@ricardosalveti

Copy link
Copy Markdown

@vishalo mind a review?

@vishalo

vishalo commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

@vishalo mind a review?

Thank you @b49020 and @ricardosalveti .

Hi @ricardosalveti, some of these patches don't align with our internal discussions. Let's reconvene and work through them together to make sure we're aligned before moving forward.

@ricardosalveti

Copy link
Copy Markdown

Hi @ricardosalveti, some of these patches don't align with our internal discussions. Let's reconvene and work through them together to make sure we're aligned before moving forward.

Sure, but what is actually conflicting here?

Would be nice if you could still help reviewing the PR anyway.

@vishalo vishalo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep this around, till we have plan on where things go?

# instance for RELEASE builds.
#
!if $(TARGET) == DEBUG
PeCoffExtraActionLib|QualcommPlatformPkg/Library/DebugPecoffExtraActionTrace32Lib/DebugPecoffExtraActionTrace32Lib.inf

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have plenty of cases where we have to debug RELEASE builds.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then keep it platform specific where needed.

(FixedPcdGet64 (PcdFdBaseAddress) + FixedPcdGet64 (PcdSystemMemorySize))
- (FixedPcdGet64 (PcdTrace32DdrBase) + FixedPcdGet64 (PcdTrace32DdrSize))
);
//

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows us to load symbols on t32 simulator from crashdumps. We have plenty of cases where we have to debug RELEASE builds. Let's keep this.

mMemRegions[mNumMemRegions].CacheAttributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;
mNumMemRegions++;
/* IMEM Cookies (only when the platform configured the region) */
if ((FixedPcdGet64 (PcdIMemCookiesBase) != 0) && (FixedPcdGet64 (PcdIMemCookiesSize) != 0)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we need to do this, it is better to use FeaturePcd, and not rely on address PCD. How about remove it once DT support is enabled ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched to use FeaturePcd for all the optional memory region mapping. And we shouldn't enforce boot DT for every platform, Pcds are the de-facto standard ways of edk2 configuration so we should support that option too.

@retval Other Pointer to the validated table.
**/
STATIC
USABLE_RAM_PARTITION_TABLE *

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SmemLib should not add RamPartitionTable , can we use SmemLib from @gparikh ? #1015

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworked for SmemLib to abstract out the RamPartitionTable.

can we use SmemLib from @gparikh ? #1015

As I see it is full-fledged SMEM driver with a lot of redundant functionality not needed for the Nord board support. So, there isn't a reason to derail Nord board support just on the SMEM PR. For sure, the SMEM driver can be extended later to add functionality as and when required.

VERSION_STRING = 1.0

[Binaries]
BIN|nord-board.dtb

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not ideal - we will have to recompile UEFI if dtb requires update. Downstream has partition-based solution, we can enable that.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be supported until we have the partition-based implementation available and merged here, shouldn't be a problem to merge this as is and later improve.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to work with you to get those pieces enabled ..

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No please we don't want to enforce partition-based implementation for every use-case. It is already implemented in non-standard way to use EFI signatures on top of U-Boot FIT blob for authentication.

We really have to review it carefully to have a partition based solution upstream aligning with Arm SystemReady practices.

Gate the optional memory regions ArmPlatformLib maps (SMEM, boot DT,
IMEM cookies and the Trace32 DDR debug buffer) on per-region boolean
FeaturePcds instead of inferring "present" from a non-zero base/size,
which conflated a valid base of 0 with "disabled" and could not be
overridden per board. Each flag defaults to FALSE so a board maps only
what it provides. Also add PcdUfsHcEnable and map the UFS register
window under it, which NonDiscoverablePciDeviceDxe does not map itself.

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
@b49020
b49020 force-pushed the nord-minplat branch 2 times, most recently from 9870020 to a62fce2 Compare July 24, 2026 08:08
b49020 added 5 commits July 24, 2026 13:22
Add a functional SmemLib that reads SMEM items by item id so
RamPartitionTableLib can obtain the usable RAM partition table;
previously only SmemLibNull existed. The library is a generic SMEM item
accessor with no knowledge of any item's payload, so the usable RAM
partition table's magic validation and fallback scan live in the
consumer, RamPartitionTableLib. Move the shared RamPartition.h from
QualcommPlatformPkg into QualcommSiliconPkg (consumers already depend on
it) and bound the fallback scan with PcdSmemSize.

Co-developed-by: Tyler Baker <tyler.baker@oss.qualcomm.com>
Signed-off-by: Tyler Baker <tyler.baker@oss.qualcomm.com>
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
RB3Gen2's OemMiscLib is board-agnostic (it reads platform PCDs). Move it
into the shared QualcommPlatformPkg so other Qualcomm boards can reuse it,
and point RB3Gen2 at it. Also migrate the SMBIOS OEM PCDs it consumes from
KodiakPkg to QualcommPlatformPkg so the shared library no longer depends on
a SoC package. No functional change.

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Move the reusable MinPlatform pieces out of GlymurOpenBoardPkg into a new
Platform/Qualcomm/QualcommMinPlatformPkg so multiple Qualcomm boards can
share them, and migrate GlymurOpenBoardPkg onto it:
 - the Stage1-4 DSC skeleton, and
 - the flash-map include, which now derives the FV/NV offsets and base
   addresses from the per-board sizes each board FDF sets.

Board-specific content (DSC overrides and the flash sizes/NV bases) stays
in the board. No functional change: the firmware volume is identical.

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
…ilds

The Trace32 PeCoffExtraActionLib emits JTAG hooks only useful with a
Trace32 debugger. Gate it behind $(TARGET) == DEBUG and use
BasePeCoffExtraActionLibNull for RELEASE.

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Add the Qualcomm Nord Generic board port, built on the MinPlatform
staged-boot model and the QualcommPlatformPkg/QualcommSiliconPkg
foundation. It runs as the TF-A BL33 payload and boots to the OS; the name
is generic so it can host further Nord-family boards.

The staged-boot Stage1-4 skeleton comes from the shared
QualcommMinPlatformPkg; Nord ships its .dsc/.fdf/.dec, board-local flash
map, BoardInitLib and DeviceTree (USER_PROVIDED_DTB), and reuses the shared
OemMiscLib. ArmPlatformLib sizes DRAM from the SMEM RAM partition table, so
no board-specific memory drivers are needed.

Co-developed-by: Tyler Baker <tyler.baker@oss.qualcomm.com>
Signed-off-by: Tyler Baker <tyler.baker@oss.qualcomm.com>
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants