2011年4月20日 星期三

Host Bus Controllers

在Driver的Entry Point中, 並不允許接觸Hardware(直接呼叫Hardware function). 所以當Driver Image被載入和啟動後, Driver在系統中只是被動者, Driver會一直等待, 直到系統告知Driver要管理一個或是多個控制器(Controller).

例如: EFI Boot Manager是負責管理Driver連接到Controller的工作.

然而, 在做這些連接動作之前, 必須要先收集這些Controller的資訊給Driver, 以方便管理. 而這些Controller的源頭就是Host Bus Controller. Firmware Component並不受EFI Driver Model的限制, 它會產生Host Bus Controller, 而Host Bus Controller會提供I/O介面. 這種EFI Driver並不屬於EFI Driver Model的一種. (這個部分很抽象...)

在EFI中, 每個Host Bridge可用Device Handle來表示, Device Handle包含了一個Device Path Protocol, 另一個Protocol提供了I/O的運作, Host Bus可以透過這些I/O來完成某些事.

例如: PCI Host Bus Controller支援PCI Host Bridge I/O Protocol. PCI Host Bridge是一個Device Handle. 此時Device Handle包含了EFI_DEVICE_PATH_PROTOCOL以及EFI_PCI_HOST_BRIDGE_IO_PROTOCOL.

PCI Bus Driver會連接到PCI Host Bridge, 並針對系統中的每個PCI Device建立出對應的Child Handle. 接著PCI Device Driver就會連接到這些Child Handle, 並產生I/O介面, 讓EFI OS可以透過此I/O介面Boot進去.

之後會再介紹不同形式的EFI Driver Model.

沒有留言:

張貼留言