American Megatrends, Inc.

StatusCode

Copyright

Release Notes

© American Megatrends, Inc.


Copyright

American Megatrends, Inc.
5555 Oakbrook Parkway
Suite 200
Norcross, GA 30093 (USA)

Copyright (c) 1999-2012 American Megatrends, Inc. All Rights Reserved.

This publication contains proprietary information, which is protected by copyright. No part of this publication may be reproduced, transcribed, stored in a retrieval system, translated into any language or computer language, or transmitted in any form whatsoever without the prior written consent of the publisher, American Megatrends, Inc.

American Megatrends, Inc. retains the right to update, change, modify this publication at any time, without notice.

For Additional Information

Call American Megatrends BIOS Sales Department at 1-800-828-9264 for additional information.

Limitations of Liability

In no event shall American Megatrends be held liable for any loss, expenses, or damages of any kind whatsoever, whether direct, indirect, incidental, or consequential, arising from the design or use of this product or the support materials provided with the product.

Limited Warranty

No warranties are made, either expressed or implied, with regard to the contents of this work, its merchantability, or fitness for a particular use. American Megatrends assumes no responsibility for errors and omissions or for the uses made of the material contained herein or reader decisions based on such use.

Trademark and Copyright Acknowledgments

All product names used in this publication are for identification purposes only and are trademarks of their respective Companies.


Release Notes - NDA Required

Component Information:
Component Title: StatusCode
Component Reference Name: StatusCode
Component Type: eModule
Release Date: 2013-02-22
Source Control Label: 4.6.3_StatusCode_19
Source Control Location: $/Alaska/BIN/Modules/StatusCode

Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:
N0NE
Component Description:

Status codes enable system components to report information about their current state. Status code is one of the three types of codes: progress code, error code, or debug code.
Debug code is data produced by various software entities that contains information specifically intended to assist in debugging.
Error code is data produced by various software entities that indicates an abnormal condition.
Progress code is data produced by various software entities that indicates forward progress.
Software components use a standardized interface published by the status code component to report status codes.
The responsibility of the status code component is to publish status code interface that routes status code data to multiple consumers. The code consuming the status code data can send it either directly to the piece of hardware (status code device) or to another software interface (status code interface) for logging or further processing.
The status code component can route status code data to multiple status code devices or software interfaces.
The examples of status code devices are: checkpoint card, serial port, video card.
The examples of status code interfaces are: in-memory event log, IPMI software stack
The status code component natively supports some of the status code devices and interfaces. Support for additional status code devices can be added using status code extensibility interface.
Filename | Description
StatusCode.cif | Cif file for StatusCode module
StatusCode.sdl | File containing the SDL tokens used by StatusCode module
StatusCode.mak | Make file for StatusCode module
StatusCodePei.c | File contains PEI specific status code routines such as entry point of the StatusCode PEIM (PeiInitStatusCode) and PEI implementation of some of the functions from the status code library.
StatusCodeDxe.c | File contains DXE specific status code routines such as Entry point of the StatusCode DXE driver and DXE implementation of some of the functions from the status code library.
StatusCodeCommon.c | File containing StatusCode services available in DXE, PEI and RUNTIME
SerialStatusCode.c | File containing StatusCode services using serial port
StatusCodeInt.h | File containing defenitions using by StatusCode module
StatusCodeMap.c | This file contains several tables that map generic namespace of status code values into domain specific namespaces.
StatusCodeRuntime.c | File contains RUNTIME specific status code routines such as Entry point of the StatusCode Runtime driver and Runtime implementation of some of the functions from the status code library.
StatusCode.chm | Chm help file for StatusCode Component (this file).
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_38, Dated: 2011-12-20
Visual eBios: RSS.5.72.0219, Dated: 2011-12-20
Compiler Tool(s): WinDDK 7600.16385.1
New features added in this label:
None.
General Bug Fixes:
EIP 90338 - ChiefRiver SCT Fail on item Generic Test\EFI Compliant Test EFI_GLOBAL_VARIABLE guid is used in non EFI defined variable. New guig AMI_GLOBAL_VARIABLE_GUID is created and used. Extern declaradion of gAmiGlobalVariableGuid moved to AmiLib.h.
EIP 106198 - Memory leak in DataHubStatusCode function of StatusCodeDxe.c. Memory allocated for the Record was newer released. FreePool operation added.
EIP 112774 - CPU Exception occurs when TRACE is used in SMM Handler because pBS, used in Delay function, do not exist during runtime. Delay replaced with dummy "for" cycle in SerialOutput function.
EIP 72806 - Runtime status code hangs because actual status code functions addresses was not converted on Virtual Address Change event. Fixed.
EIP addressed in this label:
EIP 97932 - StatusCode Router RT init fix
EIP 109426 - Issues found by CppCheck in StatusCode eModule resolved.
Files changed for EIP fixes:
StatusCodeCommon.c (EIP 112774)
StatusCodeDxe.c (EIP 106198)
SeriaStatusCode.c and StatusCode.sdl (EIP )
StatusCodeDxe.c and StatusCodeRuntime.c (EIP 90338, EIP 90338)
StatusCodeRuntime.c and StatusCode.sdl (EIP 72806)
StatusCodeRuntime.c (EIP 97932, EIP 109426)
Known issues and limitations in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
StatusCode part was tested by building any project in debug mode and observing StatusCode output on Serial port terminal, Port80 card, and/or other StatusCode devices.
Router part was tested by locating each protocol and registering functions that post something to port 80 and hangs on EFI_DEADLOOP. Behavior after registering/unregistering as expected. In DXE when rising TPL higher than Tpl of registered function - functions executed after tpl was restored.
Validation Testing:
NONE
Release History:
Label 18
Label 17

© American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: StatusCode
Component Reference Name: StatusCode
Component Type: eModule
Release Date: 2010-11-19
Source Control Label: 4.6.3_StatusCode_17
Source Control Location: $/Alaska/BIN/Modules/StatusCode

Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:
N0NE
Component Description:

Status codes enable system components to report information about their current state. Status code is one of the three types of codes: progress code, error code, or debug code.
Debug code is data produced by various software entities that contains information specifically intended to assist in debugging.
Error code is data produced by various software entities that indicates an abnormal condition.
Progress code is data produced by various software entities that indicates forward progress.
Software components use a standardized interface published by the status code component to report status codes.
The responsibility of the status code component is to publish status code interface that routes status code data to multiple consumers. The code consuming the status code data can send it either directly to the piece of hardware (status code device) or to another software interface (status code interface) for logging or further processing.
The status code component can route status code data to multiple status code devices or software interfaces.
The examples of status code devices are: checkpoint card, serial port, video card.
The examples of status code interfaces are: in-memory event log, IPMI software stack
The status code component natively supports some of the status code devices and interfaces. Support for additional status code devices can be added using status code extensibility interface.
Filename | Description
StatusCode.cif | Cif file for StatusCode module
StatusCode.sdl | File containing the SDL tokens used by StatusCode module
StatusCode.mak | Make file for StatusCode module
StatusCodePei.c | File contains PEI specific status code routines such as entry point of the StatusCode PEIM (PeiInitStatusCode) and PEI implementation of some of the functions from the status code library.
StatusCodeDxe.c | File contains DXE specific status code routines such as Entry point of the StatusCode DXE driver and DXE implementation of some of the functions from the status code library.
StatusCodeCommon.c | File containing StatusCode services available in DXE, PEI and RUNTIME
SerialStatusCode.c | File containing StatusCode services using serial port
StatusCodeInt.h | File containing defenitions using by StatusCode module
StatusCodeMap.c | This file contains several tables that map generic namespace of status code values into domain specific namespaces.
StatusCodeDxe.c | File contains RUNTIME specific status code routines such as Entry point of the StatusCode Runtime driver and Runtime implementation of some of the functions from the status code library.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_34, Dated: 2010-10-06
Visual eBios: RSS.5.70.0171, Dated: 2010-10-04
Compiler Tool(s): WinDDK 7600.16385.1
New features added in this label:
NONE
General Bug Fixes:
EFI OS setup hangs if project has StatusCode listeners in EnableACPIMode (EIP 46589). StatuseCode memory allocation changed to allocate always Runtime memory. All non-RUNTIME listeners removed from runtime instance of StatuseCode.
EIP addressed in this label:
EIP 46589 - When updated from 4.6.3_StatusCode_15 to 4.6.3_StatusCode_16 EFI OS installation hangs during ACPI enable.
Files changed for EIP fixes:
$/Alaska/BIN/Modules/StatusCode/StatusCodeDxe.c (EIP 46589)
$/Alaska/BIN/Modules/StatusCode/StatusCodeRuntime.c (EIP 46589)
$/Alaska/BIN/Modules/StatusCode/StatusCode.mak (EIP 46589)
Known issues and limitations in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
Runtime trace is tested in DOS and UEFI Win7 with the help of Afudos and Afuwin apps and modified SMIFlash.c (trace messages added). So when Afudos and Afuwin applications was lanched - trace messages added to SMIFlash.c was displaying.
Validation Testing:
NONE
Release History:
4.6.3_StatusCode_16
Fixes
  • System hangs endlessly in debug mode when serial port has failed or has not been initialized(EIP 43888).
    SendByte function is modified. The loop-until-success is replaced with loop-until-success-or-timeout.
Compatibility Impact
  • No other modules need to be updated.
  • All the changes listed below are backward compatible.
New Features
  • Support of Status Code in Runtime is added( EIP 39752, EIP 29307).
    • The Runtime Status Code supported is implemented by adding runtime and SMM instances of the status code interface.
      NOTE: AmiDxeLib has been updated in Core 4.6.4.1 to support status codes at runtime via the standard PROGRESS_CODE and ERROR_CODE macros.
      The RUNTIME_TRACE_SUPPORT SDL token has been created to support trace API after handing off control to OS.
    • In order to support registering of the runtime status code handlers, syntax of all status code handler eLinks is extended. The handler (child eLink) can be in one of the following formats:
      • 'FunctionName,' - The function will be called in PEI as well as in DXE. The function will not be called at Runtime and from the SMM handler.
      • 'PEI(FunctionName),' - The function will only be called in PEI.
      • 'DXE(FunctionName),' - The function will only be called in DXE.
      • 'RUNTIME(FunctionName),' - The function will only be called at Runtime and from the SMM handler.
    • The runtime support has been added for the following built-in status code handlers:
      • Port 80 checkpoint handlers (Port80Checkpoint)
      • Serial port handler (SerialOutput), when RUNTIME_TRACE_SUPPORT SDL token is set to "On".
        NOTE: In order to keep using serial port in the OS present environment, the serial port has to be hidden from the OS, which require support from the other modules. In order to use serial port debug messages in runtime, Core label 4.6.4.1 or newer, CSM label 4.6.3.1_CSM.7.64_72 or newer, and ACPI label 4.6.4.0_ACPI_41 or newer are required.
  • Attributes of the DxeInitStatusCode eLink are changed to "BeforeParent" to enable status code support ASAP.
  • Support of the Core 4.6.4.1 UART_INPUT_CLOCK SDL token is added(EIP 37332). The token defines base frequency of the UART chip and has been created to use common frequency value in all modules that deal with serial port such as SerialStatusCode, Terminal, and Legacy Serial Redirection.
Errata & Known Issues
None
4.6.3_StatusCode_15
Fixes
  • Buffer overflow when long debug messages are printed(EIP 24453). Code is updated to trim long debug messages (file affected: StatusCodeCommon.c).
  • Minor bug fix(EIP 24740). ReportData function is updated to properly extract status code type from the 'Type' parameter (file affected: StatusCodeCommon.c).
Compatibility Impact
  • No other modules need to be updated.
  • All the changes listed below are backward compatible.
New Features
  • STATUS_CODE_VERSION SDL token is added to track component version (file affected: StatusCode.sdl).
  • Code clean up and formatting improvements.
Errata & Known Issues
None
4.6.3_StatusCode_14
Fixes
None
Compatibility Impact
  • No other modules need to be updated.
  • All the changes listed below are backward compatible.
New Features
EIP issues addressed: 14305 , 17929 , 18485, 18494, 18827, 19107.
  • The component layout has been changed in order to simply customization of various aspects of the module. The code is rearranged into PEI only code, DXE only code, Porting code, etc.
  • The tables that map namespace of status code values into domain specific namespaces are moved into a separate file StatusCodeMap.c (to simplify porting). In the current implementation the following tables are included:
    ProgressCheckpointMap - establishes mapping between progress code values and checkpoint values. ErrorCheckpointMap - establishes mapping between error code values and checkpoint values. ProgressBeepMap - establishes mapping between progress code values and number of beeps. ErrorBeepMap - establishes mapping between error code values and number of beeps.
  • SDL Tokens that define names of the checkpoint and beep codes mapping tables are added. If token is cloned, default table defined in StatusCodeMap.c is replaced with the custom table.
  • SDL tokens to enable/disable every supported status code handler are added.
    (The only exception is beep code handler, which is controlled by the BEEP_ENABLE token defined in Core.sdl)
  • Infrastructure for support of alternative checkpoint devices is added. New eLink ReportCheckpoint is added. The eLink can be used to register custom checkpoint handlers. The handler receives checkpoint number (UINT8) as a parameter.
    The next two items are implemented using this facility.
  • Support for sending checkpoints in format "checkpoint xxx" to the serial port is added. The feature is disabled by default. To enable activate "SerialCheckpoint," eLink under ReportCheckpoint.
  • Support for display of checkpoints in the right bottom corner of the ConOut devices is added (Use CONOUT_CHECKPOINTS_SUPPORT SDL token to enable/disable; use CON_OUT_CHECKPOINTS_IN_QUIET_MODE SDL token to control quiet mode behavior).
  • Support for phase specific (PEI only or DXE only) status code handlers is added.
    Syntax of all status code handler eLinks is extended. The handler (child eLink) can be in one of the following formats:
    • 'FunctionName,' - The function will be called in PEI as well as in DXE (the only format supported by the prior versions of the module)
    • 'PEI(FunctionName),' - The function will only be called in PEI
    • 'DXE(FunctionName),' - The function will only be called in DXE
  • Support for custom error handlers is added. The list of error handlers is generated using PeiErrorCodeActions(PEI handlers) and DxeErrorCodeActions(DXE handlers) eLinks. The elements of the lists define action to perform when error of a particular type is detected. The element(child eLink) has the following format:
    ERROR_ACTION(Value,Action),
    where,
    Value - error code value (error values are defined in AmiStatusCodes.h)
    Action - error action. Function with the following interface:

    VOID Action(
        IN VOID *PeiServices, IN EFI_STATUS_CODE_VALUE Value
    );
    Value is an error value that triggered the action.
    Custom or standard action can be used. The following standard actions are defined:
    Halt - halts the execution.
    ResetOrHalt - attempts to perform a system reset. If reset fails, halts the execution.
    ResetOrResume - attempts to perform a system reset. If reset fails, resumes the execution.
    Example: 'ERROR_ACTION(PEI_RECOVERY_FAILED, Halt),'
4.6.3_StatusCode_13
  • Checkpoints in the range 0xA0-0xAC are redefined (In the previous version 0xA0 was mistakenly reserved for ASL instead of 0xAC). This label complies with version 0.50 of the Aptio 4.x Status Codes Specification.

4.6.3_StatusCode_12
  • Checkpoint list updated to comply with Aptio Status Codes Specification.
  • Differences between IA32 and x64 build rules are removed.
  • Beep code for DXE_PCI_BUS_OUT_OF_RESOURCES error is added (8 beeps).
  • Source code reformatted to comply with coding standards.
  • .chm file added.

4.6.3_StatusCode_11
  • Support for BEEP_ENABLE SDL token introduced in Core 4.6.3 is added.
  • STRING_STATUS_SUPPORT SDL token is added added. It can be used to disable string based status code output. It reduces the size of the StatusCode module.

© American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: StatusCode
Component Reference Name: StatusCode
Component Type: eModule
Release Date: 2011-07-06
Source Control Label: 4.6.3_StatusCode_18
Source Control Location: $/Alaska/BIN/Modules/StatusCode

Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:
N0NE
Component Description:

Status codes enable system components to report information about their current state. Status code is one of the three types of codes: progress code, error code, or debug code.
Debug code is data produced by various software entities that contains information specifically intended to assist in debugging.
Error code is data produced by various software entities that indicates an abnormal condition.
Progress code is data produced by various software entities that indicates forward progress.
Software components use a standardized interface published by the status code component to report status codes.
The responsibility of the status code component is to publish status code interface that routes status code data to multiple consumers. The code consuming the status code data can send it either directly to the piece of hardware (status code device) or to another software interface (status code interface) for logging or further processing.
The status code component can route status code data to multiple status code devices or software interfaces.
The examples of status code devices are: checkpoint card, serial port, video card.
The examples of status code interfaces are: in-memory event log, IPMI software stack
The status code component natively supports some of the status code devices and interfaces. Support for additional status code devices can be added using status code extensibility interface.
Filename | Description
StatusCode.cif | Cif file for StatusCode module
StatusCode.sdl | File containing the SDL tokens used by StatusCode module
StatusCode.mak | Make file for StatusCode module
StatusCodePei.c | File contains PEI specific status code routines such as entry point of the StatusCode PEIM (PeiInitStatusCode) and PEI implementation of some of the functions from the status code library.
StatusCodeDxe.c | File contains DXE specific status code routines such as Entry point of the StatusCode DXE driver and DXE implementation of some of the functions from the status code library.
StatusCodeCommon.c | File containing StatusCode services available in DXE, PEI and RUNTIME
SerialStatusCode.c | File containing StatusCode services using serial port
StatusCodeInt.h | File containing defenitions using by StatusCode module
StatusCodeMap.c | This file contains several tables that map generic namespace of status code values into domain specific namespaces.
StatusCodeDxe.c | File contains RUNTIME specific status code routines such as Entry point of the StatusCode Runtime driver and Runtime implementation of some of the functions from the status code library.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_34, Dated: 2010-10-06
Visual eBios: RSS.5.70.0171, Dated: 2010-10-04
Compiler Tool(s): WinDDK 7600.16385.1
New features added in this label:
EIP 56644 - Implemented PPI and Protocols, described in a Chapter 7 (Report Status Code Routers) of volume 3 of PI 1.2
General Bug Fixes:
EIP 54959 - Dependency from SIO removed from SerialOutput eLink and moved directly to SerialOutput function body to fix "No debug output in projects with no SIO" symptom.
EIP 54703 - Declaration of Foreground and Background variables now also depend from CON_OUT_CHECKPOINTS_IN_QUIET_MODE to fix "Disabling "CON_OUT_CHECKPOINTS_IN_QUIET_MODE" token, ends with build error" symptom.
EIP addressed in this label:
None
Files changed for EIP fixes:
StatusCodeDxe.c (EIP 54703, EIP 56644)
SeriaStatusCode.c and StatusCode.sdl (EIP 54959)
StatusCodePei.c, StatusCodeDxe.c, StatusCodeInt.h, StatusCodeCommon.c and StatusCodeRuntime.c (EIP 56644)
Known issues and limitations in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
Tested by locating each protocol and registering functions that post something to port 80 and hangs on EFI_DEADLOOP. Behavior after registering/unregistering as expected. In DXE when rising TPL higher than Tpl of registered function - functions executed after tpl was restored.
Validation Testing:
NONE
Release History:
Label17

© American Megatrends Inc.


Function by File Name

AMIBIOS Function Reference

By File Name

The following is a list of the source files.
For a list in alphabetical order, see In Alphabetical Order.

  • SerialStatusCode.c
  • StatusCode.mak
  • StatusCodeCommon.c
  • StatusCodeDxe.c
  • StatusCodeInt.h
  • StatusCodeMap.c
  • StatusCodePei.c
  • StatusCodeRuntime.c
Built on 13:06:42 02/22/13


SerialStatusCode.c

Description:
Implementation of the serial port status code handler.

The following functions are used in the file: SerialStatusCode.c.

Function | Description
SendByte | Writes the given byte to the serial port
SerialOutput | Writes the given string to the serial port byte by byte using the function SendByte.
SerialStatusInit | The function programs the stop bits, data bits, and baud rate of the com port and outputs the debug message "Status Code Available." NOTE: This function does not assumes Super I/O has already been initialized.


SendByte in the SerialStatusCode.c

Function : SendByte

File: SerialStatusCode.c
Description:
Writes the given byte to the serial port
Input:
UINT8 Byte - a byte to write to the serial port
Output:
TRUE - Byte was sent, FALSE - serial port was not ready


SerialOutput in the SerialStatusCode.c

Function : SerialOutput

File: SerialStatusCode.c
Description:
Writes the given string to the serial port byte by byte
using the function SendByte.
Input:
IN EFI_PEI_SERVICES **PeiServices - pointer to the PEI Boot Services table
CHAR8 *String - String to be sent over the serial port
Output:
EFI_SUCCESS


SerialStatusInit in the SerialStatusCode.c

Function : SerialStatusInit

File: SerialStatusCode.c
Description:
The function programs the stop bits, data bits, and baud rate
of the com port and outputs the debug message "Status Code Available."
NOTE: This function does not assumes Super I/O has already been initialized.
Input:
IN EFI_FFS_FILE_HEADER *FfsHeader
IN EFI_PEI_SERVICES **PeiServices - pointer to the PEI Boot Services table
Output:
EFI_SUCCESS


StatusCode.mak

Description:
Builds PEI and DXE StatusCode modules.
Two libraries StatusCodePei.lib and StatusCodeDxe.lib
are built and these are linked with CORE_PEI and CORE_DXE
respectively.


StatusCodeCommon.c

Description:
This file contains routines used in PEI and DXE status code modules.
It contains two main function groups:
- Status Code Library (functions utilized throughout the component).
- Status Code initialization code. The initialization code enables
support of the multiple eLinks exposed by the status code module.
The eLinks are described in the AMI Aptio 4.x StatusCode Porting Guide.

The following functions are used in the file: StatusCodeCommon.c.

Function | Description
Beep | Generates sound of the specified duration corresponding to the passed in musical note/octave pair using legacy PC/AT speaker. Control flow: BeepOn Delay BeepOff
BeepOff | Stops generation of the legacy PC/AT speaker sound started by the BeepOn routine.
BeepOn | Initiates generation of the sound corresponding to the passed in musical note/octave pair using legacy PC/AT speaker.
BeepService | This function plays Value quantity of beeps
BeepStatus | Simple Status Code handler that generates Beep codes for a certain types of progress and error codes defined by the BEEP_PROGRESS_CODES_MAP and BEEP_ERROR_CODES_MAP mapping tables.
CheckPointStatus | Looks up the checkpoint for the given status code Type and Value and calls CheckpointStatusReport function to invoke all checkpoint handlers.
CheckpointStatusReport | Calls checkpoint status code handlers registered under ReportCheckpoint eLink.
CreateString | This function converts the Type, Value, and Data into a string that can be easily output to any console: serial, screen, data storage, etc.
FindByteCode | Match "Value" to Map->Value and return Map->Byte.
Halt | Error Code Action. Halts the execution.
InitStatusCodeParts | calls initialization routines of status code subcomponents registered under StatusCodeInitialize eLink.
MiscStatusReport | Calls Misc. status code handlers (handlers that consume all available status code data) registered under ReportMiscStatus eLink
PerformErrorCodeAction | Scans list of error actions defined by the PeiErrorCodeActions/DxeErrorCodeActions lists. If action corresponding to the passed in Value is found, performs the action.
Port80Checkpoint | Outputs checkpoint value to port 0x80 To support different checkpoint displaying hardware do not port this function. Use ReportCheckpoint eLink based interface instead.
ReportAssertString | This function creates a string from the ASSERT data
ReportData | This function creates a string for error types that have not been predefined by the spec. This string contains the information in the Type and Value parameters.
ReportDebugInfo | This function creates a string from the debug informatoin packaged into Intel-specific(not defined in the standard spec) EFI_DEBUG_INFO structure.
ReportDxeAndRtRouter | Top level status code reporting routine exposed by the status code protocol/PPI. Calls the various types of status code handlers (SimpleStatusReport, StringStatusReport, MiscStatusReport, PerformErrorCodeAction) Generates string from the status code data to pass to StringStatusReport function.
ReportStatusCode | Top level status code reporting routine exposed by the status code protocol/PPI. Calls the various types of status code handlers (SimpleStatusReport, StringStatusReport, MiscStatusReport, PerformErrorCodeAction) Generates string from the status code data to pass to StringStatusReport function.
ResetOrHalt | Error Code Action. Attempts to perform a system reset. If reset fails, halts the execution (calls Halt function).
SimpleStatusReport | Calls simple status code handlers registered under ReportSimpleStatus eLink
StringStatusReport | Calls the string satus code handlers registered under ReportStringStatus eLink.


Beep in the StatusCodeCommon.c

Function : Beep

File: StatusCodeCommon.c
Description:
Generates sound of the specified duration corresponding
to the passed in musical note/octave pair using legacy PC/AT speaker.
Control flow:
BeepOn

 Delay

BeepOff
Input:
VOID *PeiServices - pointer to the PEI Boot Services table
UINT8 note - a note to play
UINT8 octave - an octave for the note
UINT32 duration - sound duration in microseconds.
Output:
VOID


BeepOff in the StatusCodeCommon.c

Function : BeepOff

File: StatusCodeCommon.c
Description:
Stops generation of the legacy PC/AT speaker sound started by the BeepOn routine.
Input:
VOID
Output:
VOID


BeepOn in the StatusCodeCommon.c

Function : BeepOn

File: StatusCodeCommon.c
Description:
Initiates generation of the sound corresponding
to the passed in musical note/octave pair using legacy PC/AT speaker.
Input:
UINT8 note - a note to play
UINT8 octave - an octave for the note
Output:
VOID


BeepService in the StatusCodeCommon.c

Function : BeepService

File: StatusCodeCommon.c
Description:
This function plays Value quantity of beeps
Input:
IN VOID *PeiServices - pointer to the PEI Boot Services table
IN EFI_STATUS_CODE_TYPE Type - the type and severity of the error that occurred
IN EFI_STATUS_CODE_VALUE Value - the Class, subclass and Operation that caused the error
IN UINT32 Instance -
IN EFI_GUI *CallerId OPTIONAL - The GUID of the caller function
IN EFI_STATUS_CODE_DATA *Data OPTIONAL - the extended data field that contains additional info
Output:
EFI_STATUS


BeepStatus in the StatusCodeCommon.c

Function : BeepStatus

File: StatusCodeCommon.c
Description:
Simple Status Code handler that generates Beep codes for a certain types of
progress and error codes defined by the BEEP_PROGRESS_CODES_MAP and BEEP_ERROR_CODES_MAP mapping tables.
Input:
EFI_PEI_SERVICES *PeiServices, - pointer to the PEI Boot Services table
IN EFI_STATUS_CODE_TYPE Type - the type and severity of the error that occurred
IN EFI_STATUS_CODE_VALUE Value - the Class, subclass and Operation that caused the error
Output:
EFI_STATUS


CheckPointStatus in the StatusCodeCommon.c

Function : CheckPointStatus

File: StatusCodeCommon.c
Description:
Looks up the checkpoint for the given status code Type
and Value and calls CheckpointStatusReport function to invoke all checkpoint handlers.
Input:
IN VOID *PeiServices - pointer to the PEI Boot Services table
IN EFI_STATUS_CODE_TYPE Type - the type and severity of the error that occurred
IN EFI_STATUS_CODE_VALUE Value - the Class, subclass and Operation that caused the error
Output:
EFI_STATUS


CheckpointStatusReport in the StatusCodeCommon.c

Function : CheckpointStatusReport

File: StatusCodeCommon.c
Description:
Calls checkpoint status code handlers registered under ReportCheckpoint eLink.
Input:
IN EFI_PEI_SERVICES *PeiServices -  pointer to Pei Services
IN UINT8              Checkpoint - checkpoint
Output:
VOID


CreateString in the StatusCodeCommon.c

Function : CreateString

File: StatusCodeCommon.c
Description:
This function converts the Type, Value, and Data into a string
that can be easily output to any console: serial, screen, data storage, etc.
Input:
IN  EFI_STATUS_CODE_TYPE Type - Contains the type and severity of the error
IN  EFI_STATUS_CODE_VALUE Value - Contains the Class, SubClass, and Operation that caused
the error
IN  EFI_STATUS_CODE_DATA *Data - Data field that contains strings and values to be reported
OUT UINT8 *String - Pointer to the beginning of a byte String array
Output:
EFI_STATUS
*String - points to the string that was created


FindByteCode in the StatusCodeCommon.c

Function : FindByteCode

File: StatusCodeCommon.c
Description:
Match "Value" to Map->Value and return Map->Byte.
Input:
STATUS_CODE_TO_BYTE_MAP *Map  - Pointer to a table (array of structures) that maps status code value (EFI_STATUS_CODE_VALUE) to a byte (UINT8) domain specific value.
EFI_STATUS_CODE_VALUE Value  - status code to map
Output:
UINT8 - domain specific mapping of the Value


Halt in the StatusCodeCommon.c

Function : Halt

File: StatusCodeCommon.c
Description:
Error Code Action.
Halts the execution.
Input:
VOID *PeiServices - not used
EFI_STATUS_CODE_VALUE Value - Value of the error code that triggered the action.
Output:
VOID


InitStatusCodeParts in the StatusCodeCommon.c

Function : InitStatusCodeParts

File: StatusCodeCommon.c
Description:
calls initialization routines of status code subcomponents
registered under StatusCodeInitialize eLink.
Input:
IN VOID *ImageHandler
IN VOID *ServicesTable
Output:
VOID


MiscStatusReport in the StatusCodeCommon.c

Function : MiscStatusReport

File: StatusCodeCommon.c
Description:
Calls Misc. status code handlers
(handlers that consume all available status code data)
registered under ReportMiscStatus eLink
Input:
IN EFI_PEI_SERVICES *PeiServices -  pointer to Pei Services
IN  EFI_STATUS_CODE_TYPE Type - Contains the type and severity of the error
IN  EFI_STATUS_CODE_VALUE Value - Contains the Class, SubClass, and Operation that caused
the error
IN  UINT32 Instance - Instance
IN EFI_GUID *CallerId OPTIONAL - The GUID of the caller function
IN EFI_STATUS_CODE_DATA *Data OPTIONAL - the extended data field that contains additional info
Output:
VOID


PerformErrorCodeAction in the StatusCodeCommon.c

Function : PerformErrorCodeAction

File: StatusCodeCommon.c
Description:
Scans list of error actions defined by the PeiErrorCodeActions/DxeErrorCodeActions lists.
If action corresponding to the passed in Value is found, performs the action.
Input:
IN EFI_PEI_SERVICES *PeiServices -  pointer to Pei Services
IN  EFI_STATUS_CODE_TYPE Type - Contains the type and severity of the error
IN  EFI_STATUS_CODE_VALUE Value - Contains the Class, SubClass, and Operation that caused
the error
Output:
VOID


Port80Checkpoint in the StatusCodeCommon.c

Function : Port80Checkpoint

File: StatusCodeCommon.c
Description:
Outputs checkpoint value to port 0x80
To support different checkpoint displaying hardware do not port this function.
Use ReportCheckpoint eLink based interface instead.
Input:
VOID *PeiServices - pointer to the PEI Boot Services table,
IN  UINTN Checkpoint - checkpoint to display
Output:
EFI_STATUS


ReportAssertString in the StatusCodeCommon.c

Function : ReportAssertString

File: StatusCodeCommon.c
Description:
This function creates a string from the ASSERT data
Input:
IN EFI_STATUS_CODE_DATA *Data - Pointer to the beginning of the ASSERT data
OUT UINT8 *String - Pointer to the beginning of a byte String array
Output:
*String - Contains information from the ASSERT data


ReportData in the StatusCodeCommon.c

Function : ReportData

File: StatusCodeCommon.c
Description:
This function creates a string for error types that have not
been predefined by the spec.  This string contains the information in
the Type and Value parameters.
Input:
IN EFI_STATUS_CODE_TYPE Type - Contains the type and severity of the error
IN EFI_STATUS_CODE_VALUE Value - Contains the Class, SubClass, and Operation that caused
the error
IN EFI_STATUS_CODE_DATA *Data - Data field that contains strings and values to be reported
OUT UINT8 *String - Pointer to the beginning of a byte String array
Output:
EFI_STATUS


ReportDebugInfo in the StatusCodeCommon.c

Function : ReportDebugInfo

File: StatusCodeCommon.c
Description:
This function creates a string from the debug informatoin packaged into
Intel-specific(not defined in the standard spec) EFI_DEBUG_INFO structure.
Input:
IN EFI_STATUS_CODE_DATA *Data - Pointer to the beginning of the ASSERT data
Output:
OUT UINT8 *String - Contains information in the ASSERT data


ReportDxeAndRtRouter in the StatusCodeCommon.c

Function : ReportDxeAndRtRouter

File: StatusCodeCommon.c
Description:
Top level status code reporting routine exposed by the status code protocol/PPI.
Calls the various types of status code handlers
(SimpleStatusReport, StringStatusReport, MiscStatusReport, PerformErrorCodeAction)
Generates string from the status code data to pass to StringStatusReport function.
Input:
IN VOID *PeiServices - pointer to the PEI Boot Services table
IN EFI_STATUS_CODE_TYPE Type - the type and severity of the error that occurred
IN EFI_STATUS_CODE_VALUE Value - the Class, subclass and Operation that caused the error
IN UINT32 Instance -
IN EFI_GUI *CallerId OPTIONAL - The GUID of the caller function
IN EFI_STATUS_CODE_DATA *Data OPTIONAL - the extended data field that contains additional info
Output:
EFI_STATUS


ReportStatusCode in the StatusCodeCommon.c

Function : ReportStatusCode

File: StatusCodeCommon.c
Description:
Top level status code reporting routine exposed by the status code protocol/PPI.
Calls the various types of status code handlers
(SimpleStatusReport, StringStatusReport, MiscStatusReport, PerformErrorCodeAction)
Generates string from the status code data to pass to StringStatusReport function.
Input:
IN VOID *PeiServices - pointer to the PEI Boot Services table
IN EFI_STATUS_CODE_TYPE Type - the type and severity of the error that occurred
IN EFI_STATUS_CODE_VALUE Value - the Class, subclass and Operation that caused the error
IN UINT32 Instance -
IN EFI_GUI *CallerId OPTIONAL - The GUID of the caller function
IN EFI_STATUS_CODE_DATA *Data OPTIONAL - the extended data field that contains additional info
Output:
EFI_STATUS


ResetOrHalt in the StatusCodeCommon.c

Function : ResetOrHalt

File: StatusCodeCommon.c
Description:
Error Code Action.
Attempts to perform a system reset. If reset fails, halts the execution (calls Halt function).
Input:
VOID *PeiServices - not used
EFI_STATUS_CODE_VALUE Value - Value of the error code that triggered the action.
Output:
VOID


SimpleStatusReport in the StatusCodeCommon.c

Function : SimpleStatusReport

File: StatusCodeCommon.c
Description:
Calls simple status code handlers registered under ReportSimpleStatus eLink
Input:
IN EFI_PEI_SERVICES *PeiServices -  pointer to Pei Services
IN  EFI_STATUS_CODE_TYPE Type - Contains the type and severity of the error
IN  EFI_STATUS_CODE_VALUE Value - Contains the Class, SubClass, and Operation that caused
the error
Output:
VOID


StringStatusReport in the StatusCodeCommon.c

Function : StringStatusReport

File: StatusCodeCommon.c
Description:
Calls the string satus code handlers registered under ReportStringStatus eLink.
Input:
IN EFI_FFS_FILE_HEADER *FfsHeader
IN CHAR8 *String
Output:
VOID


StatusCodeDxe.c

Description:
File contains DXE specific status code routines such as:
- Entry point of the StatusCode DXE driver
DXE implementation of some of the functions from the status code library.
Implementation of the data hub logger (status code subcomponent that logs status codes into the data hub)
Implementation of the ConOut checkpoints (status code subcomponent that displays checkpoints on all ConOut devices).
(Status code library is a set of generic routines utilized throughout the component).

The following functions are used in the file: StatusCodeDxe.c.

Function | Description
ConOutCheckpoint | Displays checkpoints at the right bottom corner or the ConOut devices.
ConOutCpInit | Initializes ConOut checkpoint display code. This function is called from InitStatusCodeParts function (in DXE only).
ConOutInstalled | Callback routine. Activates ConOut checkpoint display once ConOut field in the UEFI ststem table is populated.
DataHubInit | Initializes data hub error logging infrastructure. This function is called from InitStatusCodeParts function (in DXE only).
DataHubInstalled | Callback routine. Activates data hub status code logging once DataHub protocol is installed.
DataHubStatusCode | Logs status code data into the data hub
Delay | Stalls execution for a passed in number of microseconds
DxeInitStatusCode | Entry point of the StatusCode Driver. Calls InitStatusCodeParts function, installs the Status Code Protocol, and registers event handlers for the legacy boot and exit boot services events. DxeInitStatusCode installs different protocol based on value of the EFI_SPECIFICATION_VERSION SDL token (defined in Core.sdl). If value of the EFI_SPECIFICATION_VERSION constant is less than 0x20000, framework EFI_STATUS_CODE_ARCH_PROTOCOL_GUID protocol is installed; otherwise, PI EFI_STATUS_CODE_RUNTIME_PROTOCOL_GUID protocol is installed. PI Status Code Protocol is initialized with the address of DxeReportStatusCode function.
DxeReportStatusCode | DXE Status Code Reporting function. A wrapper around phase independent ReportStatucCode function defined in StatusCodeCommon.c.
PassRouterAdress | Sets variable with the address of RSC Info structure.
ResetOrResume | Error Code Action. Attempts to perform a system reset. If reset fails, returns.
RouterRegister | Register the callback function for ReportStatusCode() notification in DXE and Runtime.
RouterUnregister | Remove a previously registered callback function from the notification list.
RscHandlerNotification | Executes delayed calls (when current TPL is higher that one router was registered with) to registered status code routers.
StatusCodeExitBS | Exit Boot Services event handler. Terminates boot time status code processing
StopConOutCheckpoints | Read To Boot Callback routine. Terminates ConOut checkpoint display.

The following descriptions are used in the file: StatusCodeDxe.c.

Header | Description
Con_Out_Checkpoints | ConOut checkpoints functions: - ConOutCpInit - ConOutInstalled - StopConOutCheckpoints - ConOutCheckpoint
Data_Hub_Logging | DataHub Logging Functions: - DataHubInint - DataHubInstalled - DataHubStatusCode


Con_Out_Checkpoints in the StatusCodeDxe.c

General : Con_Out_Checkpoints

File: StatusCodeDxe.c
Description:
ConOut checkpoints functions:
- ConOutCpInit
- ConOutInstalled
- StopConOutCheckpoints
- ConOutCheckpoint


ConOutCheckpoint in the StatusCodeDxe.c

Function : ConOutCheckpoint

File: StatusCodeDxe.c
Description:
Displays checkpoints at the right bottom corner or the ConOut devices.
Input:
IN VOID *Dummy - not used. Dummy parameter for compatibility with PEI callback interface.
IN UINT8 Checkpoint  - checkpoint to display
Output:
EFI_STATUS


ConOutCpInit in the StatusCodeDxe.c

Function : ConOutCpInit

File: StatusCodeDxe.c
Description:
Initializes ConOut checkpoint display code.
This function is called from InitStatusCodeParts function (in DXE only).
Input:
IN EFI_HANDLE *ImageHandle
IN EFI_SYSTEM_TABLE *SystemTable
Output:
VOID


ConOutInstalled in the StatusCodeDxe.c

Function : ConOutInstalled

File: StatusCodeDxe.c
Description:
Callback routine. Activates ConOut checkpoint display once
ConOut field in the UEFI ststem table is populated.
Input:
IN EFI_EVENT Event - Signalled Event
IN VOID *Context - calling context
Output:
VOID


Data_Hub_Logging in the StatusCodeDxe.c

General : Data_Hub_Logging

File: StatusCodeDxe.c
Description:
DataHub Logging Functions:
- DataHubInint
- DataHubInstalled
- DataHubStatusCode


DataHubInit in the StatusCodeDxe.c

Function : DataHubInit

File: StatusCodeDxe.c
Description:
Initializes data hub error logging infrastructure.
This function is called from InitStatusCodeParts function (in DXE only).
Input:
IN EFI_HANDLE *ImageHandle
IN EFI_SYSTEM_TABLE *SystemTable
Output:
VOID


DataHubInstalled in the StatusCodeDxe.c

Function : DataHubInstalled

File: StatusCodeDxe.c
Description:
Callback routine. Activates data hub status code logging once DataHub protocol is installed.
Input:
IN EFI_EVENT Event - Signalled Event
IN VOID *Context - calling context
Output:
VOID


DataHubStatusCode in the StatusCodeDxe.c

Function : DataHubStatusCode

File: StatusCodeDxe.c
Description:
Logs status code data into the data hub
Input:
IN  EFI_STATUS_CODE_TYPE        Type
IN  EFI_STATUS_CODE_VALUE       Value
IN  UINT32                      Instance
IN  EFI_GUID                    *CallerId OPTIONAL
IN  EFI_STATUS_CODE_DATA        *Data OPTIONAL
Output:
EFI_STATUS


Delay in the StatusCodeDxe.c

Function : Delay

File: StatusCodeDxe.c
Description:
Stalls execution for a passed in number of microseconds
Input:
VOID *PeiServices - not used
UINT32 Microseconds - the number of microseconds to stall execution
Output:
VOID


DxeInitStatusCode in the StatusCodeDxe.c

Function : DxeInitStatusCode

File: StatusCodeDxe.c
Description:
Entry point of the StatusCode Driver.
Calls InitStatusCodeParts function, installs the Status Code Protocol,
and registers event handlers for the legacy boot and exit boot services events.
DxeInitStatusCode installs different protocol based on value of the
EFI_SPECIFICATION_VERSION SDL token (defined in Core.sdl).
If value of the EFI_SPECIFICATION_VERSION constant is less than 0x20000,
framework EFI_STATUS_CODE_ARCH_PROTOCOL_GUID protocol is installed;
otherwise, PI EFI_STATUS_CODE_RUNTIME_PROTOCOL_GUID protocol is installed.
PI Status Code Protocol is initialized with the address of DxeReportStatusCode function.
Input:
*ImageHandle - The firmware allocate handle for the EFI image
*SystemTable - pointer to the EFI System Table
Output:
EFI_STATUS
Modified:
StatusCode Arch Protocol- now published


DxeReportStatusCode in the StatusCodeDxe.c

Function : DxeReportStatusCode

File: StatusCodeDxe.c
Description:
DXE Status Code Reporting function.
A wrapper around phase independent ReportStatucCode
function defined in StatusCodeCommon.c.
Input:
IN EFI_STATUS_CODE_TYPE Type - the type and severity of the error that occurred
IN EFI_STATUS_CODE_VALUE Value - the Class, subclass and Operation that caused the error
IN UINT32 Instance Instance - Instance
*CallerId OPTIONAL - The GUID of the caller function
*Data OPTIONAL - the extended data field that contains additional info
Output:
EFI_STATUS


PassRouterAdress in the StatusCodeDxe.c

Function : PassRouterAdress

File: StatusCodeDxe.c
Description:
Sets variable with the address of RSC Info structure.
Input:
IN EFI_EVENT Event
IN VOID *Context
Output:
VOID


ResetOrResume in the StatusCodeDxe.c

Function : ResetOrResume

File: StatusCodeDxe.c
Description:
Error Code Action.
Attempts to perform a system reset. If reset fails, returns.
Input:
VOID *PeiServices - not used
EFI_STATUS_CODE_VALUE Value - Value of the error code that triggered the action.
Output:
VOID


RouterRegister in the StatusCodeDxe.c

Function : RouterRegister

File: StatusCodeDxe.c
Description:
Register the callback function for ReportStatusCode() notification
in DXE and Runtime.
Input:
IN EFI_RSC_HANDLER_CALLBACK Callback - A pointer to a function of type
         EFI_RSC_HANDLER_CALLBACK that is to be registered.
IN EFI_TPL Tpl -  TPL at which callback can be safely invoked.
Output:
EFI_SUCCESS           The function was successfully registered.
EFI_INVALID_PARAMETER The callback function was NULL.
EFI_OUT_OF_RESOURCES  The internal buffer ran out of space. No more functions can be
             registered.
EFI_ALREADY_STARTED   The function was already registered. It can't be registered again.


RouterUnregister in the StatusCodeDxe.c

Function : RouterUnregister

File: StatusCodeDxe.c
Description:
Remove a previously registered callback function from the notification list.
Input:
IN EFI_RSC_HANDLER_CALLBACK Callback - A pointer to a function of type
                   EFI_RSC_HANDLER_CALLBACK that is to be unregistered.
Output:
EFI_SUCCESS           The function was successfully unregistered.
EFI_INVALID_PARAMETER The callback function was NULL.
EFI_NOT_FOUND         The callback function was not found to be unregistered.


RscHandlerNotification in the StatusCodeDxe.c

Function : RscHandlerNotification

File: StatusCodeDxe.c
Description:
Executes delayed calls (when current TPL is higher that one router was
registered with) to registered status code routers.
Input:
N EFI_EVENT        Event - signaled event.
IN VOID            *Context - pointer to structure with parameters.
Output:
VOID


StatusCodeExitBS in the StatusCodeDxe.c

Function : StatusCodeExitBS

File: StatusCodeDxe.c
Description:
Exit Boot Services event handler.
Terminates boot time status code processing
Input:
IN EFI_EVENT Event - not used
IN VOID *Context - not used
Output:
VOID


StopConOutCheckpoints in the StatusCodeDxe.c

Function : StopConOutCheckpoints

File: StatusCodeDxe.c
Description:
Read To Boot Callback routine. Terminates ConOut checkpoint display.
Input:
IN EFI_EVENT Event - Signalled Event
IN VOID *Context - calling context
Output:
VOID


StatusCodeInt.h

Description:
Header file containing declarations of functions, macros, and types shared across status code module files.


StatusCodeMap.c

Description:
This file contains several tables that map generic namespace
of status code values into domain specific namespaces.
In the current implementation the following tables are included:
ProgressCheckpointMap - establishes mapping between progress code values and checkpoint values.
ErrorCheckpointMap - establishes mapping between error code values and checkpoint values.
ProgressBeepMap - establishes mapping between progress code values and number of beeps.
ErrorBeepMap - establishes mapping between error code values and number of beeps.
The mapping tables can be overriden using SDL tokens.


StatusCodePei.c

Description:
File contains PEI specific status code routines such as
entry point of the StatusCode PEIM (PeiInitStatusCode) and
PEI implementation of some of the functions from the status code library.
(Status code library is a set of generic routines utilized throughout the component).

The following functions are used in the file: StatusCodePei.c.

Function | Description
Delay | Worker function to create one memory status code GUID'ed HOB
GetFirstGuidHob | Returns the first instance of the matched GUID HOB among the whole HOB list.
PeiInitStatusCode | Pei "entry point" for this module, called by the Pei Core. Conotol flow: 1. Creates a RSC Hob and installs RSC PPI. 2. Calls InitStatusCodeParts function. 3. Installs the Status Code PPI. InitStatusCodeParts function calls initialization routines of status code subcomponents registered under StatusCodeInitialize eLink. Status Code PPI is initialized with the address of ReportStatusCode function.
PpiRegister | Register the callback function for ReportStatusCode() notification.
PpiUnregister | Remove a previously registered callback function from the notification list.
ReportStatusCodePei | Top level status code reporting routine exposed by the status code protocol/PPI. Calls the various types of status code handlers (SimpleStatusReport, StringStatusReport, MiscStatusReport, PerformErrorCodeAction) Generates string from the status code data to pass to StringStatusReport function. Also pass all parameters to Registered Statuse Code Routers.
ResetOrResume | Error Code Action. Attempts to perform a system reset. If reset fails, returns.


Delay in the StatusCodePei.c

Function : Delay

File: StatusCodePei.c
Description:
Worker function to create one memory status code GUID'ed HOB
Input:
None
Output:
UINTN*  - Pointer to the NumberOfEntries field in Hob


GetFirstGuidHob in the StatusCodePei.c

Function : GetFirstGuidHob

File: StatusCodePei.c
Description:
Returns the first instance of the matched GUID HOB among the
whole HOB list.
Input:
IN EFI_GUID *Guid - The GUID to match with in the HOB list.
Output:
VOID* Pointer po first matched Hob (NULL - if not found)


PeiInitStatusCode in the StatusCodePei.c

Function : PeiInitStatusCode

File: StatusCodePei.c
Description:
Pei "entry point" for this module, called by the Pei Core.
Conotol flow:
1. Creates a RSC Hob and installs RSC PPI.
2. Calls InitStatusCodeParts function.
3. Installs the Status Code PPI.
InitStatusCodeParts function calls initialization routines of status code subcomponents
registered under StatusCodeInitialize eLink.
Status Code PPI is initialized with the address of ReportStatusCode function.
Input:
*FfsHeader - pointer to the header of the current firmware file system file
**PeiServices - pointer to the Pei Services table
Output:
EFI_STATUS


PpiRegister in the StatusCodePei.c

Function : PpiRegister

File: StatusCodePei.c
Description:
Register the callback function for ReportStatusCode() notification.
Input:
IN EFI_PEI_RSC_HANDLER_CALLBACK Callback - A pointer to a function of type
         EFI_PEI_RSC_HANDLER_CALLBACK that is to be registered.
Output:
EFI_SUCCESS           The function was successfully registered.
EFI_INVALID_PARAMETER The callback function was NULL.
EFI_OUT_OF_RESOURCES  The internal buffer ran out of space. No more functions can be
             registered.
EFI_ALREADY_STARTED   The function was already registered. It can't be registered again.


PpiUnregister in the StatusCodePei.c

Function : PpiUnregister

File: StatusCodePei.c
Description:
Remove a previously registered callback function from the notification list.
Input:
IN EFI_PEI_RSC_HANDLER_CALLBACK Callback - A pointer to a function of type
         EFI_PEI_RSC_HANDLER_CALLBACK that is to be unregistered.
Output:
EFI_SUCCESS           The function was successfully unregistered.
EFI_INVALID_PARAMETER The callback function was NULL.
EFI_NOT_FOUND         The callback function was not found to be unregistered.


ReportStatusCodePei in the StatusCodePei.c

Function : ReportStatusCodePei

File: StatusCodePei.c
Description:
Top level status code reporting routine exposed by the status code protocol/PPI.
Calls the various types of status code handlers
(SimpleStatusReport, StringStatusReport, MiscStatusReport, PerformErrorCodeAction)
Generates string from the status code data to pass to StringStatusReport function.
Also pass all parameters to Registered Statuse Code Routers.
Input:
IN VOID *PeiServices - pointer to the PEI Boot Services table
IN EFI_STATUS_CODE_TYPE Type - the type and severity of the error that occurred
IN EFI_STATUS_CODE_VALUE Value - the Class, subclass and Operation that caused the error
IN UINT32 Instance -
IN EFI_GUI *CallerId OPTIONAL - The GUID of the caller function
IN EFI_STATUS_CODE_DATA *Data OPTIONAL - the extended data field that contains additional info
Output:
EFI_STATUS


ResetOrResume in the StatusCodePei.c

Function : ResetOrResume

File: StatusCodePei.c
Description:
Error Code Action.
Attempts to perform a system reset. If reset fails, returns.
Input:
EFI_PEI_SERVICES **PeiServices
EFI_STATUS_CODE_VALUE Value - Value of the error code that triggered the action.
Output:
VOID


StatusCodeRuntime.c

Description:
File contains Runtime specific status code routines such as:
- Entry point of the StatusCode Runtime driver
Runtime implementation of some of the functions from the status code library.
(Status code library is a set of generic routines utilized throughout the component).

The following functions are used in the file: StatusCodeRuntime.c.

Function | Description
InitElinks | This function inits all Statuse code E-links that dose not have RUNTIME mark as dummy. While leaving only RUNTIME marked E-links .
InitRouterAdress | Reads variable with the address of RSC Info structure and initialize global variable with it.
ReportStatusCodePei | Pass all parameters to Registered Statuse Code Routers.
RuntimeInitStatusCode | Entry point of the StatusCode Runtime Driver. Calls InitStatusCodeParts function, installs the Status Code Protocol, and registers event handlers for the legacy boot and exit boot services events. RuntimeInitStatusCode installs different protocol based on value of the EFI_SPECIFICATION_VERSION SDL token (defined in Core.sdl). If value of the EFI_SPECIFICATION_VERSION constant is less than 0x20000, framework EFI_STATUS_CODE_ARCH_PROTOCOL_GUID protocol is installed; otherwise, PI EFI_STATUS_CODE_RUNTIME_PROTOCOL_GUID protocol is installed. PI Status Code Protocol is initialized with the address of RuntimeReportStatusCode function.
RuntimeReportStatusCode | Runtime Status Code Reporting function. A wrapper around phase independent ReportStatucCode function defined in StatusCodeCommon.c.
RuntimeStatusCodeExitBS | Exit Boot Services event handler. Terminates boot time status code processing
ScRuntimeVirtualAddressChange | Updates pointers to RSC structure and to callback functions inside structure.
SmmInitStatusCode | Entry point of the StatusCode SMM Driver.
SmmRegister | Remove a previously registered callback function from the notification list.
SmmReportStatusCode | SMM Status Code Reporting function. A wrapper around phase independent ReportStatucCode function defined in StatusCodeCommon.c.
StatusCodeSmmEntry | This function is the entry point for this file. This function installs services in and outside SMM.


InitElinks in the StatusCodeRuntime.c

Function : InitElinks

File: StatusCodeRuntime.c
Description:
This function inits all Statuse code E-links that dose not have RUNTIME mark
as dummy. While leaving only RUNTIME marked E-links .
Input:
None
Output:
VOID


InitRouterAdress in the StatusCodeRuntime.c

Function : InitRouterAdress

File: StatusCodeRuntime.c
Description:
Reads variable with the address of RSC Info structure and
initialize global variable with it.
Input:
None
Output:
VOID


ReportStatusCodePei in the StatusCodeRuntime.c

Function : ReportStatusCodePei

File: StatusCodeRuntime.c
Description:
Pass all parameters to Registered Statuse Code Routers.
Input:
IN EFI_STATUS_CODE_TYPE Type - the type and severity of the error that occurred
IN EFI_STATUS_CODE_VALUE Value - the Class, subclass and Operation that caused the error
IN UINT32 Instance -
IN EFI_GUI *CallerId OPTIONAL - The GUID of the caller function
IN EFI_STATUS_CODE_DATA *Data OPTIONAL - the extended data field that contains additional info
Output:
EFI_STATUS


RuntimeInitStatusCode in the StatusCodeRuntime.c

Function : RuntimeInitStatusCode

File: StatusCodeRuntime.c
Description:
Entry point of the StatusCode Runtime Driver.
Calls InitStatusCodeParts function, installs the Status Code Protocol,
and registers event handlers for the legacy boot and exit boot services events.
RuntimeInitStatusCode installs different protocol based on value of the
EFI_SPECIFICATION_VERSION SDL token (defined in Core.sdl).
If value of the EFI_SPECIFICATION_VERSION constant is less than 0x20000,
framework EFI_STATUS_CODE_ARCH_PROTOCOL_GUID protocol is installed;
otherwise, PI EFI_STATUS_CODE_RUNTIME_PROTOCOL_GUID protocol is installed.
PI Status Code Protocol is initialized with the address of RuntimeReportStatusCode function.
Input:
*ImageHandle - The firmware allocate handle for the EFI image
*SystemTable - pointer to the EFI System Table
Output:
EFI_STATUS
Modified:
StatusCode Arch Protocol- now published


RuntimeReportStatusCode in the StatusCodeRuntime.c

Function : RuntimeReportStatusCode

File: StatusCodeRuntime.c
Description:
Runtime Status Code Reporting function.
A wrapper around phase independent ReportStatucCode
function defined in StatusCodeCommon.c.
Input:
IN EFI_STATUS_CODE_TYPE Type - the type and severity of the error that occurred
IN EFI_STATUS_CODE_VALUE Value - the Class, subclass and Operation that caused the error
IN UINT32 Instance Instance - Instance
*CallerId OPTIONAL - The GUID of the caller function
*Data OPTIONAL - the extended data field that contains additional info
Output:
EFI_STATUS


RuntimeStatusCodeExitBS in the StatusCodeRuntime.c

Function : RuntimeStatusCodeExitBS

File: StatusCodeRuntime.c
Description:
Exit Boot Services event handler.
Terminates boot time status code processing
Input:
IN EFI_EVENT Event - not used
IN VOID *Context - not used
Output:
VOID


ScRuntimeVirtualAddressChange in the StatusCodeRuntime.c

Function : ScRuntimeVirtualAddressChange

File: StatusCodeRuntime.c
Description:
Updates pointers to RSC structure and to callback functions inside structure.
Input:
N EFI_EVENT        Event - signaled event.
IN VOID            *Context - Context
Output:
VOID


SmmInitStatusCode in the StatusCodeRuntime.c

Function : SmmInitStatusCode

File: StatusCodeRuntime.c
Description:
Entry point of the StatusCode SMM Driver.
Input:
IN EFI_HANDLE *ImageHandle - The firmware allocate handle for the EFI image
IN EFI_SYSTEM_TABLE *SystemTable - pointer to the EFI System Table
Output:
EFI_STATUS
Modified:
StatusCode Arch Protocol- now published


SmmRegister in the StatusCodeRuntime.c

Function : SmmRegister

File: StatusCodeRuntime.c
Description:
Remove a previously registered callback function from the notification list.
Input:
IN EFI_SMM_RSC_HANDLER_CALLBACK Callback -  A pointer to a function that
                                   that is to be unregistered.
Output:
EFI_SUCCESS           Function was successfully unregistered.
EFI_INVALID_PARAMETER The callback function was NULL.
EFI_NOT_FOUND         The callback function was not found to be unregistered.


SmmReportStatusCode in the StatusCodeRuntime.c

Function : SmmReportStatusCode

File: StatusCodeRuntime.c
Description:
SMM Status Code Reporting function.
A wrapper around phase independent ReportStatucCode
function defined in StatusCodeCommon.c.
Input:
IN CONST EFI_SMM_STATUS_CODE_PROTOCOL *This -
       Points to this instance of the EFI_SMM_STATUS_CODE_PROTOCOL.
IN EFI_STATUS_CODE_VALUE Value - the Class, subclass and Operation that caused the error
IN UINT32 Instance Instance - Instance
*CallerId OPTIONAL - The GUID of the caller function
*Data OPTIONAL - the extended data field that contains additional info
Output:
EFI_STATUS


StatusCodeSmmEntry in the StatusCodeRuntime.c

Function : StatusCodeSmmEntry

File: StatusCodeRuntime.c
Description:
This function is the entry point for this file. This function
        installs  services in and outside SMM.
Input:
IN EFI_HANDLE ImageHandle -	Image handle
        IN EFI_SYSTEM_TABLE *SystemTable -	Pointer to the system table
Output:
EFI_STATUS - Status based on errors that occurred while waiting for
        time to expire.


Functions in Alphabetical Order

In Alphabetical Order

The following topics provide a list in alphabetical order.
For a list by file name, see By File Name.

  • B
  • C
  • D
  • F
  • G
  • H
  • I
  • M
  • P
  • R
  • S


Functions in Alphabetical Order

B

Function | Description
Beep | Generates sound of the specified duration corresponding to the passed in musical note/octave pair using legacy PC/AT speaker. Control flow: BeepOn Delay BeepOff
BeepOff | Stops generation of the legacy PC/AT speaker sound started by the BeepOn routine.
BeepOn | Initiates generation of the sound corresponding to the passed in musical note/octave pair using legacy PC/AT speaker.
BeepService | This function plays Value quantity of beeps
BeepStatus | Simple Status Code handler that generates Beep codes for a certain types of progress and error codes defined by the BEEP_PROGRESS_CODES_MAP and BEEP_ERROR_CODES_MAP mapping tables.


Functions in Alphabetical Order

C

Function | Description
CheckPointStatus | Looks up the checkpoint for the given status code Type and Value and calls CheckpointStatusReport function to invoke all checkpoint handlers.
CheckpointStatusReport | Calls checkpoint status code handlers registered under ReportCheckpoint eLink.
ConOutCheckpoint | Displays checkpoints at the right bottom corner or the ConOut devices.
ConOutCpInit | Initializes ConOut checkpoint display code. This function is called from InitStatusCodeParts function (in DXE only).
ConOutInstalled | Callback routine. Activates ConOut checkpoint display once ConOut field in the UEFI ststem table is populated.
CreateString | This function converts the Type, Value, and Data into a string that can be easily output to any console: serial, screen, data storage, etc.


Functions in Alphabetical Order

D

Function | Description
DataHubInit | Initializes data hub error logging infrastructure. This function is called from InitStatusCodeParts function (in DXE only).
DataHubInstalled | Callback routine. Activates data hub status code logging once DataHub protocol is installed.
DataHubStatusCode | Logs status code data into the data hub
Delay | Worker function to create one memory status code GUID'ed HOB
Delay | Stalls execution for a passed in number of microseconds
DxeInitStatusCode | Entry point of the StatusCode Driver. Calls InitStatusCodeParts function, installs the Status Code Protocol, and registers event handlers for the legacy boot and exit boot services events. DxeInitStatusCode installs different protocol based on value of the EFI_SPECIFICATION_VERSION SDL token (defined in Core.sdl). If value of the EFI_SPECIFICATION_VERSION constant is less than 0x20000, framework EFI_STATUS_CODE_ARCH_PROTOCOL_GUID protocol is installed; otherwise, PI EFI_STATUS_CODE_RUNTIME_PROTOCOL_GUID protocol is installed. PI Status Code Protocol is initialized with the address of DxeReportStatusCode function.
DxeReportStatusCode | DXE Status Code Reporting function. A wrapper around phase independent ReportStatucCode function defined in StatusCodeCommon.c.


Functions in Alphabetical Order

F

Function | Description
FindByteCode | Match "Value" to Map->Value and return Map->Byte.


Functions in Alphabetical Order

G

Function | Description
GetFirstGuidHob | Returns the first instance of the matched GUID HOB among the whole HOB list.


Functions in Alphabetical Order

H

Function | Description
Halt | Error Code Action. Halts the execution.


Functions in Alphabetical Order

I

Function | Description
InitElinks | This function inits all Statuse code E-links that dose not have RUNTIME mark as dummy. While leaving only RUNTIME marked E-links .
InitRouterAdress | Reads variable with the address of RSC Info structure and initialize global variable with it.
InitStatusCodeParts | calls initialization routines of status code subcomponents registered under StatusCodeInitialize eLink.


Functions in Alphabetical Order

M

Function | Description
MiscStatusReport | Calls Misc. status code handlers (handlers that consume all available status code data) registered under ReportMiscStatus eLink


Functions in Alphabetical Order

P

Function | Description
PassRouterAdress | Sets variable with the address of RSC Info structure.
PeiInitStatusCode | Pei "entry point" for this module, called by the Pei Core. Conotol flow: 1. Creates a RSC Hob and installs RSC PPI. 2. Calls InitStatusCodeParts function. 3. Installs the Status Code PPI. InitStatusCodeParts function calls initialization routines of status code subcomponents registered under StatusCodeInitialize eLink. Status Code PPI is initialized with the address of ReportStatusCode function.
PerformErrorCodeAction | Scans list of error actions defined by the PeiErrorCodeActions/DxeErrorCodeActions lists. If action corresponding to the passed in Value is found, performs the action.
Port80Checkpoint | Outputs checkpoint value to port 0x80 To support different checkpoint displaying hardware do not port this function. Use ReportCheckpoint eLink based interface instead.
PpiRegister | Register the callback function for ReportStatusCode() notification.
PpiUnregister | Remove a previously registered callback function from the notification list.


Functions in Alphabetical Order

R

Function | Description
ReportAssertString | This function creates a string from the ASSERT data
ReportData | This function creates a string for error types that have not been predefined by the spec. This string contains the information in the Type and Value parameters.
ReportDebugInfo | This function creates a string from the debug informatoin packaged into Intel-specific(not defined in the standard spec) EFI_DEBUG_INFO structure.
ReportDxeAndRtRouter | Top level status code reporting routine exposed by the status code protocol/PPI. Calls the various types of status code handlers (SimpleStatusReport, StringStatusReport, MiscStatusReport, PerformErrorCodeAction) Generates string from the status code data to pass to StringStatusReport function.
ReportStatusCode | Top level status code reporting routine exposed by the status code protocol/PPI. Calls the various types of status code handlers (SimpleStatusReport, StringStatusReport, MiscStatusReport, PerformErrorCodeAction) Generates string from the status code data to pass to StringStatusReport function.
ReportStatusCodePei | Top level status code reporting routine exposed by the status code protocol/PPI. Calls the various types of status code handlers (SimpleStatusReport, StringStatusReport, MiscStatusReport, PerformErrorCodeAction) Generates string from the status code data to pass to StringStatusReport function. Also pass all parameters to Registered Statuse Code Routers.
ReportStatusCodePei | Pass all parameters to Registered Statuse Code Routers.
ResetOrHalt | Error Code Action. Attempts to perform a system reset. If reset fails, halts the execution (calls Halt function).
ResetOrResume | Error Code Action. Attempts to perform a system reset. If reset fails, returns.
ResetOrResume | Error Code Action. Attempts to perform a system reset. If reset fails, returns.
RouterRegister | Register the callback function for ReportStatusCode() notification in DXE and Runtime.
RouterUnregister | Remove a previously registered callback function from the notification list.
RscHandlerNotification | Executes delayed calls (when current TPL is higher that one router was registered with) to registered status code routers.
RuntimeInitStatusCode | Entry point of the StatusCode Runtime Driver. Calls InitStatusCodeParts function, installs the Status Code Protocol, and registers event handlers for the legacy boot and exit boot services events. RuntimeInitStatusCode installs different protocol based on value of the EFI_SPECIFICATION_VERSION SDL token (defined in Core.sdl). If value of the EFI_SPECIFICATION_VERSION constant is less than 0x20000, framework EFI_STATUS_CODE_ARCH_PROTOCOL_GUID protocol is installed; otherwise, PI EFI_STATUS_CODE_RUNTIME_PROTOCOL_GUID protocol is installed. PI Status Code Protocol is initialized with the address of RuntimeReportStatusCode function.
RuntimeReportStatusCode | Runtime Status Code Reporting function. A wrapper around phase independent ReportStatucCode function defined in StatusCodeCommon.c.
RuntimeStatusCodeExitBS | Exit Boot Services event handler. Terminates boot time status code processing


Functions in Alphabetical Order

S

Function | Description
ScRuntimeVirtualAddressChange | Updates pointers to RSC structure and to callback functions inside structure.
SendByte | Writes the given byte to the serial port
SerialOutput | Writes the given string to the serial port byte by byte using the function SendByte.
SerialStatusInit | The function programs the stop bits, data bits, and baud rate of the com port and outputs the debug message "Status Code Available." NOTE: This function does not assumes Super I/O has already been initialized.
SimpleStatusReport | Calls simple status code handlers registered under ReportSimpleStatus eLink
SmmInitStatusCode | Entry point of the StatusCode SMM Driver.
SmmRegister | Remove a previously registered callback function from the notification list.
SmmReportStatusCode | SMM Status Code Reporting function. A wrapper around phase independent ReportStatucCode function defined in StatusCodeCommon.c.
StatusCodeExitBS | Exit Boot Services event handler. Terminates boot time status code processing
StatusCodeSmmEntry | This function is the entry point for this file. This function installs services in and outside SMM.
StopConOutCheckpoints | Read To Boot Callback routine. Terminates ConOut checkpoint display.
StringStatusReport | Calls the string satus code handlers registered under ReportStringStatus eLink.


General Information

Header | Description
Con_Out_Checkpoints | ConOut checkpoints functions: - ConOutCpInit - ConOutInstalled - StopConOutCheckpoints - ConOutCheckpoint
Data_Hub_Logging | DataHub Logging Functions: - DataHubInint - DataHubInstalled - DataHubStatusCode