Focusing on the use of the UEFI Shell and its recently released formal specification, this book unlocks a wide range of usage models which can help people best utilize the shell solutions. This text also expands on the obvious intended utilization of the shell and explains how it can be used in various areas such as security, networking, configuration, and other anticipated uses such as manufacturing, diagnostics, etc. Among other topics, Harnessing the UEFI Shell demonstrates how to write Shell scripts, how to write a Shell application, how to use provisioning options and more. Since the Shell is also a UEFI component, the book will make clear how the two things interoperate and how both Shell developers as well as UEFI developers can dip into the other's field to further expand the power of their solutions.

Harnessing the UEFI Shell is authored by the three chairs of the UEFI working sub-teams, Michael Rothman (Intel, chair of the UEFI Configuration and UEFI Shell sub-teams), Vincent Zimmer (Intel, chair of the UEFI networking sub-team and security sub-team), and Tim Lewis (Insyde Software, chair of the UEFI security sub-team). This book is perfect for any OEMs that ship UEFI-based solutions (which is all of the MNCs such as IBM, Dell, HP, Apple, etc.), software developers who are focused on delivering solutions targeted to manufacturing, diagnostics, hobbyists, or stand-alone kiosk environments.



Autorentext

Michael Rothman (Intel, chair of the UEFI Configuration and UEFI Shell sub-teams), Vincent Zimmer (Intel, chair of the UEFI networking sub-team and security sub-team), and Tim Lewis (Insyde Software, chair of the UEFI security sub-team).



Inhalt

Preface vii

Chapter 1 Introduction 1

What is UEFI? 1

What Do We Mean by Shell? 4

A Short History of the UEFI Shell 5

Brief Overview of the UEFI Shell 5

UEFI Shell APIs 6

Command Line Interface Features 6

Why a Shell at all? 7

Chapter 2 Under the UEFI Shell 9

Shell and UEFI 9

Evolution and Revolution 13

Chapter 3 What Is the UEFI Shell? 15

What Is Contained in the UEFI Shell? 16

What Kind of Shell Do You Have? 16

What!? No Shell? No Problem! 17

Programmatic Shell Environment 19

Using UEFI Shell Commands 20

Interactive Shell Environment 22

Scripting 22

Program Launch 24

File-System Abstractions 29

Shell Script Resolves into a UEFI Firmware Action 31

Chapter 4 Why We Need an Execution Environment before the OS 33

Evolution of a Machine 33

The Platform Initialization Flow 34

UEFI Transitions 36

States of a Platform 38

Readiness of UEFI 41

Migration Using the UEFI Shell 44

Going Forward 45

Chapter 5 Manufacturing 47

Throughput 47

Manufacturing Test Tools 49

Hardware Access with Manufacturing Tools 50

Converting Manufacturing Tools 53

Conclusion 54

Chapter 6 Bare Metal Provisionig 55

Provisioning with the UEFI Shell 55

UEFI Networking Stack 56

Securing the Network 58

Speeding Up the Network 62

Example of Putting It Together 62

Summary 68

Chapter 7 Configuration of Provisioned Material 69

Initialization Timeline 69

Configuration Infrastructure Overview 71

Using the Configuration Infrastructure 72

Driver Model Interactions 73

Provisioning the Platform 75

Configuring through the UEFI Shell 76

Basic Configuration 76

Advanced Configuration Abilities 79

Chapter 8 The Use of UEFI for Diagnostics 85

Types of Diagnostics 85

SMBIOS Table Organization 87

SMBIOS Structure Table Entry Point 88

Table Organization Graph 88

Structure Standards 89

Structure Evolution and Usage Guidelines 90

Text Strings 90

Required Structures and Data 91

Features 91

User Interface Design 92

Design Guide 92

Usage 93

Examples 93

Architecture Design 94

Data Structure 95

SMBIOS_STRUCTURE_TABLE 95

SMBIOS_HEADER 97

SMBIOS_STRUCTURE_POINTER 98

STRUCTURE_STATISTICS 99

Source Code for the Utility 100

Summary 105

Chapter 9 UEFI Shell Scripting 107

Hello, World! 108

Echo 108

Echo All Parameters 109

Echo All Parameters (Improved Version) 110

Concatenate Text Files 112

List Only Selected "ls" Information 113

Install Script 115

How to Make a Shell Script Appear as a Boot Option 119

Chapter 10 UEFI Shell Programming 121

A Simple UEFI Shell Application: HelloWorld 121

The Source File: HelloWorld.c 121

The Component Information (.inf) File 123

A Simple Standard Application: HelloWorld2 124

The Source File: HelloWorld2.c 124

The Component Information (.inf) File: HelloWorld2.inf 125

Read Keyboard Input in UEFI Shell Scripts: GetKey 126

The Source File: GetKey.c 127

The Component Information (.inf) File: GetKey.inf 137

The Build Description (.dsc) File 139

Calculate Math Expressions: Math 139

The Source File: Math.c 140

The Component Information (.inf) File: Math.inf 154

Convert ASCII to Unicode and Back: UniCodeDecode 154

The Source File: UniCodeDecode.c 155

The Component Information (.inf) File 163

Chapter 11 Managing UEFI Drivers Using the Shell 165

Testing Specific Protocols 166

Loading and Unloading UEFI Drivers 167

Load 168

LoadPciRom 168

Unload 169

Connecting UEFI Drivers 169

Connect 169

Disconnect 170

Reconnect 170

Driver and Device Information 171

Drivers 171

Titel
Harnessing the UEFI Shell
Untertitel
Moving the Platform Beyond DOS, Second Edition
EAN
9781501505812
ISBN
978-1-5015-0581-2
Format
E-Book (epub)
Hersteller
Veröffentlichung
06.03.2017
Digitaler Kopierschutz
Wasserzeichen
Dateigrösse
51.98 MB
Anzahl Seiten
326
Jahr
2017
Untertitel
Englisch
Auflage
2nd ed