On Sat, Jan 09, 2010 at 07:48:51PM +0100, Sebastian Herbszt wrote:
I have tried SeaBIOS 0.5.1 on Bochs cvs with FreeDOS 1.0 Final boot floppy. Loading from floppy was utterly slow and then FreeDOS dumped
Invalid Opcode at 0013 0000 0202 800F 01F3 20F4 10AA 10AA 109A 0000 0000 0000 00
I saw this as well. I bisected it to this commit:
ee2efa7303077ce98a745f637e213ba9a0965811
and if I apply the following change, it fixes the problem on bochs:
--- a/src/util.h +++ b/src/util.h @@ -39,7 +39,7 @@ static inline void cpu_relax(void) // Atomically enable irqs and sleep until an irq; then re-disable irqs. static inline void wait_irq(void) { - asm volatile("sti ; hlt ; cli ; cld": : :"memory"); + asm volatile("sti ; rep ; nop ; cli ; cld": : :"memory"); }
static inline void nop(void)
However, I didn't think there was anything wrong with the original code. Am I missing something?
-Kevin