The comment said the HSM-to-host wake ISR needs interrupts. The wolfHSM
TC4xx port no longer has that ISR: the client polls its response buffer,
and the host-to-HSM notify saves and restores the interrupt state
itself. Nothing on the wolfBoot host side registers an interrupt
handler, so the call and its comment go.
The HAL dropped the return value, so a failed client init surfaced as
WH_ERROR_BADARGS from the following tchsm_client_wait_ready() instead
of the actual cause. Return it directly, as the calls after it do.
arch.mk and test-app/Makefile listed the TC4xx wolfHSM port's objects
and include paths one by one, so every rename or new object in the port
needed a matching wolfBoot change. They now include
port/wolfboot/tchsm_wolfboot.mk from the port, next to the device.mk
already included there, and use the object lists, include paths and
CommBuf placement flags it defines.
That also carries the port's COMMBUF option (DSPR or LMU): device.mk
validates it, and the port's linker scripts read the
TCHSM_LSL_COMMBUF_LMU symbol the flags define, so the flags apply with
or without wolfHSM enabled.
hal/aurix_tc4xx.c includes tchsm_topology.h, which now holds the
client ids it uses.
F-14487/F-14488 scrubbed the TRNG staging buffers with wc_ForceZero,
which links the hal objects to wolfCrypt's memory.c. The OTP keystore
primer links the hal without wolfCrypt and failed to build
(undefined reference to wc_ForceZero) in the stm32h5_tz_dualbank_otp
and trustzone-emulator configs. Scrub with a local volatile loop, the
same pattern nvm_cache_scrub uses for the same reason.
The secure-mode TRNG seed helper (shared by the STM32L5/U5/H5
TrustZone ports) staged each TRNG_DR word in a stack local and
returned without clearing it. Force-zero the local before the
return, mirroring the existing scrub in hal/cm4.c.
The secure-mode TRNG seed helper copied each 24-byte CryptoCell EHR
batch into a stack array and returned without clearing it, leaving
raw TRNG output in the retired secure frame. Force-zero the batch at
the end of each iteration, mirroring the existing scrub in hal/cm4.c.
- hal/nxp_ls1028a.c: ext_flash_erase/write return len on success, not
0, so the F-12067 follow-up guards (ret != 0) always tripped and
test_flash could never pass; check ret < 0
- src/x86/qemu_fsp.c: the F-12885 stop-bit guard rejects the in-tree
uart_init(115200, 8, 'N', 0) call, leaving the FSP QEMU debug UART
unprogrammed; pass 1 stop bit
The write loop cast len to uint32_t, so a negative length became
a huge iteration count and read past the source buffer; a zero
length is a no-op success, matching the erase side.
Erase was the only ext_flash op without the layout check, so an
out-of-range request reached the SDK. Also replace the lone
_Static_assert with the tree's typedef char idiom.
The MCXA ROM API (fsl_romapi.h) takes lengthInBytes, not a sector
count, so the original pass-through was already correct and the
sector-count conversion erased almost nothing. It also called
FLASH_GetFlashConfig, which does not exist in the MCXA ROM API and
only compiled against the unit-test stub. Restore the byte length,
keep the len guard, and drop the invented call from the stub.
The dispatcher split cross-bank requests at FLASH_BANK2_BASE_REL
(0x00100000), but callers pass absolute flash addresses in
FLASHMEM_ADDRESS_SPACE, so the split never fired and the whole
request was programmed on the bank of the start address. Compare
against FLASH_BANK2_BASE (0x08100000); the test now drives
absolute addresses so it exercises the real call convention.