diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-04-30 09:08:49 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-04-30 09:08:49 +0000 |
commit | e5653d946d3e9ade00365950826268a9d4afdf91 (patch) | |
tree | cb5514a4fa8cdae7e28fc0f61733d2c9888b555e /DuetPkg/FSVariable | |
parent | 22f5582e62c270b37969d91ff8e2afcc58f7cbcd (diff) | |
download | edk2-platforms-e5653d946d3e9ade00365950826268a9d4afdf91.tar.xz |
Fix some bugs in FSVariable and BdsPlatform for duet platform.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5155 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg/FSVariable')
-rw-r--r-- | DuetPkg/FSVariable/FSVariable.c | 27 | ||||
-rw-r--r-- | DuetPkg/FSVariable/FSVariable.inf | 1 |
2 files changed, 2 insertions, 26 deletions
diff --git a/DuetPkg/FSVariable/FSVariable.c b/DuetPkg/FSVariable/FSVariable.c index cfe76ccc95..0977887818 100644 --- a/DuetPkg/FSVariable/FSVariable.c +++ b/DuetPkg/FSVariable/FSVariable.c @@ -743,7 +743,6 @@ Returns: return EFI_INVALID_PARAMETER;
}
-#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
//
// The size of the VariableName, including the Unicode Null in bytes plus
// the DataSize is limited to maximum size of MAX_HARDWARE_ERROR_VARIABLE_SIZE (32K)
@@ -760,16 +759,7 @@ Returns: return EFI_INVALID_PARAMETER;
}
}
-#else
- //
- // The size of the VariableName, including the Unicode Null in bytes plus
- // the DataSize is limited to maximum size of MAX_VARIABLE_SIZE (1024) bytes.
- //
- if ((DataSize > MAX_VARIABLE_SIZE) ||
- (sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > MAX_VARIABLE_SIZE)) {
- return EFI_INVALID_PARAMETER;
- }
-#endif
+
//
// Check whether the input variable is already existed
//
@@ -984,7 +974,6 @@ Returns: return EFI_SUCCESS;
}
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
EFI_STATUS
EFIAPI
QueryVariableInfo (
@@ -1028,21 +1017,12 @@ Returns: return EFI_INVALID_PARAMETER;
}
-#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
if((Attributes & (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) == 0) {
//
// Make sure the Attributes combination is supported by the platform.
//
return EFI_UNSUPPORTED;
}
-#else
- if((Attributes & (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS)) == 0) {
- //
- // Make sure the Attributes combination is supported by the platform.
- //
- return EFI_UNSUPPORTED;
- }
-#endif
else if ((Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) == EFI_VARIABLE_RUNTIME_ACCESS) {
//
// Make sure if runtime bit is set, boot service bit is set also.
@@ -1070,14 +1050,12 @@ Returns: //
*MaximumVariableSize = MAX_VARIABLE_SIZE - sizeof (VARIABLE_HEADER);
-#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
//
// Harware error record variable needs larger size.
//
if ((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {
*MaximumVariableSize = MAX_HARDWARE_ERROR_VARIABLE_SIZE - sizeof (VARIABLE_HEADER);
}
-#endif
//
// Point to the starting address of the variables.
@@ -1124,7 +1102,6 @@ Returns: return EFI_SUCCESS;
}
-#endif
EFI_STATUS
EFIAPI
@@ -1299,9 +1276,7 @@ Returns: SystemTable->RuntimeServices->GetNextVariableName = GetNextVariableName;
SystemTable->RuntimeServices->SetVariable = SetVariable;
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
SystemTable->RuntimeServices->QueryVariableInfo = QueryVariableInfo;
-#endif
//
// Now install the Variable Runtime Architectural Protocol on a new handle
diff --git a/DuetPkg/FSVariable/FSVariable.inf b/DuetPkg/FSVariable/FSVariable.inf index d2c29e926c..52a805d036 100644 --- a/DuetPkg/FSVariable/FSVariable.inf +++ b/DuetPkg/FSVariable/FSVariable.inf @@ -66,6 +66,7 @@ [Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize
+ gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize
[Depex]
TRUE
|