TianoCore EDK2 master
Loading...
Searching...
No Matches
UefiShellAcpiViewCommandLib.c File Reference

Go to the source code of this file.

Functions

EFI_STATUS RegisterAllParsers ()
 
UINTN EFIAPI ShellDumpBufferToFile (IN CONST CHAR16 *FileNameBuffer, IN CONST VOID *Buffer, IN CONST UINTN BufferSize)
 
CONST CHAR16 *EFIAPI ShellCommandGetManFileNameAcpiView (VOID)
 
SHELL_STATUS EFIAPI ShellCommandRunAcpiView (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI UefiShellAcpiViewCommandLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI UefiShellAcpiViewCommandLibDestructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

CONST CHAR16 gShellAcpiViewFileName [] = L"ShellCommand"
 
EFI_HII_HANDLE gShellAcpiViewHiiHandle = NULL
 
STATIC CONST SHELL_PARAM_ITEM ParamList []
 
STATIC CONST ACPI_TABLE_PARSER ParserList []
 

Detailed Description

Main file for 'acpiview' Shell command function.

Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. Copyright (c) 2016 - 2023, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file UefiShellAcpiViewCommandLib.c.

Function Documentation

◆ RegisterAllParsers()

EFI_STATUS RegisterAllParsers ( )

This function registers all the available table parsers.

Return values
EFI_SUCCESSThe parser is registered.
EFI_ALREADY_STARTEDThe parser for the ACPI Table was already registered.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_OUT_OF_RESOURCESNo space to register the parser.

Definition at line 96 of file UefiShellAcpiViewCommandLib.c.

◆ ShellCommandGetManFileNameAcpiView()

CONST CHAR16 *EFIAPI ShellCommandGetManFileNameAcpiView ( VOID  )

Return the file name of the help text file if not using HII.

Returns
The string pointer to the file name.

Definition at line 183 of file UefiShellAcpiViewCommandLib.c.

◆ ShellCommandRunAcpiView()

SHELL_STATUS EFIAPI ShellCommandRunAcpiView ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'acpiview' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if internal).
[in]SystemTablePointer to the System Table (NULL if internal).
Return values
SHELL_INVALID_PARAMETERThe command line invocation could not be parsed
SHELL_NOT_FOUNDThe command failed
SHELL_SUCCESSThe command was successful

Definition at line 202 of file UefiShellAcpiViewCommandLib.c.

◆ ShellDumpBufferToFile()

UINTN EFIAPI ShellDumpBufferToFile ( IN CONST CHAR16 *  FileNameBuffer,
IN CONST VOID *  Buffer,
IN CONST UINTN  BufferSize 
)

Dump a buffer to a file. Print error message if a file cannot be created.

Parameters
[in]FileNameThe filename that shall be created to contain the buffer.
[in]BufferPointer to buffer that shall be dumped.
[in]BufferSizeThe size of buffer to be dumped in bytes.
Returns
The number of bytes that were written

Definition at line 129 of file UefiShellAcpiViewCommandLib.c.

◆ UefiShellAcpiViewCommandLibConstructor()

EFI_STATUS EFIAPI UefiShellAcpiViewCommandLibConstructor ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Constructor for the Shell AcpiView Command library.

Install the handlers for acpiview UEFI Shell command.

Parameters
ImageHandleThe image handle of the process.
SystemTableThe EFI System Table pointer.
Return values
EFI_SUCCESSThe Shell command handlers were installed successfully.
EFI_DEVICE_ERRORHii package failed to install.

Definition at line 405 of file UefiShellAcpiViewCommandLib.c.

◆ UefiShellAcpiViewCommandLibDestructor()

EFI_STATUS EFIAPI UefiShellAcpiViewCommandLibDestructor ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Destructor for the library. free any resources.

Parameters
ImageHandleThe image handle of the process.
SystemTableThe EFI System Table pointer.

Definition at line 458 of file UefiShellAcpiViewCommandLib.c.

Variable Documentation

◆ gShellAcpiViewFileName

CONST CHAR16 gShellAcpiViewFileName[] = L"ShellCommand"

Definition at line 29 of file UefiShellAcpiViewCommandLib.c.

◆ gShellAcpiViewHiiHandle

EFI_HII_HANDLE gShellAcpiViewHiiHandle = NULL

Definition at line 30 of file UefiShellAcpiViewCommandLib.c.

◆ ParamList

Initial value:
= {
{ L"-q", TypeFlag },
{ L"-d", TypeFlag },
{ L"-h", TypeFlag },
{ L"-l", TypeFlag },
{ L"-s", TypeValue },
{ L"-r", TypeValue },
{ NULL, TypeMax }
}
#define NULL
Definition: Base.h:319
@ TypeValue
A flag that has some data following it with a space (IE "-a 1").
Definition: ShellLib.h:700
@ TypeFlag
A flag that is present or not present only (IE "-a").
Definition: ShellLib.h:699

An array of acpiview command line parameters.

Definition at line 35 of file UefiShellAcpiViewCommandLib.c.

◆ ParserList

A list of available table parsers.

Definition at line 50 of file UefiShellAcpiViewCommandLib.c.