Here's the current boot sector and beginning of startup code.
------------------------------------
#************************** .boot_header section *****************************
.section .boot, "axv"
.LONG 0x005A0008 # BH conf: Core1 Only - Can boot others via ME
.LONG 0x00000000 # Reserved for future use
.LONG 0x00000000 # Configuration Bits
.LONG 0x00000000 # Configuration Bits
.LONG 0x00000000 # CPU Checker Reset Vector
.LONG _start # CPU1 Reset Vector
.LONG 0x00000000 # CPU0 Reset Vector
.LONG 0x00000000 # Padding
#*****************************************************************************/
.section .text, "avx"
e_nop /* Add padding in case spurious interrupt */
e_nop
e_nop
e_nop
#******************************************************************************
# Function: _start_core1 *
# Content: Initialization of Core1 *
#******************************************************************************
__start:
_start:
#**************************************************
# Disable EE/ME/CE *
# MSR[ME] = 1, others = 0 *
#**************************************************
e_lis r6, 0x0000
e_or2i r6, 0x1000
mtmsr r6
------------------------------------
On reboot in the debugging, the instruction pointer is at
_start:
->> 00f9e02c: 0x70c0e000 e_lis r6,0
00f9e030: 0x70c2c000 e_or2i r6,4096
Step (instruction stepping mode):
->> 51000044: 0x780000bc e_b 0x51000100
(This the IVOR4 handler)
Step:
->> 51000100: 0x182106b0 e_stwu r1,-80(r1)
Step:
IVOR1
R1 = 0, so trying to e_stwu indexed to R1 causes an exception.
As a temporary workaround, I wrote some assembler as a "default handler" for the IVORs and manual set IVPR to point to this memory area after boot, now I'm able to trap the IVOR4 exception and read IACKR1 to determine it as an eTPU interrupt. Reading IACKR1 acknowledges that. e_rfi returns to the wrong address (before _start) but execution does continue.
My next roadblock is a mode transition in the startup code doesn't work.
The reference manual makes it clear that mode transitions "must use a timeout" but the crt0_core1.s code from NXP doesn't use one and gets stuck in an infinite loop. From other posts this might be related to peripherals already using IRCOSC or XOSC before the transition.
As a test, I just installed an unsecured chip on the eval board and loaded up the exact same firmware. No problem on reboot.
What did you want me to look for in the FCCU ?
James