define the variable related to PCD for supporting big variable (>32K) easily.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4268 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
gtian 2007-11-05 16:11:50 +00:00
parent a4c9ede55f
commit 518d395c3b
8 changed files with 35 additions and 21 deletions

View File

@ -107,6 +107,7 @@
[Pcd.common] [Pcd.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize
[depex] [depex]
TRUE TRUE

View File

@ -17,12 +17,12 @@
#define VARIABLE_STORE_SIGNATURE EFI_SIGNATURE_32 ('$', 'V', 'S', 'S') #define VARIABLE_STORE_SIGNATURE EFI_SIGNATURE_32 ('$', 'V', 'S', 'S')
#define MAX_VARIABLE_SIZE 1024 #define MAX_VARIABLE_SIZE FixedPcdGet32(PcdMaxVariableSize)
// //
// Enlarges the hardware error record maximum variable size to 32K bytes // Enlarges the hardware error record maximum variable size to 32K bytes
// //
#define MAX_HARDWARE_ERROR_VARIABLE_SIZE 0x8000 #define MAX_HARDWARE_ERROR_VARIABLE_SIZE FixedPcdGet32(PcdMaxHardwareErrorVariableSize)
#define VARIABLE_DATA 0x55AA #define VARIABLE_DATA 0x55AA

View File

@ -28,12 +28,12 @@
[LibraryClasses.common] [LibraryClasses.common]
IpIoLib|Include/Library/IpIoLib.h IpIoLib|Include/Library/IpIoLib.h
NetLib|Include/Library/NetLib.h NetLib|Include/Library/NetLib.h
ResetSystemLib|Include/Library/ResetSystemLib.h ResetSystemLib|Include/Library/ResetSystemLib.h
UdpIoLib|Include/Library/UdpIoLib.h UdpIoLib|Include/Library/UdpIoLib.h
S3Lib|Include/Library/S3Lib.h S3Lib|Include/Library/S3Lib.h
RecoveryLib|Include/Library/RecoveryLib.h RecoveryLib|Include/Library/RecoveryLib.h
[Guids.common] [Guids.common]
gPcdDataBaseHobGuid = { 0xEA296D92, 0x0B69, 0x423C, { 0x8C, 0x28, 0x33, 0xB4, 0xE0, 0xA9, 0x12, 0x68 }} gPcdDataBaseHobGuid = { 0xEA296D92, 0x0B69, 0x423C, { 0x8C, 0x28, 0x33, 0xB4, 0xE0, 0xA9, 0x12, 0x68 }}
@ -130,6 +130,9 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv|32|UINT32|0x00010031 gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv|32|UINT32|0x00010031
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0|UINT32|0x30000001 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0|UINT32|0x30000001
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x0|UINT32|0x30000002 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x0|UINT32|0x30000002
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x400|UINT32|0x30000003
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize|0x8000|UINT32|0x30000004
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x10000|UINT32|0x30000005
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x0|UINT32|0x30000013 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x0|UINT32|0x30000013
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x0|UINT32|0x30000014 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x0|UINT32|0x30000014
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x0|UINT32|0x30000010 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x0|UINT32|0x30000010
@ -150,21 +153,21 @@
[PcdsDynamic.common] [PcdsDynamic.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0|UINT32|0x30000001 # gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0|UINT32|0x30000001
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x0|UINT32|0x30000002 # gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x0|UINT32|0x30000002
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x0|UINT32|0x30000013 # gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x0|UINT32|0x30000013
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x0|UINT32|0x30000014 # gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x0|UINT32|0x30000014
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x0|UINT32|0x30000010 # gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x0|UINT32|0x30000010
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x0|UINT32|0x30000011 # gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x0|UINT32|0x30000011
[PcdsPatchableInModule.common] [PcdsPatchableInModule.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPerformanceLogEntries|28|UINT8|0x0001002f gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPerformanceLogEntries|28|UINT8|0x0001002f
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0|UINT32|0x30000001 # gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0|UINT32|0x30000001
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x0|UINT32|0x30000002 # gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x0|UINT32|0x30000002
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x0|UINT32|0x30000013 # gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x0|UINT32|0x30000013
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x0|UINT32|0x30000014 # gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x0|UINT32|0x30000014
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x0|UINT32|0x30000010 # gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x0|UINT32|0x30000010
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x0|UINT32|0x30000011 # gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x0|UINT32|0x30000011
[PcdsFeatureFlag.IA32] [PcdsFeatureFlag.IA32]

View File

@ -57,6 +57,11 @@
gEfiVariableArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED gEfiVariableArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED
gEfiVariableWriteArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED gEfiVariableWriteArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED
[Pcd.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize
[Depex] [Depex]
TRUE TRUE

View File

@ -37,10 +37,11 @@ Abstract:
#include <Library/UefiBootServicesTableLib.h> #include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h> #include <Library/UefiLib.h>
#include <Library/BaseLib.h> #include <Library/BaseLib.h>
#include <Library/PcdLib.h>
#include <VariableFormat.h> #include <VariableFormat.h>
#define VARIABLE_STORE_SIZE (64 * 1024) #define VARIABLE_STORE_SIZE FixedPcdGet32(PcdVariableStoreSize)
#define SCRATCH_SIZE (4 * 1024) #define SCRATCH_SIZE FixedPcdGet32(PcdMaxVariableSize)
// //
// Define GET_PAD_SIZE to optimize compiler // Define GET_PAD_SIZE to optimize compiler

View File

@ -64,6 +64,7 @@
[Pcd.common] [Pcd.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize
[Depex] [Depex]
TRUE TRUE

View File

@ -45,8 +45,8 @@ Abstract:
#define VARIABLE_RECLAIM_THRESHOLD (1024) #define VARIABLE_RECLAIM_THRESHOLD (1024)
#define VARIABLE_STORE_SIZE (64 * 1024) #define VARIABLE_STORE_SIZE FixedPcdGet32(PcdVariableStoreSize)
#define SCRATCH_SIZE (4 * 1024) #define SCRATCH_SIZE FixedPcdGet32(PcdMaxVariableSize)
// //
// Define GET_PAD_SIZE to optimize compiler // Define GET_PAD_SIZE to optimize compiler

View File

@ -69,6 +69,9 @@
[Pcd.common] [Pcd.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize
[FeaturePcd.common] [FeaturePcd.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics