X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fthreads%2Floader.S;h=ca79cdfda730cf75ba173750feb1aa76d0776bc2;hb=c27bbbdb32640ba99c35e417f5ae7c0377f747f0;hp=fc834ffa45642eaba3203ab7f3c844f3305d11b5;hpb=575dc45e34db19ee7808c116e93485b37e0df716;p=pintos-anon diff --git a/src/threads/loader.S b/src/threads/loader.S index fc834ff..ca79cdf 100644 --- a/src/threads/loader.S +++ b/src/threads/loader.S @@ -138,7 +138,9 @@ start: # Add PDEs to point to PTEs for the first 64 MB of RAM. # Also add identical PDEs starting at LOADER_PHYS_BASE. -# See [IA32-v3] section 3.7.6 for a description of the bits in %eax. +# See [IA32-v3a] section 3.7.6 "Page-Directory and Page-Table Entries" +# for a description of the bits in %eax. + movl $0x11007, %eax movl $0x11, %ecx @@ -150,7 +152,8 @@ start: loop 1b # Set up one-to-map linear to physical map for the first 64 MB of RAM. -# See [IA32-v3] section 3.7.6 for a description of the bits in %eax. +# See [IA32-v3a] section 3.7.6 "Page-Directory and Page-Table Entries" +# for a description of the bits in %eax. movw $0x1100, %ax movw %ax, %es @@ -217,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.