From 53b0d95c490021039ac2b5b1b7a80d82cefb2709 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 8 Apr 2006 00:23:31 +0000 Subject: [PATCH] Fix for Bochs 2.2.6. (I think this might actually be a bug in Bochs, though.) --- src/threads/loader.S | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/threads/loader.S b/src/threads/loader.S index 2d76763..987feb1 100644 --- a/src/threads/loader.S +++ b/src/threads/loader.S @@ -220,6 +220,17 @@ start: movl $1, %ebx movl $LOADER_KERN_BASE + LOADER_PHYS_BASE, %edi + +#### Disable interrupt delivery by IDE controller, because we will be +#### polling for data. +#### (If we don't do this, Bochs 2.2.6 will never deliver any IDE +#### interrupt to us later after we reset the interrupt controller +#### during boot, even if we also reset the IDE controller.) + + movw $0x3f6, %dx + movb $0x02, %al + outb %al, %dx + read_sector: # Poll status register while controller busy. -- 2.30.2