From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G2Y4j-00049M-Co for qemu-devel@nongnu.org; Mon, 17 Jul 2006 14:44:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G2Y4h-000463-7i for qemu-devel@nongnu.org; Mon, 17 Jul 2006 14:44:12 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G2Y4h-00045q-3E for qemu-devel@nongnu.org; Mon, 17 Jul 2006 14:44:11 -0400 Received: from [65.74.133.4] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1G2Y7P-0004cm-Iz for qemu-devel@nongnu.org; Mon, 17 Jul 2006 14:46:59 -0400 From: Paul Brook Subject: Re: [Qemu-devel] Hardware interrupts Date: Mon, 17 Jul 2006 19:44:02 +0100 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607171944.03284.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org > "In order to be faster, QEMU does not check at every basic block if an > hardware interrupt is pending. Instead, the user must asynchrously call a > specific function to tell that an interrupt is pending. This function > resets the chaining of the currently executing basic block. It ensures that > the execution will return soon in the main loop of the CPU emulator. Then > the main loop can test if the interrupt is pending and handle it." > What means "the user must asynchrously call a specific function..."? > > In which sense "user must"? Whoever wants to raise the interrupt. > Which "Specific function"? Usually pic_set_irq_new. I recommend you look at how the existing hardware devices are implemented. That should answer most of your questions. I'd start with something simple like serial.c or pl050.c Paul