Check in the Pcd service Driver/PEIM according to the new way of generating PCD Database
LIMITATION: 1) ONLY dynamic type PCD is supported for now. DynamicEx is not supported. 2) HII enable and VPD is not tested. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@253 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -38,59 +38,25 @@ DoTest(
|
||||
VOID
|
||||
)
|
||||
{
|
||||
PCD_TOKEN_NUMBER tn;
|
||||
UINTN Size;
|
||||
VOID * Ptr;
|
||||
UINT32 Uint32;
|
||||
UINT32 Uint32a;
|
||||
UINT64 Uint64;
|
||||
UINT64 Uint64a;
|
||||
INTN i;
|
||||
UINT8 u8;
|
||||
UINT16 u16;
|
||||
UINT32 u32;
|
||||
UINT64 u64;
|
||||
|
||||
u32 = 0xafafafaf;
|
||||
PcdSet32(PcdTestDynamicUint32, u32);
|
||||
|
||||
tn = 0x00001000;
|
||||
u64 = 0xafafafaf00000000;
|
||||
PcdSet64(PcdTestDynamicUint64, u64);
|
||||
|
||||
Size = LibPcdGetSize (tn);
|
||||
Ptr = LibPcdGetPtr (tn); /* a:RW;2880;512!e:RW;262144;512 */
|
||||
|
||||
tn = 0x00001001;
|
||||
Size = LibPcdGetSize (tn); /* FW;40960;512 */
|
||||
|
||||
tn = 0x00001002;
|
||||
Size = LibPcdGetSize (tn); /* FW;40960;512 */
|
||||
Ptr = LibPcdGetPtr (tn);
|
||||
|
||||
LibPcdSetSku (0x0a);
|
||||
tn = 0x2233;
|
||||
Uint64 = LibPcdGet64 (tn);
|
||||
|
||||
LibPcdSetSku (0x0b);
|
||||
Uint64 = LibPcdGet64 (tn);
|
||||
|
||||
LibPcdSetSku (0x0c);
|
||||
Uint64a = LibPcdGet64 (tn);
|
||||
|
||||
LibPcdSetSku (0);
|
||||
tn = 0x2233;
|
||||
Uint64 = LibPcdGet64 (tn);
|
||||
|
||||
|
||||
tn = 0xfaceface;
|
||||
Size = LibPcdGetExSize (&Guid1, tn);
|
||||
Uint32 = LibPcdGetEx32 (&Guid1, tn);
|
||||
|
||||
LibPcdCallBackOnSet (&Guid1, tn, OnsetCallback1);
|
||||
|
||||
LibPcdCancelCallBackOnSet (&Guid1, tn, OnsetCallback1);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
Uint32a = LibPcdSetEx32 (&Guid1, tn, Uint32 + i);
|
||||
DebugPrint (0x80000000, "%x\n", Uint32a);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Uint32 = LibPcdGet32 (tn);
|
||||
|
||||
u8 = PcdGet8(PcdTestDynamicUint8);
|
||||
u16 = PcdGet16(PcdTestDynamicUint16);
|
||||
|
||||
|
||||
ASSERT (u8 == 0x01);
|
||||
ASSERT (u16 == 0x1234);
|
||||
ASSERT (u64 == PcdGet64(PcdTestDynamicUint64));
|
||||
ASSERT (u32 == PcdGet32(PcdTestDynamicUint32));
|
||||
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user