From 4537db483045e090a66db262752b988898f1abf7 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 30 Jul 2025 15:04:30 +0200 Subject: [PATCH] PIC: Ignore IRQ raise or lower then the PIC is not yet properly set up. --- src/pic.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pic.c b/src/pic.c index 4b8993322..446ea1361 100644 --- a/src/pic.c +++ b/src/pic.c @@ -693,6 +693,13 @@ picint_common(uint16_t num, int level, int set, uint8_t *irq_state) uint16_t lines = level ? 0x0000 : num; pic_t *dev; + /* + Do this because some emulated cards will, for whatever reason, attempt to + raise an IRQ at init when the PIC has not yet been properly initialized. + */ + if (update_pending == NULL) + return; + /* Make sure to ignore all slave IRQ's, and in case of AT+, translate IRQ 2 to IRQ 9. */ for (uint8_t i = 0; i < 8; i++) {