Fri Dec 2 09:03:12 2022



NYLXS Mailing Lists and Archives
NYLXS Members have a lot to say and share but we don't keep many secrets. Join the Hangout Mailing List and say your peice.

DATE 2014-11-01


2022-12-02 | 2022-11-02 | 2022-10-02 | 2022-09-02 | 2022-08-02 | 2022-07-02 | 2022-06-02 | 2022-05-02 | 2022-04-02 | 2022-03-02 | 2022-02-02 | 2022-01-02 | 2021-12-02 | 2021-11-02 | 2021-10-02 | 2021-09-02 | 2021-08-02 | 2021-07-02 | 2021-06-02 | 2021-05-02 | 2021-04-02 | 2021-03-02 | 2021-02-02 | 2021-01-02 | 2020-12-02 | 2020-11-02 | 2020-10-02 | 2020-09-02 | 2020-08-02 | 2020-07-02 | 2020-06-02 | 2020-05-02 | 2020-04-02 | 2020-03-02 | 2020-02-02 | 2020-01-02 | 2019-12-02 | 2019-11-02 | 2019-10-02 | 2019-09-02 | 2019-08-02 | 2019-07-02 | 2019-06-02 | 2019-05-02 | 2019-04-02 | 2019-03-02 | 2019-02-02 | 2019-01-02 | 2018-12-02 | 2018-11-02 | 2018-10-02 | 2018-09-02 | 2018-08-02 | 2018-07-02 | 2018-06-02 | 2018-05-02 | 2018-04-02 | 2018-03-02 | 2018-02-02 | 2018-01-02 | 2017-12-02 | 2017-11-02 | 2017-10-02 | 2017-09-02 | 2017-08-02 | 2017-07-02 | 2017-06-02 | 2017-05-02 | 2017-04-02 | 2017-03-02 | 2017-02-02 | 2017-01-02 | 2016-12-02 | 2016-11-02 | 2016-10-02 | 2016-09-02 | 2016-08-02 | 2016-07-02 | 2016-06-02 | 2016-05-02 | 2016-04-02 | 2016-03-02 | 2016-02-02 | 2016-01-02 | 2015-12-02 | 2015-11-02 | 2015-10-02 | 2015-09-02 | 2015-08-02 | 2015-07-02 | 2015-06-02 | 2015-05-02 | 2015-04-02 | 2015-03-02 | 2015-02-02 | 2015-01-02 | 2014-12-02 | 2014-11-02 | 2014-10-02 | 2014-09-02 | 2014-08-02 | 2014-07-02 | 2014-06-02 | 2014-05-02 | 2014-04-02 | 2014-03-02 | 2014-02-02 | 2014-01-02 | 2013-12-02 | 2013-11-02 | 2013-10-02 | 2013-09-02 | 2013-08-02 | 2013-07-02 | 2013-06-02 | 2013-05-02 | 2013-04-02 | 2013-03-02 | 2013-02-02 | 2013-01-02 | 2012-12-02 | 2012-11-02 | 2012-10-02 | 2012-09-02 | 2012-08-02 | 2012-07-02 | 2012-06-02 | 2012-05-02 | 2012-04-02 | 2012-03-02 | 2012-02-02 | 2012-01-02 | 2011-12-02 | 2011-11-02 | 2011-10-02 | 2011-09-02 | 2011-08-02 | 2011-07-02 | 2011-06-02 | 2011-05-02 | 2011-04-02 | 2011-03-02 | 2011-02-02 | 2011-01-02 | 2010-12-02 | 2010-11-02 | 2010-10-02 | 2010-09-02 | 2010-08-02 | 2010-07-02 | 2010-06-02 | 2010-05-02 | 2010-04-02 | 2010-03-02 | 2010-02-02 | 2010-01-02 | 2009-12-02 | 2009-11-02 | 2009-10-02 | 2009-09-02 | 2009-08-02 | 2009-07-02 | 2009-06-02 | 2009-05-02 | 2009-04-02 | 2009-03-02 | 2009-02-02 | 2009-01-02 | 2008-12-02 | 2008-11-02 | 2008-10-02 | 2008-09-02 | 2008-08-02 | 2008-07-02 | 2008-06-02 | 2008-05-02 | 2008-04-02 | 2008-03-02 | 2008-02-02 | 2008-01-02 | 2007-12-02 | 2007-11-02 | 2007-10-02 | 2007-09-02 | 2007-08-02 | 2007-07-02 | 2007-06-02 | 2007-05-02 | 2007-04-02 | 2007-03-02 | 2007-02-02 | 2007-01-02 | 2006-12-02 | 2006-11-02 | 2006-10-02 | 2006-09-02 | 2006-08-02 | 2006-07-02 | 2006-06-02 | 2006-05-02 | 2006-04-02 | 2006-03-02 | 2006-02-02 | 2006-01-02 | 2005-12-02 | 2005-11-02 | 2005-10-02 | 2005-09-02 | 2005-08-02 | 2005-07-02 | 2005-06-02 | 2005-05-02 | 2005-04-02 | 2005-03-02 | 2005-02-02 | 2005-01-02 | 2004-12-02 | 2004-11-02 | 2004-10-02 | 2004-09-02 | 2004-08-02 | 2004-07-02 | 2004-06-02 | 2004-05-02 | 2004-04-02 | 2004-03-02 | 2004-02-02 | 2004-01-02 | 2003-12-02 | 2003-11-02 | 2003-10-02 | 2003-09-02 | 2003-08-02 | 2003-07-02 | 2003-06-02 | 2003-05-02 | 2003-04-02 | 2003-03-02 | 2003-02-02 | 2003-01-02 | 2002-12-02 | 2002-11-02 | 2002-10-02 | 2002-09-02 | 2002-08-02 | 2002-07-02 | 2002-06-02 | 2002-05-02 | 2002-04-02 | 2002-03-02 | 2002-02-02 | 2002-01-02 | 2001-12-02 | 2001-11-02 | 2001-10-02 | 2001-09-02 | 2001-08-02 | 2001-07-02 | 2001-06-02 | 2001-05-02 | 2001-04-02 | 2001-03-02 | 2001-02-02 | 2001-01-02 | 2000-12-02 | 2000-11-02 | 2000-10-02 | 2000-09-02 | 2000-08-02 | 2000-07-02 | 2000-06-02 | 2000-05-02 | 2000-04-02 | 2000-03-02 | 2000-02-02 | 2000-01-02 | 1999-12-02

Key: Value:

Key: Value:

DATE 2014-11-17
From Mon Nov 17 08:45:38 2014
Received: by (Postfix)
id DEA84161130; Mon, 17 Nov 2014 08:45:37 -0500 (EST)
Received: by (Postfix, from userid 28)
id C25C0161157; Mon, 17 Nov 2014 08:45:37 -0500 (EST)
Received: by (Postfix, from userid 1000)
id CEFCC161143; Mon, 17 Nov 2014 08:45:36 -0500 (EST)
Date: Mon, 17 Nov 2014 08:45:36 -0500
To: Maneesh Kongara ,
Subject: [NYLXS - HANGOUT] UEFI report
Message-ID: <>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="k1lZvvs/B4yU6o8G"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
User-Agent: Mutt/1.5.21 (2010-09-15)
Precedence: bulk

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

This is what I have so far for the UEFI presentation on Tuesday. Let me
know what you think. I wouldn't mind recording this presentation.


So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 - Leadership Development in Free Software - Unpublished Archive - coins!

Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013

Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment; filename="uefi.txt"
Content-Transfer-Encoding: 8bit

IBM/PC/Intel Based computers, like all other computing systems, need to
boot when they are powered on. The computer's various parts and in and
out devices need to be defined in order to allow access to resources.
In order to facilitate booting, PC based systems have a variety of ROM
like storage systems to read the program that begins the booting process.

When a computer starts, it has no knowledge of itself. It is a blank
slate. All the information that the system needs to know about itself,
in order to process user programs and to do useful tasks, requires
an increasingly complex task of making resources available and known.
In order to do this, systems are hard wired to look for the starting
instructions at fixed locations on the system. These locations
are specific for different hardware types. For example on Intel x86
processors, memory location FFFF:0000 is always the first instruction that
the CPU is begin executing with. Other systems have different locations,
and even different addressing schemes.

Intel x86 based system include ROM based firmware called a BIOS.
The BIOS (Basic Input/Ouptput System), has exacting specifications.
Although they can vary, for a specific x86 type of architecture, they can
only vary within the confines of the specification. A BIOS relies on the
x86 architecture’s 16-bit real mode which is a long was of saying that
it works in the environment of a 16 bit CPU of the x86 type. Since all
the intel chips have been backwardly compatible to this standard, up
until now, BIOS, and CMOS software that accesses the BIOS has been at
the core of system start ups for intel based hardware for a generation.

Over time, there has been increasing demands on hardware booting.
Even early in the history of the PC, there was a need to use PCs as thin
clients and for network booting. This required that network cards, and
networking protocols to be active prior to the booting and
implementation of the operating system. There was the creation of the
BOOTP and TFTP (trivial FTP) and a slowly a whole alphabet soup of
acronyms have been introduced into the ligo of booting system.

In addition to this, more than one operating system are now installed on
system, and hard drive capacities have grown further that the 16 BIOS
addressing scheme can read. Hard Drives have had master boot records,
but over time, booting information has moved off the master boot record
and onto various partitions. Additionally, modern Free Software and
proprietary systems can run on a variety of hardware outside of the
world of the x86 architecture.

Bios and CMOS can now also be flashed, to be updated and allow for more
flexible configurations. Tablets, micro-tables(phones), and new laptop
designs with touch screen are standard input devices have become
population. All this has put pressure to redesign the booting system
for commodity hardware.

"In the end, the BIOS is still here and still does what it has been doing
for the last 25 years: making sure your operating system can boot. It
was never designed for today’s massive diversity of hardware. It’s
still stuck with 16-bit interfaces and software interrupts, interrupt
routing and maximum precision timers, limited ROM execution space (1
MB) and image size, a limited number of initializeable devices (which
is critical in the server space), proprietary extensions, and missing
modularity—just to name a few issues." 1

This has been a blessing and a curse. Efforts to remove the BIOS
functionality have always been targeted to take away the flexibility of
run anything, clean and simple interface. IBM's MicroChannel
architecture is but one an example. Intel finally took the bull by the
horns with the introduction of the Itanium’s IA64 architecture (along
with HP) in 2003. This was a PC like server architecture that needed
around some of the BIOS limitations. The created the EFI standards
(adding more acronyms to the soup), and handed off its future to the
industrial consortium called Unified Extensible Firmware Interface Forum
which is an acronym for AMD, Insyde Software, American Megatrends, Inc..
Intel, Apple Inc, Lenovo, Dell, Microsoft, Hewlett Packard,
Phoenix Technologies and IBM. There is a SINGLE non-profit engineering
or standards group represented on UEFI forum. The result is some very
useful specifications a washed in some game changing lock down mechanism
designed to do what IBM could never accomplish with microchannel.

UEFI, in fct, is nearly an operating system sitting between your
firmware and your operating system. "It not only offers driver support,
interfaces, and services, but it also has a shell that allows users to
execute applications on a command line interface." 1

The generalized process of UEFI booting is as follows:

1- UEFI Firmware: Performs CPU and Chipset initialization and loads

2- UEFI Boot Manager - Loads device drivers and the boot application

3- Loads the OS boot manager selected by the user

4- Loads the OS

5- Runs the OS Kernel

EFI (the Intel Child of UEFI) has tables and offers run level services
to the operatings. This is similar to the runtime services that
unix-like operating systems have had for decades. Boot Services include
file services, text and graphic user consoles, and the run services can
offer access to Non-volatile random-access memory (NVRAM), date and
time, etc. EFI drivers have specific communication protocols that all
components can use. The EFI device driver environment s a virtual
drive, like what Java uses, called the EBC, which provides a CPU
independent development target for UEFI module development.

Overall Boot Time line

Part 1:
Power On
Secure Boot
Pre EFI Initialization (PEI)
PIE Core
CPU Init
Chipset Init
Board Iniit
EFI Driver Dispatcher
Architecture Protocols
Driver Execution Environment
Device, Bus and Service Driver
Utilization of the EFI Driver Dispatcher

Boot Device Selection
Boot Manager

Transition System Load
OS Absent Application
UEFI Shell
Transient OS Boot Loader
Final OS Boot Loader

Run Time
OS environment

The complete specification for UEFI is now 2098 pages of text available from
the UEFI forum, and as such, is far more detailed than the limits of
this paper. It's complete current source is at .
The transformation from CMOS/BIOS is significant and deserves some
understanding and attention.

UEFI is an embrace and extend technology for the system bios. It does
not eliminate fundamental firmware, but masks some of the complexity
for developers and computer users. It also provides for a locked down
mechanism for purchased systems such that their operating systems can not
be removed or altered. It therefor provides a key objective of
operating system vendors and computer system manufactures such that
previously has been denied them by the open standards of BIOS and CMOS.

Upon powering up the system, BIOS bases systems have a very specific
agenda of items that they must perform in order to be compliant with the
specifications. With a BIOS the x86 CPU resets and loads a PC at the top
of the one megabyte real mode address space which is where the BIOS
program is resident. Then a jump instruction is set to move the PC to
an earlier location where the BIOS is run. The system can be reset from
a cold boot or a warm boot. Flags determine which process to follow.
On a cold boot, the bios runs a "post". On a warm boot it does not.

Post identifies the systems parts and the CPU, RAM, interrupt and DMA
controllers and other parts of the chipset, video display card, keyboard,
hard disk drive, optical disc drive and other basic hardware. After
posting, optional ROMs are searched for which extend functionality.
These ROMs exist in upper memory, and the BOIS scans memory from
0x0C0000 to 0x0F0000 on the 2 KiB boundary. ROMs have a memory boundary
of 0x55 0xAA followed by a byte that describes the number of 512 byte
blocks that the expansion ROM sits at in real memory. A checksum is of
the 512 byte block that is calculated and if valid, the execute jumps to
the optional ROM which now controls the system. ROMS normally return
back to the BIOS which scans for the next ROM until the entire sector of
memory is scanned.

Finished with all this, the BIOS now calls INT 19h. INT 19H is a software
interrupt that puts address 0019H onto the address bus and starts executing
code found there. 0019H is normally a jump instruction. Usually this loads
data from Head 0, Track 0 of Sector 1 of a disk. This would be the Master
Boot Record (MBR). Information received by the Post determines which disks
are attempted to locate a bootstrap loader, installing it into memory
location 0x0000:0x7C00. The bloatstrap loader reads in the partition
table and the operating system. 2

The bios is a dumb device that does not process instructions from the
boot sector. This is left to the bootstrap program. What is most
important to understand is that the entire BIOS specification is very
specific with exact definitions of interrupts, memory mappings, from
interrupt definitions, hard drive specification and a plethora of exact
locations and limitations in order to get from power of to OS running.
Much of this detail was created because the x86 specification was
designed for the purpose of emulating the specific IMB/PC XT product and
architecture. The new UEFI specification buries much of this
specification and leaves the implementation specifics to individual
firmware companies. Under the hood, one motherboard under UEFI might
use an entirely unique set of addressing schemes and interrupts then
another, as long as BOTH end up showing an interface that complies with
the UEFI specification.

"While BIOS is fundamentally a solid piece of firmware, UEFI is a
programmable software interface that sits on top a computer’s hardware
and firmware (and indeed UEFI can and does sit on top of BIOS). Rather
than all of the boot code being stored in the motherboard’s BIOS, UEFI
sits in the/EFI/ directory in some non-volatile memory; either in NAND
on the motherboard, on your hard drive, or on a network share (more on
that later)." 3

Bootloaders have been constrained to fit in 446 bits of the master boot
record and run in 32k of system memory. These are called first stage
boot loaders and the partition tables are in a default 64 byte partition
table with four primary partitions, in its most generic form.
Boatloaders most often load secondary boot loaders that are more
flexible, such and GRUB. These loaders allow for multiple operating
system installation or to load operating systems in different states.
They read partition tables and load systems accordingly.

UEFI takes a different approach. As one tech blogger wrote, "Now let’s
look at how booting works on a UEFI system. Even if you don’t grasp the
details of this post, grasp this: it is completely different. Completely
and utterly different from how BIOS booting works. You cannot apply any
of your understanding of BIOS booting to native UEFI booting. You cannot
make a little tweak to a system designed for the world of BIOS booting
and apply it to native UEFI booting. You need to understand that it is a
completely different world." 4 I think this is overstated. Eventually
every computer system has to do exactly what a BIOS based system does.
It has to reach into the architecture of a computer, identify some
subset of its working parts, and bootstrap a fully functional operating
system into its memory while running the operating systems viable
instruction set. UEFI is an attempt to hide much of this hardware
complexity and substitute it with software complexity that looks
simpler. There are inherent problems with this approach, the first
being is the scale of the introduced complexity. Let's review some of
this introduced complexity.

One of the first changes to the booting process involved the change from
the MBR standard to what is no known as GPART or GPT standard. There
was an essential problem to the original BIOS specification that was
simply outgrown over time, namely the limitation of the size of
partitions that could be read from hard drives. The Master Boot Record,
is that special sector at the very beginning of a fixed disk that
describes the partition table of the disk and contains the primary boot
loader. The MBR is limited to 32 bits and with a sector size set at 512
bytes, hard drive addressing is limited to a shade over 2 terabytes in
size. In order address partitions greater than 2 terabytes, another
scheme was needed. That scheme came the way of the GUID Patition Table,

This is the layout for a modern Master Boot Record:
ADDRESS Description Size in Bytes
Hex Dec
+000h +0 Bootstrap code area (part 1) 218
+0DAh +218 0000h Disk timestamp[4][b]
(optional, MS-DOS 7.1-8.0
(Windows 95B/98/98SE/ME),
alternatively can serve as OEM
loader signature with NEWLDR) 2
+0DCh +220 original physical drive (80h-FFh) 1
+0DDh +221 seconds (0-59) 1
+0DEh +222 minutes (0-59) 1
+0DFh +223 hours (0-23) 1
+0E0h +224 Bootstrap code area (part 2, code
entry at +000h) 216 (or 222)
+1B8h +440 32-bit disk signature
Disk signature (optional, UEFI,
Windows NT/2000/Vista/7 and other
OSes) 4
+1BCh +444 0000h
(5A5Ah if copy-protected) 2
+1BEh +446 Partition entry #1
Partition table
(for primary partitions) 16
+1CEh +462 Partition entry #2 16
+1DEh +478 Partition entry #3 16
+1EEh +494 Partition entry #4 16
+1FEh +510 55h Boot signature[a] 2
+1FFh +511 AAh
Total size: 218 + 6 + 216 + 6 + 4×16 + 2 512 (from WIKIPEDIA)

GUID Partition Tables, which are now a key component of the UEFI
specification, feature divisions of memory through the modern LBA
placement and memory scheme. Previously, hard drive locations were
identified by the (Cylinder, Head, Sector) tuples, which identified a
location through the raw location of the hard drive. As drives changes
and new media emerged, CHS was replaced by LBA (Logical Block
Addressing).5 The protective MBR would be in LBA0. The GPT header is
in LBA1 which has a pointer to the Partition Table or a Partition Entry
Array. 6 The Partition Array, by UEFI standards must have a minimum
16,384 bytes which allows for addressing space to 18 Exabyte with up to
128 partitions.

The UEFI standard includes a native executable tongue called the EFI Byte
Code (EBC if you are keeping track). This is a 'virtual' machine in which
the firmware can be written to and for which implementation will happen
on any hardware architecture, regardless of the CPU. In C programming,
it requires the use of efi and efilib headers and a complex linkage to
cross compile to the efi binary code. A GNU-EFI package exists and
a sample program for a native EFI firmware binary is demonstrated by
Roderick W. Smith at
His sample program includes as follows:


efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
InitializeLib(ImageHandle, SystemTable);
Print(L"Hello, world!\n");


Notice how main is replaces with efi_main

The compilation would require a cross platform compile to EFI native
binary and a complex makefile is provided by Mr Smith as follow:
ARCH = $(shell uname -m | sed s,i[3456789]86,ia32,)

OBJS = main.o
TARGET = hello.efi

EFIINC = /usr/include/efi
LIB = /usr/lib64
EFILIB = /usr/lib64/gnuefi
EFI_CRT_OBJS = $(EFILIB)/crt0-efi-$(ARCH).o

CFLAGS = $(EFIINCS) -fno-stack-protector -fpic \
-fshort-wchar -mno-red-zone -Wall
ifeq ($(ARCH),x86_64)

LDFLAGS = -nostdlib -znocombreloc -T $(EFI_LDS) -shared \
-Bsymbolic -L $(EFILIB) -L $(LIB) $(EFI_CRT_OBJS)

all: $(TARGET) $(OBJS)
ld $(LDFLAGS) $(OBJS) -o $-at- -lefi -lgnuefi

objcopy -j .text -j .sdata -j .data -j .dynamic \
-j .dynsym -j .rel -j .rela -j .reloc \
--target=efi-app-$(ARCH) $^ $-at-

Note that Makefiles are tab sensitive so you will need to assure the
format of this file accordingly.7

The UEFI standard includes the possible use of a shell. With the use of
this shell, you can run arbitrary code. This is the Preboot environment
of UEFI. In fact, Smith makes clear that this preboot environment can
be useful for application development in several areas, reinforcing the
idea that UEFI is very much operating system like in it's specification.

Wolfgang-Rosenbergsr, from Intel, has extensively documented a UEFI
Shell and the EFI OpenShell available from
Among the items that the UEFI shell allows for is the execution of preboot
programs, setup, operating system installation, testing of hardware and
software, disk utilities, driver diagnostics, configuration
modifications, moving files around and between the hard disk, floppy disk,
CD-ROM, USB flash devices, and so on, to load a preboot EFI driver in the
system (has an .efi suffix) such as network stacks, tcpip drivers,
to, update old drivers in flash memory, load new drivers for plugin
cards, and more.8 This shell has two versions, Shell.efi and
Shell_full.efi. Shell.efi fits on most current flash memories.

efi binary files start with the symbol efi_main that has two parameters,
EFI_HANDLE ImageHandle and EFI_SYSTEM_TABLE *SystemTable. The
system table is a C-style structure with the following entries:

typedef struct _EFI_SYSTEM_TABLE {

CHAR16 *FirmwareVendor;
UINT32 FirmwareRevision;

EFI_HANDLE ConsoleInHandle;

EFI_HANDLE ConsoleOutHandle;

EFI_HANDLE StandardErrorHandle;


UINTN NumberOfTableEntries;


These listed handles, likewise have application interfaces that directly
tie to firmware defined modules. For example, one can call
ConOut->OutputString() to print to the console. Firmware is required to
make available a set of binary compatible libraries for extensive
program building. EFI_RUNTIME_SERVICES accesses a firmware services
which are available in the preboot environment and when the Operating
System takes control of the system. These services include system clock
functions, NVRAM variables, and system reset operations. This is unlike
EFI_BOOT_SERVIES which are only available during the preboot phase. 7

In order to accommodate all this complex preboot operating system, UEFI
specifies that boot medium must have an EFI partition which contains
binaries, and bootloader. This is something that must astute
observers have seen on flash drives for a number of years. In order to
allow them to function at bootable devices, they have EFI partitions on
their front. These small partitions must be either FAT12, FAT16 or
FAT32. All UEFI compliant systems must be able to read all of these FAT

"The file system supported by the Extensible Firmware Interface is based
on the FAT file system. EFI defines a specific version of FAT that is
explicitly documented and testable. Conformance to the EFI specification
and its associate reference documents is the only definition of FAT that
needs to be implemented to support EFI. To differentiate the EFI file
system from pure FAT, a new partition file system type has been
defined." 4

As such a EFI partition is a partition defined as such type in a gpart
record and which has a valid EFI approved version of the FAT file system
installed within it.

UEFI specifies a UEFI Boot Manager. Since the purpose of all this is
to boot an operating system, something the BIOS Specification seems to
do so matter of factly, UEFI includes a boot manager with specifications
WITHIN its environment, rather than leaving it to the operating system.
Just as BIOS reads extensions that it expects to find at predefined
locations, the UEFI Boot Manager is defined as follows:

“The UEFI boot manager is a firmware
policy engine that can be configured by
modifying architecturally defined global NVRAM
variables. The boot manager will attempt to load
UEFI drivers and UEFI applications (including
UEFI OS boot loaders) in an order defined by
the global NVRAM variables.” 4

For those used to looking at the CMOS over the years, this is largely
the "rubber hits the road" change to the booting process with UEFI. The
configuration system is entirely different and it is not alway clear
what you are looking at when your not experienced with UEFI when trying
to install an operating system. UEFI can be configured. You can alter
your boot menu when you start your system and activate the boot manager.
You can add drives, and twist up firmware configurations, even over
clock the CPU. Because of the size of the EFI Partition, this
application can be a graphic user interface, or a cursors like
configuration menu. Linux comes with a tool to help work with your boot
manager called efibootmgr.9 It produces output such as this, when run
from user space:

[root-at-system directory]# efibootmgr -v
BootCurrent: 0002
Timeout: 3 seconds
BootOrder: 0003,0002,0000,0004
Boot0000* CD/DVD Drive BIOS(3,0,00)
Boot0001* Hard Drive HD(2,0,00)
Boot0002* Fedora HD(1,800,61800,6d98f360-cb3e-4727-8fed-5ce0c040365d)File(\EFI\fedora\grubx64.efi)
Boot0003* opensuse HD(1,800,61800,6d98f360-cb3e-4727-8fed-5ce0c040365d)File(\EFI\opensuse\grubx64.efi)
Boot0004* Hard Drive BIOS(2,0,00)P0: ST1500DM003-9YN16G .
[root-at-system directory]#

Here you can see the option: BootOrder which is to load first opensuse
(with its load path within the EFI partition specified), and then Fedora
and then the CD/DVD, and finally Hard Drive under BIOS(2,0,00)

Notice the EFI Paths described in the output of efibootmanager. They
can point at any device object that the firmware presents. This is not
just Hard Drives, but network devices, USB ports or devices not yet
invented. These paths are defined in the specification under
EFI_DEVICE_PATH_PROTOCOL. These protocols are very difficult to learn
and understand. They are defined in language programing, initially by
Intel and later by other vendors. An example is given by Intel in slide
13 and 14 in their presentation on UEFI located at and where
it states:

Device Path Protocol - Example

#define EFI_DEVICE_

{0x09576e91,0x6d3f,0x11d2,0x8e,0x39,0x00,0xa0,0xc9,0x69,0x72, 0x3b}

Protocol Interface Structure

typedef struct _EFI_DEVICE_PATH_PROTOCOL {
UINT8 Type;
UINT8 SubType;
UINT8 Length[2];

• The device path describes the location of the device
the handle is for
• A UEFI driver may access only a physical device for
which it provides functionality.

The slides go on to give an example of a SCSI Bus interface and a
discussion of the language implementation.

Phoenix company defines the fully paths for devices as follows. In this
exampe the path names are spelled out for the subset of devices that
Phoneix at least is supporting with this long and verbose specification for
device paths and structure within their firmware (10). I quote the exact
specification in order to underscore how complex path naming is which
underlines that UEFI does not, as it claims, remove complexity from the
booting process. It does organize the complexity to make it more
managable in some instances.



*Protocol Interface Structure

#include EFI_PROTOCOL_CONSUMER(DevicePath) // for protocol
#include "Efi\EfiDevicePath.h" // for #define & structures

extern EFI_GUID gEfiDevicePathProtocolGuid;

typedef struct _EFI_DEVICE_PATH_PROTOCOL {
UINT8 Type;
UINT8 SubType;
UINT8 Length[2];

Member Description
Type The type of device path node.

#define ACPI_DEVICE_PATH 0x02
#define MEDIA_DEVICE_PATH 0x04
#define BBS_DEVICE_PATH 0x05

SubType The sub-type of the device path now. The meaning depends on Type. For HARDWARE_DEVICE_PATH:

#define HW_PCI_DP 0x01
#define HW_PCCARD_DP 0x02
#define HW_MEMMAP_DP 0x03
#define HW_VENDOR_DP 0x04
#define HW_CONTROLLER_DP 0x05


#define ACPI_DP 0x01
#define ACPI_EXTENDED_DP 0x02
#define ACPI_ADR_DP 0x03


#define MSG_ATAPI_DP 0x01
#define MSG_SCSI_DP 0x02
#define MSG_1394_DP 0x04
#define MSG_USB_DP 0x05
#define MSG_I2O_DP 0x06
#define MSG_INFINIBAND_DP 0x09
#define MSG_VENDOR_DP 0x0a
#define MSG_MAC_ADDR_DP 0x0b
#define MSG_IPv4_DP 0x0c
#define MSG_IPv6_DP 0x0d
#define MSG_UART_DP 0x0e
#define MSG_USB_CLASS_DP 0x0f
#define MSG_USB_WWID_DP 0x10
#define MSG_SATA_DP 0x12
#define MSG_ISCSI_DP 0x13


#define MEDIA_CDROM_DP 0x02
#define MEDIA_VENDOR_DP 0x03
#define MEDIA_FILEPATH_DP 0x04
#define MEDIA_PROTOCOL_DP 0x05


#define BBS_BBS_DP 0x01



Length The entire length of this device path node, including this header, in bytes.

The executing IEFI Image may use the device path to match its own device
drivers to the particular device. Note that the executing UEFI OS loader
and UEFI application images must access all physical devices via Boot
Services device handles until ExitBootServices() is successfully called.

A UEFI driver may access only a physical device for which it provides functionality.

Type SubType Structure





In section 8.3 of the original Intel Specification, EFI Specification
version 1.10, dated December 1, 2002, six paths are defined as follows:

Device Path Nodes
There are six major types of Device Path nodes:

1) Hardware Device Path. This Device Path defines how a device is attached
to the resource domain of a system, where resource domain is simply the
shared memory, memory mapped I/O, and I/O space of the system.

2) ACPI Device Path. This Device Path is used to describe devices whose
enumeration is not described in an industry-standard fashion. These
devices must be described using ACPI AML in the ACPI name space; this
Device Path is a linkage to the ACPI name space.

3) Messaging Device Path. This Device Path is used to describe the
connection of devices outside the resource domain of the system. This
Device Path can describe physical messaging information (e.g., a SCSI ID)
or abstract information (e.g., networking protocol IP addresses).

4) Media Device Path. This Device Path is used to describe the portion of
a medium that is being abstracted by a boot service. For example, a Media
Device Path could define which partition on a hard drive was being used.

5) BIOS Boot Specification Device Path. This Device Path is used to
point to boot legacy operating systems; it is based on the BIOS Boot
Specification Version 1.01. Refer to the References appendix for details
on obtaining this specification.

6) End of Hardware Device Path. Depending on the Sub-Type, this Device
Path node is used to indicate the end of the Device Path instance or
Device Path structure.11

You can see this specification reflected in the Phoenix development
protocols. Overall, there is a very verbose and user unfreindly naming
convention for identifying bootable objects within the UEFI bootloader,
all of which can be quite frightful when a user is confronted with
deleting a driver that the firmware initially places on the boot menu.
Firmware writers need to be careful to include a return to default
configuration in order to save the end user from themselves.

Returning back to the output of our sample efibootmgr output, and after
reviewing some of the specifications of EFI_DEVIDE_PATH_PROTOCOL, we can
now disect some of this output with better edification:

[root-at-system directory]# efibootmgr -v
BootCurrent: 0002
Timeout: 3 seconds
BootOrder: 0003,0002,0000,0004
Boot0000* CD/DVD Drive BIOS(3,0,00)
Boot0001* Hard Drive HD(2,0,00)
Boot0002* Fedora
Boot0003* opensuse
Boot0004* Hard Drive BIOS(2,0,00)P0: ST1500DM003-9YN16G .

Boot0000, and Boot0004 are evidently legacy bios boot entries. Boot0002
and Boot0003 are native UEFI entries which point to different secondary boot
loaders, both being on the same hard drive device and both executables
residing in the EFI active partition, one for fedora and one for
opensuse. Boot0001 is a UEFI default boot if all else fails. This is
similar to a bios boot but the UEFI boot loader looks on the specified
hard drive for a efi binary based on the system architecture, such as
\EFI\BOOT\BOOTx64.EFI (for a x86 64 bit arch).

Sebastian Anthony on September 22, 2011

5. Logical block addressing (LBA) is a common scheme used for specifying
the location of blocks of data stored on computer storage devices,
generally secondary storage systems such as hard disks.

LBA is a particularly simple linear addressing scheme; blocks are located
by an integer index, with the first block being LBA 0, the second LBA 1,
and so on

11. EFI Specification 1.10 - December 1, 2002:


  1. 2014-11-01 Elfen Magix <> Subject: [NYLXS - HANGOUT] Linux & Raspberry PI Teaching Projects?
  2. 2014-11-01 Ruben Safir <> Re: [NYLXS - HANGOUT] Linux & Raspberry PI Teaching Projects?
  3. 2014-11-01 Ruben Safir <> Re: [NYLXS - HANGOUT] Linux & Raspberry PI Teaching Projects?
  4. 2014-11-02 Ruben Safir <> Subject: [NYLXS - HANGOUT] Tookster parrot is gone
  5. 2014-11-02 Ruben Safir <> Subject: [NYLXS - HANGOUT] PNG Lib problems
  6. 2014-11-02 Ruben Safir <> Subject: [NYLXS - HANGOUT] [ Re: Architecture Homework - Review Questions]
  7. 2014-11-02 Ruben Safir <> Subject: [NYLXS - HANGOUT] 2to4 decoder
  8. 2014-11-03 Ruben Safir <> Subject: [NYLXS - HANGOUT] Digital Electronics tutorial
  9. 2014-11-03 Ruben Safir <> Re: [NYLXS - HANGOUT] Digital Electronics tutorial
  10. 2014-11-03 Ruben Safir <> Fwd: Re: [NYLXS - HANGOUT] [ Re: Architecture
  11. 2014-11-03 Ruben Safir <> Subject: [NYLXS - HANGOUT] Fwd: HW Assignment #3
  12. 2014-11-05 Elfen Magix <> Re: [NYLXS - HANGOUT] Linux & Raspberry PI Teaching Projects?
  13. 2014-11-05 Ruben Safir <> Re: [NYLXS - HANGOUT] Linux & Raspberry PI Teaching Projects?
  14. 2014-11-06 Subject: [NYLXS - HANGOUT] [ nixCraft Linux / UNIX Newsletter]
  15. 2014-11-06 Ruben Safir <> Subject: [NYLXS - HANGOUT] Fwd: Archetchure class - memory cache math et al
  16. 2014-11-08 Ruben Safir <> Subject: [NYLXS - HANGOUT] httpd won't go away
  17. 2014-11-08 Ruben Safir <> Subject: [NYLXS - HANGOUT] Fwd: Re: [opensuse] PNG Lib problems
  18. 2014-11-08 Ruben Safir <> Fwd: [NYLXS - HANGOUT] httpd won't go away
  19. 2014-11-09 Ruben Safir <> Subject: [NYLXS - HANGOUT] Fwd: Re: [opensuse] httpd won't go away
  20. 2014-11-09 Ruben Safir <> Subject: [NYLXS - HANGOUT] Re: [opensuse] httpd won't go away
  21. 2014-11-09 Ruben Safir <> Subject: [NYLXS - HANGOUT] Postgres Lecture
  22. 2014-11-09 Ruben Safir <> Subject: [NYLXS - HANGOUT] Lectures at LIU with IEEE and The Computer Science Club
  23. 2014-11-09 Ruben Safir <> Subject: [NYLXS - HANGOUT] [ LIU Brooklyn Computer Science Program and
  24. 2014-11-09 Ruben Safir <> Subject: [NYLXS - HANGOUT] [ Re: Talk at LIU Brooklyn]
  25. 2014-11-09 Ruben Safir <> Subject: [NYLXS - HANGOUT] [ Re: Talk at LIU Brooklyn]
  26. 2014-11-10 Ruben Safir <> Subject: [NYLXS - HANGOUT] [ [ Invitation: NYLUG Open hacker
  27. 2014-11-10 Ruben Safir <> Subject: [NYLXS - HANGOUT] [ [ Thursday: Join us at
  28. 2014-11-10 Subject: [NYLXS - HANGOUT] [Perlweekly] #172 - And the Silver Camel Goes To...
  29. 2014-11-11 Ruben Safir <> Subject: [NYLXS - HANGOUT] Fwd: FYI: The Institute Online: 3-D Printing Opens Products to Counterfeiting
  30. 2014-11-11 Ruben Safir <> Subject: [NYLXS - HANGOUT] [ Guido]
  31. 2014-11-11 Subject: [NYLXS - HANGOUT] [ LIU CS Club: iPhone Development
  32. 2014-11-12 Subject: [NYLXS - HANGOUT] DB Architeture Lecture tomorrow - C++ db design
  33. 2014-11-12 Ruben Safir <> Subject: [NYLXS - HANGOUT] firefox crashing
  34. 2014-11-12 Re: [NYLXS - HANGOUT] firefox crashing
  35. 2014-11-12 Re: [NYLXS - HANGOUT] firefox crashing
  36. 2014-11-13 Ruben Safir <> Re: [NYLXS - HANGOUT] firefox crashing
  37. 2014-11-13 Ruben Safir <> Re: [NYLXS - HANGOUT] firefox crashing
  38. 2014-11-14 Ruben Safir <> Subject: [NYLXS - HANGOUT] how is this research...UEFI
  39. 2014-11-16 Ruben Safir <> Subject: [NYLXS - HANGOUT] Postgres Lecture tomorrow
  40. 2014-11-16 Ruben Safir <> Subject: [NYLXS - HANGOUT] LIU CS Club: iPhone Development Workshop THIS THURSDAY
  41. 2014-11-17 Subject: [NYLXS - HANGOUT] [ [isoc-ny] Internet Society Statement on
  42. 2014-11-17 Subject: [NYLXS - HANGOUT] UEFI report
  43. 2014-11-18 Ruben Safir <> Subject: [NYLXS - HANGOUT] UEFI and Secure Boot
  44. 2014-11-19 Ruben Safir <> Subject: [NYLXS - HANGOUT] oh Joy!
  45. 2014-11-21 Ruben Safir <> Subject: [NYLXS - HANGOUT] New Private Browsing?
  46. 2014-11-23 Ruben Safir <> Subject: [NYLXS - HANGOUT] [ Re: Perl + DBD-Oracle, problems with encoding
  47. 2014-11-23 Ruben Safir <> Subject: [NYLXS - HANGOUT] [ [ Re: MySQL dying?]]
  48. 2014-11-23 Ruben Safir <> Subject: [NYLXS - HANGOUT] [ Re: Perl + DBD-Oracle, problems with encoding
  49. 2014-11-26 Ruben Safir <> Subject: [NYLXS - HANGOUT] [ [LIU Comp Sci] Why Normalization Failed to
  50. 2014-11-26 Ruben Safir <> Subject: [NYLXS - HANGOUT] [ [LIU Comp Sci] Why Data Models Shouldn't Drive
  51. 2014-11-26 Ruben Safir <> Subject: [NYLXS - HANGOUT] [ [LIU Comp Sci] Problems with Normalization]
  52. 2014-11-27 einker <> Subject: [NYLXS - HANGOUT] Happy Thanksgiving All!
  53. 2014-11-27 einker <> Subject: [NYLXS - HANGOUT] Happy Thanksgiving All!
  54. 2014-11-27 Ruben Safir <> Re: [NYLXS - HANGOUT] Happy Thanksgiving All!
  55. 2014-11-27 Ruben Safir <> Re: [NYLXS - HANGOUT] Happy Thanksgiving All!
  56. 2014-11-27 Re: [NYLXS - HANGOUT] Happy Thanksgiving All!
  57. 2014-11-27 Re: [NYLXS - HANGOUT] Happy Thanksgiving All!
  58. 2014-11-28 Ruben Safir <> Re: [NYLXS - HANGOUT] Happy Thanksgiving All!
  59. 2014-11-28 einker <> Re: [NYLXS - HANGOUT] Happy Thanksgiving All!
  60. 2014-11-29 Ruben Safir <> Subject: [NYLXS - HANGOUT] Fwd: [LIU Comp Sci] Memory Cache theory Architecture Class
  61. 2014-11-29 Ruben Safir <> Subject: [NYLXS - HANGOUT] Introduction and Basics - Carnegie Mellon
  62. 2014-11-30 Subject: [NYLXS - HANGOUT] Invitation: What I learned as a programmer from founding a startup
  63. 2014-11-30 Ruben Safir <> Subject: [NYLXS - HANGOUT] purging systemd

NYLXS are Do'ers and the first step of Doing is Joining! Join NYLXS and make a difference in your community today!