diff options
Diffstat (limited to 'EdkModulePkg/Universal/PCD/Test/PcdTest.c')
-rw-r--r-- | EdkModulePkg/Universal/PCD/Test/PcdTest.c | 70 |
1 files changed, 18 insertions, 52 deletions
diff --git a/EdkModulePkg/Universal/PCD/Test/PcdTest.c b/EdkModulePkg/Universal/PCD/Test/PcdTest.c index 77e25ac2b6..21fa67a6aa 100644 --- a/EdkModulePkg/Universal/PCD/Test/PcdTest.c +++ b/EdkModulePkg/Universal/PCD/Test/PcdTest.c @@ -38,59 +38,25 @@ DoTest( VOID
)
{
- PCD_TOKEN_NUMBER tn;
- UINTN Size;
- VOID * Ptr;
- UINT32 Uint32;
- UINT32 Uint32a;
- UINT64 Uint64;
- UINT64 Uint64a;
- INTN i;
-
- tn = 0x00001000;
-
- 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);
+ UINT8 u8;
+ UINT16 u16;
+ UINT32 u32;
+ UINT64 u64;
+ u32 = 0xafafafaf;
+ PcdSet32(PcdTestDynamicUint32, u32);
+
+ u64 = 0xafafafaf00000000;
+ PcdSet64(PcdTestDynamicUint64, u64);
+
+ u8 = PcdGet8(PcdTestDynamicUint8);
+ u16 = PcdGet16(PcdTestDynamicUint16);
+
+
+ ASSERT (u8 == 0x01);
+ ASSERT (u16 == 0x1234);
+ ASSERT (u64 == PcdGet64(PcdTestDynamicUint64));
+ ASSERT (u32 == PcdGet32(PcdTestDynamicUint32));
return;
}
|