mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-25 09:28:22 +08:00
91 lines
2.4 KiB
C
91 lines
2.4 KiB
C
|
/* ffsparser.h
|
||
|
|
||
|
Copyright (c) 2015, Nikolaj Schlej. 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,
|
||
|
WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||
|
|
||
|
|
||
|
Parsing data is an information needed for each level of image reconstruction
|
||
|
routines without the need of backward traversal
|
||
|
|
||
|
*/
|
||
|
|
||
|
#ifndef __PARSINGDATA_H__
|
||
|
#define __PARSINGDATA_H__
|
||
|
|
||
|
#include "basetypes.h"
|
||
|
|
||
|
//typedef struct _CAPSULE_PARSING_DATA {
|
||
|
//} CAPSULE_PARSING_DATA;
|
||
|
|
||
|
//typedef struct _IMAGE_PARSING_DATA {
|
||
|
//} IMAGE_PARSING_DATA;
|
||
|
|
||
|
//typedef struct _PADDING_PARSING_DATA {
|
||
|
//} PADDING_PARSING_DATA;
|
||
|
|
||
|
typedef struct _VOLUME_PARSING_DATA {
|
||
|
EFI_GUID extendedHeaderGuid;
|
||
|
UINT32 alignment;
|
||
|
UINT8 revision;
|
||
|
BOOLEAN hasExtendedHeader;
|
||
|
BOOLEAN hasZeroVectorCRC32;
|
||
|
BOOLEAN isWeakAligned;
|
||
|
} VOLUME_PARSING_DATA;
|
||
|
|
||
|
//typedef struct _FREE_SPACE_PARSING_DATA {
|
||
|
//} FREE_SPACE_PARSING_DATA;
|
||
|
|
||
|
typedef struct _FILE_PARSING_DATA {
|
||
|
UINT16 tail;
|
||
|
BOOLEAN hasTail;
|
||
|
} FILE_PARSING_DATA;
|
||
|
|
||
|
typedef struct _COMPRESSED_SECTION_PARSING_DATA {
|
||
|
UINT32 uncompressedSize;
|
||
|
UINT8 compressionType;
|
||
|
UINT8 algorithm;
|
||
|
} COMPRESSED_SECTION_PARSING_DATA;
|
||
|
|
||
|
typedef struct _GUIDED_SECTION_PARSING_DATA {
|
||
|
EFI_GUID guid;
|
||
|
UINT32 attributes;
|
||
|
} GUIDED_SECTION_PARSING_DATA;
|
||
|
|
||
|
typedef struct _FREEFORM_GUIDED_SECTION_PARSING_DATA {
|
||
|
EFI_GUID guid;
|
||
|
} FREEFORM_GUIDED_SECTION_PARSING_DATA;
|
||
|
|
||
|
typedef struct _SECTION_PARSING_DATA {
|
||
|
union {
|
||
|
COMPRESSED_SECTION_PARSING_DATA compressed;
|
||
|
GUIDED_SECTION_PARSING_DATA guidDefined;
|
||
|
FREEFORM_GUIDED_SECTION_PARSING_DATA freeformSubtypeGuid;
|
||
|
};
|
||
|
} SECTION_PARSING_DATA;
|
||
|
|
||
|
typedef struct _PARSING_DATA {
|
||
|
BOOLEAN fixed;
|
||
|
BOOLEAN isOnFlash;
|
||
|
UINT8 emptyByte;
|
||
|
UINT8 ffsVersion;
|
||
|
UINT32 offset;
|
||
|
UINT64 address;
|
||
|
union {
|
||
|
//CAPSULE_PARSING_DATA capsule;
|
||
|
//IMAGE_PARSING_DATA image;
|
||
|
//PADDING_PARSING_DATA padding;
|
||
|
VOLUME_PARSING_DATA volume;
|
||
|
//FREE_SPACE_PARSING_DATA freeSpace;
|
||
|
FILE_PARSING_DATA file;
|
||
|
SECTION_PARSING_DATA section;
|
||
|
};
|
||
|
} PARSING_DATA;
|
||
|
|
||
|
#endif
|