aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lessons/Lesson_20/README.md6
-rw-r--r--Lessons/Lesson_20/UefiLessonsPkg/Include/CustomPcdTypes.h23
-rw-r--r--Lessons/Lesson_20/UefiLessonsPkg/UefiLessonsPkg.dec7
-rw-r--r--Lessons/Lesson_25/UefiLessonsPkg/PCDLesson/PCDLesson.c68
-rw-r--r--Lessons/Lesson_25/UefiLessonsPkg/PCDLesson/PCDLesson.inf71
-rw-r--r--Lessons/Lesson_25/UefiLessonsPkg/UefiLessonsPkg.dec103
-rw-r--r--Lessons/Lesson_25/UefiLessonsPkg/UefiLessonsPkg.dsc98
-rw-r--r--Lessons/Lesson_29/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_35/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_36/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_38/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_43/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_47/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_48/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_50/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_51/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_53/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_54/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_55/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_57/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_58/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_59/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_60/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_61/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_62/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_64/UefiLessonsPkg/UefiLessonsPkg.dsc3
-rw-r--r--Lessons/Lesson_72/UefiLessonsPkg/UefiLessonsPkg.dsc3
27 files changed, 373 insertions, 63 deletions
diff --git a/Lessons/Lesson_20/README.md b/Lessons/Lesson_20/README.md
index e9ad949..8dab81d 100644
--- a/Lessons/Lesson_20/README.md
+++ b/Lessons/Lesson_20/README.md
@@ -631,6 +631,12 @@ typedef struct {
#endif
```
+Add the `Include` folder to the DEC file:
+```
+[Includes]
+ Include
+```
+
You can use the created `CustomStruct` structure type and initialize its values via this sytnax:
```
gUefiLessonsPkgTokenSpaceGuid.PcdCustomStruct|{0}|CustomStruct|0x535D4CB5 {
diff --git a/Lessons/Lesson_20/UefiLessonsPkg/Include/CustomPcdTypes.h b/Lessons/Lesson_20/UefiLessonsPkg/Include/CustomPcdTypes.h
new file mode 100644
index 0000000..0b9eab0
--- /dev/null
+++ b/Lessons/Lesson_20/UefiLessonsPkg/Include/CustomPcdTypes.h
@@ -0,0 +1,23 @@
+#ifndef CUSTOM_PCD_TYPES_H
+#define CUSTOM_PCD_TYPES_H
+
+typedef struct {
+ EFI_GUID Guid;
+ CHAR16 Name[6];
+} InnerCustomStruct;
+
+typedef struct {
+ UINT8 Val8;
+ UINT32 Val32[2];
+ InnerCustomStruct ValStruct;
+ union {
+ struct {
+ UINT8 Field1:1;
+ UINT8 Field2:4;
+ UINT8 Filed3:3;
+ } BitFields;
+ UINT8 Byte;
+ } ValUnion;
+} CustomStruct;
+
+#endif
diff --git a/Lessons/Lesson_20/UefiLessonsPkg/UefiLessonsPkg.dec b/Lessons/Lesson_20/UefiLessonsPkg/UefiLessonsPkg.dec
index 2fb6e56..3ce3c6e 100644
--- a/Lessons/Lesson_20/UefiLessonsPkg/UefiLessonsPkg.dec
+++ b/Lessons/Lesson_20/UefiLessonsPkg/UefiLessonsPkg.dec
@@ -9,9 +9,10 @@
PACKAGE_NAME = UefiLessonsPkg
PACKAGE_GUID = 7e7edbba-ca2c-4177-a3f0-d3371358773a
PACKAGE_VERSION = 1.01
-
-[Includes]
-
+
+[Includes]
+ Include
+
[LibraryClasses]
[Guids]
diff --git a/Lessons/Lesson_25/UefiLessonsPkg/PCDLesson/PCDLesson.c b/Lessons/Lesson_25/UefiLessonsPkg/PCDLesson/PCDLesson.c
new file mode 100644
index 0000000..0fca03d
--- /dev/null
+++ b/Lessons/Lesson_25/UefiLessonsPkg/PCDLesson/PCDLesson.c
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2021, Konstantin Aladyshev <aladyshev22@gmail.com>
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/UefiLib.h>
+
+#include <Library/DevicePathLib.h>
+#include <Library/PcdLib.h>
+
+EFI_STATUS
+EFIAPI
+UefiMain (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+ 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));
+//-------
+ Print(L"PcdFeatureFlag=%d\n", FeaturePcdGet(PcdFeatureFlag));
+ Print(L"PcdFeatureFlag=%d\n", PcdGetBool(PcdFeatureFlag));
+ Print(L"PcdBool=%d\n", FixedPcdGetBool(PcdBool));
+ Print(L"PcdBool=%d\n", PcdGetBool(PcdBool));
+//-------
+ Print(L"PcdPatchableInt32=0x%x\n", PatchPcdGet32(PcdPatchableInt32));
+ Print(L"PcdPatchableInt32=0x%x\n", PcdGet32(PcdPatchableInt32));
+ PatchPcdSet32(PcdPatchableInt32, 43);
+ Print(L"PcdPatchableInt32=%d\n", PatchPcdGet32(PcdPatchableInt32));
+ EFI_STATUS Status = PcdSet32S(PcdPatchableInt32, 44);
+ Print(L"Status=%r\n", Status);
+ Print(L"PcdPatchableInt32=%d\n", PatchPcdGet32(PcdPatchableInt32));
+//-------
+ Print(L"PcdDynamicInt32=0x%x\n", PcdGet32(PcdDynamicInt32));
+ PcdSet32S(PcdDynamicInt32, 0xBEEFBEEF);
+ Print(L"PcdDynamicInt32=0x%x\n", PcdGet32(PcdDynamicInt32));
+
+ Print(L"PcdDynamicExInt32=%x\n", PcdGetEx32(&gUefiLessonsPkgTokenSpaceGuid, PcdDynamicExInt32));
+ PcdSetEx32S(&gUefiLessonsPkgTokenSpaceGuid, PcdDynamicExInt32, 0x77777777);
+ Print(L"PcdDynamicExInt32=%x\n", PcdGetEx32(&gUefiLessonsPkgTokenSpaceGuid, PcdDynamicExInt32));
+ return EFI_SUCCESS;
+}
diff --git a/Lessons/Lesson_25/UefiLessonsPkg/PCDLesson/PCDLesson.inf b/Lessons/Lesson_25/UefiLessonsPkg/PCDLesson/PCDLesson.inf
new file mode 100644
index 0000000..4bc872f
--- /dev/null
+++ b/Lessons/Lesson_25/UefiLessonsPkg/PCDLesson/PCDLesson.inf
@@ -0,0 +1,71 @@
+##
+# Copyright (c) 2021, Konstantin Aladyshev <aladyshev22@gmail.com>
+#
+# SPDX-License-Identifier: MIT
+##
+
+[Defines]
+ INF_VERSION = 1.25
+ BASE_NAME = PCDLesson
+ FILE_GUID = 8c1a6b71-0c4b-4497-aaad-07404edf142c
+ MODULE_TYPE = UEFI_APPLICATION
+ VERSION_STRING = 1.0
+ ENTRY_POINT = UefiMain
+
+[Sources]
+ PCDLesson.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ UefiLessonsPkg/UefiLessonsPkg.dec
+
+[LibraryClasses]
+ UefiApplicationEntryPoint
+ UefiLib
+
+[FixedPcd]
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt8
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt16
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt32
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt64
+ gUefiLessonsPkgTokenSpaceGuid.PcdBool
+ gUefiLessonsPkgTokenSpaceGuid.PcdExpression
+ gUefiLessonsPkgTokenSpaceGuid.PcdExpression_1
+ gUefiLessonsPkgTokenSpaceGuid.PcdExpression_2
+ gUefiLessonsPkgTokenSpaceGuid.PcdExpression_3
+ gUefiLessonsPkgTokenSpaceGuid.PcdAsciiStr
+ gUefiLessonsPkgTokenSpaceGuid.PcdUCS2Str
+ gUefiLessonsPkgTokenSpaceGuid.PcdArray
+ gUefiLessonsPkgTokenSpaceGuid.PcdGuidInBytes
+ gUefiLessonsPkgTokenSpaceGuid.PcdGuid
+ gUefiLessonsPkgTokenSpaceGuid.PcdGuidByPCD
+ gUefiLessonsPkgTokenSpaceGuid.PcdGuidByEfiGuid
+ gUefiLessonsPkgTokenSpaceGuid.PcdDevicePath
+ gUefiLessonsPkgTokenSpaceGuid.PcdIntCasts
+ gUefiLessonsPkgTokenSpaceGuid.PcdWithLabels
+ gUefiLessonsPkgTokenSpaceGuid.PcdArrayExt
+ gUefiLessonsPkgTokenSpaceGuid.PcdCustomStruct
+ gUefiLessonsPkgTokenSpaceGuid.PcdCustomStruct_1
+ gUefiLessonsPkgTokenSpaceGuid.PcdArrayWithFixedSize
+ gUefiLessonsPkgTokenSpaceGuid.PcdArrayWithFixedSize_1
+ gUefiLessonsPkgTokenSpaceGuid.PcdArrayWithFixedSize_2
+ gUefiLessonsPkgTokenSpaceGuid.PcdArrayWithFixedSize_3
+ gUefiLessonsPkgTokenSpaceGuid.PcdArrayWithFixedSize_4
+
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt32Override|43
+
+ gUefiLessonsPkgTokenSpaceGuid.Region1Offset
+ gUefiLessonsPkgTokenSpaceGuid.Region1Size
+
+[FeaturePcd]
+ gUefiLessonsPkgTokenSpaceGuid.PcdFeatureFlag
+
+[PatchPcd]
+ gUefiLessonsPkgTokenSpaceGuid.PcdPatchableInt32
+
+[Pcd]
+ gUefiLessonsPkgTokenSpaceGuid.PcdDynamicInt32
+
+[PcdEx]
+ gUefiLessonsPkgTokenSpaceGuid.PcdDynamicExInt32
+
diff --git a/Lessons/Lesson_25/UefiLessonsPkg/UefiLessonsPkg.dec b/Lessons/Lesson_25/UefiLessonsPkg/UefiLessonsPkg.dec
new file mode 100644
index 0000000..a841f53
--- /dev/null
+++ b/Lessons/Lesson_25/UefiLessonsPkg/UefiLessonsPkg.dec
@@ -0,0 +1,103 @@
+##
+# Copyright (c) 2021, Konstantin Aladyshev <aladyshev22@gmail.com>
+#
+# SPDX-License-Identifier: MIT
+##
+
+[Defines]
+ DEC_SPECIFICATION = 0x00010005
+ PACKAGE_NAME = UefiLessonsPkg
+ PACKAGE_GUID = 7e7edbba-ca2c-4177-a3f0-d3371358773a
+ PACKAGE_VERSION = 1.01
+
+[Includes]
+ Include
+
+[Guids]
+ # FILE_GUID as defined in UefiLessonsPkg/HelloWorld/HelloWorld.inf
+ gHelloWorldFileGuid = {0x2e55fa38, 0xf148, 0x42d3, {0xaf, 0x90, 0x1b, 0xe2, 0x47, 0x32, 0x3e, 0x30}}
+ gUefiLessonsPkgTokenSpaceGuid = {0x150cab53, 0xad47, 0x4385, {0xb5, 0xdd, 0xbc, 0xfc, 0x76, 0xba, 0xca, 0xf0}}
+ gHIIStringsCGuid = { 0x8e0b8ed3, 0x14f7, 0x499d, { 0xa2, 0x24, 0xae, 0xe8, 0x9d, 0xc9, 0x7f, 0xa3 }}
+ gHIIStringsUNIGuid = { 0x6ee19058, 0x0fe2, 0x44ed, { 0x89, 0x1c, 0xa5, 0xd7, 0xe1, 0x08, 0xee, 0x1a }}
+ gHIIStringsUNIRCGuid = { 0x785693b4, 0x623e, 0x40fa, { 0x9a, 0x45, 0x68, 0xda, 0x38, 0x30, 0x89, 0xdd }}
+ gHIIAddRussianFontGuid = { 0x9fe2f616, 0x323c, 0x45a7, { 0x87, 0xa2, 0xdf, 0xef, 0xf5, 0x17, 0xcc, 0x66 }}
+
+[Protocols]
+ gSimpleClassProtocolGuid = { 0xb5510eea, 0x6f11, 0x4e4b, { 0xad, 0x0f, 0x35, 0xce, 0x17, 0xbd, 0x7a, 0x67 }}
+
+[PcdsFixedAtBuild]
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt8|0x88|UINT8|0x3B81CDF1
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt16|0x1616|UINT16|0x77DFB6E6
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt32|0x32323232|UINT32|0xF2A48130
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt64|0x6464646464646464|UINT64|0x652F4E29
+ gUefiLessonsPkgTokenSpaceGuid.PcdBool|TRUE|BOOLEAN|0x69E88A63
+ gUefiLessonsPkgTokenSpaceGuid.PcdExpression|0xFF000000 + 0x00FFFFFF|UINT32|0x9C405222
+ gUefiLessonsPkgTokenSpaceGuid.PcdExpression_1|((0xFFFFFFFF & 0x000000FF) << 8) + 0x33|UINT32|0x5911C44B
+ gUefiLessonsPkgTokenSpaceGuid.PcdExpression_2|(0x00000000 | 0x00100000)|UINT32|0xAD880207
+ gUefiLessonsPkgTokenSpaceGuid.PcdExpression_3|((56 < 78) || !(23 > 44))|BOOLEAN|0x45EDE955
+ gUefiLessonsPkgTokenSpaceGuid.PcdAsciiStr|"hello"|VOID*|0xB29914B5
+ gUefiLessonsPkgTokenSpaceGuid.PcdUCS2Str|L"hello"|VOID*|0xF22124E5
+ gUefiLessonsPkgTokenSpaceGuid.PcdArray|{0xa5, 0xA6, 0xA7}|VOID*|0xD5DB9A27
+ gUefiLessonsPkgTokenSpaceGuid.PcdGuidInBytes|{0x07, 0x07, 0x74, 0xF1, 0x1D, 0x69, 0x03, 0x42, 0xBF, 0xAB, 0x99, 0xE1, 0x32, 0xFA, 0x41, 0x66}|VOID*|0xB9E0CDC0
+ gUefiLessonsPkgTokenSpaceGuid.PcdGuid|{GUID("f1740707-691d-4203-bfab-99e132fa4166")}|VOID*|0x7F2066F7
+ gUefiLessonsPkgTokenSpaceGuid.PcdGuidByPCD|{GUID(gUefiLessonsPkgTokenSpaceGuid)}|VOID*|0x0860CCD5
+ gUefiLessonsPkgTokenSpaceGuid.PcdGuidByEfiGuid|{GUID({0x150cab53, 0xad47, 0x4385, {0xb5, 0xdd, 0xbc, 0xfc, 0x76, 0xba, 0xca, 0xf0}})}|VOID*|0x613506D5
+ gUefiLessonsPkgTokenSpaceGuid.PcdDevicePath|{DEVICE_PATH("PciRoot(0x0)/Pci(0x1,0x1)/Ata(0x0)")}|VOID*|0xC56EE1E2
+ gUefiLessonsPkgTokenSpaceGuid.PcdIntCasts|{UINT16(0x1122), UINT32(0x33445566), UINT8(0x77), UINT64(0x8899aabbccddeeff)}|VOID*|0x647456A6
+ gUefiLessonsPkgTokenSpaceGuid.PcdWithLabels|{ 0x0A, 0x0B, OFFSET_OF(End), 0x0C, LABEL(Start) 0x0D, LABEL(End) 0x0E, 0x0F, OFFSET_OF(Start) }|VOID*|0xD91A8BF6
+ gUefiLessonsPkgTokenSpaceGuid.PcdArrayExt|{0x11, UINT16(0x2233), UINT32(0x44556677), L"hello", "world!", GUID("09b9b358-70bd-421e-bafb-4f97e2ac7d44")}|VOID*|0x7200C5DF
+ gUefiLessonsPkgTokenSpaceGuid.PcdCustomStruct|{0}|CustomStruct|0x535D4CB5 {
+ <Packages>
+ UefiLessonsPkg/UefiLessonsPkg.dec
+ <HeaderFiles>
+ CustomPcdTypes.h
+ }
+ gUefiLessonsPkgTokenSpaceGuid.PcdCustomStruct.Val8|0x11
+ gUefiLessonsPkgTokenSpaceGuid.PcdCustomStruct.Val32[0]|0x22334455
+ gUefiLessonsPkgTokenSpaceGuid.PcdCustomStruct.Val32[1]|0x66778899
+ gUefiLessonsPkgTokenSpaceGuid.PcdCustomStruct.ValStruct.Guid|{GUID("f1740707-691d-4203-bfab-99e132fa4166")}
+ gUefiLessonsPkgTokenSpaceGuid.PcdCustomStruct.ValStruct.Name|L'Hello'
+ gUefiLessonsPkgTokenSpaceGuid.PcdCustomStruct.ValUnion.BitFields.Field2|0xF
+
+ gUefiLessonsPkgTokenSpaceGuid.PcdCustomStruct_1|{CODE(
+ {
+ 0x11,
+ {0x22334455, 0x66778899},
+ {
+ {0xf1740707, 0x691d, 0x4203, {0xbf, 0xab, 0x99, 0xe1, 0x32, 0xfa, 0x41, 0x66}},
+ {0x0048, 0x0065, 0x006c, 0x006c, 0x006f, 0x0000}
+ },
+ {{0x0, 0xf, 0x0}}
+ }
+ )}|CustomStruct|0xC1D6B9A7 {
+ <Packages>
+ UefiLessonsPkg/UefiLessonsPkg.dec
+ <HeaderFiles>
+ CustomPcdTypes.h
+ }
+
+ gUefiLessonsPkgTokenSpaceGuid.PcdArrayWithFixedSize|{0x0}|UINT8[8]|0x4C4CB9A3
+ gUefiLessonsPkgTokenSpaceGuid.PcdArrayWithFixedSize_1|{0x0}|UINT32[3]|0x285DAD21
+ gUefiLessonsPkgTokenSpaceGuid.PcdArrayWithFixedSize_2|{UINT32(0x11223344), UINT32(0x55667788), UINT32(0x99aabbcc)}|UINT32[3]|0x25D6ED26
+ gUefiLessonsPkgTokenSpaceGuid.PcdArrayWithFixedSize_3|{CODE({0x11223344, 0x55667788, 0x99aabbcc})}|UINT32[3]|0xE5BC424D
+ gUefiLessonsPkgTokenSpaceGuid.PcdArrayWithFixedSize_4|{0x0}|CustomStruct[2]|0x0D00EE44 {
+ <Packages>
+ UefiLessonsPkg/UefiLessonsPkg.dec
+ <HeaderFiles>
+ CustomPcdTypes.h
+ }
+
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt32Override|42|UINT32|0x3CB8ABB8
+
+[PcdsFeatureFlag]
+ gUefiLessonsPkgTokenSpaceGuid.PcdFeatureFlag|TRUE|BOOLEAN|0x16DD586E
+
+[PcdsPatchableInModule]
+ gUefiLessonsPkgTokenSpaceGuid.PcdPatchableInt32|0x31313131|UINT32|0xFCDA11B5
+
+[PcdsDynamic]
+ gUefiLessonsPkgTokenSpaceGuid.PcdDynamicInt32|0xCAFECAFE|UINT32|0x4F9259A3
+
+[PcdsDynamicEx]
+ gUefiLessonsPkgTokenSpaceGuid.PcdDynamicExInt32|0xBABEBABE|UINT32|0xAF35F3B2
+
diff --git a/Lessons/Lesson_25/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_25/UefiLessonsPkg/UefiLessonsPkg.dsc
new file mode 100644
index 0000000..f406e97
--- /dev/null
+++ b/Lessons/Lesson_25/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -0,0 +1,98 @@
+##
+# Copyright (c) 2021, Konstantin Aladyshev <aladyshev22@gmail.com>
+#
+# SPDX-License-Identifier: MIT
+##
+
+[Defines]
+ DSC_SPECIFICATION = 0x0001001C
+ PLATFORM_GUID = 3db7270f-ffac-4139-90a4-0ae68f3f8167
+ PLATFORM_VERSION = 0.01
+ PLATFORM_NAME = UefiLessonsPkg
+ SKUID_IDENTIFIER = DEFAULT
+ SUPPORTED_ARCHITECTURES = X64
+ BUILD_TARGETS = DEBUG|RELEASE
+ FLASH_DEFINITION = UefiLessonsPkg/UefiLessonsPkg.fdf
+
+
+[LibraryClasses]
+ #HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
+ #DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
+ UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
+ UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
+ DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
+ BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
+ #PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+ PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
+ BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
+ RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
+ PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+ DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+ UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
+ MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
+ DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
+ UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+ ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
+ ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
+ FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
+ HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
+ SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
+ UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
+ UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
+ #SimpleLibrary|UefiLessonsPkg/Library/SimpleLibrary/SimpleLibrary.inf
+ #SimpleLibrary|UefiLessonsPkg/Library/SimpleLibraryWithConstructor/SimpleLibraryWithConstructor.inf
+ SimpleLibrary|UefiLessonsPkg/Library/SimpleLibraryWithConstructorAndDestructor/SimpleLibraryWithConstructorAndDestructor.inf
+ #PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
+
+[Components]
+ #MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
+ UefiLessonsPkg/SimplestApp/SimplestApp.inf
+ UefiLessonsPkg/HelloWorld/HelloWorld.inf
+ UefiLessonsPkg/ImageHandle/ImageHandle.inf
+ UefiLessonsPkg/ImageInfo/ImageInfo.inf
+ UefiLessonsPkg/MemoryInfo/MemoryInfo.inf
+ UefiLessonsPkg/SimpleShellApp/SimpleShellApp.inf
+ UefiLessonsPkg/ListVariables/ListVariables.inf
+ UefiLessonsPkg/ShowBootVariables/ShowBootVariables.inf
+ UefiLessonsPkg/InteractiveApp/InteractiveApp.inf
+ UefiLessonsPkg/PCDLesson/PCDLesson.inf
+ UefiLessonsPkg/SmbiosInfo/SmbiosInfo.inf
+ UefiLessonsPkg/ShowTables/ShowTables.inf
+ UefiLessonsPkg/AcpiInfo/AcpiInfo.inf
+ UefiLessonsPkg/SaveBGRT/SaveBGRT.inf
+ UefiLessonsPkg/ListPCI/ListPCI.inf
+ UefiLessonsPkg/SimpleDriver/SimpleDriver.inf
+ UefiLessonsPkg/PCIRomInfo/PCIRomInfo.inf
+ UefiLessonsPkg/Library/SimpleLibrary/SimpleLibrary.inf
+ UefiLessonsPkg/Library/SimpleLibraryWithConstructor/SimpleLibraryWithConstructor.inf
+ UefiLessonsPkg/SimpleLibraryUser/SimpleLibraryUser.inf
+ UefiLessonsPkg/SimpleClassProtocol/SimpleClassProtocol.inf
+ UefiLessonsPkg/SimpleClassUser/SimpleClassUser.inf
+ UefiLessonsPkg/HotKeyDriver/HotKeyDriver.inf
+ UefiLessonsPkg/ShowHII/ShowHII.inf
+ UefiLessonsPkg/HIIStringsC/HIIStringsC.inf
+ UefiLessonsPkg/HIIStringsUNI/HIIStringsUNI.inf
+ UefiLessonsPkg/HIIStringsUNIRC/HIIStringsUNIRC.inf
+ UefiLessonsPkg/HIIStringsMan/HIIStringsMan.inf
+ UefiLessonsPkg/HIIAddRussianFont/HIIAddRussianFont.inf
+ UefiLessonsPkg/HIIAddLocalization/HIIAddLocalization.inf
+ UefiLessonsPkg/AddNewLanguage/AddNewLanguage.inf
+ UefiLessonsPkg/HIISimpleForm/HIISimpleForm.inf
+ #UefiLessonsPkg/HIIStaticForm/HIIStaticForm.inf
+ UefiLessonsPkg/HIIStaticFormDriver/HIIStaticFormDriver.inf
+ UefiLessonsPkg/DisplayHIIByGuid/DisplayHIIByGuid.inf
+ UefiLessonsPkg/SetVariableExample/SetVariableExample.inf
+ UefiLessonsPkg/UpdateDmpstoreDump/UpdateDmpstoreDump.inf
+ UefiLessonsPkg/HIIFormCheckbox/HIIFormCheckbox.inf
+ UefiLessonsPkg/HIIFormDataElements/HIIFormDataElements.inf
+ UefiLessonsPkg/HIIFormVarstore/HIIFormVarstore.inf
+ UefiLessonsPkg/HIIFormLabel/HIIFormLabel.inf
+ #UefiLessonsPkg/SimplePeiModule/SimplePeiModule.inf
+ UefiLessonsPkg/SimpleDxeDriver/SimpleDxeDriver.inf
+ #UefiLessonsPkg/BinaryModule/BinaryModule.inf
+ #UefiLessonsPkg/FlashAccessRaw/FlashAccessRaw.inf
+ UefiLessonsPkg/FfsFile/FfsFile.inf
+
+[PcdsFixedAtBuild]
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt32Override|44
+
diff --git a/Lessons/Lesson_29/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_29/UefiLessonsPkg/UefiLessonsPkg.dsc
index e9fe780..6173be3 100644
--- a/Lessons/Lesson_29/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_29/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -51,6 +51,3 @@
UefiLessonsPkg/AcpiInfo/AcpiInfo.inf
UefiLessonsPkg/SaveBGRT/SaveBGRT.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_35/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_35/UefiLessonsPkg/UefiLessonsPkg.dsc
index e5ac032..2cc5d96 100644
--- a/Lessons/Lesson_35/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_35/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -60,6 +60,3 @@
UefiLessonsPkg/Library/SimpleLibrary/SimpleLibrary.inf
UefiLessonsPkg/SimpleLibraryUser/SimpleLibraryUser.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_36/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_36/UefiLessonsPkg/UefiLessonsPkg.dsc
index 58e94f6..88b58c8 100644
--- a/Lessons/Lesson_36/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_36/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -63,6 +63,3 @@
UefiLessonsPkg/Library/SimpleLibraryWithConstructor/SimpleLibraryWithConstructor.inf
UefiLessonsPkg/SimpleLibraryUser/SimpleLibraryUser.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_38/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_38/UefiLessonsPkg/UefiLessonsPkg.dsc
index 6df15fa..ece8287 100644
--- a/Lessons/Lesson_38/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_38/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -68,6 +68,3 @@
UefiLessonsPkg/SimpleClassProtocol/SimpleClassProtocol.inf
UefiLessonsPkg/SimpleClassUser/SimpleClassUser.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_43/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_43/UefiLessonsPkg/UefiLessonsPkg.dsc
index 3b67e88..268a552 100644
--- a/Lessons/Lesson_43/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_43/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -66,6 +66,3 @@
UefiLessonsPkg/HotKeyDriver/HotKeyDriver.inf
UefiLessonsPkg/ShowHII/ShowHII.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_47/UefiLessonsPkg.dsc b/Lessons/Lesson_47/UefiLessonsPkg.dsc
index ae1846c..feb0718 100644
--- a/Lessons/Lesson_47/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_47/UefiLessonsPkg.dsc
@@ -67,6 +67,3 @@
UefiLessonsPkg/ShowHII/ShowHII.inf
UefiLessonsPkg/HIIStringsC/HIIStringsC.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_48/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_48/UefiLessonsPkg/UefiLessonsPkg.dsc
index c781f31..77e3e2a 100644
--- a/Lessons/Lesson_48/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_48/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -68,6 +68,3 @@
UefiLessonsPkg/HIIStringsC/HIIStringsC.inf
UefiLessonsPkg/HIIStringsUNI/HIIStringsUNI.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_50/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_50/UefiLessonsPkg/UefiLessonsPkg.dsc
index c279a21..c7b31a6 100644
--- a/Lessons/Lesson_50/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_50/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -69,6 +69,3 @@
UefiLessonsPkg/HIIStringsUNI/HIIStringsUNI.inf
UefiLessonsPkg/HIIStringsUNIRC/HIIStringsUNIRC.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_51/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_51/UefiLessonsPkg/UefiLessonsPkg.dsc
index b97cbbe..e1d9a2a 100644
--- a/Lessons/Lesson_51/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_51/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -70,6 +70,3 @@
UefiLessonsPkg/HIIStringsUNIRC/HIIStringsUNIRC.inf
UefiLessonsPkg/HIIStringsMan/HIIStringsMan.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_53/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_53/UefiLessonsPkg/UefiLessonsPkg.dsc
index 4ddf8ff..e55d2b1 100644
--- a/Lessons/Lesson_53/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_53/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -71,6 +71,3 @@
UefiLessonsPkg/HIIStringsMan/HIIStringsMan.inf
UefiLessonsPkg/HIIAddRussianFont/HIIAddRussianFont.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_54/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_54/UefiLessonsPkg/UefiLessonsPkg.dsc
index 48b78ca..0e72d72 100644
--- a/Lessons/Lesson_54/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_54/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -72,6 +72,3 @@
UefiLessonsPkg/HIIAddRussianFont/HIIAddRussianFont.inf
UefiLessonsPkg/HIIAddLocalization/HIIAddLocalization.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_55/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_55/UefiLessonsPkg/UefiLessonsPkg.dsc
index 85ea19a..cbb5cdd 100644
--- a/Lessons/Lesson_55/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_55/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -73,6 +73,3 @@
UefiLessonsPkg/HIIAddLocalization/HIIAddLocalization.inf
UefiLessonsPkg/AddNewLanguage/AddNewLanguage.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_57/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_57/UefiLessonsPkg/UefiLessonsPkg.dsc
index aec7768..11a7d54 100644
--- a/Lessons/Lesson_57/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_57/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -74,6 +74,3 @@
UefiLessonsPkg/AddNewLanguage/AddNewLanguage.inf
UefiLessonsPkg/HIISimpleForm/HIISimpleForm.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_58/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_58/UefiLessonsPkg/UefiLessonsPkg.dsc
index 8b2ff85..fe58919 100644
--- a/Lessons/Lesson_58/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_58/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -75,6 +75,3 @@
UefiLessonsPkg/HIISimpleForm/HIISimpleForm.inf
UefiLessonsPkg/HIIStaticForm/HIIStaticForm.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_59/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_59/UefiLessonsPkg/UefiLessonsPkg.dsc
index 67ab576..575e223 100644
--- a/Lessons/Lesson_59/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_59/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -77,6 +77,3 @@
UefiLessonsPkg/HIIStaticFormDriver/HIIStaticFormDriver.inf
UefiLessonsPkg/DisplayHIIByGuid/DisplayHIIByGuid.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_60/UefiLessonsPkg.dsc b/Lessons/Lesson_60/UefiLessonsPkg.dsc
index b33c87d..fe8e3f7 100644
--- a/Lessons/Lesson_60/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_60/UefiLessonsPkg.dsc
@@ -78,6 +78,3 @@
UefiLessonsPkg/DisplayHIIByGuid/DisplayHIIByGuid.inf
UefiLessonsPkg/SetVariableExample/SetVariableExample.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_61/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_61/UefiLessonsPkg/UefiLessonsPkg.dsc
index 2180620..5c91a73 100644
--- a/Lessons/Lesson_61/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_61/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -79,6 +79,3 @@
UefiLessonsPkg/SetVariableExample/SetVariableExample.inf
UefiLessonsPkg/UpdateDmpstoreDump/UpdateDmpstoreDump.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_62/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_62/UefiLessonsPkg/UefiLessonsPkg.dsc
index d94d78c..36953ec 100644
--- a/Lessons/Lesson_62/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_62/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -80,6 +80,3 @@
UefiLessonsPkg/UpdateDmpstoreDump/UpdateDmpstoreDump.inf
UefiLessonsPkg/DevicePath/DevicePath.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_64/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_64/UefiLessonsPkg/UefiLessonsPkg.dsc
index b55f860..6ef42fc 100644
--- a/Lessons/Lesson_64/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_64/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -81,6 +81,3 @@
UefiLessonsPkg/DevicePath/DevicePath.inf
UefiLessonsPkg/HIIFormCheckbox/HIIFormCheckbox.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-
diff --git a/Lessons/Lesson_72/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_72/UefiLessonsPkg/UefiLessonsPkg.dsc
index b63f118..7d24344 100644
--- a/Lessons/Lesson_72/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_72/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -83,6 +83,3 @@
UefiLessonsPkg/HIIFormDataElements/HIIFormDataElements.inf
UefiLessonsPkg/HIIFormLabel/HIIFormLabel.inf
-[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
-