Freedom from Interference (FFI) for spatial corruption requires that a fault in a QM SWC cannot corrupt the memory of an ASIL SWC. The MPU hardware enforces this — OsApplication boundaries prevent any write outside the SWC's designated region.
/* FFI validation test: inject wild pointer in QM task */
/* Expected: OsProtectionHook fires, safety task unaffected */
TASK(Task_QM_FaultInjection)
{
/* Intentionally write to ASIL SWC .data section */
/* (QM OsApp has no MPU access to ASIL region) */
volatile uint32* asil_data_ptr = (volatile uint32*)0x200010A0; /* EPS .data */
*asil_data_ptr = 0xDEADBEEF; /* MPU fault triggered here */
TerminateTask();
}
/* Expected OsProtectionHook call: */
/* FatalError = E_OS_PROTECTION_MEMORY */
/* OS action: PRO_TERMINATEAPPL_RESTART (QM OsApp restarted) */
/* ASIL task continues unaffected — FFI demonstrated */