Showing changes from revision #6 to #7:
Added | Removed | Changed
Entry | |
---|---|
R0 | bits 0-7: Vector number |
bit 8: 0 to release, or 1 to claim | |
bits 9-31: reserved | |
R1 | Address of replacement routine |
R2 | If releasing: Address of your routine |
Exit | |
---|---|
R0 | Preserved |
R1 | If claiming, address of original routine, else preserved |
R2 | Preserved |
The purpose of this call is to claim a processor vector.
This call is used to allow low-level code to claim the ARM’s hardware vectors vectors, which are called when interrupts and aborts occur.
The address of your routine must be provided on release to ensure claims and releases happen in the correct order. If the address currently on the vector differs from that in R2, an error is returned.
The FIQ vector cannot be claimed through this call. Instead, Service_ClaimFIQ or Service_ClaimFIQinBackground must be used.
Routines installed via OS_ClaimProcessorVector are entered directly from the corresponding hardware vector. This means that:
This SWI is only available on RISC OS 3.5 and later. To claim a processor vector on earlier OS versions, you must directly patch the processor vector table at &0. If your code needs to pass on to the previous claimant claimant, then care will be needed to make sure you decode the old handler instruction correctly (typically it will either be a branch instruction or a PC-relativeLDR of the PC)