summaryrefslogtreecommitdiffstats
path: root/DuetPkg
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-30 00:13:41 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-30 00:13:41 +0000
commitd4577dceca346244bf99aed328444e4c069147d1 (patch)
treefd38a2e74a943fa526a4e142bf016e797174fe59 /DuetPkg
parent2a8e98291d2030e8eb25ed9dc4dbbf7c4453eb94 (diff)
downloadedk2-d4577dceca346244bf99aed328444e4c069147d1.tar.gz
edk2-d4577dceca346244bf99aed328444e4c069147d1.tar.bz2
edk2-d4577dceca346244bf99aed328444e4c069147d1.zip
Remove unnecessary use of FixedPcdxxx() functions and [FixedPcd] INF sections. These should only be used for PCDs that are used to pre-init global variables, pre-init global structures, or size arrays.
Do some minor clean ups to INF files git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9872 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg')
-rw-r--r--DuetPkg/FSVariable/FSVariable.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/DuetPkg/FSVariable/FSVariable.c b/DuetPkg/FSVariable/FSVariable.c
index 30a21d1e6b..2298e4e474 100644
--- a/DuetPkg/FSVariable/FSVariable.c
+++ b/DuetPkg/FSVariable/FSVariable.c
@@ -1301,12 +1301,12 @@ Returns:
//
// The size of the VariableName, including the Unicode Null in bytes plus
- // the DataSize is limited to maximum size of FixedPcdGet32(PcdMaxHardwareErrorVariableSize)
- // bytes for HwErrRec, and FixedPcdGet32(PcdMaxVariableSize) bytes for the others.
+ // the DataSize is limited to maximum size of PcdGet32 (PcdMaxHardwareErrorVariableSize)
+ // bytes for HwErrRec, and PcdGet32 (PcdMaxVariableSize) bytes for the others.
//
if ((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {
- if ((DataSize > FixedPcdGet32(PcdMaxHardwareErrorVariableSize)) ||
- (sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > FixedPcdGet32(PcdMaxHardwareErrorVariableSize))) {
+ if ((DataSize > PcdGet32(PcdMaxHardwareErrorVariableSize)) ||
+ (sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > PcdGet32(PcdMaxHardwareErrorVariableSize))) {
return EFI_INVALID_PARAMETER;
}
//
@@ -1316,8 +1316,8 @@ Returns:
return EFI_INVALID_PARAMETER;
}
} else {
- if ((DataSize > FixedPcdGet32(PcdMaxVariableSize)) ||
- (sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > FixedPcdGet32(PcdMaxVariableSize))) {
+ if ((DataSize > PcdGet32(PcdMaxVariableSize)) ||
+ (sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > PcdGet32(PcdMaxVariableSize))) {
return EFI_INVALID_PARAMETER;
}
}
@@ -1421,18 +1421,18 @@ Returns:
// Harware error record variable needs larger size.
//
if ((Attributes & (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) == (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) {
- *MaximumVariableStorageSize = FixedPcdGet32(PcdHwErrStorageSize);
- *MaximumVariableSize = FixedPcdGet32(PcdMaxHardwareErrorVariableSize) - sizeof (VARIABLE_HEADER);
+ *MaximumVariableStorageSize = PcdGet32(PcdHwErrStorageSize);
+ *MaximumVariableSize = PcdGet32(PcdMaxHardwareErrorVariableSize) - sizeof (VARIABLE_HEADER);
} else {
if ((Attributes & EFI_VARIABLE_NON_VOLATILE) != 0) {
- ASSERT (FixedPcdGet32(PcdHwErrStorageSize) < VariableStoreHeader->Size);
- *MaximumVariableStorageSize = VariableStoreHeader->Size - sizeof (VARIABLE_STORE_HEADER) - FixedPcdGet32(PcdHwErrStorageSize);
+ ASSERT (PcdGet32(PcdHwErrStorageSize) < VariableStoreHeader->Size);
+ *MaximumVariableStorageSize = VariableStoreHeader->Size - sizeof (VARIABLE_STORE_HEADER) - PcdGet32(PcdHwErrStorageSize);
}
//
- // Let *MaximumVariableSize be FixedPcdGet32(PcdMaxVariableSize) with the exception of the variable header size.
+ // Let *MaximumVariableSize be PcdGet32(PcdMaxVariableSize) with the exception of the variable header size.
//
- *MaximumVariableSize = FixedPcdGet32(PcdMaxVariableSize) - sizeof (VARIABLE_HEADER);
+ *MaximumVariableSize = PcdGet32(PcdMaxVariableSize) - sizeof (VARIABLE_HEADER);
}
//