From e26e327f7e3d27264e1986969a981ecd4d4ea116 Mon Sep 17 00:00:00 2001 From: Konstantin Aladyshev Date: Fri, 5 Aug 2022 16:53:29 +0300 Subject: Update PCDLesson source Signed-off-by: Konstantin Aladyshev --- UefiLessonsPkg/PCDLesson/PCDLesson.c | 67 ++++++++++++++++++++++------------ UefiLessonsPkg/PCDLesson/PCDLesson.inf | 48 ++++++++++++++++++------ 2 files changed, 80 insertions(+), 35 deletions(-) (limited to 'UefiLessonsPkg/PCDLesson') diff --git a/UefiLessonsPkg/PCDLesson/PCDLesson.c b/UefiLessonsPkg/PCDLesson/PCDLesson.c index 2853326..0fca03d 100644 --- a/UefiLessonsPkg/PCDLesson/PCDLesson.c +++ b/UefiLessonsPkg/PCDLesson/PCDLesson.c @@ -7,6 +7,7 @@ #include #include +#include #include EFI_STATUS @@ -16,34 +17,52 @@ UefiMain ( IN EFI_SYSTEM_TABLE *SystemTable ) { - Print(L"PcdMyVar32=%d\n", FixedPcdGet32(PcdMyVar32)); - Print(L"PcdMyVar32_1=%d\n", FixedPcdGet32(PcdMyVar32_1)); - Print(L"PcdMyVar32_2=%d\n", FixedPcdGet32(PcdMyVar32_2)); + Print(L"PcdInt8=0x%x\n", FixedPcdGet8(PcdInt8)); + Print(L"PcdInt16=0x%x\n", FixedPcdGet16(PcdInt16)); + Print(L"PcdInt32=0x%x\n", FixedPcdGet32(PcdInt32)); + Print(L"PcdInt64=0x%x\n", FixedPcdGet64(PcdInt64)); + Print(L"PcdBool=0x%x\n", FixedPcdGetBool(PcdBool)); + Print(L"PcdInt8=0x%x\n", PcdGet8(PcdInt8)); + Print(L"PcdInt16=0x%x\n", PcdGet16(PcdInt16)); + Print(L"PcdInt32=0x%x\n", PcdGet32(PcdInt32)); + Print(L"PcdInt64=0x%x\n", PcdGet64(PcdInt64)); + Print(L"PcdIntBool=0x%x\n", PcdGetBool(PcdBool)); - Print(L"PcdMyVar32=%d\n", PcdGet32(PcdMyVar32)); + Print(L"PcdAsciiStr=%a\n", FixedPcdGetPtr(PcdAsciiStr)); + Print(L"PcdAsciiStrSize=%d\n", FixedPcdGetSize(PcdAsciiStr)); + Print(L"PcdUCS2Str=%s\n", PcdGetPtr(PcdUCS2Str)); + Print(L"PcdUCS2StrSize=%d\n", PcdGetSize(PcdUCS2Str)); - Print(L"PcdMyPatchableVar32=%d\n", PcdGet32(PcdMyPatchableVar32)); - EFI_STATUS Status = PcdSet32S(PcdMyPatchableVar32, 44); - Print(L"Status=%r\n", Status); - Print(L"PcdMyPatchableVar32=%d\n", PcdGet32(PcdMyPatchableVar32)); - PatchPcdSet32(PcdMyPatchableVar32, 45); - Print(L"PcdMyPatchableVar32=%d\n", PatchPcdGet32(PcdMyPatchableVar32)); - - - Print(L"PcdMyFeatureFlagVar=%d\n", FeaturePcdGet(PcdMyFeatureFlagVar)); - Print(L"PcdMyFeatureFlagVar=%d\n", PcdGetBool(PcdMyFeatureFlagVar)); - Print(L"PcdMyVarBool=%d\n", FixedPcdGetBool(PcdMyVarBool)); - Print(L"PcdMyVarBool=%d\n", PcdGetBool(PcdMyVarBool)); - + for (UINTN i=0; i