You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Initial port refresh for the NXP T2080 target
* IFC Flash driver and multi-core support on T2080
* Working wolfBoot test-app startup on T2080
* Support for NAII and Curtiss-Wright T2080 vendor boards
Example configuration: [/config/examples/nxp-t2080.config](/config/examples/nxp-t2080.config).
3269
+
Stock layout is default; for NAII 68PPC2, uncomment the "# NAII 68PPC2:" lines and comment the stock lines.
3271
3270
3272
3271
### Design NXP T2080 PPC
3273
3272
3274
3273
The QorIQ requires a Reset Configuration Word (RCW) to define the boot parameters, which resides at the start of the flash (0xE8000000).
3275
3274
3276
3275
The flash boot entry point is `0xEFFFFFFC`, which is an offset jump to wolfBoot initialization boot code. Initially the PowerPC core enables only a 4KB region to execute from. The initialization code (`src/boot_ppc_start.S`) sets the required CCSR and TLB for memory addressing and jumps to wolfBoot `main()`.
3277
3276
3278
-
RM 4.3.3 Boot Space Translation
3277
+
#### Boot Sequence and Hardware Constraints
3278
+
3279
+
**Memory Hierarchy:**
3280
+
3281
+
```
3282
+
CPU Core → L1 (32KB I + 32KB D) → L2 (256KB/cluster, shared by 4 cores)
3283
+
→ CoreNet Fabric → CPC (2MB, SRAM or L3 cache)
3284
+
→ DDR Controller → DDR SDRAM
3285
+
→ IFC Controller → NOR Flash
3286
+
```
3287
+
3288
+
Each core begins execution at effective address `0x0_FFFF_FFFC` with a single
3289
+
4KB MMU page (RM 4.3.3). The assembly startup (`boot_ppc_start.S`) configures
3290
+
TLBs, caches, and stack before jumping to C code.
3291
+
3292
+
**Cold Boot Stack (L1 Locked D-Cache)**
3293
+
3294
+
CPC SRAM is unreliable for stores on cold power-on — L1 dirty-line evictions
3295
+
through CoreNet to CPC cause bus errors (silent CPU checkstop with `MSR[ME]=0`).
3296
+
The fix (matching U-Boot) uses L1 locked D-cache as the initial 16KB stack:
3297
+
`dcbz` allocates cache lines without bus reads, `dcbtls` locks them so they
3298
+
are never evicted. The locked lines at `L1_CACHE_ADDR` (0xF8E00000) are
3299
+
entirely core-local. After DDR init in `hal_init()`, the stack relocates to
3300
+
DDR and the CPC switches from SRAM to L3 cache mode.
3301
+
3302
+
**Flash TLB and XIP**
3303
+
3304
+
The flash TLB uses `MAS2_W | MAS2_G` (Write-Through + Guarded) during XIP
3305
+
boot, allowing L1 I-cache to cache instruction fetches while preventing
3306
+
speculative prefetch to the IFC. C code switches to `MAS2_I | MAS2_G` during
3307
+
flash write/erase (command mode), then `MAS2_M` for full caching afterward.
3308
+
3309
+
**RAMFUNCTION Constraints**
3310
+
3311
+
The NAII 68PPC2 NOR flash (two S29GL01GS x8 in parallel, 16-bit bus) enters
3312
+
command mode bank-wide — instruction fetches during program/erase return status
3313
+
data instead of code. All flash write/erase functions are marked `RAMFUNCTION`,
3314
+
placed in `.ramcode`, copied to DDR, and remapped via TLB9. Key rules:
3315
+
3316
+
-**No calls to flash-resident code.** The linker generates trampolines that
3317
+
jump back to flash addresses. Any helper called from RAMFUNCTION code must
3318
+
itself be RAMFUNCTION or fully inlined. Delay ticks are pre-computed in
3319
+
`hal_flash_init()` to avoid calling `hal_get_plat_clk()` from flash `.text`.
3320
+
-**Inline TLB/cache ops.**`hal_flash_cache_disable/enable` use
3321
+
`ram_write_tlb()` (inline mtspr) and direct L1CSR0/L1CSR1 manipulation.
data → 0x29) must execute without bus-stalling delays. UART output between
3324
+
steps (~87us per character at 115200) triggers DQ1 abort.
3325
+
-**WBP abort recovery.** Plain `AMD_CMD_RESET` (0xF0) is ignored in
3326
+
WBP-abort state; the full unlock + 0xF0 sequence is required.
3327
+
3328
+
**Multi-Core (ENABLE_MP)**
3279
3329
3280
-
"When each core comes out of reset, its MMU has one 4 KB page defined at 0x0_FFFF_Fnnn. Each core begins execution with the instruction at effective address 0x0_FFFF_FFFC. To get this instruction, the core's first instruction fetch is a burst read of boot code from effective address 0x0_FFFF_FFC0."
3330
+
The e6500 L2 cache is per-cluster (shared by all 4 cores). Secondary cores
3331
+
must skip L2 flash-invalidate (L2FI) since the primary core already
3332
+
initialized the shared L2; they only set L1 stash ID via L1CSR2.
3333
+
3334
+
**e6500 64-bit GPR**
3335
+
3336
+
The e6500 has 64-bit GPRs even in 32-bit mode. `lis` sign-extends to 64 bits,
7 - SRAM TLB configured Z - About to jump to C code
3360
+
8 - CPC enabled
3361
+
```
3281
3362
3282
3363
### Building wolfBoot for NXP T2080 PPC
3283
3364
3284
3365
By default wolfBoot will use `powerpc-linux-gnu-` cross-compiler prefix. These tools can be installed with the Debian package `gcc-powerpc-linux-gnu` (`sudo apt install gcc-powerpc-linux-gnu`).
3285
3366
3286
3367
The `make` creates a `factory.bin` image that can be programmed at `0xE8080000`
3368
+
(For NAII 68PPC2, first edit `nxp-t2080.config` to uncomment the NAII 68PPC2 lines.)
0 commit comments