● Firmware Device (FD):
Bios Rom即是一個 FD, 一個FD可以由多個FV組成● Firmware Volume (FV):
每個FV通常是由一個 header+N個Firmware Files所組成, 一般說的Boot Firmware Volume/ Recovery Firmware Volume/ Main Firmware Volume就是以這個為單位, FV的細部定義如下:
Bios Rom即是一個 FD, 一個FD可以由多個FV組成● Firmware Volume (FV):
每個FV通常是由一個 header+N個Firmware Files所組成, 一般說的Boot Firmware Volume/ Recovery Firmware Volume/ Main Firmware Volume就是以這個為單位, FV的細部定義如下:
// // PEI 接收資料 // Status = (*PeiServices)->LocatePpi ( PeiServices, &gEfiPeiReadOnlyVariablePpiGuid, 0, NULL, &ReadOnlyVariable ); ASSERT_PEI_ERROR (PeiServices, Status); VariableSize = sizeof (SETUP_DATA); Status = ReadOnlyVariable->GetVariable ( PeiServices, L"Setup", &gEfiSetupGuid, NULL, &VariableSize, &SetupData ); if (EFI_ERROR (Status)) return;
Offset
|
Name
|
Length
|
Description
|
00h
|
Anchor String
|
4 BYTEs
|
_SM_, specified as
four ASCII characters (5F 53 4D 5F).
|
10h
|
Intermediate Anchor
String
|
5 BYTEs
|
_DMI_, specified as
five ASCII characters (5F 44 4D 49 5F)
|
16h
|
Structure Table
Length
|
WORD
|
Total length of
SMBIOS Structure Table, pointed to by the Structure Table Address, in bytes
|
18h
|
Structure Table
Address
|
DWORD
|
32-bit physical
starting address of the read-only SMBIOS Structure
|
1Ch
|
Number of SMBIOS
Structures
|
WORD
|
Handle的數量
|
typedef的結構。在UEFI下會綁定GUID,並且透過Driver來安裝Protocol instance到handle上. 上層若要控制device,必須透過呼叫Protocol instance來達成。
Bus Driver會Create Child handle 但Device Driver不會。如果Bus Driver Create的 Child handle是Physical device, Bus Driver 必須安裝Device Path Protocol instance到Child handle
• Startup with transitory memory store for call-stack (I.e., cache)
• XIP from ROM● Core locates, validates, and dispatches PEIMs
• Silicon/platform abstractions● Primary goals
• Discover boot mode
• Launch modules that initialize main memory
• Discovery & launch DXE core- Convey platform info into DXE
VOID
EFIAPI
SecStartup (
IN UINT32 SizeOfRam,
IN UINT32 TempRamBase,
IN VOID *BootFirmwareVolume
){
...
}
;; Reset Vector
; ; This is where the processor will begin execution ; nop nop jmp short EarlyBspInitReal16 |