tianocore.org
- Setup the UEFI Driver Wizard
- Create a UEFI Driver Template
Creating a Template UEFI Driver with the UEFI Driver Wizard
- Open source tool
- Based on Driver Writer’s Guide for UEFI 2.3.1 content
- Intel SSG engineers contributed
- Located on http://www.TianoCore.org
-
info - Work space must contain BaseTools, MdePkg & MdeModulePkg Packages from latest stable tag from https://github.com/tianocore/edk2 for Driver development on Tianocore.org
-
For this lab use previous lab’s setup w/ Windows C:\FW\edk2-ws\
-
info - Python* scripts from Github Link then use instructions from README for Python and wxPython versions to install then run
bash$ python launch.py
Using UEFI Driver Wizard
- UEFI Device Driver
- UEFI Version 2.7 (0x00020046)
#define EFI_2_70_SYSTEM_TABLE_REVISION ((2<<16) | (70DEC))
- Unloadable driver
- Support IA32 & x64 CPUs
- Returns component name information
- Byte stream device (i.e.UART / Serial I/O)
- Option to produce HII strings & forms for setup
Note:
The driver wizard will create all the c and .h files for a template UEFI driver
- Establishes a proper UEFI Driver Entry Point
- References to basic driver libraries/headers based on Driver Wizard form input
- Inserted in .INF, .H and .C files
- Skeletons for common driver functions
- Includes comments based on information from the Driver Writer’s Guide for UEFI 2.3.1
- Functions may return error values until ported (EFI_UNSUPPORTED, EFI_DEVICE_ERROR)
- In this lab, you'll create a new UEFI driver using the UEFI Driver Wizard.
- This will create a set of "c" code files to be used as a template UEFI Driver used in the subsequent driver labs
First setup for Building EDK II for Emulator, See Lab Setup
Install UEFI Driver Wizard from the downloaded lab material
Open and Run /FW/DriverWizard/UefiDriverWizard.msi
Click through “Next” until install finishes
Open the UEFI Driver Wizard
- Open source tool
- Based on Driver Writer’s Guide for UEFI 2.3.1 content
- Intel SSG engineers contributed
- Located on http://www.TianoCore.org
Click on File and Select
“Open WORKSPACE”
Or
Control+O
- Browse to
C:/FW/edk2-ws/edk2
- Select “OK”
- Should say
“
WORKSPACE C:\FW\edk2-ws\edk2 selected
”
Note: the environment for EDK II must be setup with edksetup.bat
Control+N – to Open Menu
- UEFI Driver Path” – Type: “MyWizardDriver”
- Note: “UEFI Driver Name” is filled in.
- Also if the "UEFI Driver path" is not filled in, an error will occur.
- Ensure all the forms, radio buttons, and boxes are filled in and selected exactly like the image to the right (except GUID) from slide 12 of the PDF for this lab
- Fill in "UEFI Driver Version
- Select "UEFI Driver Model Device Driver"
- Fill in "Driver Binding Version" with the value 0x0000000A
- Select the following "Optional Features Commmon to all UEFI Driver Types"
- "Unloadable"
- "Driver Supported EFI version Protocol"
- "HII Packages for String, Fonts, or Images"
- Fill in "UEFI Specification Version" with the value of 0x00020046
- Select the following for "CPU Architectures":
- IA32
- X64
Note: A new, specific driver GUID will populate, so it will be different than this image
Click on the Next>>
button
Ensure all the forms, radio buttons, and boxes are filled in and selected exactly like the image to the right from slide 13 of the PDF for this lab
Select the following on the "UEFI Driver Optional Features" menu
- "Component Name 2 Protocol”
- "Component Name Protocol”
- "HII Packages for Forms . . .”
Click on the Next>>
button
Select
- “PCI Driver that consumes the PCI I/O Protocol”
Click on the Next>>
button
Select
- "Byte stream device (i.e.UART)
producing Serial I/O Protocol"
Click on the Finish
button
UEFI Driver template created
The UEFI Driver Wizard will show several files that it created in the dialog window.
Note: if an error occurs, make sure you have given it a file path from Slide 12
- Setup the UEFI Driver Wizard
- Create a UEFI Driver Template
Return to Training Table of contents for next presentation link: https://github.com/tianocore-training/Tianocore_Training_Contents/wiki
/**
Redistribution and use in source (original document form) and 'compiled' forms (converted
to PDF, epub, HTML and other formats) with or without modification, are permitted provided
that the following conditions are met:
Redistributions of source code (original document form) must retain the above copyright
notice, this list of conditions and the following disclaimer as the first lines of this
file unmodified.
Redistributions in compiled form (transformed to other DTDs, converted to PDF, epub, HTML
and other formats) must reproduce the above copyright notice, this list of conditions and
the following disclaimer in the documentation and/or other materials provided with the
distribution.
THIS DOCUMENTATION IS PROVIDED BY TIANOCORE PROJECT "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TIANOCORE PROJECT BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
Copyright (c) 2020, Intel Corporation. All rights reserved.
**/