diff options
author | Konstantin Aladyshev <aladyshev22@gmail.com> | 2021-07-10 00:04:40 +0300 |
---|---|---|
committer | Konstantin Aladyshev <aladyshev22@gmail.com> | 2021-07-10 00:04:40 +0300 |
commit | 6064c1e48b622f53538f4df9bdd402c607a87d51 (patch) | |
tree | 93d3c937b9568568307fd2ff7053a30c538ad72a /Lesson_21/README.md | |
parent | a9c375c80c3505be794ec2b5d5bb90de27ef0d42 (diff) | |
download | UEFI-Lessons-6064c1e48b622f53538f4df9bdd402c607a87d51.tar.gz UEFI-Lessons-6064c1e48b622f53538f4df9bdd402c607a87d51.tar.bz2 UEFI-Lessons-6064c1e48b622f53538f4df9bdd402c607a87d51.zip |
Move lessons to separate folder
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Diffstat (limited to 'Lesson_21/README.md')
-rw-r--r-- | Lesson_21/README.md | 71 |
1 files changed, 0 insertions, 71 deletions
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 - |