Newer
Older
AMI-Aptio-BIOS-Reversed / DevicePathDxe / DevicePathDxe.h
@Ajax Dong Ajax Dong 2 days ago 7 KB Init
/** @file
  DevicePathDxe.h -- Header for DevicePathDxe

Copyright (c) HR650X BIOS Decompilation Project
**/

#ifndef __DEVICEPATHDXE_H__
#define __DEVICEPATHDXE_H__

#include "../uefi_headers/Uefi.h"

//
// Function Prototypes
//

EFI_STATUS
EFIAPI
GetDevicePathType(
  VOID
);

EFI_STATUS
EFIAPI
GetDevicePathSubType(
  VOID
);

EFI_STATUS
EFIAPI
GetDevicePathNodeLength(
  VOID
);

EFI_STATUS
EFIAPI
IsDevicePathEnd(
  VOID
);

EFI_STATUS
EFIAPI
IsDevicePathEndInstance(
  VOID
);

EFI_STATUS
EFIAPI
SetDevicePathNodeLength(
  VOID
);

EFI_STATUS
EFIAPI
DevicePathValid(
  VOID
);

EFI_STATUS
EFIAPI
DevicePathNodeLength(
  VOID
);

EFI_STATUS
EFIAPI
DevicePathType(
  VOID
);

EFI_STATUS
EFIAPI
DevicePathSubType(
  VOID
);

EFI_STATUS
EFIAPI
DevicePathStrSize(
  VOID
);

EFI_STATUS
EFIAPI
IsDevicePathMultiInstance(
  VOID
);

EFI_STATUS
EFIAPI
DevicePathNodeInstanceContain(
  VOID
);

EFI_STATUS
EFIAPI
CatDevicePathToTextStr(
  VOID
);

EFI_STATUS
EFIAPI
DevicePathDxeEntryPoint(
  VOID
);

EFI_STATUS
EFIAPI
1: Device Path Node Access (DevicePathUtilities)(
  VOID
);

EFI_STATUS
EFIAPI
- Read Type byte from device path node(
  VOID
);

EFI_STATUS
EFIAPI
to EDK2: DevicePathType(Node)(
  VOID
);

EFI_STATUS
EFIAPI
GetDevicePathType((
  VOID
);

EFI_STATUS
EFIAPI
- Read SubType byte from device path node(
  VOID
);

EFI_STATUS
EFIAPI
to EDK2: DevicePathSubType(Node)(
  VOID
);

EFI_STATUS
EFIAPI
GetDevicePathSubType((
  VOID
);

EFI_STATUS
EFIAPI
- Read Length field from device path node(
  VOID
);

EFI_STATUS
EFIAPI
to EDK2: DevicePathNodeLength(Node)(
  VOID
);

EFI_STATUS
EFIAPI
GetDevicePathNodeLength((
  VOID
);

EFI_STATUS
EFIAPI
- Advance to next device path node(
  VOID
);

EFI_STATUS
EFIAPI
*(
  VOID
);

EFI_STATUS
EFIAPI
- Check if node type is END (0x7F)(
  VOID
);

EFI_STATUS
EFIAPI
IsDevicePathEnd((
  VOID
);

EFI_STATUS
EFIAPI
- Check for END + END_ENTIRE (0xFF)(
  VOID
);

EFI_STATUS
EFIAPI
IsDevicePathEndInstance((
  VOID
);

EFI_STATUS
EFIAPI
- Write Length field(
  VOID
);

EFI_STATUS
EFIAPI
SetDevicePathNodeLength((
  VOID
);

EFI_STATUS
EFIAPI
- Mark node as END of entire path(
  VOID
);

EFI_STATUS
EFIAPI
- Validate entire device path mult-instance(
  VOID
);

EFI_STATUS
EFIAPI
each node length >= 4, no length overflow, ends with END(
  VOID
);

EFI_STATUS
EFIAPI
DevicePathValid((
  VOID
);

EFI_STATUS
EFIAPI
- Wrapper for GetDevicePathNodeLength with ASSERT(
  VOID
);

EFI_STATUS
EFIAPI
DevicePathNodeLength((
  VOID
);

EFI_STATUS
EFIAPI
- Wrapper for GetDevicePathType with ASSERT(
  VOID
);

EFI_STATUS
EFIAPI
DevicePathType((
  VOID
);

EFI_STATUS
EFIAPI
- Wrapper for GetDevicePathSubType with ASSERT(
  VOID
);

EFI_STATUS
EFIAPI
DevicePathSubType((
  VOID
);

EFI_STATUS
EFIAPI
2: Device Path Node Construction Helpers(
  VOID
);

EFI_STATUS
EFIAPI
- Allocate and initialize a device path node(
  VOID
);

EFI_STATUS
EFIAPI
3: Device Path Manipulation (concatenate, append, etc.)(
  VOID
);

EFI_STATUS
EFIAPI
- Return total size of device path in bytes(
  VOID
);

EFI_STATUS
EFIAPI
DevicePathStrSize((
  VOID
);

EFI_STATUS
EFIAPI
to END node(
  VOID
);

EFI_STATUS
EFIAPI
- Duplicate a device path(
  VOID
);

EFI_STATUS
EFIAPI
- Concatenate two device paths(
  VOID
);

EFI_STATUS
EFIAPI
- Append a single node to a device path(
  VOID
);

EFI_STATUS
EFIAPI
- Append a second multi-instance path(
  VOID
);

EFI_STATUS
EFIAPI
the END_INSTANCE separator(
  VOID
);

EFI_STATUS
EFIAPI
the final END_ENTIRE with END_INSTANCE(
  VOID
);

EFI_STATUS
EFIAPI
((EFI_DEVICE_PATH_PROTOCOL *)Buffer - 1); /* actually set subtype */(
  VOID
);

EFI_STATUS
EFIAPI
- Split a multi-instance path(
  VOID
);

EFI_STATUS
EFIAPI
buffer of one instance and its size(
  VOID
);

EFI_STATUS
EFIAPI
the END node for this instance(
  VOID
);

EFI_STATUS
EFIAPI
and override END subType for size calculation(
  VOID
);

EFI_STATUS
EFIAPI
and advance past END node(
  VOID
);

EFI_STATUS
EFIAPI
more instances(
  VOID
);

EFI_STATUS
EFIAPI
- Check if path has multiple instances(
  VOID
);

EFI_STATUS
EFIAPI
IsDevicePathMultiInstance((
  VOID
);

EFI_STATUS
EFIAPI
- Check if path contains END_INSTANCE(
  VOID
);

EFI_STATUS
EFIAPI
DevicePathNodeInstanceContain((
  VOID
);

EFI_STATUS
EFIAPI
4: Device Path To Text (DevicePathToText)(
  VOID
);

EFI_STATUS
EFIAPI
- Convert a single device path node to text string(
  VOID
);

EFI_STATUS
EFIAPI
in dispatch table based on Type/SubType(
  VOID
);

EFI_STATUS
EFIAPI
conversion for unknown node types(
  VOID
);

EFI_STATUS
EFIAPI
= DefaultDevicePathToTextStr (DeviceNode, DisplayOnly, AllowShortcuts);(
  VOID
);

EFI_STATUS
EFIAPI
- Convert entire device path to text(
  VOID
);

EFI_STATUS
EFIAPI
is the main protocol function(
  VOID
);

EFI_STATUS
EFIAPI
each node via the type table, joining with L"/"(
  VOID
);

EFI_STATUS
EFIAPI
= DevicePathToTextStr (Node, DisplayOnly, AllowShortcuts);(
  VOID
);

EFI_STATUS
EFIAPI
- Fallback conversion for unregistered types(
  VOID
);

EFI_STATUS
EFIAPI
- Append formatted text to dynamic string(
  VOID
);

EFI_STATUS
EFIAPI
CatDevicePathToTextStr((
  VOID
);

EFI_STATUS
EFIAPI
needed size via SPrint(
  VOID
);

EFI_STATUS
EFIAPI
(Args);(
  VOID
);

EFI_STATUS
EFIAPI
5: Device Path From Text (DevicePathFromText)(
  VOID
);

EFI_STATUS
EFIAPI
- Convert text representation to device path(
  VOID
);

EFI_STATUS
EFIAPI
the input string so we can tokenize it(
  VOID
);

EFI_STATUS
EFIAPI
= StrAllocCopy (TextDevicePath);(
  VOID
);

EFI_STATUS
EFIAPI
by L'/' separator, convert each token(
  VOID
);

EFI_STATUS
EFIAPI
(*RemainingStr != L'\0') {(
  VOID
);

EFI_STATUS
EFIAPI
next node descriptor(
  VOID
);

EFI_STATUS
EFIAPI
= RemainingStr;(
  VOID
);

EFI_STATUS
EFIAPI
each token(
  VOID
);

EFI_STATUS
EFIAPI
= WorkingStr;(
  VOID
);

EFI_STATUS
EFIAPI
the text token to a device path node(
  VOID
);

EFI_STATUS
EFIAPI
= ConvertTextToDevicePathNode (NodeStr);(
  VOID
);

EFI_STATUS
EFIAPI
- Dispatch text-to-node conversion(
  VOID
);

EFI_STATUS
EFIAPI
on the text prefix (e.g., "Pci", "Acpi", "Usb", etc.)(
  VOID
);

EFI_STATUS
EFIAPI
a dispatch table matching known path type names.(
  VOID
);

EFI_STATUS
EFIAPI
search through conversion table(
  VOID
);

EFI_STATUS
EFIAPI
(i = 0; mFromTextTable[i].Function != NULL; i++) {(
  VOID
);

EFI_STATUS
EFIAPI
- Various node-from-text converter functions(
  VOID
);

EFI_STATUS
EFIAPI
handles a specific device path node format string.(
  VOID
);

EFI_STATUS
EFIAPI
6: Protocol Dispatch Tables(
  VOID
);

EFI_STATUS
EFIAPI
Path Type table for DevicePathToText conversion(
  VOID
);

EFI_STATUS
EFIAPI
(Type, SubType) -> conversion function(
  VOID
);

EFI_STATUS
EFIAPI
mToTextTable[] = {(
  VOID
);

EFI_STATUS
EFIAPI
DEVICE PATHS (Type 1)(
  VOID
);

EFI_STATUS
EFIAPI
DEVICE PATHS (Type 2)(
  VOID
);

EFI_STATUS
EFIAPI
extended HID(
  VOID
);

EFI_STATUS
EFIAPI
extended CID(
  VOID
);

EFI_STATUS
EFIAPI
DEVICE PATHS (Type 3)(
  VOID
);

EFI_STATUS
EFIAPI
DEVICE PATHS (Type 4)(
  VOID
);

EFI_STATUS
EFIAPI
DEVICE PATHS (Type 5)(
  VOID
);

EFI_STATUS
EFIAPI
Path From Text dispatch table(
  VOID
);

EFI_STATUS
EFIAPI
text prefix string -> conversion function pointer(
  VOID
);

EFI_STATUS
EFIAPI
mFromTextTable[] = {(
  VOID
);

EFI_STATUS
EFIAPI
table for VEN device path nodes(
  VOID
);

EFI_STATUS
EFIAPI
against known Vendor GUIDs for named text output(
  VOID
);

EFI_STATUS
EFIAPI
mVendorTable[] = {(
  VOID
);

EFI_STATUS
EFIAPI
7: Module Entry Point & Protocol Installation(
  VOID
);

EFI_STATUS
EFIAPI
variables(
  VOID
);

EFI_STATUS
EFIAPI
mImageHandle        = NULL;(
  VOID
);

EFI_STATUS
EFIAPI
the HOB list pointer (for DXE drivers)(
  VOID
);

EFI_STATUS
EFIAPI
= GetHobList ();(
  VOID
);

EFI_STATUS
EFIAPI
the three Device Path protocols(
  VOID
);

EFI_STATUS
EFIAPI
= gBootServices->InstallMultipleProtocolInterfaces ((
  VOID
);

#endif /* __DEVICEPATHDXE_H__ */