Translate

Image of RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302) (Certification Press)
Image of XSLT 2.0 and XPath 2.0 Programmer's Reference (Programmer to Programmer)
Image of Advanced Programming in the UNIX Environment, Second Edition (Addison-Wesley Professional Computing Series)
Image of Android Wireless Application Development

Using the EFI_SHELL_PROTOCOL To Read a File

In this post, I provide the source code for a working UEFI shell application which displays the contents of an ASCII file using functionality provided by the EFI_SHELL_PROTOCOL protocol. The current version of the EFI_SHELL_PROTOCOL is 2.1 and here are the exposed protocol interfaces: typedef struct _EFI_SHELL_PROTOCOL { EFI_SHELL_EXECUTE Execute; EFI_SHELL_GET_ENV GetEnv; EFI_SHELL_SET_ENV SetEnv; EFI_SHELL_GET_ALIAS GetAlias; EFI_SHELL_SET_ALIAS SetAlias; EFI_SHELL_GET_HELP_TEXT GetHelpText; EFI_SHELL_GET_DEVICE_PATH_FROM_MAP GetDevicePathFromMap; EFI_SHELL_GET_MAP_FROM_DEVICE_PATH GetMapFromDevicePath; EFI_SHELL_GET_DEVICE_PATH_FROM_FILE_PATH GetDevicePathFromFilePath; EFI_SHELL_GET_FILE_PATH_FROM_DEVICE_PATH GetFilePathFromDevicePath; EFI_SHELL_SET_MAP SetMap; EFI_SHELL_GET_CUR_DIR GetCurDir; EFI_SHELL_SET_CUR_DIR SetCurDir; EFI_SHELL_OPEN_FILE_LIST OpenFileList; EFI_SHELL_FREE_FILE_LIST FreeFileList; EFI_SHELL_REMOVE_DUP_IN_FILE_LIST RemoveDupInFileList; EFI_SHELL_BATCH_IS_ACTIVE BatchIsActive; EFI_SHELL_IS_ROOT_SHELL IsRootShell; EFI_SHELL_ENABLE_PAGE_BREAK EnablePageBreak; EFI_SHELL_DISABLE_PAGE_BREAK DisablePageBreak; EFI_SHELL_GET_PAGE_BREAK GetPageBreak; EFI_SHELL_GET_DEVICE_NAME GetDeviceName; EFI_SHELL_GET_FILE_INFO GetFileInfo; EFI_SHELL_SET_FILE_INFO SetFileInfo; EFI_SHELL_OPEN_FILE_BY_NAME OpenFileByName; EFI_SHELL_CLOSE_FILE CloseFile;

Examine ESRT entries from UEFI Shell

This post details a simple UEFI shell utility for listing the contents of an EFI System Resource Table (ESRT). Essentially ESRT a catalog of firmware which can be updated with the UEFI UpdateCapsule mechanism described in section 7.5 of the UEFI Specification. The ESRT provides a mechanism for identifying integrated device and system firmware resources for the purposes of targeting firmware updates to those resources. Each entry in the ESRT describes a device or system firmware resource that can be targeted by a firmware update package. UEFI firmware must allocate and populate an ESRT system resource entry for itself (system

Revisit - Retrieve Microsoft Windows Product Key From UEFI Shell

In a February 2015 post, I published the source code for a simple UEFI shell utility which could retrieve a Microsoft Windows product license key from a system running Windows 8 or later. The code was based on the GNU EFI development and runtime libraries. There are a number of freely available EFI development environments. GNU EFI is probably the simplest of these and is what I recommend for beginners. It’s easy to install in a Linux environment such as Fedora 23 as both runtime and development RPMs are available from the Fedora repos. The most sophisticated EFI development environment

Shell Script to List ACPI tables

ACPI (Advanced Configuration and Power Interface) defines platform-independent interfaces for hardware discovery, configuration, power management and monitoring, and these tables contain lots of useful information for low-level programmers such as myself. Here is a short shell script which I clobbered together a few days ago to list out the ACPI tables on a system together with a short description of each table where possible. #!/bin/bash # # Author: Finnbarr P. Murphy # Date: January 2015 # Purpose: List ACPI tables # License: BSD # TMP1=$(mktemp -u -p /var/tmp/ acpiXXXXXX) TMP2=$(mktemp -u -p /var/tmp/ acpiXXXXXX) TMP3=$(mktemp -u -p /var/tmp/ acpiXXXXXX) cat

List ACPI Tables From UEFI Shell

As part of my UEFI Rescue DVD project, I decided that I wanted a small utility to list out the firmware Advanced Configuration and Power Interface (ACPI) tables. ACPI defines platform-independent interfaces for hardware discovery, configuration, power management and monitoring, and these tables contain lots of useful information for low-level programmers such as myself. Here is the source code for the first version of my listacpi utility: // // Copyright (c) 2015 Finnbarr P. Murphy. All rights reserved. // // Display list of ACPI tables // // License: BSD License // #include <efi.h> #include <efilib.h> typedef struct { CHAR8 Signature[8];