Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ ifeq ($(ARCH),AARCH64)
ifeq ($(TARGET),nxp_ls1028a)
ARCH_FLAGS=-mcpu=cortex-a72+crypto -march=armv8-a+crypto -mtune=cortex-a72
CFLAGS+=$(ARCH_FLAGS) -DCORTEX_A72

# ZynqMP RVBAR (0xFD5C0040) does not exist on LS1028A -- the store faults
# pre-UART. LS1028A reset vector comes from the boot ROM (DCFG BOOTLOCPTR),
# so skip the RVBAR write.
CFLAGS+=-DSKIP_RVBAR=1
# MMU on (boot_aarch64_start.S LS1028A table): DDR Normal cacheable -- required
# for coherency with the ENETC coherent DMA (SICAR=0x27276767); CCSR/BAR Device.
CFLAGS +=-ffunction-sections -fdata-sections
LDFLAGS+=-Wl,--gc-sections

Expand Down Expand Up @@ -855,11 +860,18 @@ ifeq ($(ARCH),PPC)
endif

ifneq ($(NO_ASM),1)
# Use the SHA256 and SP math all assembly accelerations
# Use the SHA256/SHA512 and SP math assembly accelerations.
# (wolfSSL PR 10767 added the SHA-512 PPC32 asm transform; SHA384/SHA512
# hashing in sha512.c now references Transform_Sha512_Len.) The unused
# object is pruned by --gc-sections when sha512.o is not linked (ED25519).
CFLAGS+=-DWOLFSSL_SP_PPC
CFLAGS+=-DWOLFSSL_PPC32_ASM -DWOLFSSL_PPC32_ASM_INLINE
#CFLAGS+=-DWOLFSSL_PPC32_ASM_SMALL
MATH_OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/ppc32/ppc32-sha256-asm_c.o
# Add the SHA-512 PPC32 asm object only if its source is present (wildcard):
# the wolfSSL pin (PR 10767) provides it; the build falls back to C sha512 for
# an older checkout that lacks it.
MATH_OBJS+=$(patsubst %.c,%.o,$(wildcard $(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/ppc32/ppc32-sha512-asm_c.c))
endif
endif

Expand Down
31 changes: 31 additions & 0 deletions config/examples/nxp-ls1028a.config
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,34 @@ WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x20080000
WOLFBOOT_LOAD_DTS_ADDRESS?=0x80000000
WOLFBOOT_DTS_BOOT_ADDRESS?=0x20F00000
WOLFBOOT_DTS_UPDATE_ADDRESS?=0x20F00000

# -----------------------------------------------------------------------------
# wolfIP network test in the test-app (optional)
# -----------------------------------------------------------------------------
# Compiles the wolfIP TCP/IP stack + the NXP ENETC ethernet port into the
# test-app and runs a board-side network test (the test-app Makefile selects
# the nxp_enetc port automatically for TARGET=nxp_ls1028a). ENETC is a PCIe
# integrated-endpoint MAC discovered over ECAM (AArch64 LE, no byte-swap). This
# target runs MMU-on with cacheable DDR (required for coherent ENETC DMA), so
# the driver does explicit cache maintenance around its rings/buffers.
#
# wolfIP does not fit the default 256KB OCRAM load region, so load the app
# into DDR and enlarge the boot partition. Override the flash layout below
# (the defaults above target a minimal OCRAM-resident app):
#ENABLE_WOLFIP=1
#WOLFBOOT_LIB_WOLFIP=../lib/wolfip
#WOLFBOOT_PARTITION_SIZE=0x100000
#WOLFBOOT_PARTITION_BOOT_ADDRESS=0x20100000
#WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x20300000
#WOLFBOOT_PARTITION_SWAP_ADDRESS=0x20500000
# Load (and run) the app from DDR rather than OCRAM:
#WOLFBOOT_LOAD_ADDRESS=0x80100000
# Set the PHY interface for the board if it differs from port0 SGMII (the
# nxp_enetc_board.h default); RGMII boards set NXP_ENETC_IF_SGMII=0.
#CFLAGS_EXTRA+=-DNXP_ENETC_IF_SGMII=0
# Test mode (default with neither flag = acquire a DHCP lease and stop):
# WOLFBOOT_TEST_TFTP=1 RRQ a file from a host tftpd, report size+checksum
# (set CFLAGS_EXTRA TFTP_EXPECT_SIZE/TFTP_EXPECT_SUM to verify)
# WOLFIP_SPEED_TEST=1 TCP throughput server on port 9 (drive with nc/dd/pv)
#WOLFBOOT_TEST_TFTP=1
#WOLFIP_SPEED_TEST=1
25 changes: 25 additions & 0 deletions config/examples/nxp-t1024.config
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,28 @@ WOLFBOOT_LOAD_DTS_ADDRESS?=0x7F100000

# Load to RAM before hash and verify
CFLAGS_EXTRA+=-DWOLFBOOT_USE_RAMBOOT

# -----------------------------------------------------------------------------
# wolfIP network test in the test-app (optional)
# -----------------------------------------------------------------------------
# Compiles the wolfIP TCP/IP stack + the NXP QorIQ FMan ethernet port
# (mEMAC/MDIO, FM1@DTSEC1) into the test-app and runs a board-side network
# test. The T1024 (e5500) reuses the same nxp_fman driver as the T2080/T1040;
# the default CCSRBAR is the reset value 0xFE000000 (no BOARD_CW_VPX3152
# relocate). Build the app FLAT and 32-bit (ELF=0) at a low load address --
# the elf32 load path is not used here. The wolfIP objects are built -fno-plt
# -D_FORTIFY_SOURCE=0 (the test-app does no PLT/GOT runtime fixup).
# Point WOLFBOOT_LIB_WOLFIP at a wolfIP checkout (or add it as lib/wolfip).
#ENABLE_WOLFIP=1
#WOLFBOOT_LIB_WOLFIP=../lib/wolfip
#ELF=0
#WOLFBOOT_LOAD_ADDRESS=0x100000
# Set the PHY interface for the T1024 board if it differs from FM1@DTSEC1
# SGMII (the nxp_fman_board.h default); RGMII boards set NXP_FMAN_IF_SGMII=0.
#CFLAGS_EXTRA+=-DNXP_FMAN_IF_SGMII=0
# Test mode (default with neither flag = acquire a DHCP lease and stop):
# WOLFBOOT_TEST_TFTP=1 RRQ a file from a host tftpd, report size+checksum
# (set CFLAGS_EXTRA TFTP_EXPECT_SIZE/TFTP_EXPECT_SUM to verify)
# WOLFIP_SPEED_TEST=1 TCP throughput server on port 9 (drive with nc/dd/pv)
#WOLFBOOT_TEST_TFTP=1
#WOLFIP_SPEED_TEST=1
34 changes: 34 additions & 0 deletions config/examples/nxp-t1040.config
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,37 @@ WOLFBOOT_LOAD_DTS_ADDRESS?=0x7F100000

# Load to RAM before hash and verify
CFLAGS_EXTRA+=-DWOLFBOOT_USE_RAMBOOT

# -----------------------------------------------------------------------------
# wolfIP network test in the test-app (optional)
# -----------------------------------------------------------------------------
# Compiles the wolfIP TCP/IP stack + the NXP QorIQ FMan ethernet port
# (mEMAC/MDIO, FM1@DTSEC1) into the test-app and runs a board-side network
# test. The T1040 (e5500) reuses the same nxp_fman driver as the T2080; the
# default CCSRBAR is the reset value 0xFE000000 (no BOARD_CW_VPX3152 relocate).
# Build the app FLAT and 32-bit (ELF=0) at a low load address -- the elf32
# load path is not used here. The wolfIP objects are built -fno-plt
# -D_FORTIFY_SOURCE=0 (the test-app does no PLT/GOT runtime fixup).
# Point WOLFBOOT_LIB_WOLFIP at a wolfIP checkout (or add it as lib/wolfip).
#ENABLE_WOLFIP=1
#WOLFBOOT_LIB_WOLFIP=../lib/wolfip
#ELF=0
#WOLFBOOT_LOAD_ADDRESS=0x100000
# PHY wiring. The nxp_fman default is FM1@DTSEC1 SGMII, PHY probed at addr 0x2.
# On the T1040D4RDB the cabled front port "ETH0" is FM1@DTSEC4 (ethernet@e6000),
# RGMII, with a Realtek RTL8211 PHY (id 0x001CC915) at MDIO addr 4 -- verified
# on hardware (DHCP lease, WOLFIP_TEST: PASS). DTSEC1/2 are fixed-link to the
# on-board L2 switch (no PHY). Uncomment for the RDB ETH0 port:
#CFLAGS_EXTRA+=-DNXP_FMAN_MEMAC_IDX=4
#CFLAGS_EXTRA+=-DNXP_FMAN_IF_SGMII=0
#CFLAGS_EXTRA+=-DNXP_FMAN_PHY_ADDR=4
# To identify the cabled port on a different board, enable the MDIO bus scan:
# it prints ID1/ID2/BSR for every address after init; the one with link=UP is
# the wired port (BSR bit 2). Diagnostic only.
#CFLAGS_EXTRA+=-DWOLFIP_PHY_SCAN
# Test mode (default with neither flag = acquire a DHCP lease and stop):
# WOLFBOOT_TEST_TFTP=1 RRQ a file from a host tftpd, report size+checksum
# (set CFLAGS_EXTRA TFTP_EXPECT_SIZE/TFTP_EXPECT_SUM to verify)
# WOLFIP_SPEED_TEST=1 TCP throughput server on port 9 (drive with nc/dd/pv)
#WOLFBOOT_TEST_TFTP=1
#WOLFIP_SPEED_TEST=1
39 changes: 39 additions & 0 deletions config/examples/nxp-t2080.config
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,42 @@ WOLFBOOT_LOAD_DTS_ADDRESS?=0x200000
# wolfCrypt Test and Benchmark (requires larger partition size)
#WOLFCRYPT_TEST?=1
#WOLFCRYPT_BENCHMARK?=1

# -----------------------------------------------------------------------------
# wolfIP network test in the test-app (optional)
# -----------------------------------------------------------------------------
# Compiles the wolfIP TCP/IP stack + the NXP QorIQ FMan ethernet port
# (mEMAC/MDIO/SGMII, FM1@DTSEC1) into the test-app and runs a board-side
# network test. Build the app FLAT and 32-bit (ELF=0, OS_64BIT=0) at a low
# load address (WOLFBOOT_LOAD_ADDRESS=0x100000) -- the elf32 load path and
# the 64-bit RTOS handoff are not used here. The wolfIP objects are built
# -fno-plt -D_FORTIFY_SOURCE=0 (the test-app does no PLT/GOT runtime fixup).
# Point WOLFBOOT_LIB_WOLFIP at a wolfIP checkout (or add it as lib/wolfip).
#ENABLE_WOLFIP=1
#WOLFBOOT_LIB_WOLFIP=../lib/wolfip
# Build FLAT + 32-bit at a low load address (matches the prose above); the
# sibling nxp-t1040/nxp-t1024 configs set these too.
#ELF=0
#OS_64BIT=0
#WOLFBOOT_LOAD_ADDRESS=0x100000
# Test mode (default with neither flag = acquire a DHCP lease and stop):
# WOLFBOOT_TEST_TFTP=1 RRQ a file from a host tftpd, report size+checksum
# (set CFLAGS_EXTRA TFTP_EXPECT_SIZE/TFTP_EXPECT_SUM to verify)
# WOLFIP_SPEED_TEST=1 TCP throughput server on port 9 (drive with nc/dd/pv)
#WOLFBOOT_TEST_TFTP=1
#WOLFIP_SPEED_TEST=1
#
# Per-board wolfIP ethernet wiring (defaults above are CW VPX3-152 / RDB =
# FM1@DTSEC1, SGMII, PHY probed at addr 0x2). Override per the board device
# tree if the wired port differs:
#
# NAII 68PPC2 (hardware-verified): PRIME port is FM1@DTSEC3 = RGMII with the
# Marvell PHY at MDIO addr 0 (68ppc2.dts ethernet@e4000: phy-connection-type
# "rgmii-id", phy-handle -> ethernet-phy@0 reg <0>). The MDIO scan would
# otherwise grab DTSEC4's PHY at addr 1, so set the address explicitly:
#CFLAGS_EXTRA+=-DNXP_FMAN_MEMAC_IDX=3
#CFLAGS_EXTRA+=-DNXP_FMAN_IF_SGMII=0
#CFLAGS_EXTRA+=-DNXP_FMAN_PHY_ADDR=0
#
# NAII NOR is dual-bank with only the top 128KB boot sector common to both
# banks; flash the ucode/app with the boot-bank select in its runtime state.
23 changes: 19 additions & 4 deletions docs/Targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -5918,6 +5918,21 @@ variants are supported:
Example configuration: [/config/examples/nxp-t2080.config](/config/examples/nxp-t2080.config).
See [Board Selection](#board-selection) below for per-board setup.

> **FMan microcode (DPAA/wolfIP):** when DPAA/FMan is enabled, wolfBoot
> uploads the FMan microcode from NOR at `FMAN_FW_ADDR` (`hal/nxp_t2080.c`).
> This default is board-gated: CW VPX3-152 (256 MB NOR) uses `0xFFE60000`;
> the T2080 RDB and NAII 68PPC2 (128 MB NOR at `0xE8000000`) use `0xEFF00000`
> (just below the wolfBoot region, like the T1040 RDB). The address is
> bounds-checked against the NOR window, so a wrong value fails gracefully
> instead of machine-checking. Flash the matching `fsl_fman_ucode_*` blob at
> that address. wolfIP-on-FMan is hardware-verified on the CW VPX3-152
> (FM1@DTSEC1, SGMII) and the NAII 68PPC2 (FM1@DTSEC3, RGMII, PHY @ addr 0 --
> see the wolfIP block in the example config). The same driver is also
> hardware-verified on the T1040D4RDB (e5500; FM1@DTSEC4, RGMII, RTL8211 @
> addr 4). NAII NOR is dual-bank with only
> the top 128 KB boot sector common to both banks, so flash the ucode/app with
> the boot-bank select in its runtime state.

### Design NXP T2080 PPC

The QorIQ requires a Reset Configuration Word (RCW) to define the boot parameters, which resides at the start of the flash (`0xE8000000` for 128 MB boards, `0xF0000000` for the 256 MB CW VPX3-152).
Expand Down Expand Up @@ -6196,8 +6211,8 @@ Flash Layout (T2080 RDB / NAII 68PPC2, 128 MB flash):
| Description | File | Address |
| ----------- | ---- | ------- |
| Reset Configuration Word (RCW) | _(board-specific)_ | `0xE8000000` |
| Frame Manager Microcode | `fsl_fman_ucode_t2080_r1.0.bin` | `0xE8020000` |
| Signed Application | `test-app/image_v1_signed.bin` | `0xE8080000` |
| Frame Manager Microcode | `fsl_fman_ucode_t2080_r1.0.bin` | `0xEFF00000` |
| Signed Application | `test-app/image_v1_signed.bin` | `0xEFEE0000` |
| wolfBoot | `wolfboot.bin` | `0xEFFE0000` |
| Boot Entry Point (offset jump to init code) | | `0xEFFFFFFC` |

Expand All @@ -6206,8 +6221,8 @@ Flash Layout (CW VPX3-152, 256 MB flash):
| Description | File | Address |
| ----------- | ---- | ------- |
| Reset Configuration Word (RCW) | _(board-specific)_ | `0xF0000000` |
| Frame Manager Microcode | `fsl_fman_ucode_t2080_r1.0.bin` | `0xF0020000` |
| Signed Application | `test-app/image_v1_signed.bin` | `0xF0080000` |
| Frame Manager Microcode | `fsl_fman_ucode_t2080_r1.0.bin` | `0xFFE60000` |
| Signed Application | `test-app/image_v1_signed.bin` | `0xFF000000` |
| wolfBoot | `wolfboot.bin` | `0xFFFE0000` |
| Boot Entry Point (offset jump to init code) | | `0xFFFFFFFC` |

Expand Down
Loading
Loading