aboutsummaryrefslogtreecommitdiffstats
path: root/Lessons/Lesson_21/UefiLessonsPkg/PCDLesson/PCDLesson.c
diff options
context:
space:
mode:
Diffstat (limited to 'Lessons/Lesson_21/UefiLessonsPkg/PCDLesson/PCDLesson.c')
-rw-r--r--Lessons/Lesson_21/UefiLessonsPkg/PCDLesson/PCDLesson.c34
1 files changed, 31 insertions, 3 deletions
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 <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>
+#include <Library/DevicePathLib.h>
#include <Library/PcdLib.h>
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<FixedPcdGetSize(PcdArray); i++) {
+ Print(L"PcdArray[%d]=0x%02x\n", i, ((UINT8*)FixedPcdGetPtr(PcdArray))[i]);
+ }
+
+ Print(L"PcdGuidInBytes=%g\n", *(EFI_GUID*)FixedPcdGetPtr(PcdGuidInBytes));
+ Print(L"PcdGuid=%g\n", *(EFI_GUID*)FixedPcdGetPtr(PcdGuid));
+
+ Print(L"PcdDevicePath: %s\n", ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL*) FixedPcdGetPtr(PcdDevicePath), FALSE, FALSE));
+
+//-------------
+ Print(L"PcdInt32Override=%d\n", FixedPcdGet32(PcdInt32Override));
+//-------------
+
return EFI_SUCCESS;
}