2014-02-27 17:14:41 +08:00
|
|
|
/* types.h
|
|
|
|
|
2016-02-02 09:08:08 +08:00
|
|
|
Copyright (c) 2016, Nikolaj Schlej. All rights reserved.
|
2014-02-27 17:14:41 +08:00
|
|
|
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.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2016-04-09 18:47:19 +08:00
|
|
|
#ifndef TYPES_H
|
|
|
|
#define TYPES_H
|
2014-02-27 17:14:41 +08:00
|
|
|
|
|
|
|
#include "basetypes.h"
|
|
|
|
|
|
|
|
// Actions
|
|
|
|
namespace Actions
|
|
|
|
{
|
|
|
|
enum ActionTypes {
|
|
|
|
NoAction = 50,
|
2015-05-15 01:15:19 +08:00
|
|
|
Erase,
|
2014-02-27 17:14:41 +08:00
|
|
|
Create,
|
|
|
|
Insert,
|
|
|
|
Replace,
|
|
|
|
Remove,
|
|
|
|
Rebuild,
|
|
|
|
Rebase
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
// Types
|
|
|
|
namespace Types {
|
|
|
|
enum ItemTypes {
|
|
|
|
Root = 60,
|
|
|
|
Capsule,
|
|
|
|
Image,
|
|
|
|
Region,
|
|
|
|
Padding,
|
|
|
|
Volume,
|
|
|
|
File,
|
2015-02-06 16:47:19 +08:00
|
|
|
Section,
|
2016-03-21 06:59:03 +08:00
|
|
|
FreeSpace,
|
2016-04-17 07:25:44 +08:00
|
|
|
VssStore,
|
2017-12-11 09:56:00 +08:00
|
|
|
Vss2Store,
|
2016-04-17 07:25:44 +08:00
|
|
|
FtwStore,
|
|
|
|
FdcStore,
|
|
|
|
FsysStore,
|
|
|
|
EvsaStore,
|
|
|
|
FlashMapStore,
|
|
|
|
CmdbStore,
|
|
|
|
NvarEntry,
|
|
|
|
VssEntry,
|
|
|
|
FsysEntry,
|
|
|
|
EvsaEntry,
|
|
|
|
FlashMapEntry,
|
2016-04-15 02:36:59 +08:00
|
|
|
Microcode,
|
2016-04-17 07:25:44 +08:00
|
|
|
SlicData,
|
2014-02-27 17:14:41 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2015-02-06 16:47:19 +08:00
|
|
|
namespace Subtypes {
|
|
|
|
enum ImageSubtypes{
|
2016-04-07 14:23:37 +08:00
|
|
|
IntelImage = 90,
|
2015-02-06 16:47:19 +08:00
|
|
|
UefiImage
|
|
|
|
};
|
|
|
|
|
|
|
|
enum CapsuleSubtypes {
|
2016-04-07 14:23:37 +08:00
|
|
|
AptioSignedCapsule = 100,
|
2015-02-06 16:47:19 +08:00
|
|
|
AptioUnsignedCapsule,
|
2015-09-01 03:34:42 +08:00
|
|
|
UefiCapsule,
|
|
|
|
ToshibaCapsule
|
2015-02-06 16:47:19 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum VolumeSubtypes {
|
2016-04-07 14:23:37 +08:00
|
|
|
UnknownVolume = 110,
|
2015-02-06 16:47:19 +08:00
|
|
|
Ffs2Volume,
|
2016-03-28 21:03:32 +08:00
|
|
|
Ffs3Volume,
|
2016-04-07 14:23:37 +08:00
|
|
|
NvramVolume
|
2015-02-06 16:47:19 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum RegionSubtypes {
|
2016-02-02 09:08:08 +08:00
|
|
|
DescriptorRegion = 0,
|
2015-02-06 16:47:19 +08:00
|
|
|
BiosRegion,
|
2016-02-02 09:08:08 +08:00
|
|
|
MeRegion,
|
|
|
|
GbeRegion,
|
2015-12-30 06:39:43 +08:00
|
|
|
PdrRegion,
|
2017-12-11 09:56:00 +08:00
|
|
|
DevExp1Region,
|
|
|
|
Bios2Region,
|
|
|
|
MicrocodeRegion,
|
|
|
|
EcRegion,
|
|
|
|
DevExp2Region,
|
|
|
|
IeRegion,
|
|
|
|
Tgbe1Region,
|
|
|
|
Tgbe2Region,
|
2016-02-02 09:08:08 +08:00
|
|
|
Reserved1Region,
|
|
|
|
Reserved2Region,
|
2017-12-11 09:56:00 +08:00
|
|
|
PttRegion
|
2015-02-06 16:47:19 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum PaddingSubtypes {
|
2016-04-07 14:23:37 +08:00
|
|
|
ZeroPadding = 120,
|
2015-02-06 16:47:19 +08:00
|
|
|
OnePadding,
|
|
|
|
DataPadding
|
|
|
|
};
|
2016-03-21 06:59:03 +08:00
|
|
|
|
2016-04-17 07:25:44 +08:00
|
|
|
enum NvarEntrySubtypes {
|
|
|
|
InvalidNvarEntry = 130,
|
|
|
|
InvalidLinkNvarEntry,
|
|
|
|
LinkNvarEntry,
|
|
|
|
DataNvarEntry,
|
|
|
|
FullNvarEntry
|
2016-03-21 06:59:03 +08:00
|
|
|
};
|
2016-03-28 21:03:32 +08:00
|
|
|
|
2016-04-17 07:25:44 +08:00
|
|
|
enum VssEntrySubtypes {
|
|
|
|
InvalidVssEntry = 140,
|
|
|
|
StandardVssEntry,
|
|
|
|
AppleVssEntry,
|
2017-10-12 13:59:23 +08:00
|
|
|
AuthVssEntry,
|
|
|
|
IntelVssEntry
|
2016-04-07 14:23:37 +08:00
|
|
|
};
|
|
|
|
|
2016-12-23 06:34:24 +08:00
|
|
|
enum FsysEntrySubtypes {
|
|
|
|
InvalidFsysEntry = 150,
|
|
|
|
NormalFsysEntry
|
|
|
|
};
|
|
|
|
|
2016-04-17 07:25:44 +08:00
|
|
|
enum EvsaEntrySubtypes {
|
2016-12-23 06:34:24 +08:00
|
|
|
InvalidEvsaEntry = 160,
|
2016-04-07 14:23:37 +08:00
|
|
|
UnknownEvsaEntry,
|
|
|
|
GuidEvsaEntry,
|
|
|
|
NameEvsaEntry,
|
|
|
|
DataEvsaEntry,
|
2016-03-28 21:03:32 +08:00
|
|
|
};
|
2016-04-15 02:36:59 +08:00
|
|
|
|
|
|
|
enum FlashMapEntrySubtypes {
|
2016-12-23 06:34:24 +08:00
|
|
|
VolumeFlashMapEntry = 170,
|
2016-04-17 07:25:44 +08:00
|
|
|
DataFlashMapEntry
|
2016-04-15 02:36:59 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum MicrocodeSubtypes {
|
2016-12-23 06:34:24 +08:00
|
|
|
IntelMicrocode = 180,
|
2016-04-15 02:36:59 +08:00
|
|
|
AmdMicrocode
|
|
|
|
};
|
2016-04-17 07:25:44 +08:00
|
|
|
|
|
|
|
enum SlicDataSubtypes {
|
2016-12-23 06:34:24 +08:00
|
|
|
PubkeySlicData = 190,
|
2016-04-17 07:25:44 +08:00
|
|
|
MarkerSlicData
|
|
|
|
};
|
2016-10-10 14:05:04 +08:00
|
|
|
}
|
2014-02-27 17:14:41 +08:00
|
|
|
|
2016-06-26 11:54:21 +08:00
|
|
|
// *ToUString conversion routines
|
|
|
|
extern UString actionTypeToUString(const UINT8 action);
|
|
|
|
extern UString itemTypeToUString(const UINT8 type);
|
|
|
|
extern UString itemSubtypeToUString(const UINT8 type, const UINT8 subtype);
|
|
|
|
extern UString compressionTypeToUString(const UINT8 algorithm);
|
|
|
|
extern UString regionTypeToUString(const UINT8 type);
|
2016-07-15 03:22:51 +08:00
|
|
|
extern UString fitEntryTypeToUString(const UINT8 type);
|
2015-02-06 16:47:19 +08:00
|
|
|
|
2016-04-09 18:47:19 +08:00
|
|
|
#endif // TYPES_H
|