Skip to content

Commit 439d8be

Browse files
committed
NXP T2080 / CW VPX3-152: VxWorks 7 64-bit boot support
Adds the wolfBoot side of the ePAPR handoff for VxWorks 7 64-bit on the CW VPX3-152, plus several T2080 robustness fixes uncovered along the way. Also adds a Design subsection in docs/Targets.md describing the OS64BIT handoff (final 64-bit memory map, RAMFUNCTION trampoline, IVPR-to-DDR relocation, FDT fixups) and an opt-in WOLFBOOT_PPC_PRE_OS_DUMP build flag for handoff-state diagnostics.
1 parent 8c7b864 commit 439d8be

15 files changed

Lines changed: 2046 additions & 305 deletions

File tree

.github/workflows/test-configs.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,24 @@ jobs:
211211
arch: ppc
212212
config-file: ./config/examples/nxp-t2080.config
213213

214+
# Additional T2080 board-specific compile tests for alternate board macros.
215+
nxp_t2080_test_naii_68ppc2:
216+
uses: ./.github/workflows/test-build-powerpc.yml
217+
with:
218+
arch: ppc
219+
config-file: ./config/examples/nxp-t2080.config
220+
make-args: CFLAGS_EXTRA=-DBOARD_NAII_68PPC2
221+
222+
# VPX3-152 compile test: validates board-specific code paths build cleanly.
223+
# Uses default config addresses (128MB layout); real hardware needs the
224+
# VPX3-152 address overrides uncommented in .config.
225+
nxp_t2080_vpx3152_test:
226+
uses: ./.github/workflows/test-build-powerpc.yml
227+
with:
228+
arch: ppc
229+
config-file: ./config/examples/nxp-t2080.config
230+
make-args: CFLAGS_EXTRA=-DBOARD_CW_VPX3152
231+
214232
nxp_lpc54s0xx_test:
215233
uses: ./.github/workflows/test-build.yml
216234
with:

arch.mk

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,18 @@ ifeq ($(TARGET),nxp_t2080)
10721072
CFLAGS+=$(ARCH_FLAGS)
10731073
BIG_ENDIAN=1
10741074
CFLAGS+=-DMMU -DWOLFBOOT_FDT -DWOLFBOOT_DUALBOOT
1075+
# Support U-Boot legacy uImage header: strip 64-byte header before jumping
1076+
# to the OS image (e.g. uVxWorks, uImage Linux kernel).
1077+
CFLAGS+=-DWOLFBOOT_UBOOT_LEGACY
1078+
# 64-bit OS support (VxWorks 7, Linux 64-bit): transitions LAW/TLB to
1079+
# 36-bit physical addressing before jumping to the OS. Equivalent to
1080+
# CW U-Boot "ossel ostype2". Set OS_64BIT=1 in .config to enable.
1081+
ifeq ($(OS_64BIT),1)
1082+
CFLAGS+=-DENABLE_OS64BIT
1083+
endif
1084+
ifneq ($(WOLFBOOT_BOOTARGS),)
1085+
CFLAGS+=-DWOLFBOOT_BOOTARGS='"$(WOLFBOOT_BOOTARGS)"'
1086+
endif
10751087
CFLAGS+=-pipe # use pipes instead of temp files
10761088
CFLAGS+=-feliminate-unused-debug-types
10771089
LDFLAGS+=$(ARCH_FLAGS)

config/examples/nxp-t2080.config

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# NXP T2080 wolfBoot Configuration
22
# Default board: T2080 RDB (66.66 MHz oscillator, DDR3L SODIMM)
33
#
4-
# Board selection: uncomment exactly one line to override the default.
5-
# Default (no define): T2080 RDB (66.66 MHz oscillator, DDR3L SODIMM)
6-
# BOARD_CW_VPX3152: CW VPX3-152 (66.667 MHz oscillator, DDR3L)
7-
# BOARD_NAII_68PPC2: NAII 68PPC2 (100 MHz oscillator, 8GB DDR3)
4+
# Board selection:
5+
# Default (no define): T2080 RDB (66.66 MHz oscillator, DDR3L SODIMM)
6+
# BOARD_NAII_68PPC2: NAII 68PPC2 (100 MHz oscillator, 8 GB DDR3)
7+
# BOARD_CW_VPX3152: CW VPX3-152 (66.667 MHz oscillator, 4 GB DDR3L)
88
#
9-
#CFLAGS_EXTRA+=-DBOARD_CW_VPX3152
9+
# For NAII 68PPC2, uncomment the line below (addresses are the same as RDB):
1010
#CFLAGS_EXTRA+=-DBOARD_NAII_68PPC2
11+
#
12+
# For CW VPX3-152 (256 MB NOR flash at 0xF0000000), uncomment the BOARD
13+
# define AND the address override block at the bottom of this file.
14+
#CFLAGS_EXTRA+=-DBOARD_CW_VPX3152
1115

1216
ARCH=PPC
1317
TARGET=nxp_t2080
@@ -34,51 +38,61 @@ RAM_CODE?=1
3438
DUALBANK_SWAP?=0
3539
WOLFTPM?=0
3640
OPTIMIZATION_LEVEL?=1
41+
ELF?=1
42+
DEBUG_ELF=0
3743

38-
# NOR Base Address
39-
# T2080 RDB: 128MB flash at 0xE8000000, wolfBoot at top (0xEFFE0000)
40-
# CW VPX3-152: 256MB flash at 0xF0000000, wolfBoot at top (0xFFFE0000)
44+
# -----------------------------------------------------------------------------
45+
# Default addresses: T2080 RDB / NAII 68PPC2 (128 MB NOR flash @ 0xE8000000)
46+
# -----------------------------------------------------------------------------
47+
48+
# NOR Base Address: wolfBoot at top of flash
4149
ARCH_FLASH_OFFSET?=0xEFFE0000
42-
#ARCH_FLASH_OFFSET?=0xFFFE0000 # CW VPX3-152
4350

4451
# CPC SRAM address (must match L2SRAM_ADDR in nxp_ppc.h)
45-
# CW VPX3-152: relocated to 0xEE900000 to avoid 256MB flash TLB overlap
4652
L2SRAM_ADDR?=0xF8F00000
47-
#L2SRAM_ADDR?=0xEE900000 # CW VPX3-152
4853

4954
# Flash Sector Size
5055
WOLFBOOT_SECTOR_SIZE?=0x10000
5156

5257
# wolfBoot start address
5358
WOLFBOOT_ORIGIN?=0xEFFE0000
54-
#WOLFBOOT_ORIGIN?=0xFFFE0000 # CW VPX3-152
5559
# wolfBoot partition size (custom)
5660
BOOTLOADER_PARTITION_SIZE=0x20000
5761

5862
# Application Partition Size
5963
WOLFBOOT_PARTITION_SIZE?=0x100000
6064
# Location in Flash for Application Partition
6165
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0xEFEE0000
62-
#WOLFBOOT_PARTITION_BOOT_ADDRESS?=0xFFEE0000 # CW VPX3-152
6366
# Load Partition to RAM Address
6467
WOLFBOOT_LOAD_ADDRESS?=0x19000
6568

6669
# Location in Flash for Update Partition
6770
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0xEFDE0000
68-
#WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0xFFDE0000 # CW VPX3-152
6971

7072
# Location of temporary sector used during updates
7173
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0xEFDD0000
72-
#WOLFBOOT_PARTITION_SWAP_ADDRESS?=0xFFDD0000 # CW VPX3-152
7374

7475
# DTS (Device Tree)
7576
WOLFBOOT_DTS_BOOT_ADDRESS?=0xE8040000
76-
#WOLFBOOT_DTS_BOOT_ADDRESS?=0xF0040000 # CW VPX3-152
7777
WOLFBOOT_DTS_UPDATE_ADDRESS?=0xE8050000
78-
#WOLFBOOT_DTS_UPDATE_ADDRESS?=0xF0050000 # CW VPX3-152
7978
# DTS Load to RAM Address
8079
WOLFBOOT_LOAD_DTS_ADDRESS?=0x200000
8180

81+
# -----------------------------------------------------------------------------
82+
# CW VPX3-152 address overrides (256 MB NOR flash @ 0xF0000000)
83+
# Uncomment ALL lines below when building for VPX3-152.
84+
# Also uncomment CFLAGS_EXTRA+=-DBOARD_CW_VPX3152 at the top of this file.
85+
# -----------------------------------------------------------------------------
86+
#ARCH_FLASH_OFFSET=0xFFFE0000
87+
#L2SRAM_ADDR=0xEE900000
88+
#WOLFBOOT_ORIGIN=0xFFFE0000
89+
#WOLFBOOT_PARTITION_BOOT_ADDRESS=0xFFEE0000
90+
#WOLFBOOT_PARTITION_UPDATE_ADDRESS=0xFFDE0000
91+
#WOLFBOOT_PARTITION_SWAP_ADDRESS=0xFFDD0000
92+
#WOLFBOOT_DTS_BOOT_ADDRESS=0xF0040000
93+
#WOLFBOOT_DTS_UPDATE_ADDRESS=0xF0050000
94+
#WOLFBOOT_LOAD_DTS_ADDRESS=0xF000000
95+
8296
# Flash erase/write/read test at update partition address
8397
#TEST_FLASH?=1
8498

0 commit comments

Comments
 (0)