OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
FirmwareFile.c File Reference
#include <PiDxe.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/DevicePathLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcFileLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>
#include <Protocol/DevicePath.h>
#include <Protocol/GraphicsOutput.h>
#include <Protocol/FirmwareVolume.h>
#include <Protocol/FirmwareVolume2.h>

Go to the source code of this file.

Functions

STATIC EFI_HANDLE GetFvFileData (IN EFI_GUID *FvNameGuid, IN EFI_SECTION_TYPE SectionType, OUT VOID **FileData OPTIONAL, OUT UINT32 *FileSize OPTIONAL)
 
EFI_DEVICE_PATH_PROTOCOL * OcCreateFvFileDevicePath (IN EFI_GUID *FileGuid)
 
VOID * OcReadFvFileSection (IN EFI_GUID *FileGuid, IN UINT8 SectionType, OUT UINT32 *FileSize)
 

Detailed Description

Copyright (C) 2020, vit9696. All rights reserved.

All rights reserved.

This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file FirmwareFile.c.

Function Documentation

◆ GetFvFileData()

STATIC EFI_HANDLE GetFvFileData ( IN EFI_GUID * FvNameGuid,
IN EFI_SECTION_TYPE SectionType,
OUT VOID **FileData OPTIONAL,
OUT UINT32 *FileSize OPTIONAL )

Definition at line 31 of file FirmwareFile.c.

◆ OcCreateFvFileDevicePath()

EFI_DEVICE_PATH_PROTOCOL * OcCreateFvFileDevicePath ( IN EFI_GUID * FileGuid)

Creates a device path for a firmware file.

Parameters
[in]FileGuidFirmware file GUID.
Return values
devicepath allocated from pool on success.
NULLon failure (e.g. when a file is not present).

Definition at line 163 of file FirmwareFile.c.

◆ OcReadFvFileSection()

VOID * OcReadFvFileSection ( IN EFI_GUID * FileGuid,
IN UINT8 SectionType,
OUT UINT32 * FileSize )

Reads firmware file section to pool-allocated buffer.

Parameters
[in]FileGuidFirmware file GUID.
[in]SectionTypeSection type to read.
[out]FileSizeSize of the section read.
Returns
file contents allocated from pool.
Return values
NULLon failure (e.g. when a file is not present).

Definition at line 186 of file FirmwareFile.c.