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).
3069
+
Stock layout is default; for NAII 68PPC2, uncomment the "# NAII 68PPC2:" lines and comment the stock lines.
3071
3070
3072
3071
### Design NXP T2080 PPC
3073
3072
3074
3073
The QorIQ requires a Reset Configuration Word (RCW) to define the boot parameters, which resides at the start of the flash (0xE8000000).
3075
3074
3076
3075
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()`.
3077
3076
3078
-
RM 4.3.3 Boot Space Translation
3077
+
#### Boot Sequence and Hardware Constraints
3078
+
3079
+
**Memory Hierarchy:**
3080
+
3081
+
```
3082
+
CPU Core → L1 (32KB I + 32KB D) → L2 (256KB/cluster, shared by 4 cores)
3083
+
→ CoreNet Fabric → CPC (2MB, SRAM or L3 cache)
3084
+
→ DDR Controller → DDR SDRAM
3085
+
→ IFC Controller → NOR Flash
3086
+
```
3087
+
3088
+
Each core begins execution at effective address `0x0_FFFF_FFFC` with a single
3089
+
4KB MMU page (RM 4.3.3). The assembly startup (`boot_ppc_start.S`) configures
3090
+
TLBs, caches, and stack before jumping to C code.
3091
+
3092
+
**Cold Boot Stack (L1 Locked D-Cache)**
3093
+
3094
+
CPC SRAM is unreliable for stores on cold power-on — L1 dirty-line evictions
3095
+
through CoreNet to CPC cause bus errors (silent CPU checkstop with `MSR[ME]=0`).
3096
+
The fix (matching U-Boot) uses L1 locked D-cache as the initial 16KB stack:
3097
+
`dcbz` allocates cache lines without bus reads, `dcbtls` locks them so they
3098
+
are never evicted. The locked lines at `L1_CACHE_ADDR` (0xF8E00000) are
3099
+
entirely core-local. After DDR init in `hal_init()`, the stack relocates to
3100
+
DDR and the CPC switches from SRAM to L3 cache mode.
3101
+
3102
+
**Flash TLB and XIP**
3103
+
3104
+
The flash TLB uses `MAS2_W | MAS2_G` (Write-Through + Guarded) during XIP
3105
+
boot, allowing L1 I-cache to cache instruction fetches while preventing
3106
+
speculative prefetch to the IFC. C code switches to `MAS2_I | MAS2_G` during
3107
+
flash write/erase (command mode), then `MAS2_M` for full caching afterward.
3108
+
3109
+
**RAMFUNCTION Constraints**
3110
+
3111
+
The NAII 68PPC2 NOR flash (two S29GL01GS x8 in parallel, 16-bit bus) enters
3112
+
command mode bank-wide — instruction fetches during program/erase return status
3113
+
data instead of code. All flash write/erase functions are marked `RAMFUNCTION`,
3114
+
placed in `.ramcode`, copied to DDR, and remapped via TLB9. Key rules:
3115
+
3116
+
-**No calls to flash-resident code.** The linker generates trampolines that
3117
+
jump back to flash addresses. Any helper called from RAMFUNCTION code must
3118
+
itself be RAMFUNCTION or fully inlined. Delay ticks are pre-computed in
3119
+
`hal_flash_init()` to avoid calling `hal_get_plat_clk()` from flash `.text`.
3120
+
-**Inline TLB/cache ops.**`hal_flash_cache_disable/enable` use
3121
+
`ram_write_tlb()` (inline mtspr) and direct L1CSR0/L1CSR1 manipulation.
data → 0x29) must execute without bus-stalling delays. UART output between
3124
+
steps (~87us per character at 115200) triggers DQ1 abort.
3125
+
-**WBP abort recovery.** Plain `AMD_CMD_RESET` (0xF0) is ignored in
3126
+
WBP-abort state; the full unlock + 0xF0 sequence is required.
3127
+
3128
+
**Multi-Core (ENABLE_MP)**
3079
3129
3080
-
"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."
3130
+
The e6500 L2 cache is per-cluster (shared by all 4 cores). Secondary cores
3131
+
must skip L2 flash-invalidate (L2FI) since the primary core already
3132
+
initialized the shared L2; they only set L1 stash ID via L1CSR2.
3133
+
3134
+
**e6500 64-bit GPR**
3135
+
3136
+
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
3160
+
8 - CPC enabled
3161
+
```
3081
3162
3082
3163
### Building wolfBoot for NXP T2080 PPC
3083
3164
3084
3165
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`).
3085
3166
3086
3167
The `make` creates a `factory.bin` image that can be programmed at `0xE8080000`
3168
+
(For NAII 68PPC2, first edit `nxp-t2080.config` to uncomment the NAII 68PPC2 lines.)
0 commit comments