Debugging under Unified Extensible Firmware Interface (UEFI): Addressing DXE Driver Challenges

Similar documents
Firmware Implementation Techniques to Achieve Windows 8 Fast Boot

Introduction to Intel Boot Loader Development Kit (Intel BLDK) Intel SSG/SSD/UEFI

Intel Transparent Computing

System Prep Applications A Powerful New Feature in UEFI 2.5

Comparison on BIOS between UEFI and Legacy

Writing and Debugging EBC Drivers

UEFI Forum Update. UEFI Spring Plugfest March 29-31, 2016 Presented by Dong Wei (The UEFI Forum)

Manufacturing Tools in the UEFI Secure Boot Environment

PreBoot Provisioning Solutions with UEFI

UEFI Plugfest March

Solutions for the Intel Platform Innovation Framework for EFI July 26, Slide 1

Implementing MicroPython as a UEFI Test Framework

Using the UEFI Shell. October 2010 UEFI Taipei Plugfest Insyde Software

UEFI State of the Union Ecosystem enabling update

UEFI and IoT: Best Practices in Developing IoT Firmware Solutions

Tailoring TrustZone as SMM Equivalent

Hardware Prototyping Using a Windows-Hosted UEFI environment

Strengthening the Chain of Trust. Kevin Lane HP Jeff Bobzin Insyde Software

Standardized Firmware for ARMv8 based Volume Servers

UEFI Plugfest Dupont, WA

AMI Product Catalog. A Leader in Storage and Computing Innovations Worldwide

Implementing Secure Boot: A Refresher on Key & Database Configuration

UEFI and the Security Development Lifecycle

System Firmware and Device Firmware Updates using Unified Extensible Firmware Interface (UEFI) Capsules

Mark Tuttle, Lee Rosenbaum, Oleksandr Bazhaniuk, John Loucaides, Vincent Zimmer Intel Corporation. August 10, 2015

The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams.

UEFI 2.1 Features. Added protocols. New member functions or equivalent

UEFI TECHNICAL UPDATES & PLATFORM INNOVATIONS. Dong Wei - HP 魏东 Vincent Zimmer - Intel

Steps To Format Laptop Windows Xp And Install Windows 7 Dell

Engineering UEFI Firmware for Windows: Best Practices and Pitfalls to Avoid

Designing Interoperability into IA-64 Systems: DIG64 Guidelines

Building a Firmware Component Ecosystem with the Intel Firmware Engine

Building Better Firmware Experience An OEM Perspective

Aptio 5.x Status Codes

A Tour Beyond BIOS Using the Intel Firmware Support Package with the EFI Developer Kit II

ARM Trusted Firmware ARM UEFI SCT update

UEFI and PCI bootkits. Pierre Chifflier PacSec 2013

O p t i m i z e d U E F I I m p l e m e n t a t i o n o n I n t e l X e o n B a s e d O C P P l a t f o r m

Graphics Output Protocol (GOP) Driver for UEFI

The TPM 2.0 specs are here, now what?

General Firmware Overview of Recommendations for Window OS

UEFI updates, Secure firmware and Secure Services on Arm

bdigdb for BDI2000 PowerPC4xx version

What s New in Platform Builder 7

Intel Firmware Engine User Guide

U-Boot and Linux Kernel Debug using CCSv5

PL-I Assignment Broup B-Ass 5 BIOS & UEFI

Intel Boot Loader Development Kit (Intel BLDK)

UEFI Security and Networking Advancements

Windows 8 Uefi Bios Update Step By Step Guide Msi Usa

EFIS005. Security and Networking Advancements Today s UEFI and Intel UEFI Development Kit 2010 (Intel UDK2010)

The Role UEFI Technologies Play in ARM Platform Architecture

Debugging on Intel Platforms

An overview of ACPICA Userspace Tools

Mohan J. Kumar Intel Fellow Intel Corporation

A Tour Beyond BIOS Using the Intel Firmware Support Package 1.1 with the EFI Developer Kit II

Chapter 2 Operating-System Structures

Integrated Software Environment. Part 2

UEFI What is it? Spring 2017 UEFI Seminar and Plugfest March 27-31, 2017 Presented by Dong Wei (ARM) presented by. Updated

IA32 OS START-UP UEFI FIRMWARE. CS124 Operating Systems Fall , Lecture 6

Leveraging Windows Update to Distribute Firmware Updates Model Based Servicing (MBS)

Track Three Building a Rich UI Based Dual Display Video Player with the Freescale i.mx53 using LinuxLink

Firmware Test Suite - Uses, Development, Contribution and GPL

A Tour Beyond BIOS Capsule Update and Recovery in EDK II

Microsoft UEFI Certification Authority

UEFI Manageability and REST Services

Hacking the Extensible Firmware Interface. John Heasman, Director of Research

Technology in Action. Alan Evans Kendall Martin Mary Anne Poatsy. Eleventh Edition. Copyright 2015 Pearson Education, Inc.

An Introduction to Platform Security

UEFI Test Tools For Linux Developers

Reducing Platform Boot Time

Chapter 2. Operating-System Structures

Addressing the Increasing Challenges of Debugging on Accelerated HPC Systems. Ed Hinkel Senior Sales Engineer

Disassemble the machine code present in any memory region. Single step through each assembly language instruction in the Nios II application.

Getting Started with TargetOS on the ZedBoard 1 Introduction

Fall 2017 UEFI Plugfest Agenda

CHAPTER 2: SYSTEM STRUCTURES. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

i.mx5x Modular Design Platform: Product Prototyping Accelerator

Chapter 2: Operating-System Structures

Chapter 2: Operating-System Structures

Track Two Building an Internet Radio with the TI Sitara AM3517 using LinuxLink

Updates on Server Base System Architecture and Boot Requirements. Dong Wei

Revision: 0.30 June Intel Server Board S1200RP UEFI Development Kit Firmware Installation Guide

Implementing Advanced USB Interrupt Transfers

AMD Security and Server innovation

Advanced x86: BIOS and System Management Mode Internals UEFI SecureBoot. Xeno Kovah && Corey Kallenberg LegbaCore, LLC

ServerReady and Open Standards Accelerating Delivery

Date and Time The date is factory set to the date of the BIOS build. The date and time are editable. NumLock

Attacking and Defending the Platform

Simplified Firmware: Intel Boot Loader Development Kit

Fastboot BIOS. An Investigation of BIOS Speed Enhancement Featuring the Intel Atom Processor

Using the Command Line

Getting Started with ArcGIS Runtime. Jeff Shaner David Cardella

PLX USB Development Kit

ECE 471 Embedded Systems Lecture 12

Overview of Microcontroller and Embedded Systems

Impact of platform firmware on Linux kernel. Megha Dey, Sai Praneeth Prakhya Intel Open Source Technology Center

Note: The configurations and factory defaults described here are for EPM-15 BIOS version

DELLEMC. TUESDAY September 19 th 4:00PM (GMT) & 10:00AM (CST) Webinar Series Episode Nine WELCOME TO OUR ONLINE EVENTS ONLINE EVENTS

Introduction to Embedded Systems

Transcription:

Debugging under Unified Extensible Firmware Interface (UEFI): Addressing DXE Driver Challenges Jeff Bobzin Sr. Director Insyde Software Session ID EFIS003

Debugging Then The first computer bug, a moth removed from the Mark II in 1947, is now at the Smithsonian museum Grace Hopper, whose many accomplishments included writing the first compiler, popularized the term Computer Bug 2

Agenda Debugging Now Benefits of the UEFI Architecture Tips for Project Planning Debugging Tools 3

UEFI is Architected for Modularity Benefits of the UEFI Architecture UEFI UEFI- enabled OS Framework Drivers Pre-boot Tools OEM /ODM Drivers Option ROMs IBV z Drivers Foundations MRC - CPU Today s OS Compatibility Compatibility Support Support Module Module A Architectural Protocols UEFI is an interface specification Allows Driver Encapsulation As supported devices migrate to new market segments, the driver can easily follow Same driver for Mobile For Desktop/Server For Embedded Too! Hardware 4

UEFI Has a Defined Control Flow Benefits of the UEFI Architecture UEFI/Framework boot process goes through defined stages with clear rules for each stage DXE Debug 5

UEFI is Architected for Debugging Uses clear inter module interfaces called protocols Drivers often both consume and produce protocols Driver writer should treat platform service protocols as a black box Agreed Protocol Definition Benefits of the UEFI Architecture Calling Module References Protocol Provider Module Publishes Protocol 6

Agenda Benefits of the UEFI Architecture Tips for Project Planning Debugging Tools 7

Plan Early for Debug Project Planning Tips When designing your board consider: 1. Firmware Storage, initial load 2. Debugger tool Connections 3. Serial Debug Output When starting driver or application project consider: 1. Utilize UEFI Modular Architecture 2. Possible to test in the Shell? 3. CPU modes IA32, x64, EBC 8

Agenda Benefits of the UEFI Architecture Tips for Project Planning Debugging Tools Hardware (Jtag) Debuggers Software Debugger Tools Macros from Tianocore.org 9

Debugging Then Debugging Tools Released in 1979, the SDK-86 was Intel s first Reference Board. It offered a full-featured debugger in ROM with keypad and serial interface. All of its debugger commands are still used in debuggers today. 10

Standard Today Source level Debugging Debugging Tools Source Level View of Target on developer desktop Set Breakpoints in target Execution software and hardware Hardware breakpoints for memory or I/O access Go/step control > step into, step over, etc. Dump registers and memory, dump indexed registers, dump PCI registers, etc. Dump UEFI tables 11

Hardware Debugger Debugging Tools American Arium JTAG Source level Debugger ECM XDP3 12

American Arium ITP Jtag Connection 13

Debugging Tools American Arium H/W Debugger Application Interface 14

Debugging Tools Hardware Debugger Useful in All Stages 15

Platform Software Debugger Debugging Tools H2ODDT from Insyde Software Operating System UEFI Firmware Hardware 16

H2ODDT from Insyde Software Debugging Tools Connects to Target USB Port 0 USB0 Developer System Firmware w/ H2ODDT Included Target Board 17

H2ODDT Features and Requirements DDT drivers are built into the firmware image which is then flashed to the platform Versions for IA32 and x64 Must use target USB Port 0 (which has special debug mode) Debugging capability from PEI init through DXE into boot phase Includes debug of SMM drivers and legacy option ROMs 18

H2ODDT Gives Full Source View Debugging Tools 19

See Your Code In Action! 20

Complete Step Control Over Target Debugging Tools 21

More H2ODDT Features Debugging Tools Register viewer Memory dump viewer Local and Global Variables 22

Debugging Tools H2ODDT Platform Software Debugger Useful Throughout the Boot 23

New From Insyde: Shell level Debugger Debugging Tools DDT-AD = Debugger for Applications and Drivers + Operating System UEFI Applications UEFI Driver UEFI Firmware Hardware 24

Debugging Tools DDT AD Software Debugger for Shell Level Debug Board needing driver USB0 Developer System Thumb Drive w/ DDT-AD Driver Host Board 25

DDT AD Features and Requirements Debug your drivers using any UEFIcompatible platform DDT AD is loaded from UEFI Shell Prompt using Flash drive or other media Capability to debug anything that can be loaded from the Shell Same cable and source level debug features as standard Insyde H2ODDT Debugging Tools 26

DDT AT Lets You See Inside Your Driver IHV APP TEST APP DDT-AD IHV DRIVER UEFI SHELL IHV HARDWARE UEFI API INTERFACE UEFI-COMPATIBLE PLATFORM 27

Strengths of DDT AD 1. Easy setup no need to build debug firmware image 2. Simple connection using USB cable 3. Look inside the source of the driver or application under test 4. Debug problems on any UEFI board 5. Useful for many segments OEM/ODM and IHV, driver and application 28

DDT AD Status Insyde is beginning Beta test Is this tool interesting to your company? Send email to debug@insydesw.com 29

DDT AD Used in Shell Environment Debugging Tools 30

DEMO: DDT AD Debugger 31 31

Source Debuggers Tips and Tricks Debugging Tools 1. Compiler optimization can make source display hard to follow Local variables often held in registers, code order may be rearranged Include this statement in your source to disable optimizer: #pragma optimize (, off ) 2. Include this statement in your source to hard code a breakpoint at any point debugbreak() compiler intrinsic 32

More Source Debugger Tips 3. Same source can be built for native CPU or EBC binary so usually recommended to debug drivers in native first and then retest in EBC before release 4. Problems in EBC drivers can be checked with EBC Debugger http://www.uefi.org/events/ebc_debugger.zip 33

Software Debug Macros Debugging Tools From www.tianocore.org 34

EDK Debug Macros from tianocore.org These Macros Output to serial port Debugging Tools DEBUG (ErrorLevel, String, ) printf like formatted print string if ErrorLevel is active ASSERT (Expression) If Expression is FALSE, then print file name and line number and halt. ASSERT_EFI_ERROR (Status) If Status is not EFI_SUCCESS, then print file name and line number and halt. CR (Record, Type, Field, Signature) ASSERT()s if Data Structure Signature does not match EFI_BREAKPOINT () Generate a CPU break point instruction 35

Review: Debugging Tools Debugging Tools Board Connection Strengths Hardware Debugger ITP Jtag Full Source view, break if hung H2ODDT Platform Software Debugger DDT-AD Shell-level Debugger In-source Macros USB Port 0 USB Port 0 Serial Full Source view and breakpoints with no special connector Easy to use tool for UEFI driver and application development Free but still useful in project 36

Summary Conclusions 1. UEFI architecture is modular and designed for debugging 2. Plan early so board design includes required debugger support features 3. Several debugger tools available: choose the best tool for your project 37

Call To Action The industry is moving to UEFI and conversion has many benefits. Plan early to include debugging and make your UEFI project a success. Select one of these easy to use tools to increase productivity! 38

Resources www.uefi.org www.tianocore.org http://www.intel.com/technology/efi/ www.arium.com www.insydesw.com Win a ipod touch at next UEFI session Visit Insyde at Booth # 320 Or Booth # 153 39

Please Fill out the Session Evaluation Form Place form in evaluation box at the back of session room Thank You for your input, we use it to improve future Intel Developer Forum events 40 40

Questions? 41 41