Boot Block 本次學習目標: 瞭解 Boot Block 扮演的角色
Boot Block 學習大綱
1. What is Boot Block?
Definition:
Summary: Boot Block = minimum BIOS + crisis recovery
Boot Block 是配合 EEPROM 的架構出現的產物。PC 用的 EEPROM 在 top block 有個獨立控制的 write protect 功能。BIOS vendor 利用這種架構,規劃 Boot Block 區域。可以利用這個硬體保護機制,來做一些應用。比方可以用來修復更新失敗的 BIOS。會用到 Boot Block 的情況是,假設使用者在 更新 BIOS 期間,PC 被切斷了電源,這樣 BIOS 是處於壞掉的情況 (更新失敗)。
- What is Boot Block?
- Boot Block main function block diagram
- Boot Block POST Flowchart
- Introduction to the AFUDOS
1. What is Boot Block?
Definition:
It is also a stand alone block in the ROM which allows the end users to recover the BIOS ROM in case of damages. (Power failure during flash update)
Summary: Boot Block = minimum BIOS + crisis recovery
Boot Block 是配合 EEPROM 的架構出現的產物。PC 用的 EEPROM 在 top block 有個獨立控制的 write protect 功能。BIOS vendor 利用這種架構,規劃 Boot Block 區域。可以利用這個硬體保護機制,來做一些應用。比方可以用來修復更新失敗的 BIOS。會用到 Boot Block 的情況是,假設使用者在 更新 BIOS 期間,PC 被切斷了電源,這樣 BIOS 是處於壞掉的情況 (更新失敗)。
如果 Boot Block 沒有被破壞掉的話,則 Boot Block 可以做到最精簡的開機,幫助你再次更新BIOS。至於怎樣修復更新 BIOS,跟 Book Block 能做到怎樣的開機,就要看各家的做法。
有些Book Block有點亮螢幕,有些沒點亮螢幕,不過通常是開到 Dos 之下,然後配合光碟/ usb 隨身碟裡面的 BIOS rom 檔,再次更新到正確的 BIOS。
Q: 比較一下沒有 Boot Block 的 BIOS ROM 做法?
Power on 時 CPU 第一個 code read 一定是FFFFFFF0;
在那邊有放一個 jmp 指令 (因為 FFFFFFF0 ~ FFFFFFFFh 只有16 byte 空間,無法放很多code),CPU 會再跳到其他固定的地方,若這固定的地方放的是 Boot Block code,則先跑 Boot Block,否則是進入 BIOS entry point (BIOS entry point 就是 POST code一開始的地方,而他的第一條指令都是 cli,且位址是固定的,也就是 F000:E05B,legacy BIOS基本上都是這樣設計。)
2. Boot Block main function block diagram
上面是兩種BIOS的block diagram,可以看得出來,大部分的Block都可以自己分配,
只有Boot Block 大家都會儘量把他放在第一個區塊(legacy BIOS 設計)。
下圖是可以看一下boot block包了哪些功能,但其實這些功能是看各家怎樣設計的。
比方不一定要點亮VGA,也不一定要support光碟機,都是有用到才加進去的概念。
別忘記了,這只是救援用的,所以當然越小越好,只要能達成開機,再次更新BIOS就好。
Note : 名詞解釋一下
If the BIOS were to assign resources to each PnP device on every boot, two problems would result. First, it would take time to do something that it has already done before, each boot, for no purpose. After all, most people change their system hardware relatively infrequently. Second and more importantly, it is possible that the BIOS might not always make the same decision when deciding how to allocate resources, and you might find them changing even when the hardware remains unchanged.
ESCD is designed to overcome these problems. The ESCD area is a special part of your BIOS's CMOS memory, where BIOS settings are held. This area of memory is used to hold configuration information for the hardware in your system. At boot time the BIOS checks this area of memory and if no changes have occurred since the last bootup, it knows it doesn't need to configure anything and skips that portion of the boot process.
ESCD is also used as a communications link between the BIOS and the operating system. Both use the ESCD area to read the current status of the hardware and to record changes. Windows 95 reads the ESCD to see if hardware has been changed and react accordingly. Windows 95 also allows users to override Plug and Play resource assignments by manually changing resources in the Device Manager. This information is recorded in the ESCD area so the BIOS knows about the change at the next boot and doesn't try to change the assignment back again.
The ESCD information is stored in a non-volatile CMOS memory area, the same way that standard BIOS settings are stored.
C.3. Boot Block POST Flowchart
下圖是早期A牌的BIOS的Boot Block 開機流程,因為他比較簡單易懂,所以就拿來參考一下。
可以看到只initialize一些需要用到的設備而已,然後就開到dos之下的crisis disk。
(這邊算check sum的點跟後來的BIOS有些不同,所以可以跳過不看沒關係)
C.4. Introduction to the AFUDOS
我比較熟悉的是AMI 的BIOS 所以在這邊介紹一下我常用的AFUDOS.
Summary
(1). AFUDOS is a BIOS update/flash utility with a command line interface.
(2). AFUDOS is supported by MS-DOS environment
(3). System BIOS should have the followings:
a. AMIBIOS CORE version 8.xx.xx.
b. SMIFlash eModule with “8.00.00_SMIFlash-1.00.07” label or later.
c. Token: SDSMGR_IN_RUNTIME = ON.
d. Token: SMI_INTERFACE_FOR_SDSMGR_FUNC = ON.
(4). We can copy the AFUDOS.EXE executable file to any storage location accessible by the host system and then run AFUDOS in command prompt.
AFUDOS 是一個 BIOS 更新工具,屬於“BIOS flash tool”類,使用 MS-DOS 的命令行介面。
使用物件必須為 AMIBIOS 核心 7.xx 或 AMIBIOS8,舊的 AMIBIOS 系統支援 AMIFLASH.COM 程式。
當然EFI的BIOS也是有AFUDOS for EFI BIOS,所以使用時要注意自己的版本是不是正確的。
Usage
AFUDOS [Option 1] [Option 2]...
AFUDOS
有些Book Block有點亮螢幕,有些沒點亮螢幕,不過通常是開到 Dos 之下,然後配合光碟/ usb 隨身碟裡面的 BIOS rom 檔,再次更新到正確的 BIOS。
Q: 比較一下沒有 Boot Block 的 BIOS ROM 做法?
Power on 時 CPU 第一個 code read 一定是FFFFFFF0;
在那邊有放一個 jmp 指令 (因為 FFFFFFF0 ~ FFFFFFFFh 只有16 byte 空間,無法放很多code),CPU 會再跳到其他固定的地方,若這固定的地方放的是 Boot Block code,則先跑 Boot Block,否則是進入 BIOS entry point (BIOS entry point 就是 POST code一開始的地方,而他的第一條指令都是 cli,且位址是固定的,也就是 F000:E05B,legacy BIOS基本上都是這樣設計。)
2. Boot Block main function block diagram
上面是兩種BIOS的block diagram,可以看得出來,大部分的Block都可以自己分配,
只有Boot Block 大家都會儘量把他放在第一個區塊(legacy BIOS 設計)。
下圖是可以看一下boot block包了哪些功能,但其實這些功能是看各家怎樣設計的。
比方不一定要點亮VGA,也不一定要support光碟機,都是有用到才加進去的概念。
別忘記了,這只是救援用的,所以當然越小越好,只要能達成開機,再次更新BIOS就好。
Note : 名詞解釋一下
If the BIOS were to assign resources to each PnP device on every boot, two problems would result. First, it would take time to do something that it has already done before, each boot, for no purpose. After all, most people change their system hardware relatively infrequently. Second and more importantly, it is possible that the BIOS might not always make the same decision when deciding how to allocate resources, and you might find them changing even when the hardware remains unchanged.
ESCD is designed to overcome these problems. The ESCD area is a special part of your BIOS's CMOS memory, where BIOS settings are held. This area of memory is used to hold configuration information for the hardware in your system. At boot time the BIOS checks this area of memory and if no changes have occurred since the last bootup, it knows it doesn't need to configure anything and skips that portion of the boot process.
ESCD is also used as a communications link between the BIOS and the operating system. Both use the ESCD area to read the current status of the hardware and to record changes. Windows 95 reads the ESCD to see if hardware has been changed and react accordingly. Windows 95 also allows users to override Plug and Play resource assignments by manually changing resources in the Device Manager. This information is recorded in the ESCD area so the BIOS knows about the change at the next boot and doesn't try to change the assignment back again.
The ESCD information is stored in a non-volatile CMOS memory area, the same way that standard BIOS settings are stored.
C.3. Boot Block POST Flowchart
下圖是早期A牌的BIOS的Boot Block 開機流程,因為他比較簡單易懂,所以就拿來參考一下。
可以看到只initialize一些需要用到的設備而已,然後就開到dos之下的crisis disk。
(這邊算check sum的點跟後來的BIOS有些不同,所以可以跳過不看沒關係)
C.4. Introduction to the AFUDOS
我比較熟悉的是AMI 的BIOS 所以在這邊介紹一下我常用的AFUDOS.
Summary
(1). AFUDOS is a BIOS update/flash utility with a command line interface.
(2). AFUDOS is supported by MS-DOS environment
(3). System BIOS should have the followings:
a. AMIBIOS CORE version 8.xx.xx.
b. SMIFlash eModule with “8.00.00_SMIFlash-1.00.07” label or later.
c. Token: SDSMGR_IN_RUNTIME = ON.
d. Token: SMI_INTERFACE_FOR_SDSMGR_FUNC = ON.
(4). We can copy the AFUDOS.EXE executable file to any storage location accessible by the host system and then run AFUDOS in command prompt.
AFUDOS 是一個 BIOS 更新工具,屬於“BIOS flash tool”類,使用 MS-DOS 的命令行介面。
使用物件必須為 AMIBIOS 核心 7.xx 或 AMIBIOS8,舊的 AMIBIOS 系統支援 AMIFLASH.COM 程式。
當然EFI的BIOS也是有AFUDOS for EFI BIOS,所以使用時要注意自己的版本是不是正確的。
Usage
AFUDOS
AFUDOS
留言
張貼留言