- 
                Notifications
    You must be signed in to change notification settings 
- Fork 349
Structure Array PCD
        Liming Gao edited this page Mar 21, 2019 
        ·
        1 revision
      
    - When PCD is declared in DEC file, VOID* will be replaced by C Array.
- C Array can be basic data type array, such as UINT8[10]
- C Array can be structure array, such as TEST[20]
- C Array can be flexible array, such as TEST[]
 gTestPkgTokenSpaceGuid.PcdName|{0x00}|TEST[]|0x10000000
- C Array PCD value is VOID * type. C source code uses PcdGetPtr(PcdName)API
 to get PCD value pointer, then convert it to C array, and access the element value.
- If PCD is configured as Dynamic/DynamicEx PCD, C source code can use
 PcdSetPtrS(PcdName, SizeOfBuffer, Buffer)API to update PCD value.
- Globle C structure or array can be initialized with the value.
- If PCD is declared as C Structure or Array, its value can be specified with C style value.
For example:
 gTestPkgTokenSpaceGuid.PcdName|{CODE({
 {0, {0, 0, 0, 0, 0, 0, 0}},
 {0, {0, 0, 0, 0, 0, 0, 0}},
 {0, {0, 0, 0, 0, 0, 0, 0}},
 {0, {0, 0, 0, 0, 0, 0, 0}},
 {0, {0, 0, 0, 0, 0, 0, 0}},
 {0, {0, 0, 0, 0, 0, 0, 0}},
 {0, {0, 0, 0, 0, 0, 0, 0}},
 {0, {0, 0, 0, 0, 0, 0, 0}},
 {0, {0, 0, 0, 0, 0, 0, 0}},
 {0, {0, 0, 0, 0, 0, 0, 0}},
 })}
Home
Getting Started with EDK II
Build Instructions
EDK II Platforms
EDK II Documents
EDK II Release Planning
Reporting Issues
Reporting Security Issues
Community Information
Inclusive Language
Additional Projects & Tasks
Training
Community Support
Community Virtual Meetings
GHSA GitHub Security Advisories Process (Draft)
Infosec-GHSA-Process-Proposal (Draft)