|
From: | Mark Cave-Ayland |
Subject: | Re: [PATCH 8/8] q800: add NMI handler |
Date: | Fri, 15 Oct 2021 21:12:23 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
On 15/10/2021 09:40, Laurent Vivier wrote:
Le 13/10/2021 à 23:21, Mark Cave-Ayland a écrit :This allows the programmer's switch to be triggered via the monitor for debugging purposes. Since the CPU level 7 interrupt is level-triggered, use a timer to hold the NMI active for 100ms before releasing it again.I'm wondering if Qemu provides another way to have a level-triggered interrupt in this case. I' tried to see if keeping the button pressed on a mac kept the IRQ up (as QMP NMI does), but a real mac is too slow and has to many things to display it was not really conclusive...
When writing the patch I rebased the outstanding MacOS patches onto the branch, installed Macsbug into MacOS and used "info nmi" to break into it.
Testing glue_nmi() with: GLUE_set_irq(s, GLUE_IRQ_IN_NMI, 1); GLUE_set_irq(s, GLUE_IRQ_IN_NMI, 0);i.e. a simple pulse didn't launch MacsBug at all. Keeping the NMI high launches MacsBug (which is usable) but then as soon as you exit MacsBug with ES, MacsBug breaks immediately again making it impossible to return to the Finder. Adding the timer allows launching MacsBug and then exiting/re-entering MacsBug again on demand as expected.
ATB, Mark.
[Prev in Thread] | Current Thread | [Next in Thread] |