From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- .../Source/C/Common/FirmwareVolumeBufferLib.h | 163 +++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 roms/edk2/BaseTools/Source/C/Common/FirmwareVolumeBufferLib.h (limited to 'roms/edk2/BaseTools/Source/C/Common/FirmwareVolumeBufferLib.h') diff --git a/roms/edk2/BaseTools/Source/C/Common/FirmwareVolumeBufferLib.h b/roms/edk2/BaseTools/Source/C/Common/FirmwareVolumeBufferLib.h new file mode 100644 index 000000000..6b1caba99 --- /dev/null +++ b/roms/edk2/BaseTools/Source/C/Common/FirmwareVolumeBufferLib.h @@ -0,0 +1,163 @@ +/** @file +EFI Firmware Volume routines which work on a Fv image in buffers. + +Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef FirmwareVolumeBuffer_h_INCLUDED +#define FirmwareVolumeBuffer_h_INCLUDED + +#include "Common/UefiBaseTypes.h" +#include "Common/PiFirmwareFile.h" +#include "Common/PiFirmwareVolume.h" + +EFI_STATUS +FvBufAddFile ( + IN OUT VOID *Fv, + IN VOID *File + ); + +EFI_STATUS +FvBufAddFileWithExtend ( + IN OUT VOID **Fv, + IN VOID *File + ); + +EFI_STATUS +FvBufAddVtfFile ( + IN OUT VOID *Fv, + IN VOID *File + ); + +EFI_STATUS +FvBufChecksumFile ( + IN OUT VOID *FfsFile + ); + +EFI_STATUS +FvBufChecksumHeader ( + IN OUT VOID *Fv + ); + +EFI_STATUS +FvBufClearAllFiles ( + IN OUT VOID *Fv + ); + +VOID +FvBufCompact3ByteSize ( + OUT VOID* SizeDest, + IN UINT32 Size + ); + +EFI_STATUS +FvBufCountSections ( + IN VOID* FfsFile, + IN UINTN* Count + ); + +EFI_STATUS +FvBufDuplicate ( + IN VOID *SourceFv, + IN OUT VOID **DestinationFv + ); + +UINT32 +FvBufExpand3ByteSize ( + IN VOID* Size + ); + +UINT32 +FvBufGetFfsFileSize ( + IN EFI_FFS_FILE_HEADER *Ffs + ); + +UINT32 +FvBufGetFfsHeaderSize ( + IN EFI_FFS_FILE_HEADER *Ffs + ); + +EFI_STATUS +FvBufExtend ( + IN VOID **Fv, + IN UINTN Size + ); + +EFI_STATUS +FvBufFindFileByName ( + IN VOID *Fv, + IN EFI_GUID *Name, + OUT VOID **File + ); + +EFI_STATUS +FvBufFindFileByType ( + IN VOID *Fv, + IN EFI_FV_FILETYPE Type, + OUT VOID **File + ); + +EFI_STATUS +FvBufFindNextFile ( + IN VOID *Fv, + IN OUT UINTN *Key, + OUT VOID **File + ); + +EFI_STATUS +FvBufFindNextSection ( + IN VOID *SectionsStart, + IN UINTN TotalSectionsSize, + IN OUT UINTN *Key, + OUT VOID **Section + ); + +EFI_STATUS +FvBufFindSectionByType ( + IN VOID *FfsFile, + IN UINT8 Type, + OUT VOID **Section + ); + +EFI_STATUS +FvBufGetFileRawData ( + IN VOID* FfsFile, + OUT VOID** RawData, + OUT UINTN* RawDataSize + ); + +EFI_STATUS +FvBufGetSize ( + IN VOID *Fv, + OUT UINTN *Size + ); + +EFI_STATUS +FvBufPackageFreeformRawFile ( + IN EFI_GUID* Filename, + IN VOID* RawData, + IN UINTN RawDataSize, + OUT VOID** FfsFile + ); + +EFI_STATUS +FvBufRemoveFile ( + IN OUT VOID *Fv, + IN EFI_GUID *Name + ); + +EFI_STATUS +FvBufUnifyBlockSizes ( + IN OUT VOID *Fv, + IN UINTN BlockSize + ); + +EFI_STATUS +FvBufShrinkWrap ( + IN VOID *Fv + ); + +#endif // #ifndef FirmwareVolumeBuffer_h_INCLUDED + -- cgit