Ich habe die allerersten Codes analysiert, wenn das BIOS startet bis zum Laden des Global/Interrupt Descriptor Table Registers. Das BIOS, von dem ich spreche, ist das von MITs Kurs "Operating Systems Engineering". Ich habe Schwierigkeiten zu verstehen, wie BIOS danach geht.Was macht das BIOS nach dem Laden der globalen/Interrupt-Deskriptor-Tabelle in JOS?
[f000:fff0] 0xffff0: ljmp $0xf000,$0xe05b
#when BIOS starts executing, jump to the address fe05bH to continue to execute
[f000:e05b] 0xfe05b: cmpl $0x0,%cs:0x6574
[f000:e062] 0xfe062: jne 0xfd2b6
[f000:e066] 0xfe066: xor %ax,%ax
[f000:e068] 0xfe068: mov %ax,%ss
#set %ss to 0
[f000:e06a] 0xfe06a: mov $0x7000,%esp
[f000:e070] 0xfe070: mov $0xf3c24,%edx
[f000:e076] 0xfe076: jmp 0xfd124
[f000:d124] 0xfd124: mov %eax,%ecx
[f000:d127] 0xfd127: cli
#turn off interrupt
[f000:d128] 0xfd128: cld
# set DF flag to 0, when DF=0, SI = SI + 1 , DI = DI + 1
[f000:d129] 0xfd129: mov $0x8f,%eax
[f000:d12f] 0xfd12f: out %al,$0x70
[f000:d131] 0xfd131: in $0x71,%al
#close NMI through 70H I/O port, selecting CMOS 0xF register, and assigining 0xF register's value to %al register
[f000:d133] 0xfd133: in $0x92,%al
[f000:d135] 0xfd135: or $0x2,%al
[f000:d137] 0xfd137: out %al,$0x92
#enable A20 address line
[f000:d139] 0xfd139: lidtw %cs:0x6690
[f000:d13f] 0xfd13f: lgdtw %cs:0x6650
#loading Global/Interrupt Descriptor Table Register
[f000:d145] 0xfd145: mov %cr0,%eax
[f000:d148] 0xfd148: or $0x1,%eax
[f000:d14c] 0xfd14c: mov %eax,%cr0
#set CR0 PE=1. when PE=1 CPU is in protected mode
[f000:d14f] 0xfd14f: ljmpl $0x8,$0xfd157
The target architecture is assumed to be i386
=> 0xfd157: mov $0x10,%eax
=> 0xfd15c: mov %eax,%ds
=> 0xfd15e: mov %eax,%es
=> 0xfd160: mov %eax,%ss
=> 0xfd162: mov %eax,%fs
=> 0xfd164: mov %eax,%gs
#After loading GDTR, it's necessary to reload all the segment register
.....
Nach diesem Codes, weiß ich nicht, wie BIOS für ein startfähiges Gerät wie Diskette, Festplatte oder CD-ROM zur Suche ausführt. Schließlich, wenn es eine Boot-Diskette findet, liest das BIOS den Bootloader von der Festplatte und überträgt die Steuerung, um es