Let me clarify my third question:
The example shows code that when receiving a NULL <ConfigRequest> request 
string in ExtractConfig, will build a <ConfigHdr>.
This <ConfigHdr> will be used to construct a <ConfigResp> response string that 
holds the fields and data of this VFR Form, needed by ExtractConfig().
I would like to continue to support this option of NULL request strings, but 
stop using EFI Variables.
Because the function HiiConstructConfigHdr accepts a GUID as a parameter, I am 
not sure if it would still be possible.
If so, what GUID and Name would I pass to HiiConstructConfigHdr  function so 
that I may continue support this feature?

Thanks,
Ben
From: Ben Schroeder [mailto:ben...@mellanox.com]
Sent: Thursday, November 07, 2013 5:39 PM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] Hii and EFI Variables

Hi,

First Question:
The examples I have seen for HII Config Access Protocol have used an EFI 
Variable to store the data and retrieve it.
Is it possible to just use a defined structure and set/get the values from it.

It doesn't seem that GetVariable/SetVariable are necessary if I can just save 
the values in a struct for my driver use.
Then I can pass these values to BlockToConfig as needed.

Is this possible? Is there anything that requires me to use EFI variables in 
junction with HII config access protocol.


Second Question (about HiiConstructConfigHdr):
EFIAPI
HiiConstructConfigHdr (
  IN CONST EFI_GUID  *Guid,  OPTIONAL
  IN CONST CHAR16    *Name,  OPTIONAL
  IN EFI_HANDLE      DriverHandle
  )

It takes a Guid and a Name. I assume this is the GUID of an EFI var store, 
otherwise why would you need a name?
Or is it the GUID of the VFR Form?


Last Question: (concerning ExtractConfig() from ConfigAccessProtocol)

The following code is taken from DriverSampleDxe.
Assuming I don't use EFI Variables.  I also assume I would still need take care 
of the even of a NULL request string, and populate the entire configuration 
header.
How what I go about this if I don't use EFI VarStore? (assuming it's not 
necessary to work with HII)

  if (Request == NULL) {
    //
    // Request is set to NULL, construct full request string.
    // Allocate and fill a buffer large enough to hold the <ConfigHdr> template
    // followed by "&OFFSET=0&WIDTH=WWWWWWWWWWWWWWWW" followed by a 
Null-terminator
    //
    ConfigRequestHdr = HiiConstructConfigHdr (&gDriverSampleFormSetGuid, 
VariableName, PrivateData->DriverHandle[0]);
    Size = (StrLen (ConfigRequestHdr) + 32 + 1) * sizeof (CHAR16);
    ConfigRequest = AllocateZeroPool (Size);
    ASSERT (ConfigRequest != NULL);
    AllocatedRequest = TRUE;
    UnicodeSPrint (ConfigRequest, Size, L"%s&OFFSET=0&WIDTH=%016LX", 
ConfigRequestHdr, (UINT64)BufferSize);
    FreePool (ConfigRequestHdr);
    ConfigRequestHdr = NULL;
  }

Thanks,
Ben.
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to