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
and `enable-method = "spin-table"`for every core, and marks every core
6147
-
`status = "okay"` (marking the secondaries `"disabled"` made VxWorks skip
6148
-
them and stall on the first spin-table release). The
6149
-
DTB's existing `/memory.reg` is left untouched if already populated
6150
-
(matching production U-Boot's `fdt_fixup_memory` which only writes when
6151
-
the node is missing). The DTB's bootargs is replaced with the
6152
-
`WOLFBOOT_BOOTARGS` value from `.config` if defined.
6153
-
6154
-
**RAMFUNCTION OS-jump trampoline.** wolfBoot is XIP from flash by default;
6155
-
`wolfBoot_os64bit_jump()` is a `RAMFUNCTION` (lives in `.ramcode` /
6156
-
DDR). Steps it performs in order:
6157
-
6158
-
1. Copy the exception handler (`isr_empty`, ~208 bytes) from flash
6159
-
`0xFFFE_0000` to DDR at `0x0080_0000` (4 KB-aligned), then re-point
6160
-
`IVPR` to the DDR copy. Without this, the next step (switching
6161
-
flash to cache-inhibit + guarded) would break the e6500 fetcher's
6162
-
ability to service handler instructions, causing any subsequent
6163
-
exception to silent-hang. Production U-Boot's `IVPR` likewise
6164
-
targets its DDR-relocated code, not flash.
6165
-
2. Call `hal_flash_cache_disable_pre_os()` (also `RAMFUNCTION`) which
6166
-
switches the flash TLB to `MAS2_I|MAS2_G`, asserts DUART1 MCR=3
6167
-
(DTR+RTS, matching production U-Boot's pre-bootm value), and zeros
6168
-
`TCR` to disable any leftover watchdog reset arming.
6169
-
3. `sync; isync` to drain the pipeline.
6170
-
4. Indirect-jump to the OS entry through `bctrl`. The bctrl is fetched
6171
-
from DDR (the trampoline itself), matching the production U-Boot
6172
-
pattern of running its final pre-OS instructions out of DDR.
6173
-
6174
-
**Other VxWorks-driven adjustments:**
6175
-
6176
-
- `CORES_PER_CLUSTER = 4`for T2080: the four e6500 cores share a single
6177
-
cluster (2 MB L2), so the MP secondary path's linear core-ID is
6178
-
`(PIR>>5)*4 + ((PIR>>3) & 0x3)`. The cluster term is 0 on this one-cluster
6179
-
part; an earlier value of 2 (a mistaken "2 clusters of 2" reading) was
6180
-
masked by that and only worked by accident.
6181
-
- T2080 rev-1 e6500 errata block at primary core reset and the
6182
-
secondary boot path. Erratum A003999 (HDBCR1 |= 0x0100_0000) is
6183
-
intentionally NOT applied because production CW U-Boot does not
6184
-
apply it to T2080.
6185
-
- Secondary L2 init is gated on cluster ID > 0; T2080's four cores are all
6186
-
in cluster 0, so every secondary skips it and shares the boot core's L2.
6187
-
- IFC chip-selects on CW VPX3-152: AMASK + `MSEL=GPCM` aligned with CW
6188
-
U-Boot's CSPR programming. CSOR is left alone while wolfBoot is still
6189
-
XIP from flash (writing CSOR would alter the GPCM timing of the very
6190
-
flash we are fetching from).
6191
-
6192
-
**Early-boot UART debug (`WOLFBOOT_EARLY_UART`).** Defining this
6193
-
preprocessor flag compiles in the e6500 early-boot (pre-C) UART debug
6194
-
helper macros in`src/boot_ppc_start.S` (DUART1 at `CCSR + 0x11C500`).
6195
-
They emit single-character breadcrumbs from the assembly startup when
6196
-
bringing up a new board or OS, before the C `wolfBoot_printf` path is
6197
-
available. Off by default.
6011
+
The HAL handles several QorIQ boot constraints; the rationale is documented in`src/boot_ppc_start.S` and `hal/nxp_t2080.c`:
6012
+
6013
+
- **Cold-boot stack.** CPC SRAM is unreliable for stores on cold power-on, so the initial 16KB stack uses locked L1 D-cache and relocates to DDR after `hal_init()`.
6014
+
- **XIP flash access.** wolfBoot executes in place from NOR. Because program/erase puts the NOR into command mode bank-wide, all flash write/erase routines are `RAMFUNCTION` (copied to DDR) and must not call flash-resident code; the flash TLB switches cache attributes around program/erase.
6015
+
- **Multi-core (`ENABLE_MP`).** The e6500 L2 is shared by all four cores in the single cluster, so secondaries skip L2 re-init and share the boot core's L2.
6016
+
- **CW VPX3-152 (256 MB NOR) only.** The larger flash VA range forces CCSRBAR to relocate from `0xFE000000` to `0xEF000000` (CPC/L1 addresses move to `0xEE900000`/`0xEE800000`), and the boot-ROM TLB is invalidated to avoid an e6500 multi-hit machine check. The 128 MB RDB and NAII boards need neither adjustment.
6017
+
6018
+
#### VxWorks 7 / 64-bit OS Boot Support (ENABLE_OS64BIT)
6019
+
6020
+
With `ENABLE_OS64BIT`, `do_boot()` performs the extra handoff needed to launch a 64-bit kernel -- a VxWorks 7 kernel (Curtiss-Wright `ossel=ostype2` mode) or a 64-bit Linux kernel via the ePAPR convention. This path is hardware-verified on the CW VPX3-152 booting VxWorks 7 and Green Hills INTEGRITY-178 tuMP.
6021
+
6022
+
wolfBoot hands off per ePAPR: FDT pointer in `r3`, `'EPAP'` in `r6`, IMA size in `r7`, remaining GPRs zero, with the OS switching itself to 64-bit mode. Before the jump wolfBoot builds the final 64-bit memory map (DDR identity-mapped at TLB1 slot 0, plus the board's peripheral and PCIe windows), fixes up the FDT (`cpu-release-addr`, `enable-method`, per-core `status`, and the `WOLFBOOT_BOOTARGS` bootargs), releases the secondary cores into the ePAPR spin-table, and jumps to the OS entry from a `RAMFUNCTION` trampoline running out of DDR. The board-specific peripheral map is supplied by the board HAL (for the VPX3-152, `hal_cw_vpx3152_os64_periph()`).
6023
+
6024
+
Set `WOLFBOOT_EARLY_UART` to compile in pre-C single-character UART breadcrumbs (DUART1) emitted from the assembly startup, useful when bringing up a new board or OS. Off by default.
0 commit comments