From 6064c1e48b622f53538f4df9bdd402c607a87d51 Mon Sep 17 00:00:00 2001 From: Konstantin Aladyshev Date: Sat, 10 Jul 2021 00:04:40 +0300 Subject: Move lessons to separate folder Signed-off-by: Konstantin Aladyshev --- Lesson_21/README.md | 71 ----------------------------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 Lesson_21/README.md (limited to 'Lesson_21/README.md') diff --git a/Lesson_21/README.md b/Lesson_21/README.md deleted file mode 100644 index 4e53c04..0000000 --- a/Lesson_21/README.md +++ /dev/null @@ -1,71 +0,0 @@ -Let's create a another variable `PcdMyVar32_1` the same way we did in the previous lesson. - -Add a PCD definition to the `UefiLessonsPkg/UefiLessonsPkg.dec`: -``` -[PcdsFixedAtBuild] - ... - gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_1|42|UINT32|0x00000002 -``` - -Add print statement to `UefiLessonsPkg/PCDLesson/PCDLesson.c`: -``` -Print(L"PcdMyVar32_1=%d\n", FixedPcdGet32(PcdMyVar32_1)); -``` - -As for the `PCDLesson.inf` this time add an override for a value this time: -``` -[FixedPcd] - ... - gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_1|43 -``` - -If you build execute our app under OVMF you would get: -``` -FS0:\> PCDLesson.efi -PcdMyVar32=42 -PcdMyVar32_1=43 -``` - -So it means that every App/Driver can override a PCD declared in *.dec file differently. - -______________ - -Now let's create a third variable `PcdMyVar32_2` the same way as `PcdMyVar32_1`. -`UefiLessonsPkg/UefiLessonsPkg.dec` - ``` -[PcdsFixedAtBuild] - ... - gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|42|UINT32|0x00000003 -``` -UefiLessonsPkg/PCDLesson/PCDLesson.c -``` -Print(L"PcdMyVar32_2=%d\n", FixedPcdGet32(PcdMyVar32_2)); -``` -UefiLessonsPkg/PCDLesson/PCDLesson.inf -``` -[FixedPcd] - ... - gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|43 -``` -Only this time add an override for the variable to our `UefiLessonsPkg/UefiLessonsPkg.dsc` file: -``` -[PcdsFixedAtBuild] - gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44 -``` - -If you build our app and execute in under OVMF now you would get: -``` -FS0:\> PCDLesson.efi -PcdMyVar32=42 -PcdMyVar32_1=43 -PcdMyVar32_2=44 -``` - -So override order would be: -``` -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 - -- cgit v1.2.3-18-g5258