UEFI是英文Extensible Firmware Interfaces的縮寫, 由Intel提出的. 以下有幾個重要的名稱跟UEFI架構息息相關 (Key Concepts) :
UEFI System Table
Data structure with data information tables to interface with the systems.
System table含有許多的資料結構, 涵蓋active console devices, Runtime Service , Boot Service , system configuration tables such as ACPI, SMBIOS, and the SAL System Table.
當中Boot Service則在ExitBootService之後無法使用,而Runtime Service則在進入OS後仍可使用.
![](https://pics9.yamedia.tw/29/userfile/w/wttmama/blog/14d1ab0ff3805e.jpg)
Handle database and Protocol
Callable interface that are registered.
Handle Database 是由Handles和Protocols组成的,可以被任何UEFI Image訪問。在執行完ExitBootServices之後,Handle Database就不存在了。
Handle由一個或多個Protocol所組成, 而Protocol由GUID來表示,每個Protocol都有自定義的GUID.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6a-l6B1mPKsmQb_aqFXAcLk928387aTAuiAGNLTRJ0yQnqpmIxV-Ks9rhHKbouFoKsSXf3P8hq_AqqN7cwocQ_34aBa28e8NxNBpx_kPZH7J0bMLaG1rfXfF4KUFM_YBUQv9Hvy9T3bl1/s640/driver.jpg)
UEFI Image
The executable content format. The UEFI image主要包含 :
(1) UEFI Application : like OS loader
(2) UEFI Driver : like UEFI boot service driver and UEFI runtime service driver
這當中使用的memory與退出返回的方式有差異 :
退出或返回时的Action不同:
(A) UEFI Applications:当Image退出或返回时,这种Image会被自动卸载,其内存资源和状态会被释放。
(B) UEFI OS Loader:这是一种特殊类型的Application,通常不会退出或返回,相反的,它会调用gBS-
>ExitBootService()来把平台的控制权从固件交给OS。
(C) UEFI Boot Service Drivers:这种Image的内存资源和状态在进入操作系统之前都被保存,当OS
Loader调用gBS->ExitBootService()时被释放。
(D) UEFI Runtime Drivers:这种Image的内存资源和状态会一直存在。这些Images和UEFI OS并存,并
且能够被支持UEFI的OS调用。
UEFI Event
Legacy post is Interrupt, EFI post is Event.
一个UEFI Image可以对Event做以下的事情:
1). 创建一个Event //CreateEvent()
2). 销毁一个Event //CloseEvent()
3). 查看一个Event是否处在Signaled状态 //CheckEvent()
4). 等待一个Event进入Signaled状态 //WaitForEvent()
5). 请求一个Event从Waiting状态进入到Signaled状态 //SignalEvent()
UEFI沒有中斷INT所以導入event. UEFI Driver经常使用Timer Events来允许Driver周期性的轮询Device。
沒有留言:
張貼留言