You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Lessons/Lesson_25/README.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -278,9 +278,9 @@ Now let's try to access the PCD, this is done via `PcdGetEx32`/`PcdSetEx32S` fun
278
278
```
279
279
As you can see, API in this case a little bit different. The `Guid` in these defines is a pointer to the GUID, so we need to use `&gUefiLessonsPkgTokenSpaceGuid` in our case. Here is the code:
We don't need to do anything to import `gUefiLessonsPkgTokenSpaceGuid` as it is already in its `AutoGen.c` file:
286
286
```
@@ -309,25 +309,25 @@ The behaviour is similar to the Dynamic PCD. For the first time you'll get initi
309
309
```
310
310
FS0:\> PCDLesson.efi
311
311
...
312
-
PcdDynamicExInt32=BABEBABE
313
-
PcdDynamicExInt32=77777777
312
+
PcdDynamicExInt32=0xBABEBABE
313
+
PcdDynamicExInt32=0x77777777
314
314
```
315
315
But since the program updates PCD, at the next launches it would start with the updated value:
316
316
```
317
317
FS0:\> PCDLesson.efi
318
318
...
319
-
PcdDynamicExInt32=77777777
320
-
PcdDynamicExInt32=77777777
319
+
PcdDynamicExInt32=0x77777777
320
+
PcdDynamicExInt32=0x77777777
321
321
```
322
322
And QEMU re-launch takes things to the start.
323
323
324
324
# Using Dynamic API functions to access Dynamic Ex PCDs
325
325
326
326
It is important to notice that the `PcdGet32`/`PcdSet32S` functions are not specific Dynamic API functions. These functons are generic API that can be used with all types of PCD including the Dynamic Ex PCDs. For an example add this code to our application:
0 commit comments