UEFI
uefi关键内容
1. Objects-管理系统(包括I/O设备,memory,events)的状态。
2. The UEFI System Table-data structure with data in-formation tables to interface with the systems
3. .Handle database and protocols- callable interfaces that are registered
4. UEFI Image-the executable content format.
5. Events-the software can be signed in response to some other activity.(软件可以被信号通知以做出一些反应)
6. Device paths-a data structure that describes the hardware location of an entity
什么是GUID?
1. GUID—guaranteed(Globally) Unique Identifiers(设定的唯一标识符),总共128个bit。
2. Used to identify protocols-用于去识别协议。
3. Regulate extension mechanism-控制扩展机制。
–Documented in the spec
–Added through drivers
Handles:
.所有的协议都有一个Handles和其联系在一起的。
. Every device and executable image in EFI has a handle protocol in the handle database.
What is the UEFI System Table?
.Firmware implementation information
-外围设备只能读取Table数据。
-Spec version。
-UEFI protocols的接口。
-其他标准的接口。
Device path protocol:
-一个描述一个设备在platform中位置的数据结构。
-ALL boot device,logical devices and images 都必须被一个device path所描述。
-device path的6types:
.Hardware
.Acpi-uid/hid of device of in AMI
.Message-例如:LAN, Fiber Channel, ATAPI, SCSI, USB.
.Media-HD, Floppy,CD-ROM.
.EDD 3.0 boot device—see EDD 3.0 SPEC INT13 48.
.End of hardware-marks end of device path。
What are UEFI Boot services?
.Events and notifications
-polled(轮询) devices,no interrupts
.watchdog timer
- Elegant recovery
.Memory allocation(内存分配)
.Handle location ––for finding protocols
.Image loading
-Drivers, application, OS loader
UEFI Runtime Services:
.Services available at both boot time and runtime.
.Timer, wakeup alarm
-Allow system to wake up or power on at a set time.
.Variables
-boot manager handshake.
.System reset.
UEFI Driver Design
. Modular chunks(大块的) of code run in pre-boot。
-manage devices or services.
-..they are NOT OS-present drivers!.(他们不是使OS出现的驱动)。
.Drivers export(输出) protocol(协议) interfaces
-protocol=instance(实例) data + access methods.
- Like C++ classes but more code space efficient(效率)。
- Identified by GUID to avoid collisions(冲突)。
- Version numbers and signatures provide means to manage driver management policy
.Drivers may consume(占用) protocol interfaces。
-self-describing the dependencies.
-E.g. memory initialization may depend on SMBUS service
UEFI Driver Model:
.Used for devices on industry standard bus.
-“boot devices”
.Structured model of device/bus hierarchy(层次).
-device drivers and bus drivers。
-Device drivers are topology(拓扑结构) agnostic.
.Benefits(好处)
-simpler device drivers
-把复杂性都移进入BUS drivers 和core services
-Smaller drivers footprint(占用?)。
-通过platform来确定性的选择驱动
-which driver controls which device。
-Describes 复杂的bus hierarchies(层次)。
-Embedded, Desktop, Workstation, Server
-Extensible to future bus types
BUS DRIVER:
. Consumes(消耗) Parent Bus I/O Abstraction(s)。
.initializes bus controller(初始化bus控制器).
.Allocates Resources for child controllers.-分配资源给子控制器
.Creates Handles for child controllers.
. Loads drivers from Option ROMs if present-从option ROM载入驱动。
DEVICE DRIVER:
.Consumes(消耗) bus i/o abstraction(s)。
.initializes device controller
.produces device abstraction(s)
-Block i/o protocol
-simple text output protocol.
-simple Network protocol.
.Does not create any child handles.
.can still be a “parent” controller.
DEIVER Initialization:
.EFI Driver handoff state.
.Not allowed to touch hardware resources.
Installs driver binding on driver image handle.
阅读全文
类别:Efi 查看评论