Purpose and scope
This unit owns pending-interrupt updates, top-pending selection, enable checks, timer refresh on reads, and end-of-interrupt state changes.
PTO-ARCH-SYSTEM-REGISTERS-INTERRUPTThe complete ASL owner is shown directly below.
// PTO-UNIT: {"id":"PTO-ARCH-SYSTEM-REGISTERS-INTERRUPT","surface":"arch","classification":["system-registers","interrupt"],"depends_on":["PTO-ARCH-SYSTEM-REGISTERS-TIMER"]}func RefreshTopPendingInterrupt(ring: AccessControlRing)begin let pending = _ExtendedSystemRegisters[[ ContextRegisterIndex(ring, 0x0f08)]]; var found = FALSE; var top: InterruptID = 0; for interrupt_id = 0 to 63 do if !found && pending[interrupt_id] == '1' then top = interrupt_id as InterruptID; found = TRUE; end; end; _ExtendedSystemRegisters[[ContextRegisterIndex(ring, 0x0f09)]] = NaturalToWord(top as integer {0..262144});end;
func SetInterruptPending(ring: AccessControlRing, interrupt_id: InterruptID)begin let index = ContextRegisterIndex(ring, 0x0f08); _ExtendedSystemRegisters[[index]][interrupt_id] = '1'; RefreshTopPendingInterrupt(ring);end;
func ClearInterruptPending(ring: AccessControlRing, interrupt_id: InterruptID)begin let index = ContextRegisterIndex(ring, 0x0f08); _ExtendedSystemRegisters[[index]][interrupt_id] = '0'; RefreshTopPendingInterrupt(ring);end;
readonly func InterruptEnabled(ring: AccessControlRing, interrupt_id: InterruptID) => booleanbegin let interrupt_config = _ExtendedSystemRegisters[[ ContextRegisterIndex(ring, 0x0f07)]]; if interrupt_id == TimerInterruptId(ring) then return interrupt_config[1] == '1'; else return interrupt_config[0] == '1'; end;end;
func ReadInterruptPending(ring: AccessControlRing) => Wordbegin RefreshTimerPending(ring); return _ExtendedSystemRegisters[[ContextRegisterIndex(ring, 0x0f08)]];end;
func ReadTopPendingInterrupt(ring: AccessControlRing) => Wordbegin RefreshTimerPending(ring); return _ExtendedSystemRegisters[[ContextRegisterIndex(ring, 0x0f09)]];end;
func EndOfInterrupt(ring: AccessControlRing, value: Word)begin if value[63:6] == Zeros{58} then ClearInterruptPending(ring, UInt(value[5:0]) as InterruptID); end; _ACRTrapAsynchronous[[ring]] = FALSE; _ACRTrapArgumentValid[[ring]] = FALSE;end;
This unit owns pending-interrupt updates, top-pending selection, enable checks, timer refresh on reads, and end-of-interrupt state changes.
For each ACR, low index 0x0f07 holds interrupt configuration, 0x0f08 holds the pending bitmap, and 0x0f09 holds the selected top-pending interrupt ID.
RefreshTopPendingInterrupt scans pending bits from interrupt ID 0 through 63 and records the first set ID. If no bit is set, the stored top value remains 0.
SetInterruptPending sets one pending bit; ClearInterruptPending clears one. Both immediately recompute the top-pending value.
InterruptEnabled tests configuration bit 1 for the ring's timer interrupt and bit 0 for every other interrupt ID.
ReadInterruptPending and ReadTopPendingInterrupt call RefreshTimerPending before returning their respective context-register values.
EndOfInterrupt clears a pending interrupt only when bits 63:6 of its input are zero; the low six bits then select the ID. Regardless of that encoding check, it clears _ACRTrapAsynchronous and _ACRTrapArgumentValid for the ring.
Top-pending value 0 alone does not distinguish no pending interrupt from pending interrupt ID 0; the pending bitmap provides that information.
If pending IDs 5 and 9 are both set, refresh records 5 because the scan stops at the first set bit. Clearing ID 5 recomputes the top value as 9.
Bodies come from owning ASL. Dragging or buttons change only this page-session view order.
No NDF clause is attached to this unit.
12 matching entries
PTO-AVS-ARCH-SYSTEM-REGISTERS-INTERRUPT-STATIC-001tests/asl/arch/system-registers/interrupt/arch-static-interrupt-contract-001.asl95732ad1696857b64611f72d130cd82f331b7711b2c68d7b6595a832d9645166PTO-AVS-ARCH-TESTINTERRUPTREGISTERSTATE-STATE-TRANSITION-001tests/asl/arch/system-registers/interrupt/arch-state-register-001.asla64d42334a45d3834287228bb415e2c1d492d7d90323b099bea087aae3f7c78fPTO-EVIDENCE-RELEASE-TRACEABILITYPTO-EVIDENCE-RELEASE-TRACEABILITYspec/evidence/release-traceability-readiness.jsonc7327021d39dc67ac5564bc55073b3870a397d79ac8d9648284d56e33bc14a3ePTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSUREPTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSUREspec/evidence/instruction-contract-closure.json3ef2bb62421c79dff8fa77a1c7983923b523244b8090812883ef81286ca8106aPTO-EVIDENCE-ARCHITECTURE-READINESSPTO-EVIDENCE-ARCHITECTURE-READINESSspec/evidence/architecture-readiness.json4b0b85199101251bea744e0f3591cc31906909dc80d5ab651c417a936036a004PTO-EVIDENCE-RELEASE-GATE-READINESSPTO-EVIDENCE-RELEASE-GATE-READINESSspec/evidence/release-gate-readiness.jsona0f4d2b6920c08981ea55fd8ef820708a40d4feb5402c5150e8e9ab532d84ce0PTO-EVIDENCE-RELEASE-MANIFESTPTO-EVIDENCE-RELEASE-MANIFESTspec/release-manifest.json1a64c109ed7a90351c41e2a418b3c0ebaf8ad975838986d2101385186b85c0d8Loading ADR-0003…
ADR-0003docs/status/decisions/0003-pto-owned-system-register-names.mdc6a5379776c3b29c25f0896bc56f84d8f5c15832bbba0859b822aa99a65e342dLoading ADR-0010…
ADR-0010docs/status/decisions/0010-acr-routing-and-context-reset.md7594432a33c54880227fa3ab495bf5b29d406ac3b4e83634ffefe0a713e85f35Loading ADR-0016…
ADR-0016docs/status/decisions/0016-interrupt-pending-and-timer-state.mdd864e76e1cd097d55d05e36cc28adc756a2b2cc46df5720a6f6afa5b3f9b9fe0Loading ADR-0017…
ADR-0017docs/status/decisions/0017-system-register-behavior-classes.md6b4f7a29546952e4c5c61b0f4f921b04ecbc8340ba4ad86619277f17da97f95fLoading ADR-0031…
ADR-0031docs/status/decisions/0031-scalar-sys-totality-and-profile-boundaries.md5680b3516be6c28a1ccb198c99f5efb66317c65330f6d87434173024d2795a7d{
"classification": [
"system-registers",
"interrupt"
],
"documentation": "docs/arch/system-registers/interrupt.md",
"id": "PTO-ARCH-SYSTEM-REGISTERS-INTERRUPT",
"mnemonic": null,
"readiness_subjects": [
"ADR-0003",
"ADR-0010",
"ADR-0016",
"ADR-0017",
"ADR-0031"
],
"semantic_tests": [
"PTO-AVS-ARCH-TESTINTERRUPTREGISTERSTATE-STATE-TRANSITION-001"
],
"source": "asl/arch/system-registers/interrupt.asl",
"surface": "arch",
"tests": [
"PTO-AVS-ARCH-SYSTEM-REGISTERS-INTERRUPT-STATIC-001",
"PTO-AVS-ARCH-TESTINTERRUPTREGISTERSTATE-STATE-TRANSITION-001"
]
}0.58.5 · Release candidate7dc8b7e5b121d2b2499a2273bebff29e2cd868122341ac0204294c8619bbfc70f514e70f535ff7bc1ddb3d799639378d5071af34c85ef285453cfdbd6050f1efcefd7188ee77f7fa91d5c44191467734a9f41177asl/arch/system-registers/interrupt.asl