MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / ParseSection

Function ParseSection

BaseTools/Source/C/VolInfo/VolInfo.c:1627–2083  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1625}
1626
1627EFI_STATUS
1628ParseSection (
1629 IN UINT8 *SectionBuffer,
1630 IN UINT32 BufferLength
1631 )
1632/*++
1633
1634Routine Description:
1635
1636 Parses EFI Sections
1637
1638Arguments:
1639
1640 SectionBuffer - Buffer containing the section to parse.
1641 BufferLength - Length of SectionBuffer
1642
1643Returns:
1644
1645 EFI_SECTION_ERROR - Problem with section parsing.
1646 (a) compression errors
1647 (b) unrecognized section
1648 EFI_UNSUPPORTED - Do not know how to parse the section.
1649 EFI_SUCCESS - Section successfully parsed.
1650 EFI_OUT_OF_RESOURCES - Memory allocation failed.
1651
1652--*/
1653{
1654 EFI_SECTION_TYPE Type;
1655 UINT8 *Ptr;
1656 UINT32 SectionLength;
1657 UINT32 SectionHeaderLen;
1658 CHAR8 *SectionName;
1659 EFI_STATUS Status;
1660 UINT32 ParsedLength;
1661 UINT8 *CompressedBuffer;
1662 UINT32 CompressedLength;
1663 UINT8 *UncompressedBuffer;
1664 UINT32 UncompressedLength;
1665 UINT8 *ToolOutputBuffer;
1666 UINT32 ToolOutputLength;
1667 UINT8 CompressionType;
1668 UINT32 DstSize;
1669 UINT32 ScratchSize;
1670 UINT8 *ScratchBuffer;
1671 DECOMPRESS_FUNCTION DecompressFunction;
1672 GETINFO_FUNCTION GetInfoFunction;
1673 // CHAR16 *name;
1674 CHAR8 *ExtractionTool;
1675 CHAR8 *ToolInputFile;
1676 CHAR8 *ToolOutputFile;
1677 CHAR8 *SystemCommand;
1678 EFI_GUID *EfiGuid;
1679 UINT16 DataOffset;
1680 UINT16 Attributes;
1681 UINT32 RealHdrLen;
1682 CHAR8 *ToolInputFileName;
1683 CHAR8 *ToolOutputFileName;
1684 CHAR8 *UIFileName;

Callers 1

PrintFileInfoFunction · 0.85

Calls 15

GetLengthFunction · 0.85
GetSectionFileLengthFunction · 0.85
GetSectionHeaderLengthFunction · 0.85
SectionNameToStrFunction · 0.85
printfFunction · 0.85
RebaseImageFunction · 0.85
PutFileImageFunction · 0.85
fopenFunction · 0.85
fcloseFunction · 0.85
strrchrFunction · 0.85
removeFunction · 0.85
UnicodeStrLenFunction · 0.85

Tested by

no test coverage detected