From: "Ken Taylor" <Ken_Taylor@phoenix.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: PCD EX interface.
Date: Thu, 23 Jan 2020 01:37:08 +0000 [thread overview]
Message-ID: <2fb8e97b19214251bf25f44c7b4149a3@SCL-EXCHMB-13.phoenix.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1930 bytes --]
Hi all,
I'm trying to access a PCD in a build independent manner. Specifically, moving forward, I want to write a PCD value in my BIOS code during PEI phase, and then read back the value of that PCD in a build independent shell utility (or identify and report situations in which the PCD is not found). I figure this is a good time to use [PcdsDynamicEx] in the build, because standard PCDs are assigned a build specific token, which kind of defeats my purpose.
At first, everything seemed to be working okay. A call to PcdGetEx8 returned 0 on a build in which the PCD was undefined. Then I tried a build in which I wrote the PCD, and I got back a random number other than 0 or what I'd written to the PCD in the BIOS. Then, I decided to try PcdGetExSize to see if the PCD was even defined properly defined... at which point my shell utility locked up.
So a little debugging later, and I discover that I'm hitting an ASSERT because the GUID my utility is passing to the DXE PCD service isn't being found in the list of GUIDs. Probably an error in my build or build tool configuration, so I'll have to sort that out. That's on me.
But now I've got a problem:
If I try to get the size of a DynamicEx PCD in the context of a BIOS build for which that PCD is undefined, the call locks up. I expected to just get a size of 0, since the PCD is not defined in the build context of the PCD DXE service. Is this a problem that's been fixed since my BIOS source code was cut? What can I do for older builds that haven't been fixed (and probably never will)? Do I have to just accept that I'm going to get garbage or lockup if I run my shell utility on some builds? Do I have to write a DXE driver and expose a protocol, just so I can know if that PCD exists and is properly defined?
Is the idea that I might want to do this unreasonable? Should I just give up and use a HOB or a variable?
Regards,
-Ken.
[-- Attachment #2: Type: text/html, Size: 4431 bytes --]
next reply other threads:[~2020-01-23 1:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-23 1:37 Ken Taylor [this message]
2020-01-23 11:21 ` [edk2-devel] PCD EX interface Laszlo Ersek
2020-01-23 21:08 ` Andrew Fish
2020-01-24 10:14 ` Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2fb8e97b19214251bf25f44c7b4149a3@SCL-EXCHMB-13.phoenix.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox