SetupDesignGuide.pdf - Firmware Encoding Index
SetupDesignGuide.pdf - Firmware Encoding Index
SetupDesignGuide.pdf - Firmware Encoding Index
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Setup Design Guide<br />
DRAFT<br />
6<br />
Setup Driver Considerations<br />
6.1 Pre-boot Operation versus Runtime Operation<br />
Due to the static nature of the data contained in the HII Database and the capacity to update NVRAM<br />
variables, the pre-boot configuration data can be effectively used during O/S runtime. This allows the<br />
same configuration mechanisms to be used in pre-boot as well as in runtime.<br />
Some thought needs to be given when designing the overall requirements associated with a setup<br />
application with regards to the type of data that is needed and it’s hardware interaction requirements.<br />
For additional information about hardware interaction see section 2.6. If some of the questions<br />
associated with a setup environment require a high level of hardware interaction, it might make sense to<br />
design the user interface flow in the VFR such that these types of questions are isolated. The reason for<br />
this is that when this data is exported to a runtime presence, it may not make any sense in that<br />
environment. For instance if there were a page which contained some diagnostic type of interactions<br />
which are not reasonable in a runtime environment the user experience of that page may not be<br />
desirable.<br />
6.2 How to allocate and steer data to NV storage<br />
The file which contains the global data primarily consists of a series of #define values and the definition<br />
of the NV mapping descriptors. This file is intended to be used as an include file both for VFR<br />
purposes as well as a ‘C’ syntax include file for drivers that are built to support the EFI setup<br />
infrastructure.<br />
There NV mapping descriptors take the form of structure declarations in this definition file. Each piece<br />
of data that can be changed in the configuration needs to be saved. For each of these data items, there<br />
will be a structure member.<br />
To support the ability to store data in multiple physical locations, one needs to be able to specify which<br />
data items will reside in which NV storage location. A common scenario would be that a developer<br />
might have the results of many questions reside in the systemboard NVRAM, yet some of the questions<br />
might reside in another NV storage location. To differentiate between which is the system store and<br />
which is the alternate store the VFR_NV_KEY macro is used in the structure definition.<br />
The VFR compiler will read the structure that has the macro with a 0 input as the system store<br />
descriptor. All structures with non-zero macro inputs are going to be considered to be non-system<br />
storage descriptors.<br />
A sample VFR entry which declares a system NV store descriptor might look like the following entry:<br />
nvstorage<br />
handle = NULL,<br />
devicepath = NULL,<br />
key = NvRamMapKey;<br />
A sample VFR entry which declares a non-system NV store descriptor might look like the following<br />
entry:<br />
nvstorage handle = 1,<br />
44