OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
ACPIe.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <Uefi/UefiBaseType.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseOverflowLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/DebugLib.h>
#include <IndustryStandard/Acpi.h>
#include <Library/OcAcpiLib.h>
#include <IndustryStandard/AcpiAml.h>
#include <UserFile.h>

Go to the source code of this file.

Functions

STATIC VOID PrintParserError (IN EFI_STATUS Status)
 
STATIC EFI_STATUS AcpiFindEntryInFile (IN CONST CHAR8 *FileName, IN CONST CHAR8 *PathString, IN UINT8 Entry, OUT UINT32 *Offset)
 
int ENTRY_POINT (int argc, char *argv[])
 
int LLVMFuzzerTestOneInput (const uint8_t *Data, size_t Size)
 

Detailed Description

Copyright (c) 2020-2021, Ubsefor & koralexa. All rights reserved. SPDX-License-Identifier: BSD-3-Clause

Definition in file ACPIe.c.

Function Documentation

◆ AcpiFindEntryInFile()

STATIC EFI_STATUS AcpiFindEntryInFile ( IN CONST CHAR8 * FileName,
IN CONST CHAR8 * PathString,
IN UINT8 Entry,
OUT UINT32 * Offset )

Finds offset of required entry in ACPI table in case it exists.

Parameters
[in]FileNamePath to file containing ACPI table.
[in]PathStringPath to entry which must be found.
[in]EntryNumber of entry which must be found.
[out]OffsetOffset of the entry if it was found.
Return values
EFI_SUCCESSRequired entry was found.
EFI_NOT_FOUNDRequired entry was not found.
EFI_DEVICE_ERRORError occured during parsing ACPI table.
EFI_OUT_OF_RESOURCESNesting limit has been reached.
EFI_INVALID_PARAMETERGot wrong path to the entry.
EFI_LOAD_ERRORWrong path to the file or the file can't be opened.

Definition at line 78 of file ACPIe.c.

◆ ENTRY_POINT()

int ENTRY_POINT ( int argc,
char * argv[] )

Finds sought entry in ACPI table. Usage: ./ACPIe -f FileName Path [Entry]

Parameters
[in]FileNamePath to file with ACPI table.
[in]PathPath to required entry.
[in]EntryNumber of required entry.

Definition at line 115 of file ACPIe.c.

◆ LLVMFuzzerTestOneInput()

int LLVMFuzzerTestOneInput ( const uint8_t * Data,
size_t Size )

Definition at line 226 of file ACPIe.c.

◆ PrintParserError()

STATIC VOID PrintParserError ( IN EFI_STATUS Status)

Prints description of error occured in the perser.

Parameters
[in]StatusError occured in the parser.

Definition at line 26 of file ACPIe.c.