public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* How to using PcdGetEx to change a PCD.
@ 2017-12-14  8:59 krishnaLee
  2017-12-14 10:27 ` Andrew Fish
  0 siblings, 1 reply; 6+ messages in thread
From: krishnaLee @ 2017-12-14  8:59 UTC (permalink / raw)
  To: edk2-devel

Hello,
I am learning and writing a application to change the Nt32pkg-virtual machine's boot time.follow code is success.
but I think if I using PcdGetEx16 function, it will also work well,but failed when I compile it.
I had read some Specs about the difference between PcdGetEx and PcdGet,but I can't understand,maybe I need some practice,
So can anyone modify it to using PcdGetEx to implement the same function in the application?
//source-code--start
EFI_STATUS
EFIAPI
UefiMain (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
UINTN buffer=0;
UINTN index;
buffer=PcdGet16(PcdPlatformBootTimeOut);
//buffer=PcdGetEx16(&gEfiMdePkgTokenSpaceGuid,PcdPlatformBootTimeOut);//compile failed.
Print(L"buffer:%d\n",buffer);
PcdSet16(PcdPlatformBootTimeOut,5);
...


//source-code-end.


attachment is the full source code.
edk2-vUDK2017's build command:
build -p Nt32Pkg\Nt32Pkg.dsc -m Nt32Pkg\Application\mytestpcd2\mytestpcd2.inf


thank you very much!


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-12-31  8:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-14  8:59 How to using PcdGetEx to change a PCD krishnaLee
2017-12-14 10:27 ` Andrew Fish
2017-12-14 14:55   ` Gao, Liming
2017-12-28  9:41     ` krishnaLee
2017-12-29 15:26       ` Gao, Liming
2017-12-31  8:47         ` krishnaLee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox