Tristan, I do not believe that is actually the problem, and arguably QEMU is correct with timing accuracy set aside. The root of the issue is a more of a timing problem because the clear/set can happen atomically in QEMU with respect to the cpu clock vs the real hardware which takes multiple clock cycles for this to happen. Even Linux can fall victim to this with heavy printk (if you have ever seen the message "too much work for interrupt....").
You should instead consider fixing the BSP i8250Sio.c, because it clears reads the iir and jumps out of the main serial loop if there is if it has done enough work, vs checking if it has done enough work and jumping out of the loop before reading the iir. As an FYI for VxWorks 6.4 and up it is fixed there and you can request a patch through the normal channels (not the QEMU developer list). Also the fix you suggested would certainly allow you to run a VxWorks image, but the BSP will never take a break (power save), because the interrupt service routine for the rs232 will be called over and over until the work limit expires and the BSP is permitted to so something else. Cheers, Jason. > -----Original Message----- > From: > On Behalf Of Tristan Gingold > Sent: Friday, May 04, 2007 7:52 AM > To: [email protected] > Subject: [Qemu-devel] PATCH: serial.c > > Hi, > > According to the documentation, reading IIR does not reset > any pending interrupt. > This issue caused VxWorks to freeze. > > Tristan. >
