mirror of https://github.com/acidanthera/audk.git
Refine comments
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7975 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
cf84d2671a
commit
9e40e4bd0a
|
@ -1014,7 +1014,7 @@ extern PEI_PCD_DATABASE_INIT gPEIPcdDbInit;
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Introduction of PEI PCD database //
|
||||
// Introduction of PCD database //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
|
@ -1144,6 +1144,13 @@ extern PEI_PCD_DATABASE_INIT gPEIPcdDbInit;
|
|||
To access a dynamicEx type PCD, pair of "token space guid/token number" all need
|
||||
to be specificed for PcdSet/PcdGet accessing macro.
|
||||
|
||||
Platform Token Number is started from 1, and inceased continuous. From whole
|
||||
platform scope, there are two zones: PEI Zone and DXE Zone
|
||||
| Platform Token Number
|
||||
----------|----------------------------------------------------------------
|
||||
PEI Zone: | 1 ~ PEI_LOCAL_TOKEN_NUMBER
|
||||
DXE Zone: | (PEI_LOCAL_TOKEN_NUMBER + 1) ~ (PEI_LOCAL_TOKEN_NUMBER + DXE_LOCAL_TOKEN_NUMBER)
|
||||
|
||||
3.2.3 Local Token Number
|
||||
To fast searching a PCD entry in PCD database, PCD driver translate
|
||||
platform token number to local token number via a mapping table.
|
||||
|
@ -1200,28 +1207,28 @@ extern PEI_PCD_DATABASE_INIT gPEIPcdDbInit;
|
|||
be seemed as "no default value".
|
||||
|
||||
3.3.1 Simple Sample PCD Database C Structure
|
||||
A general sample of PCD database structue is as follows:
|
||||
typedef struct _PCD_DATABASE {
|
||||
typedef struct _PCD_DATABASE_INIT {
|
||||
//===== Following is PCD database internal maintain structures
|
||||
DYNAMICEX_MAPPING ExMapTable[PEI_EXMAPPING_TABLE_SIZE];
|
||||
UINT32 LocalTokenNumberTable[PEI_LOCAL_TOKEN_NUMBER_TABLE_SIZE];
|
||||
GUID GuidTable[PEI_GUID_TABLE_SIZE];
|
||||
SIZE_INFO SizeTable[PEI_SIZE_TABLE_SIZE];
|
||||
UINT8 SkuIdTable[PEI_SKUID_TABLE_SIZE];
|
||||
SKU_ID SystemSkuId;
|
||||
|
||||
//===== Following is value structure for PCD with default value
|
||||
....
|
||||
....
|
||||
....
|
||||
} Init;
|
||||
typedef struct _PCD_DATABSE_UNINIT {
|
||||
//==== Following is value structure for PCD without default value
|
||||
....
|
||||
....
|
||||
} UnInit;
|
||||
}
|
||||
A general sample of PCD database structue is as follows:
|
||||
typedef struct _PCD_DATABASE {
|
||||
typedef struct _PCD_DATABASE_INIT {
|
||||
//===== Following is PCD database internal maintain structures
|
||||
DYNAMICEX_MAPPING ExMapTable[PEI_EXMAPPING_TABLE_SIZE];
|
||||
UINT32 LocalTokenNumberTable[PEI_LOCAL_TOKEN_NUMBER_TABLE_SIZE];
|
||||
GUID GuidTable[PEI_GUID_TABLE_SIZE];
|
||||
SIZE_INFO SizeTable[PEI_SIZE_TABLE_SIZE];
|
||||
UINT8 SkuIdTable[PEI_SKUID_TABLE_SIZE];
|
||||
SKU_ID SystemSkuId;
|
||||
|
||||
//===== Following is value structure for PCD with default value
|
||||
....
|
||||
....
|
||||
....
|
||||
} Init;
|
||||
typedef struct _PCD_DATABSE_UNINIT {
|
||||
//==== Following is value structure for PCD without default value
|
||||
....
|
||||
....
|
||||
} UnInit;
|
||||
}
|
||||
|
||||
3.3.2 PCD value structure in PCD database C structure
|
||||
The value's structure is generated by build tool in PCD database C structure.
|
||||
|
@ -1257,5 +1264,11 @@ extern PEI_PCD_DATABASE_INIT gPEIPcdDbInit;
|
|||
above ascii string table,
|
||||
UINT8 StringTable[13];
|
||||
The number of 13 in above sample is max size of byte array.
|
||||
|
||||
|
||||
3.3.3 Some utility structures in PCD Database
|
||||
3.3.3.1 GuidTable
|
||||
GuidTable array is used to store all related GUID value in PCD database:
|
||||
- Variable GUID for HII type PCD
|
||||
- Token space GUID for dynamicex type PCD
|
||||
|
||||
**/
|
||||
|
|
Loading…
Reference in New Issue