Skip to content

Support for NXP T1040 RDB#714

Open
dgarske wants to merge 1 commit intowolfSSL:masterfrom
dgarske:nxp_t1040
Open

Support for NXP T1040 RDB#714
dgarske wants to merge 1 commit intowolfSSL:masterfrom
dgarske:nxp_t1040

Conversation

@dgarske
Copy link
Contributor

@dgarske dgarske commented Mar 5, 2026

New: NXP T1040D4RDB Support

  • Add wolfBoot port for NXP T1040D4RDB (4-core e5500, 256MB NOR, 8GB DDR4)
  • Shared HAL hal/nxp_t10xx.c with T1024/T1040 #ifdef guards, thin wrappers for build system
  • T1040-specific DDR4 timing/config registers, 256MB IFC NOR flash geometry, 4 PCIe controllers
  • Example config config/examples/nxp-t1040.config with 256MB NOR flash layout
  • Linker scripts for T1040 main and stage1 bootstrap
  • Test application test-app/app_nxp_t1040.c with partition info and keystore display
  • Lauterbach TRACE32 scripts: t1040_flash.cmm (NOR programming) and t1040_debug.cmm (TLB/LAW setup)

Fixed: ELF In-Place Loading

  • Cache ELF program headers on stack before segment processing to prevent collision during RAM boot
  • Add ELF_MAX_PH (default 8) to control cache size
  • Remove empty BSS PT_LOAD segment from test-app/PPC.ld that triggered false collision detection

Improved: T1024/T1040 Code Sharing

  • Refactor hal/nxp_t1024.c into shared hal/nxp_t10xx.c (no T1024 functional changes)
  • Combine duplicate arch.mk sections for T1024/T1040 using $(filter) pattern
  • Combine T1024/T1040 documentation into single "NXP QorIQ T10xx PPC" section in docs/Targets.md

Improved: PPC Boot Infrastructure

  • Fix CPC SRAM size register for e5500 vs e6500 (256KB vs 1MB) in boot_ppc_start.S
  • Fix stage1 Makefile ASFLAGS ordering (must be set after BUILD_LOADER_STAGE1 added to CFLAGS)
  • Add debug symbols (-g) to stage1 PPC builds
  • Add keystore object to T1024/T1040 test-app builds

Documentation

  • Add Design subsection with TLB entry table, LAW entry table, memory map, boot sequence
  • Add Lauterbach script references and debugging instructions
  • Add T1040 flash layout, RCW, and bin-assemble examples

Example Boot Output:

wolfBoot HAL Init
Loading wolfBoot to DDR
wolfBoot HAL Init
LIODN fsl-usb2-mph: 0xFE0E0520=553
LIODN fsl-usb2-dr: 0xFE0E0524=554
LIODN fsl,esdhc: 0xFE0E0530=552
LIODN fsl,pq-sata-v2: 0xFE0E0550=555
LIODN fsl,tdm1.0: 0xFE0E0574=560
LIODN fsl,qe: 0xFE0E0578=559
LIODN fsl,elo3-dma: 0xFE0E0580=147
LIODN fsl,elo3-dma: 0xFE0E0584=227
LIODN fsl,qman: 0xFE318D08=62
LIODN fsl,bman: 0xFE31AD08=63
LIODN fsl,qoriq-pcie: 0xFE240040=148
LIODN fsl,qoriq-pcie: 0xFE250040=228
LIODN fsl,qoriq-pcie: 0xFE260040=308
Flash: Mfg 0x89, Device Code 0x7E/0x28/0x1
CPLD BOARD_ID: 0x1130013
CPLD PLD_VER: 0x13
CPLD PCI 0x7F13, RCW4 0x66000002, SRDS1_PRTCL 0xCC
Route Lane B->SGMII
CPLD PCI 0x7F13
PCIe 1: Base 0xFE240000, Rev 0x2080204
PCIe 2: Base 0xFE250000, Rev 0x2080204
PCIe 3: Base 0xFE260000, Rev 0x2080204
PCIe 1: No link (LTSSM 0x0)
PCIe 2: No link (LTSSM 0x0)
PCIe 3: No link (LTSSM 0x0)
QE: Firmware: Length 13428, Count 1
QE: uploading 'Microcode for T1040 r1.0' version 0.0.1
QE: Traps 0
FMAN: Firmware: Length 32604, Count 1
FMAN: uploading 'Microcode for T1040 r1.1' version 106.4.18
PHY 1: SGMII, Mac DC:A7:D9:0:6:F4
PHY 1: Unknown (OUI 732, Mdl 11, Rev 4)
PHY 2: SGMII, Mac DC:A7:D9:0:6:F5
PHY 2: Unknown (OUI 3FFFFF, Mdl 3F, Rev F)
PHY 3: RGMII, Mac DC:A7:D9:0:6:F6
PHY 3: Unknown (OUI 3FFFFF, Mdl 3F, Rev F)
PHY 4: RGMII, Mac DC:A7:D9:0:6:F7
PHY 4: Unknown (OUI 732, Mdl 11, Rev 5)
MP: Starting cores 2-4 (boot page 0x7FFFF000, spin table 0x7FF01900)
Versions: Boot 1, Update 0
Trying Boot partition at 0xEE000000
Loading header 512 bytes from 0xEE000000 to 0x6FFFFE00
Loading image 255612 bytes from 0xEE000200 to 0x70000000...done
Boot partition: 0x6FFFFE00 (sz 255612, ver 0x1, type 0x601)
Checking integrity...done
Verifying signature...done
Successfully selected image in part: 0
Firmware Valid
Loading elf at 0x70000000
Found valid elf32 (big endian)
Program Headers 1 (size 32)
Load 10256 bytes (offset 0x10000) to 0x70000000 (p 0x70000000)
Entry point 0x70000000
Loading DTB (size 35035) from 0xE8800000 to RAM at 0x7F100000
Booting at 0x70000000
FDT: Version 17, Size 35035
FDT: Expanded (2KB) to 37083 bytes
FDT: Set memory, start=0x0, size=0x0
FDT: Set cpu (444), status=okay
FDT: Set cpu (444), cpu-release-addr=0
FDT: Set cpu (444), enable-method=spin-table
FDT: Set cpu (444), timebase-frequency=37500000
FDT: Set cpu (444), clock-frequency=1400000000
FDT: Set cpu (444), bus-frequency=600000000
FDT: Set cpu (744), status=disabled
FDT: Set cpu (744), cpu-release-addr=0
FDT: Set cpu (744), enable-method=spin-table
FDT: Set cpu (744), timebase-frequency=37500000
FDT: Set cpu (744), clock-frequency=1400000000
FDT: Set cpu (744), bus-frequency=600000000
FDT: Set cpu (1048), status=disabled
FDT: Set cpu (1048), cpu-release-addr=0
FDT: Set cpu (1048), enable-method=spin-table
FDT: Set cpu (1048), timebase-frequency=37500000
FDT: Set cpu (1048), clock-frequency=1400000000
FDT: Set cpu (1048), bus-frequency=600000000
FDT: Set cpu (1352), status=disabled
FDT: Set cpu (1352), cpu-release-addr=0
FDT: Set cpu (1352), enable-method=spin-table
FDT: Set cpu (1352), timebase-frequency=37500000
FDT: Set cpu (1352), clock-frequency=1400000000
FDT: Set cpu (1352), bus-frequency=600000000
FDT: Set soc (8848), bus-frequency=600000000
FDT: Set serial (24124), clock-frequency=300000000
FDT: Set serial (24280), clock-frequency=300000000
FDT: Set serial (24436), clock-frequency=300000000
FDT: Set serial (24592), clock-frequency=300000000
FDT: Set qe (31268), clock-frequency=300000000
FDT: Set qe (31268), bus-frequency=300000000
FDT: Set qe (31268), brg-frequency=150000000
FDT: Set fsl-usb2-mph (25396), fsl,liodn=553
FDT: Set fsl-usb2-dr (25644), fsl,liodn=554
FDT: Set fsl,esdhc (23636), fsl,liodn=552
FDT: Set fsl,pq-sata-v2 (26024), fsl,liodn=555
FDT: Set fsl,tdm1.0 (25280), fsl,liodn=560
FDT: Set fsl,qe (31348), fsl,liodn=559
FDT: Set fsl,elo3-dma (21644), fsl,liodn=147
FDT: Set fsl,elo3-dma (22656), fsl,liodn=227
FDT: Set fsl,fman-port-1g-rx (13508), fsl,liodn=1061
FDT: Set fsl,fman-port-1g-rx (13884), fsl,liodn=1062
FDT: Set fsl,fman-port-1g-rx (14260), fsl,liodn=1063
FDT: Set fsl,fman-port-1g-rx (14636), fsl,liodn=1064
FDT: Set fsl,qman (9812), fsl,liodn=62
FDT: Set fsl,bman (9920), fsl,liodn=63
FDT: Set fsl,qoriq-pcie (27916), fsl,liodn=148
FDT: Set fsl,qoriq-pcie (28628), fsl,liodn=228
FDT: Set fsl,qoriq-pcie (29340), fsl,liodn=308
FDT: Set qman-portal@0 (6980), fsl,liodn=1,27
FDT: Set qman-portal@0/fman@0 (7136), fsl,liodn=974
FDT: Set qman-portal@1 (7172), fsl,liodn=2,28
FDT: Set qman-portal@1/fman@0 (7332), fsl,liodn=975
FDT: Set qman-portal@2 (7368), fsl,liodn=3,29
FDT: Set qman-portal@2/fman@0 (7528), fsl,liodn=976
FDT: Set qman-portal@3 (7564), fsl,liodn=4,30
FDT: Set qman-portal@3/fman@0 (7724), fsl,liodn=977
FDT: Set qman-portal@4 (7760), fsl,liodn=5,31
FDT: Set qman-portal@4/fman@0 (7920), fsl,liodn=978
FDT: Set qman-portal@5 (7956), fsl,liodn=6,32
FDT: Set qman-portal@5/fman@0 (8116), fsl,liodn=979
FDT: Set qman-portal@6 (8152), fsl,liodn=7,33
FDT: Set qman-portal@6/fman@0 (8312), fsl,liodn=980
FDT: Set qman-portal@7 (8348), fsl,liodn=8,34
FDT: Set qman-portal@7/fman@0 (8508), fsl,liodn=981
FDT: Set qman-portal@8 (8544), fsl,liodn=9,35
FDT: Set qman-portal@8/fman@0 (8704), fsl,liodn=982
FDT: Set qman-portal@9 (8740), fsl,liodn=10,36
FDT: Set qman-portal@9/fman@0 (8900), fsl,liodn=983
FDT: Set fman@ (10548), clock-frequency=300000000
FDT: Ethernet0: Offset 10768
FDT: Set ethernet@0 (10768), local-mac-address=DC:A7:D9:0:6:F4
FDT: Ethernet1: Offset 11016
FDT: Set ethernet@1 (11016), local-mac-address=DC:A7:D9:0:6:F5
FDT: Ethernet2: Offset 11264
FDT: Set ethernet@2 (11264), local-mac-address=DC:A7:D9:0:6:F6
FDT: Ethernet3: Offset 11496
FDT: Set ethernet@3 (11496), local-mac-address=DC:A7:D9:0:6:F7
FDT: Ethernet4: Offset 11728
FDT: Set ethernet@4 (11728), local-mac-address=0:0:0:0:0:0
FDT: pcie1@FE240000, Offset 28536
FDT: Set pcie@1 (28536), dma-ranges
FDT: Set pcie@1 (28536), bus-ranges
FDT: pcie2@FE250000, Offset 29344
FDT: Set pcie@2 (29344), dma-ranges
FDT: Set pcie@2 (29344), bus-ranges
FDT: pcie3@FE260000, Offset 30152
FDT: Set pcie@3 (30152), dma-ranges
FDT: Set pcie@3 (30152), bus-ranges
FDT: Set sdhc@ (24384), clock-frequency=300000000
FDT: Set cpu (24384), status=okay
========================
NXP T1040 wolfBoot demo Application
Copyright 2025 wolfSSL Inc
GPL v3
========================

System information
====================================
Boot partition version: 1
Update partition version: 0
Current firmware state: NEW
Update state: NEW

Bootloader keystore information
====================================
Number of public keys: 1

  Public Key #0: size 96, type 6, mask FFFFFFFF
  ====================================
  6D 86 AE 32 71 7C 63 AC AA F1 81 06 9C 77 F2 E3 
  B8 CE 59 9E 40 9E D8 8E 7A 20 DD FA E6 CB 47 50 
  DD A6 3C 73 6D 95 50 FF 16 BB 97 76 1B D5 20 37 
  71 EF C9 60 0B D9 F7 7C 0F B2 E9 89 4F 8A 72 78 
  E2 7A 63 05 DB B9 CD 1B 6F CD 6A 20 4C 47 F0 D6 
  6D E7 7E 90 1B 5E FC 2B 0F 26 AE CE F9 9E 17 98 
  

Boot partition marked successful
Test App: idle loop

@dgarske dgarske self-assigned this Mar 5, 2026
Copilot AI review requested due to automatic review settings March 5, 2026 23:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds build, HAL, linker, documentation, and Lauterbach scripting needed to bring up and program wolfBoot on the NXP QorIQ T1040 RDB.

Changes:

  • Introduces a new nxp_t1040 target (build flags, example config, link scripts, HAL wrapper).
  • Adds T1040-specific test application and updates test-app build logic.
  • Adds Lauterbach .cmm scripts and target documentation for flashing/debugging.

Reviewed changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
tools/scripts/nxp_t1040/t1024_flash.cmm Adds a TRACE32 NOR flashing script intended for T1040.
tools/scripts/nxp_t1040/t1024_debug.cmm Adds a TRACE32 debug setup script (CPU/MMU/symbols/breakpoints).
test-app/app_nxp_t1040.c Adds a simple UART “heartbeat” test app for T1040.
test-app/Makefile Enables PPC64 build settings for nxp_t1040.
hal/nxp_t1040_stage1.ld Adds stage1 linker script for T1040 boot-from-NOR layout.
hal/nxp_t1040.ld Adds main linker script for T1040 RAM-loaded image.
hal/nxp_t1040.c Adds T1040 HAL wrapper to shared T10xx implementation.
hal/nxp_t1024.c Replaces large T1024-specific HAL with a shared T10xx wrapper include.
hal/nxp_ppc.h Adds TARGET_nxp_t1040 platform definitions.
docs/Targets.md Documents T1040 target, flash map, and build steps.
config/examples/nxp-t1040.config Adds example configuration for T1040 memory map / partitions.
arch.mk Adds compiler/linker flags and object selection for nxp_t1040.
Makefile Selects factory_wstage1.bin as main target for nxp_t1040.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copilot AI review requested due to automatic review settings March 7, 2026 00:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 16 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@dgarske dgarske marked this pull request as ready for review March 18, 2026 18:16
@dgarske dgarske assigned danielinux and wolfSSL-Bot and unassigned dgarske Mar 18, 2026
@dgarske dgarske requested a review from danielinux March 18, 2026 20:06
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.

4 participants