diff options
author | Damien Zammit <damien@zamaudio.com> | 2023-10-02 03:39:13 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-10-03 20:23:37 +0200 |
commit | 60c53f565454a6afd8f0b80d36d791d50653751d (patch) | |
tree | c564a05516645344dbca35a40a198951627458b9 /kern/processor.c | |
parent | 34623c520c66df73663a6e02a05551e7330b9e5e (diff) | |
download | gnumach-60c53f565454a6afd8f0b80d36d791d50653751d.tar.gz gnumach-60c53f565454a6afd8f0b80d36d791d50653751d.tar.bz2 gnumach-60c53f565454a6afd8f0b80d36d791d50653751d.zip |
Fix interrupt handling
Logic for interrupts:
- interrupt.S raises spl (thus IF cleared)
- interrupt.S EOI
- interrupt.S calls the handler
- for pure in-kernel handlers, they do whatever they want with IF
cleared.
- when a userland handler is registers, queue_intr masks the irq.
- interrupt.S lowers spl with splx_cli, thus IF still cleared
- iret, that sets IF
- later on, userland acks the IRQ, that unmasks the irq
The key to this change is that all interrupts, including IPIs, are
treated the same way. Eg. the spl level is now raised before an IPI and
restored after. Also, EOI is not needed inside irq_acknowledge.
With this change and the experimental change not to dispatch threads
direct to idle processors in the scheduler, I no longer observe kernel
faults, but an occasional hang does occur.
Message-Id: <20231002033906.124427-1-damien@zamaudio.com>
Diffstat (limited to 'kern/processor.c')
0 files changed, 0 insertions, 0 deletions