From 8650425f070f1d42d92017e6ceb8d6e37a3e49c2 Mon Sep 17 00:00:00 2001 From: Jonathan Campbell Date: Sun, 18 Mar 2018 00:11:55 -0700 Subject: [PATCH] explain --- tool/remctl/serial/remsrv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tool/remctl/serial/remsrv.c b/tool/remctl/serial/remsrv.c index f97cc7ddc..1d5be91f4 100644 --- a/tool/remctl/serial/remsrv.c +++ b/tool/remctl/serial/remsrv.c @@ -358,6 +358,16 @@ static void interrupt uart_irq() { if (uart->irq >= 8) p8259_OCW2(8,P8259_OCW2_NON_SPECIFIC_EOI); p8259_OCW2(0,P8259_OCW2_NON_SPECIFIC_EOI); + /* After acknowledging the interrupt, THEN process the data + * and possibly call into DOS. There's a reason for this. + * On some systems, the RS-232 IRQ might be higher priority + * than the disk drive we're trying to access. Failure to + * ack the serial IRQ before disk I/O isn't an issue on the + * IBM PC because IRQ 15 is higher priority than IRQ 3, BUT + * on PC-98 this is vital because IRQ 4 (RS-232C) is higher + * priority than the hard drive. Failure to ack our IRQ + * prevents the hard drive from working and a long "hang" + * within MS-DOS and the BIOS! */ irq_uart_handle_iir(uart); /* halt here if instructed */