syscall
, that forces a trap.
When the trap occurs, the hardware needs to do all of the following in the current
cycle:
rfe
, that returns from an interrupt
syscall
and rfe
do the desired things by writing tiny test programs and observing that the machine
jumps to the correct address and that the Status register is updated correctly.
(The formats of the new instructions are in the Cebollita documentation.)
The SMOK container provides a lot of support for these functions -- you should not have to understand the internals of that component to get this working. More information is provided at the end of this document.
Exception Cause ID | Meaning |
1 | Char device needs attention |
2 | Block device needs attention |
4 | Addressing violation |
8 | System call |
16 | Integer overflow |
Note that of these you need to implement only the syscall and addressing violation exceptions. You can have your trap handler just halt the machine.