From 33107d87e110c19815d2059e7df2e249bb125257 Mon Sep 17 00:00:00 2001 From: Konstantin Aladyshev Date: Thu, 4 Aug 2022 13:55:01 +0300 Subject: Update PCD override lesson Signed-off-by: Konstantin Aladyshev --- .../Lesson_21/UefiLessonsPkg/PCDLesson/PCDLesson.c | 34 ++++++++++++++++++++-- .../UefiLessonsPkg/PCDLesson/PCDLesson.inf | 31 ++++++++++++++++++-- 2 files changed, 59 insertions(+), 6 deletions(-) (limited to 'Lessons/Lesson_21/UefiLessonsPkg/PCDLesson') diff --git a/Lessons/Lesson_21/UefiLessonsPkg/PCDLesson/PCDLesson.c b/Lessons/Lesson_21/UefiLessonsPkg/PCDLesson/PCDLesson.c index ce92e04..4f22579 100644 --- a/Lessons/Lesson_21/UefiLessonsPkg/PCDLesson/PCDLesson.c +++ b/Lessons/Lesson_21/UefiLessonsPkg/PCDLesson/PCDLesson.c @@ -7,6 +7,7 @@ #include #include +#include #include EFI_STATUS @@ -16,8 +17,35 @@ 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"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)); + + for (UINTN i=0; i