18.2 PendingEvent Structure

<< Click to Display Table of Contents >>

Navigation:  ASA-EMulatR Reference Guide > Introduction > Architecture Overview > Chapter 18 – Fault Dispatcher & Precise Exceptions >

18.2 PendingEvent Structure

18.2.1 Unified Event Carrier

 

PendingEvent (faultLib/PendingEvent_Refined.h, ~420 lines) is the single structure that carries all information for any exceptional event — from a DTB miss to a machine check to a CALL_PAL — through detection, queueing, and delivery. It is designed to be created at the detection point, passed to FaultDispatcher for queueing, and consumed at delivery when entering PAL mode.

 


 

18.2.2 Core Fields

 

Field

Purpose

cpuId

CPU this event belongs to

eventClass (EventClass)

High-level classification: None, Exception, Interrupt, MachineCheck, Reset, InternalError, SystemEvent

priority (EventPriority)

Dispatch priority: Low, Normal, High, Critical, Reset

kind (PendingEventKind)

Event type: Exception, Interrupt, Ast, MachineCheck, Reset, PalCall

exceptionClass (ExceptionClass_EV6)

Fine-grained exception type (32 values)

palVectorId (PalVectorId_EV6)

Resolved PAL vector — set at delivery time, not detection

 


 

18.2.3 Address and Context Fields

 

faultVA — virtual address of the faulting access (data faults) or instruction fetch (ITB faults). faultPC — program counter at the faulting instruction. asn — address space number at the time of the fault. cm — current mode (kernel/executive/supervisor/user) at the time of the event.

 


 

18.2.4 D-Stream Fault Specifics

 

For data-stream faults, PendingEvent carries a DStreamFaultType discriminator: DTB_MISS_SINGLE, DTB_MISS_DOUBLE_3, DTB_MISS_DOUBLE_4, DFAULT_ACV, DFAULT_FOE, DFAULT_FOW, DFAULT_FOR, UNALIGN. Additional fields include mmAccessType (Read/Write/Execute) and mmFaultReason for precise fault classification.

 


 

18.2.5 Specialized Event Fields

 

Arithmetic and FP: exc_Sum (arithmetic exception summary register value) and exc_Mask (arithmetic exception mask) carry the FPCR trap state needed for PAL to update EXC_SUM.

 

Machine Check: mcReason (MachineCheckReason), mchkCode, and mchkAddr carry the machine check diagnostic data needed by the PAL MCHK handler.

 

Interrupt: deviceInterruptVector, hwVector, hwIPL, swiLevel, and astMode carry the source identification needed by the PAL interrupt handler.

 

Extended Properties: The embedded PendingPropertyInfo struct carries detailed metadata: access type flags (isWrite, isExecute, isUnaligned, isInstruction), fault type flags (isMachineCheck, isAccessViolation, isInvalidPTE, isNonCanonical, isFaultOnExecute/Write/Read, isDoubleMiss), physical address, PTE value, and SMP fault information (initiatingCpu, participatingCpus, acknowledgedCpus, isSmpRendezvousFailure).

 

See Also: faultLib/PendingEvent_Refined.h (~420 lines) – PendingEvent structure; 7.6 PendingEvent Structure.