Intel® System Debugger User Guide

ID 648476
Date 06/13/2024
Confidential
Document Table of Contents

Loading Pre-EFI Initialization Modules (PEIMs)

To load modules for Pre-EFI Initialization phase, follow the steps below:

  1. Halt the target and ensure that it has stopped in the flash memory region 0xff600000 - 0x100000000.

  2. Select a desired hardware thread in the Debug view.

  3. Expand the drop-down menu of the load_this Load the Current Module button and select Load Pre-EFI Initializations Modules (PEIMs).

    The selected context defines the address range that will be searched for debug information:

    • If you select a thread_instance_suspended hardware thread, the memory scan will start from the program counter of the thread.

      The value is equal to the program counter of the first stack frame of the thread.

    • If you select a stack_frame_instance stack frame, the start point will be its program counter (displayed in the view).

  4. When the search and loading is completed, check the Modules view for the list of successfully loaded modules.

    If the view is empty, no modules have been found or successfully loaded.

  5. Launch the ISD Shell and check the error messages to determine possible issues.

    If a module has been added successfully, the shell returns a corresponding message.

Error Messages

Error Message

Failure Cause

Solution

Not in Flash Memory

The target has been halted too late in the UEFI boot sequence to seach for PEI modules.

Resume the target and halt it early enough to intercept the flash memory region.

Could not load symbols (no symbol path information)

The BIOS does not contain debug information.

Compile the modules with debug information.

<path_​to_​efi_​file> does not exist

The .efi file does not exist or cannot be found by the debugger.

Create path mapping rules as described here.

NOTE: A PEI module may be in compressed state in flash memory, and is only later decompressed and loaded into the DRAM. In this particular scenario, the module will not be discovered either by loading BIOS ROM file or Load Pre-EFI Initialization Modules. Hence, to load symbols for a compressed module, the user must manually track when the module is decompressed and loaded in to the DRAM. As in the case of BIOS, the user can use break on PeiDisptacher function in ../Pei/Dispatcher/Dispatcher.c and track when the module is loaded in DRAM. Then can use the address and load the symbol file manually.