二、MCH(NorthBridge)的處理
FFFF_FFF0h地址由Processor送到MCH進(jìn)行解析,這個(gè)地址落在MCH固定為High BIOS 分配的區(qū)域中,MCH直接通過(guò)DMI接口送到ICH進(jìn)行處理。
MCH相當(dāng)于一個(gè)派發(fā)者角色,根據(jù)定義的地址映射分派到不同的接口。
三、ICH(SouthBridge)的處理
1、ICH對(duì)MCH提交過(guò)來(lái)的地址進(jìn)行解碼。
2、ICH的地址映射機(jī)制中:FFFF_FFF0地址落 FFF8_0000 ~ FFFF_FFFFh這個(gè)范圍中,這個(gè)范圍的地址將直接分派到LPC接口的Frimware Hub進(jìn)行處理,LPC 接口相當(dāng)于一個(gè)PCI-to-ISA 橋,BIOS寄居在LPC bus上,從而訪問(wèn)BIOS區(qū)域。
3、在物理器件上,ICH Firmware Hub的IDSEL選擇固定地址設(shè)為FFF8_0000 ~ FFFF_FFFF范圍,LPC接口寄存器(B#0, D#30,F#0)中的,Firmware Hub Decode Enable寄存器的bit15固定為1,允許FFF8_0000 ~ FFFF_FFFF地址提交到Firmware Hub。這樣確保FFFF_FFF0提交到LPC bus。
ICH相當(dāng)于一個(gè)解碼器角色,解碼后分配任務(wù)給設(shè)備執(zhí)行。
四、第一條指令執(zhí)行
經(jīng)典地在FFFF_FFF0絕大多數(shù)是一條far jmp指令:jmp far ptr 0F000h:0E05Bh,不同的BIOS跳轉(zhuǎn)的地址或許不同。這條指令跳轉(zhuǎn)到FE05B這個(gè)地址上執(zhí)行。同時(shí)刷新CS.Selector、CS.Base以及EIP寄存器。引一段 Intel 的話:
The first instruction that is fetched and executed following a hardware reset is
located at physical address FFFFFFF0H. This address is 16 bytes below the
processor’s uppermost physical address. The EPROM containing the software initialization
code must be located at this address.
The address FFFFFFF0H is beyond the 1-MByte addressable range of the processor
while in real-address mode. The processor is initialized to this starting address as
follows. The CS register has two parts: the visible segment selector part and the
hidden base address part. In real-address mode, the base address is normally
formed by shifting the 16-bit segment selector value 4 bits to the left to produce a
20-bit base address. However, during a hardware reset, the segment selector in the
CS register is loaded with F000H and the base address is loaded with FFFF0000H. The
starting address is thus formed by adding the base address to the value in the EIP
register (that is, FFFF0000 + FFF0H = FFFFFFF0H).
以上這段文字表明,Intel從架構(gòu)上規(guī)定了,processor復(fù)位后,FFFFFFF0H地址上必須包含一些初始化程序,BIOS必須在定位在這段地址區(qū)域上。
MCH與ICH的配合從物理上通過(guò)地址映射機(jī)制保證了這一點(diǎn)的實(shí)施。
五、驗(yàn)證一下FFFF_FFF0地址上是否是一條far jmp指令,可以簡(jiǎn)單地打開(kāi)cmd窗口執(zhí)行debug命令。
C:>debug
-d F000:FFF0
F000:FFF0 EA 5B E0 00 F0 30 32 2F 32 37 2F 30 38 00 FC
EA 5B E0 00 F0 就是 jmp far ptr F000:E05B 指令,這條指令跳轉(zhuǎn)到FE05B的物理地址上,這將是 BIOS 的 BOOTBLOCK。