Skip to content

Latest commit

 

History

History
485 lines (380 loc) · 17.8 KB

PITCHME.md

File metadata and controls

485 lines (380 loc) · 17.8 KB

---?image=assets/images/gitpitch-audience.jpg @title[UEFI_Driver_Wizard_Win_Lab]




UEFI & EDK II Training

UEFI Driver Wizard Lab - Windows

See also LabGuide.md for Copy & Paste examples in labs


tianocore.org Note: PITCHME.md for UEFI / EDK II Training UEFI Driver Wizard Win Lab

Copyright (c) 2020, Intel Corporation. All rights reserved.

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:

  1. 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.

  2. 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.


@title[Lesson Objective]

<p align="center"Lesson Objective


  • @fa[certificate gp-bullet-cyan]  Setup the UEFI Driver Wizard

  • @fa[certificate gp-bullet-yellow]  Create a UEFI Driver Template

---?image=assets/images/binary-strings-black2.jpg @title[UEFI Driver Wizard Section ]





     UEFI Driver Wizard

        Creating a Template UEFI Driver with the
        UEFI Driver Wizard

---?image=/assets/images/slides/Slide4.JPG @title[UEFI Driver Wizard Overview]

UEFI Driver Wizard Overview


  • ✓  Open source tool
  • ✓  Based on Driver Writer’s Guide     for UEFI 2.3.1 content
  • ✓  Intel engineers contributed
  • ✓  Located on www.TianoCore.org
  

Note:

---?image=/assets/images/slides/Slide5.JPG @title[Installing UEFI Driver Wizard]

Installing UEFI Driver Wizard

Requirements and Options

  • Work space must contain BaseTools, MdePkg & MdeModulePkg Packages from Tianocore.org edk2 for Driver development on Tianocore.org
  • This lab uses previous lab’s setup w/ Windows `C:/FW/src/edk2`
  • For Linux, Python scripts from Github Link then use instructions from README for Python and wxPython versions to install then run
    •   `bash$ python launch.py`

Note:

Same as slide

---?image=/assets/images/slides/Slide6.JPG @title[Requirements for Your Driver ]

Requirements for Your Driver

@snap[north-west span-80 ]

@box[bg-grey-25 text-white rounded my-box-pad2 ](
















 

)
@snapend

@snap[north-west span-80 ]


   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 strings & forms for setup
@snapend

Note:


@title[Template File Contents]

Template File Contents

@snap[north-west span-60 fragment]


@box[bg-gold2 text-white rounded my-box-pad2 ](

Proper UEFI driver entry point
 

)
@snapend

@snap[north-east span-65 fragment]




 

@box[bg-royal text-white rounded my-box-pad2 ](

Basic driver libraries/headers
 

)
@snapend

@snap[north-west span-70 fragment]






 
 

@box[bg-purple-pp text-white rounded my-box-pad2 ](

Skeletons for common driver functions
 

)
@snapend

@snap[north-east span-90 fragment]









 
 

@box[bg-navy text-white rounded my-box-pad2 ](

Error values until ported EFI_UNSUPPORTED, EFI_DEVICE_ERROR
 

)
@snapend

Note:

  • 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)

---?image=/assets/images/slides/Slide11.JPG @title[Lab 1: Create a UEFI Driver section]

Lab 1: Create a UEFI Driver with the UEFI Driver Wizard


  • 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
 

Note:

---?image=/assets/images/slides/Slide12.JPG @title[Lab 1: Install UEFI Driver Wizard ]

Lab 1: Install UEFI Driver Wizard

First setup for building EDK II for Emulator, See Lab Setup
  • Install UEFI Driver Wizard

  • 1. Open and Run
       
    `/FW/DriverWizard/UefiDriverWizard.msi`
  • 2. Click through "Next" until install finishes


  • Open the UEFI Driver Wizard
 
Note:

same as slide

---?image=/assets/images/slides/Slide13.JPG @title[Lab 1: UefiDriverWizard -Select Work Space]

Lab 1: UEFI Driver Wizard -Select Work Space

  • 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`

 

Note:

  • 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

  • another note, the environment for EDK II must be setup with edksetup.bat

---?image=/assets/images/slides/Slide14.JPG @title[Lab 1: -Create a New UEFI Driver]

Lab 1: Create a New UEFI Driver


Control+N - to Open Menu Note: - Control+N – to Open Menu

---?image=/assets/images/slides/Slide15.JPG @title[Lab 1: New UEFI Driver Menu]

              Lab 1:

New UEFI Driver Menu

  • “UEFI Driver Path” – Type: “MyWizardDriver”
    •   Note: “UEFI Driver Name” is filled in
  • Ensure all the forms, radio buttons, and boxes are filled in and selected exactly like the image to the right.

  • Note:A new, specific driver GUID will populate, so it will be different than this image

    •                Click
  •  

Note:

  • “UEFI Driver Version” – Type: “1.0”
  • “UEFI Driver Type” – Select: “UEFI Driver Model Device Driver”
  • “Opetional Features …” – Select:
    • Unloadable
      
    • Driver Supporte EFI Version Protocol
      
    • HII Packages for Strings, Fonts, or images
      
  • “CPU Architecture” – Select: “IA32” and “X64”

---?image=/assets/images/slides/Slide16.JPG @title[Lab 1: UEFI Driver Model Optional Features]

Lab 1: UEFI Driver Model Optional Features

  • Ensure all the forms, radio buttons, and boxes are filled in and selected exactly like the image to the right.

  • ✓  "Componnt Name 2 Prorocol”
  • ✓  "Componnt Name Prorocol”
  • ✓  "HII Packages for Forms . . .”




  •                      Click
  •  

Note:

  • UEFI Driver Model Opetional Features – Select:
    • Componnt Name 2 Prorocol
    • Componnt Name 2 Prorocol
    • HII Packages for Forms and HII based configuruation

---?image=/assets/images/slides/Slide17.JPG @title[Lab 1: UEFI Driver Consumed Protocol]

Lab 1: UEFI Driver Consumed Protocol

Select
✓  "PCI Driver that consumes the PCI I/O Protocol”







  •                    Click
  •  

Note:

Same as slide

---?image=/assets/images/slides/Slide18.JPG @title[Lab 1: UEFI Driver Produced Protocols]

Lab 1: UEFI Driver Produced Protocols


  • Select
  • ✓  "Byte stream device (i.e.UART)  
          producing Serial I/O Protocol”







  •                        Click
  •  

Note:

Same as slide

---?image=/assets/images/slides/Slide19.JPG @title[Lab 1: UEFI Driver Created]

Lab 1: UEFI Driver Created

UEFI Driver template created

Note:

Same as slide


@title[Summary]

Summary


  • @fa[certificate gp-bullet-cyan]  Setup the UEFI Driver Wizard

  • @fa[certificate gp-bullet-yellow]  Create a UEFI Driver Template

---?image=assets/images/gitpitch-audience.jpg @title[Questions]
Questions

---?image=assets/images/gitpitch-audience.jpg @title[Logo Slide]


![Logo Slide](/assets/images/TianocoreLogo.png =10x)


@title[Acknowledgements]

Acknowledgements

/**
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.
**/