summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Universal/VariablePei/Variable.h
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2008-01-14 06:35:23 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2008-01-14 06:35:23 +0000
commit130e25699a6d060c966978e345c6c8eeed85d065 (patch)
tree9ba431713d743f899f3928f17d8b908a5efbe7ea /IntelFrameworkModulePkg/Universal/VariablePei/Variable.h
parent51dc1f659f280fefefc960377dc79490c03d3f5e (diff)
downloadedk2-platforms-130e25699a6d060c966978e345c6c8eeed85d065.tar.xz
1) Replace MACRO with C functions.
2) Add HEADER_VALID_ONLY state of variable, which represents only the header is valid and the data/name is stale. This may be caused by incomplete data updating. Adding the state helps to check whether the header is valid. If variable header is valid, then we must skip the data of variable with the valid size. If the header is invalid, we should only skip the header of variable. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4555 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/VariablePei/Variable.h')
-rw-r--r--IntelFrameworkModulePkg/Universal/VariablePei/Variable.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/IntelFrameworkModulePkg/Universal/VariablePei/Variable.h b/IntelFrameworkModulePkg/Universal/VariablePei/Variable.h
index 2f586c6f4a..0e37be5292 100644
--- a/IntelFrameworkModulePkg/Universal/VariablePei/Variable.h
+++ b/IntelFrameworkModulePkg/Universal/VariablePei/Variable.h
@@ -44,27 +44,6 @@ Abstract:
#define HEADER_ALIGN(Header) (((UINTN) (Header) + HEADER_ALIGNMENT - 1) & (~(HEADER_ALIGNMENT - 1)))
-#define NAMESIZE_OF_VARIABLE(Variable) \
- ((((Variable)->DataSize == (UINT32) -1) || \
- ((Variable)->Attributes == (UINT32) -1) || \
- ((Variable)->NameSize == (UINT32) -1)) ? \
- 0 : \
- (Variable)->NameSize \
- )
-
-#define DATASIZE_OF_VARIABLE(Variable) \
- ((((Variable)->DataSize == (UINT32) -1) || \
- ((Variable)->Attributes == (UINT32) -1) || \
- ((Variable)->NameSize == (UINT32) -1)) ? \
- 0 : \
- (Variable)->DataSize \
- )
-
-#define GET_VARIABLE_NAME_PTR(a) (CHAR16 *) ((UINTN) (a) + sizeof (VARIABLE_HEADER))
-
-#define GET_VARIABLE_DATA_PTR(a) \
- (UINT8 *) ((UINTN) GET_VARIABLE_NAME_PTR (a) + NAMESIZE_OF_VARIABLE(a) + GET_PAD_SIZE (NAMESIZE_OF_VARIABLE(a)))
-
typedef struct {
VARIABLE_HEADER *CurrPtr;
VARIABLE_HEADER *EndPtr;