Harnessing the UEFI Shell by Michael Rothman Vincent Zimmer Tim Lewis

Harnessing the UEFI Shell by Michael Rothman Vincent Zimmer Tim Lewis

Author:Michael Rothman,Vincent Zimmer,Tim Lewis [Неизв.]
Language: eng
Format: epub
Publisher: De Gruyter
Published: 2017-08-23T21:00:00+00:00


Loading and Unloading UEFI Drivers

Two UEFI Shell commands are available to load and start UEFI drivers, Load and LoadPciRom. The UEFI Shell command that can be used to unload a UEFI driver if it is unloadable is Unload.

Load

The Load command loads a UEFI driver from a file. UEFI driver files typically have an extension of . efi. This command has one important option, the -nc (“No Connect”) option, for UEFI driver developers. When the Load command is used without the -nc option, the loaded driver is automatically connected to any devices in the system that it is able to manage. This means that the UEFI driver’s entry point is executed and then the EFI Boot Service ConnectController() is called. If the UEFI driver produces the Driver Binding Protocol in the driver’s entry point, then the ConnectController() call exercises the Supported() and Start() services of Driver Binding Protocol that was produced.

If the -nc option is used with the Load command, then this automatic connect operation is not performed. Instead, only the UEFI driver’s entry point is executed. When the -nc option is used, the UEFI Shell command Connect can be used to connect the UEFI driver to any devices in the system that it is able to manage. The Load command can also take wild cards, so multiple UEFI drivers can be loaded at the same time.

The following are some examples of the Load command.

Example 1 loads and does not connect the UEFI driver image EfiDriver.efi. This example exercises only the UEFI driver’s entry point:

fs0:> Load -nc EfiDriver.efi

Example 2 loads and connects the UEFI driver image called EfiDriver.efi. This example exercises the UEFI driver’s entry point and the Supported() and Start() functions of the Driver Binding Protocol:

fs0:> Load EfiDriver.efi

Example 3 loads and connects all the UEFI drivers with an .efi extension from fs0:, exercising the UEFI driver entry points and their Supported() and Start() functions of the Driver Binding Protocol:

fs0:> Load *.efi



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.