return EFI_INVALID_PARAMETER;\r
}\r
\r
-#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)\r
//\r
// The size of the VariableName, including the Unicode Null in bytes plus\r
// the DataSize is limited to maximum size of MAX_HARDWARE_ERROR_VARIABLE_SIZE (32K)\r
return EFI_INVALID_PARAMETER;\r
} \r
} \r
-#else \r
- //\r
- // The size of the VariableName, including the Unicode Null in bytes plus\r
- // the DataSize is limited to maximum size of MAX_VARIABLE_SIZE (1024) bytes.\r
- //\r
- if ((DataSize > MAX_VARIABLE_SIZE) ||\r
- (sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > MAX_VARIABLE_SIZE)) {\r
- return EFI_INVALID_PARAMETER;\r
- } \r
-#endif\r
+\r
//\r
// Check whether the input variable is already existed\r
//\r
return EFI_SUCCESS;\r
}\r
\r
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
EFI_STATUS\r
EFIAPI\r
QueryVariableInfo (\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
-#if (EFI_SPECIFICATION_VERSION >= 0x0002000A) \r
if((Attributes & (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) == 0) {\r
//\r
// Make sure the Attributes combination is supported by the platform.\r
//\r
return EFI_UNSUPPORTED; \r
} \r
-#else\r
- if((Attributes & (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS)) == 0) {\r
- //\r
- // Make sure the Attributes combination is supported by the platform.\r
- //\r
- return EFI_UNSUPPORTED; \r
- } \r
-#endif \r
else if ((Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) == EFI_VARIABLE_RUNTIME_ACCESS) {\r
//\r
// Make sure if runtime bit is set, boot service bit is set also.\r
//\r
*MaximumVariableSize = MAX_VARIABLE_SIZE - sizeof (VARIABLE_HEADER);\r
\r
-#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)\r
//\r
// Harware error record variable needs larger size.\r
//\r
if ((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {\r
*MaximumVariableSize = MAX_HARDWARE_ERROR_VARIABLE_SIZE - sizeof (VARIABLE_HEADER);\r
}\r
-#endif\r
\r
//\r
// Point to the starting address of the variables.\r
\r
return EFI_SUCCESS;\r
}\r
-#endif\r
\r
EFI_STATUS\r
EFIAPI\r
SystemTable->RuntimeServices->GetNextVariableName = GetNextVariableName;\r
SystemTable->RuntimeServices->SetVariable = SetVariable;\r
\r
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
SystemTable->RuntimeServices->QueryVariableInfo = QueryVariableInfo;\r
-#endif\r
\r
//\r
// Now install the Variable Runtime Architectural Protocol on a new handle\r