aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Aladyshev <aladyshev22@gmail.com>2022-08-04 13:55:01 +0300
committerKonstantin Aladyshev <aladyshev22@gmail.com>2022-08-04 13:55:01 +0300
commit33107d87e110c19815d2059e7df2e249bb125257 (patch)
tree3ebea9604e2f2a088dab6aa1d7e5b3485ad2fee3
parente2a415f13a7090b12f9363d51a0d1f80cafded67 (diff)
downloadUEFI-Lessons-33107d87e110c19815d2059e7df2e249bb125257.tar.gz
UEFI-Lessons-33107d87e110c19815d2059e7df2e249bb125257.tar.bz2
UEFI-Lessons-33107d87e110c19815d2059e7df2e249bb125257.zip
Update PCD override lesson
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
-rw-r--r--Lessons/Lesson_21/README.md189
-rw-r--r--Lessons/Lesson_21/UefiLessonsPkg/PCDLesson/PCDLesson.c34
-rw-r--r--Lessons/Lesson_21/UefiLessonsPkg/PCDLesson/PCDLesson.inf31
-rw-r--r--Lessons/Lesson_21/UefiLessonsPkg/UefiLessonsPkg.dec65
-rw-r--r--Lessons/Lesson_21/UefiLessonsPkg/UefiLessonsPkg.dsc2
5 files changed, 275 insertions, 46 deletions
diff --git a/Lessons/Lesson_21/README.md b/Lessons/Lesson_21/README.md
index 4e53c04..5ed3bc1 100644
--- a/Lessons/Lesson_21/README.md
+++ b/Lessons/Lesson_21/README.md
@@ -1,71 +1,188 @@
-Let's create a another variable `PcdMyVar32_1` the same way we did in the previous lesson.
+In this lesson we are going to look at the PCD override capability.
-Add a PCD definition to the `UefiLessonsPkg/UefiLessonsPkg.dec`:
+# INF override
+
+Create new `UINT32` PCD with a name `PcdInt32Override` and a default value equal to 42 (`UefiLessonsPkg/UefiLessonsPkg.dec`):
```
[PcdsFixedAtBuild]
- ...
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_1|42|UINT32|0x00000002
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt32Override|42|UINT32|0x3CB8ABB8
```
-Add print statement to `UefiLessonsPkg/PCDLesson/PCDLesson.c`:
+Now when we would populate the PCD to our application via the INF file (`UefiLessonsPkg/PCDLesson/PCDLesson.inf`), we would use the PCD override syntax to change the default value of our PCD, which looks like this:
```
-Print(L"PcdMyVar32_1=%d\n", FixedPcdGet32(PcdMyVar32_1));
+[FixedPcd]
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt32Override|43
```
-As for the `PCDLesson.inf` this time add an override for a value this time:
+If you build our application now, and look at the `Build/UefiLessonsPkg/RELEASE_GCC5/X64/UefiLessonsPkg/PCDLesson/PCDLesson/DEBUG/AutoGen.h`, you would see that `PcdInt32Override` default value was overriden:
```
-[FixedPcd]
- ...
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_1|43
+...
+#define _PCD_VALUE_PcdInt32Override 43U
+...
```
-If you build execute our app under OVMF you would get:
+You can even add a print statement to the `UefiLessonsPkg/PCDLesson/PCDLesson.c` to verify the result:
+```
+Print(L"PcdInt32Override=%d\n", FixedPcdGet32(PcdInt32Override));
+```
+
+If you rebuild the application and execute it under OVMF you would get:
```
FS0:\> PCDLesson.efi
-PcdMyVar32=42
-PcdMyVar32_1=43
+...
+PcdInt32Override=43
```
-So it means that every App/Driver can override a PCD declared in *.dec file differently.
+So it means that every App/Driver can override a PCD declared in `*.dec` file differently.
-______________
+# DSC override
-Now let's create a third variable `PcdMyVar32_2` the same way as `PcdMyVar32_1`.
-`UefiLessonsPkg/UefiLessonsPkg.dec`
- ```
+Besides overwriting PCDs locally in every module it is possible to override PCDs globally in the package via its DSC file.
+
+Don't delete our INF override but another one in the DSC file (`UefiLessonsPkg/UefiLessonsPkg.dsc`). In this case we would override the default value to 44:
+```
[PcdsFixedAtBuild]
- ...
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|42|UINT32|0x00000003
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt32Override|44
```
-UefiLessonsPkg/PCDLesson/PCDLesson.c
+
+If you build the app and execute in under OVMF now you would get:
```
-Print(L"PcdMyVar32_2=%d\n", FixedPcdGet32(PcdMyVar32_2));
+FS0:\> PCDLesson.efi
+...
+PcdInt32Override=44
```
-UefiLessonsPkg/PCDLesson/PCDLesson.inf
+
+So as you can see there is some order of precedence for the override statments:
```
-[FixedPcd]
+DEC < INF < DSC
+```
+- Declaration file (DEC) declares PCD with its default value
+- Every App/Driver Information file (INF) can override the value of this PCD differently
+- However a package description file that contains all these Apps/Drivers (DSC) can override this PCD for all of them
+
+It is important to note that the DSC file in this case means a DSC file of the package that we build. And it is not necessary the same as the DSC file of the module origin package.
+
+For the proof let's build our module as a part of the `OvmfPkg/OvmfPkgX64.dsc` package. For this add our application to the `[Components]` section in the `OvmfPkg/OvmfPkgX64.dsc` file:
+```
+[Components]
...
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|43
+ UefiLessonsPkg/PCDLesson/PCDLesson.inf
+```
+
+Now build the OVMF image:
+```
+build --platform=OvmfPkg/OvmfPkgX64.dsc --arch=X64 --buildtarget=RELEASE --tagname=GCC5
```
-Only this time add an override for the variable to our `UefiLessonsPkg/UefiLessonsPkg.dsc` file:
+
+The image of our application in this case would be not at the usual `Build/UefiLessonsPkg/RELEASE_GCC5/X64/PCDLesson.efi` path, but at the path
+```
+Build/OvmfX64/RELEASE_GCC5/X64/PCDLesson.efi
+```
+
+So if you copy this `.efi` file to our shared disk and execute it under OVMF image, you would get:
+```
+FS0:\> PCDLesson.efi
+...
+PcdInt32Override=43
+```
+
+As you can see the override from the `UefiLessonsPkg/UefiLessonsPkg.dsc` file doesn't work in this case.
+
+For the DSC override you need to modify the DSC of the package that we build, i.e. `OvmfPkg/OvmfPkgX64.dsc` file:
```
[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
+ ...
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt32Override|45
```
-If you build our app and execute in under OVMF now you would get:
+Rebuild OVMF image, copy updated application to the shared folder, and verify that now DSC override is working correctly:
```
FS0:\> PCDLesson.efi
-PcdMyVar32=42
-PcdMyVar32_1=43
-PcdMyVar32_2=44
+...
+PcdInt32Override=45
```
-So override order would be:
+# FDF override
+
+When we've added our application to the `[Components]` section in the `OvmfPkg/OvmfPkgX64.dsc` we said that we want to compile our application as part of the package. If we want to include our application to the final OVMF flash image we need to add it to the `FDF` file. We won't go into details of how it is done right now, just add the `INF UefiLessonsPkg/PCDLesson/PCDLesson.inf` statement to the end of `[FV.DXEFV]` setion:
```
-DEC < INF < DSC
+[FV.DXEFV]
+...
+INF UefiLessonsPkg/PCDLesson/PCDLesson.inf
+#################################################
```
-- Declaration file (DEC) declares PCD with its default value
-- Every App/Driver Information file (INF) can override the value of this PCD differently
-- However a package description file that contains all these Apps/Drivers (DSC) can override this PCD for all of them
+
+Important part for us now is that in the same FDF file we can override our PCD via the `SET` syntax. First put it in the `[Defines]` section:
+```
+[Defines]
+...
+SET gUefiLessonsPkgTokenSpaceGuid.PcdInt32Override = 46
+...
+```
+
+Rebuild and verify the override result:
+```
+FS0:\> PCDLesson.efi
+...
+PcdInt32Override=46
+```
+
+Now add another `SET` statement to the section of our module (which is `[FV.DXEFV]` in our case):
+```
+[FV.DXEFV]
+...
+INF UefiLessonsPkg/PCDLesson/PCDLesson.inf
+SET gUefiLessonsPkgTokenSpaceGuid.PcdInt32Override = 47
+#################################################
+```
+
+This override should take precedence over the general one in the `[Defines]` section:
+```
+FS0:\> PCDLesson.efi
+...
+PcdInt32Override=47
+```
+
+# DSC in-module overrides
+
+The next level of PCD override is the DSC in-module overrides. The override syntax in this case looks like this:
+```
+[Components]
+ ...
+ UefiLessonsPkg/PCDLesson/PCDLesson.inf {
+ <PcdsFixedAtBuild>
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt32Override|48
+ }
+```
+
+This override would take precedence over the ones in the FDF file:
+```
+FS0:\> PCDLesson.efi
+...
+PcdInt32Override=48
+```
+
+# Overriding via command-line argument
+
+Finally it is possible to override PCD via a command-line argument to the `build` command, for example:
+```
+build --platform=OvmfPkg/OvmfPkgX64.dsc \
+ --arch=X64 \
+ --buildtarget=RELEASE \
+ --tagname=GCC5 \
+ --pcd="gUefiLessonsPkgTokenSpaceGuid.PcdInt32Override=49"
+```
+
+Verify the override via our print statement:
+```
+FS0:\> PCDLesson.efi
+...
+PcdInt32Override=49
+```
+
+# Final words
+
+In this lesson we've investgated some of the precedence rules of the PCD override.
+
+The complete documentation on the subject can be found at this link [https://edk2-docs.gitbook.io/edk-ii-dsc-specification/2_dsc_overview/27_pcd_section_processing#2.7.3.8-precedence](https://edk2-docs.gitbook.io/edk-ii-dsc-specification/2_dsc_overview/27_pcd_section_processing#2.7.3.8-precedence)
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;
}
diff --git a/Lessons/Lesson_21/UefiLessonsPkg/PCDLesson/PCDLesson.inf b/Lessons/Lesson_21/UefiLessonsPkg/PCDLesson/PCDLesson.inf
index ae10121..9a01b11 100644
--- a/Lessons/Lesson_21/UefiLessonsPkg/PCDLesson/PCDLesson.inf
+++ b/Lessons/Lesson_21/UefiLessonsPkg/PCDLesson/PCDLesson.inf
@@ -24,7 +24,32 @@
UefiLib
[FixedPcd]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_1|43
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|43
+ 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
diff --git a/Lessons/Lesson_21/UefiLessonsPkg/UefiLessonsPkg.dec b/Lessons/Lesson_21/UefiLessonsPkg/UefiLessonsPkg.dec
index d7b1852..e3e16cd 100644
--- a/Lessons/Lesson_21/UefiLessonsPkg/UefiLessonsPkg.dec
+++ b/Lessons/Lesson_21/UefiLessonsPkg/UefiLessonsPkg.dec
@@ -22,7 +22,66 @@
[Protocols]
[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32|42|UINT32|0x00000001
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_1|42|UINT32|0x00000002
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|42|UINT32|0x00000003
+ 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
+
diff --git a/Lessons/Lesson_21/UefiLessonsPkg/UefiLessonsPkg.dsc b/Lessons/Lesson_21/UefiLessonsPkg/UefiLessonsPkg.dsc
index 97a0e42..55bce16 100644
--- a/Lessons/Lesson_21/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/Lessons/Lesson_21/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -43,5 +43,5 @@
UefiLessonsPkg/PCDLesson/PCDLesson.inf
[PcdsFixedAtBuild]
- gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44
+ gUefiLessonsPkgTokenSpaceGuid.PcdInt32Override|44