diff options
15 files changed, 517 insertions, 379 deletions
diff --git a/IntelFrameworkPkg/Include/FrameworkDxe.h b/IntelFrameworkPkg/Include/FrameworkDxe.h index 07eece9..f43e113 100644 --- a/IntelFrameworkPkg/Include/FrameworkDxe.h +++ b/IntelFrameworkPkg/Include/FrameworkDxe.h @@ -24,4 +24,6 @@ #include <Framework/DxeCis.h>
+#include <Framework/FrameworkInternalFormRepresentation.h>
+
#endif
diff --git a/IntelFrameworkPkg/Include/Guid/StatusCodeDataTypeId.h b/IntelFrameworkPkg/Include/Guid/StatusCodeDataTypeId.h index dbe8fba..c608b21 100644 --- a/IntelFrameworkPkg/Include/Guid/StatusCodeDataTypeId.h +++ b/IntelFrameworkPkg/Include/Guid/StatusCodeDataTypeId.h @@ -24,6 +24,7 @@ #include <Framework/StatusCode.h>
#include <Framework/DataHubRecords.h>
#include <Protocol/DebugSupport.h>
+#include <Protocol/FrameworkHii.h>
//////////////////////////////////////////////////////////////////////////////////////////
// String Data Type defintion. This is part of Status Code Specification
@@ -40,7 +41,7 @@ typedef enum { } EFI_STRING_TYPE;
typedef struct {
- EFI_HII_HANDLE Handle;
+ FRAMEWORK_EFI_HII_HANDLE Handle;
STRING_REF Token;
} EFI_STATUS_CODE_STRING_TOKEN;
diff --git a/IntelFrameworkPkg/Include/Library/FrameworkHiiLib.h b/IntelFrameworkPkg/Include/Library/FrameworkHiiLib.h index d2d7433..ceb91cf 100644 --- a/IntelFrameworkPkg/Include/Library/FrameworkHiiLib.h +++ b/IntelFrameworkPkg/Include/Library/FrameworkHiiLib.h @@ -14,10 +14,16 @@ **/
-#ifndef __HII_LIB_H__
-#define __HII_LIB_H__
+#ifndef __FRAMEWORK_HII_LIB_H__
+#define __FRAMEWORK_HII_LIB_H__
+
+#include <FrameworkDxe.h>
#include <Protocol/FrameworkHii.h>
+//
+// FrameworkHiiLib will produce HiiLib library class too.
+//
+#include <Library/HiiLib.h>
/**
This function allocates pool for an EFI_HII_PACKAGES structure
@@ -41,6 +47,4 @@ PreparePackages ( )
;
-
-
#endif
diff --git a/IntelFrameworkPkg/Include/Library/FrameworkIfrSupportLib.h b/IntelFrameworkPkg/Include/Library/FrameworkIfrSupportLib.h index d2a1ff5..2ea9a01 100644 --- a/IntelFrameworkPkg/Include/Library/FrameworkIfrSupportLib.h +++ b/IntelFrameworkPkg/Include/Library/FrameworkIfrSupportLib.h @@ -513,7 +513,7 @@ Returns: EFI_STATUS
ExtractDataFromHiiHandle (
- IN EFI_HII_HANDLE HiiHandle,
+ IN FRAMEWORK_EFI_HII_HANDLE HiiHandle,
IN OUT UINT16 *ImageLength,
OUT UINT8 *DefaultImage,
OUT EFI_GUID *Guid
@@ -547,7 +547,7 @@ Returns: --*/
;
-EFI_HII_HANDLE
+FRAMEWORK_EFI_HII_HANDLE
FindHiiHandle (
IN OUT EFI_HII_PROTOCOL **HiiProtocol, OPTIONAL
IN EFI_GUID *Guid
@@ -917,7 +917,7 @@ Returns: EFI_STATUS
ValidateDataFromHiiHandle (
- IN EFI_HII_HANDLE HiiHandle,
+ IN FRAMEWORK_EFI_HII_HANDLE HiiHandle,
OUT BOOLEAN *Results
)
/*++
diff --git a/IntelFrameworkPkg/Include/Protocol/FrameworkFormBrowser.h b/IntelFrameworkPkg/Include/Protocol/FrameworkFormBrowser.h index 867a5b7..14cd53f 100644 --- a/IntelFrameworkPkg/Include/Protocol/FrameworkFormBrowser.h +++ b/IntelFrameworkPkg/Include/Protocol/FrameworkFormBrowser.h @@ -43,7 +43,7 @@ typedef struct { typedef struct {
EFI_HII_IFR_PACK *IfrData;
EFI_HII_STRING_PACK *StringData;
-} EFI_IFR_PACKET;
+} FRAMEWORK_EFI_IFR_PACKET;
typedef struct {
UINTN LeftColumn;
@@ -94,9 +94,9 @@ EFI_STATUS (EFIAPI *EFI_SEND_FORM) (
IN EFI_FORM_BROWSER_PROTOCOL *This,
IN BOOLEAN UseDatabase,
- IN EFI_HII_HANDLE *Handle,
+ IN FRAMEWORK_EFI_HII_HANDLE *Handle,
IN UINTN HandleCount,
- IN EFI_IFR_PACKET *Packet, OPTIONAL
+ IN FRAMEWORK_EFI_IFR_PACKET *Packet, OPTIONAL
IN EFI_HANDLE CallbackHandle, OPTIONAL
IN UINT8 *NvMapOverride, OPTIONAL
IN EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
diff --git a/IntelFrameworkPkg/Include/Protocol/FrameworkFormCallback.h b/IntelFrameworkPkg/Include/Protocol/FrameworkFormCallback.h index 12aed7d..c544dec 100644 --- a/IntelFrameworkPkg/Include/Protocol/FrameworkFormCallback.h +++ b/IntelFrameworkPkg/Include/Protocol/FrameworkFormCallback.h @@ -24,7 +24,7 @@ #ifndef __FORM_CALLBACK_H__
#define __FORM_CALLBACK_H__
-#include <PiDxe.h>
+#include <FrameworkDxe.h>
#include <Protocol/FrameworkHii.h>
#include <Protocol/FrameworkFormBrowser.h>
@@ -50,41 +50,41 @@ typedef struct _EFI_FORM_CALLBACK_PROTOCOL EFI_FORM_CALLBACK_PROTOCOL; #pragma pack(1)
typedef struct {
UINT8 OpCode; // Likely a string, numeric, or one-of
- UINT8 Length; // Length of the EFI_IFR_DATA_ENTRY packet
+ UINT8 Length; // Length of the FRAMEWORK_EFI_IFR_DATA_ENTRY packet
UINT16 Flags; // Flags settings to determine what behavior is desired from the browser after the callback
VOID *Data; // The data in the form based on the op-code type - this is not a pointer to the data, the data follows immediately
// If the OpCode is a OneOf or Numeric type - Data is a UINT16 value
// If the OpCode is a String type - Data is a CHAR16[x] type
// If the OpCode is a Checkbox type - Data is a UINT8 value
- // If the OpCode is a NV Access type - Data is a EFI_IFR_NV_DATA structure
+ // If the OpCode is a NV Access type - Data is a FRAMEWORK_EFI_IFR_NV_DATA structure
//
-} EFI_IFR_DATA_ENTRY;
+} FRAMEWORK_EFI_IFR_DATA_ENTRY;
typedef struct {
VOID *NvRamMap; // If the flag of the op-code specified retrieval of a copy of the NVRAM map,
// this is a pointer to a buffer copy
//
- UINT32 EntryCount; // How many EFI_IFR_DATA_ENTRY entries
+ UINT32 EntryCount; // How many FRAMEWORK_EFI_IFR_DATA_ENTRY entries
//
- // EFI_IFR_DATA_ENTRY Data[1]; // The in-line Data entries.
+ // FRAMEWORK_EFI_IFR_DATA_ENTRY Data[1]; // The in-line Data entries.
//
-} EFI_IFR_DATA_ARRAY;
+} FRAMEWORK_EFI_IFR_DATA_ARRAY;
typedef union {
- EFI_IFR_DATA_ARRAY DataArray; // Primarily used by those who call back to their drivers and use HII as a repository
- EFI_IFR_PACKET DataPacket; // Primarily used by those which do not use HII as a repository
- CHAR16 *String; // If returning an error - fill the string with null-terminated contents
+ FRAMEWORK_EFI_IFR_DATA_ARRAY DataArray; // Primarily used by those who call back to their drivers and use HII as a repository
+ FRAMEWORK_EFI_IFR_PACKET DataPacket; // Primarily used by those which do not use HII as a repository
+ CHAR16 String[1]; // If returning an error - fill the string with null-terminated contents
} EFI_HII_CALLBACK_PACKET;
typedef struct {
- EFI_IFR_OP_HEADER Header;
+ FRAMEWORK_EFI_IFR_OP_HEADER Header;
UINT16 QuestionId; // Offset into the map
UINT8 StorageWidth; // Width of the value
//
// CHAR8 Data[1]; // The Data itself
//
-} EFI_IFR_NV_DATA;
+} FRAMEWORK_EFI_IFR_NV_DATA;
#pragma pack()
//
@@ -178,7 +178,7 @@ EFI_STATUS (EFIAPI *EFI_FORM_CALLBACK) (
IN EFI_FORM_CALLBACK_PROTOCOL *This,
IN UINT16 KeyValue,
- IN EFI_IFR_DATA_ARRAY *Data,
+ IN FRAMEWORK_EFI_IFR_DATA_ARRAY *Data,
OUT EFI_HII_CALLBACK_PACKET **Packet
);
diff --git a/IntelFrameworkPkg/Include/Protocol/FrameworkHii.h b/IntelFrameworkPkg/Include/Protocol/FrameworkHii.h index 32e66ed..1fd197a 100644 --- a/IntelFrameworkPkg/Include/Protocol/FrameworkHii.h +++ b/IntelFrameworkPkg/Include/Protocol/FrameworkHii.h @@ -51,6 +51,8 @@ typedef struct _EFI_HII_PROTOCOL EFI_HII_PROTOCOL;
+typedef UINT16 FRAMEWORK_EFI_HII_HANDLE;
+
//
// Global definition
//
@@ -139,7 +141,7 @@ typedef struct { // ********************************************************
//
typedef struct {
- EFI_HII_HANDLE HiiHandle;
+ FRAMEWORK_EFI_HII_HANDLE HiiHandle;
EFI_GUID PackageGuid;
UINT32 DataTableSize;
UINT32 IfrDataOffset;
@@ -207,25 +209,6 @@ typedef struct { //
} EFI_HII_STRING_PACK;
-//
-// Glyph Attributes
-//
-#define EFI_GLYPH_NON_SPACING 1
-#define EFI_GLYPH_WIDE 2
-
-typedef struct {
- CHAR16 UnicodeWeight;
- UINT8 Attributes;
- UINT8 GlyphCol1[GLYPH_HEIGHT];
-} EFI_NARROW_GLYPH;
-
-typedef struct {
- CHAR16 UnicodeWeight;
- UINT8 Attributes;
- UINT8 GlyphCol1[GLYPH_HEIGHT];
- UINT8 GlyphCol2[GLYPH_HEIGHT];
- UINT8 Pad[3];
-} EFI_WIDE_GLYPH;
//
// A font list consists of a font header followed by a series
@@ -249,117 +232,6 @@ typedef struct { EFI_HII_PACK_HEADER Header;
} EFI_HII_IFR_PACK_HEADER;
-//
-// pedef EFI_HII_PACK_HEADER EFI_HII_IFR_PACK_HEADER;
-//
-typedef enum {
- EfiKeyLCtrl,
- EfiKeyA0,
- EfiKeyLAlt,
- EfiKeySpaceBar,
- EfiKeyA2,
- EfiKeyA3,
- EfiKeyA4,
- EfiKeyRCtrl,
- EfiKeyLeftArrow,
- EfiKeyDownArrow,
- EfiKeyRightArrow,
- EfiKeyZero,
- EfiKeyPeriod,
- EfiKeyEnter,
- EfiKeyLShift,
- EfiKeyB0,
- EfiKeyB1,
- EfiKeyB2,
- EfiKeyB3,
- EfiKeyB4,
- EfiKeyB5,
- EfiKeyB6,
- EfiKeyB7,
- EfiKeyB8,
- EfiKeyB9,
- EfiKeyB10,
- EfiKeyRshift,
- EfiKeyUpArrow,
- EfiKeyOne,
- EfiKeyTwo,
- EfiKeyThree,
- EfiKeyCapsLock,
- EfiKeyC1,
- EfiKeyC2,
- EfiKeyC3,
- EfiKeyC4,
- EfiKeyC5,
- EfiKeyC6,
- EfiKeyC7,
- EfiKeyC8,
- EfiKeyC9,
- EfiKeyC10,
- EfiKeyC11,
- EfiKeyC12,
- EfiKeyFour,
- EfiKeyFive,
- EfiKeySix,
- EfiKeyPlus,
- EfiKeyTab,
- EfiKeyD1,
- EfiKeyD2,
- EfiKeyD3,
- EfiKeyD4,
- EfiKeyD5,
- EfiKeyD6,
- EfiKeyD7,
- EfiKeyD8,
- EfiKeyD9,
- EfiKeyD10,
- EfiKeyD11,
- EfiKeyD12,
- EfiKeyD13,
- EfiKeyDel,
- EfiKeyEnd,
- EfiKeyPgDn,
- EfiKeySeven,
- EfiKeyEight,
- EfiKeyNine,
- EfiKeyE0,
- EfiKeyE1,
- EfiKeyE2,
- EfiKeyE3,
- EfiKeyE4,
- EfiKeyE5,
- EfiKeyE6,
- EfiKeyE7,
- EfiKeyE8,
- EfiKeyE9,
- EfiKeyE10,
- EfiKeyE11,
- EfiKeyE12,
- EfiKeyBackSpace,
- EfiKeyIns,
- EfiKeyHome,
- EfiKeyPgUp,
- EfiKeyNLck,
- EfiKeySlash,
- EfiKeyAsterisk,
- EfiKeyMinus,
- EfiKeyEsc,
- EfiKeyF1,
- EfiKeyF2,
- EfiKeyF3,
- EfiKeyF4,
- EfiKeyF5,
- EfiKeyF6,
- EfiKeyF7,
- EfiKeyF8,
- EfiKeyF9,
- EfiKeyF10,
- EfiKeyF11,
- EfiKeyF12,
- EfiKeyPrint,
- EfiKeySLck,
- EfiKeyPause
-} EFI_KEY;
-
typedef struct {
EFI_KEY Key;
CHAR16 Unicode;
@@ -367,7 +239,7 @@ typedef struct { CHAR16 AltGrUnicode;
CHAR16 ShiftedAltGrUnicode;
UINT16 Modifier;
-} EFI_KEY_DESCRIPTOR;
+} FRAMEWORK_EFI_KEY_DESCRIPTOR;
//
// This structure allows a sparse set of keys to be redefined
@@ -389,7 +261,7 @@ typedef struct { //
typedef struct {
EFI_HII_PACK_HEADER Header;
- EFI_KEY_DESCRIPTOR *Descriptor;
+ FRAMEWORK_EFI_KEY_DESCRIPTOR *Descriptor;
UINT8 DescriptorCount;
} EFI_HII_KEYBOARD_PACK;
@@ -422,7 +294,7 @@ typedef struct _EFI_HII_VARIABLE_PACK_LIST { @param This A pointer to the EFI_HII_PROTOCOL instance.
@param Packages A pointer to an EFI_HII_PACKAGES package instance.
- @param Handle A pointer to the EFI_HII_HANDLE instance.
+ @param Handle A pointer to the FRAMEWORK_EFI_HII_HANDLE instance.
@retval EFI_SUCCESS Data was extracted from Packages, the database
was updated with the data, and Handle returned successfully.
@@ -434,7 +306,7 @@ EFI_STATUS (EFIAPI *EFI_HII_NEW_PACK) (
IN EFI_HII_PROTOCOL *This,
IN EFI_HII_PACKAGES *Packages,
- OUT EFI_HII_HANDLE *Handle
+ OUT FRAMEWORK_EFI_HII_HANDLE *Handle
);
/**
@@ -453,7 +325,7 @@ typedef EFI_STATUS
(EFIAPI *EFI_HII_REMOVE_PACK) (
IN EFI_HII_PROTOCOL *This,
- IN EFI_HII_HANDLE Handle
+ IN FRAMEWORK_EFI_HII_HANDLE Handle
);
/**
@@ -463,7 +335,7 @@ EFI_STATUS @param HandleBufferLength On input, a pointer to the length of the handle
buffer. On output, the length of the handle buffer that is required
for the handles found.
- @param Handle An array of EFI_HII_HANDLE instances returned.
+ @param Handle An array of FRAMEWORK_EFI_HII_HANDLE instances returned.
@retval EFI_SUCCESS Handle was updated successfully.
@retval EFI_BUFFER_TOO_SMALL The HandleBufferLength parameter indicates
@@ -475,14 +347,14 @@ EFI_STATUS (EFIAPI *EFI_HII_FIND_HANDLES) (
IN EFI_HII_PROTOCOL *This,
IN OUT UINT16 *HandleBufferLength,
- OUT EFI_HII_HANDLE *Handle
+ OUT FRAMEWORK_EFI_HII_HANDLE *Handle
);
/**
Exports the contents of the database into a buffer.
@param This A pointer to the EFI_HII_PROTOCOL instance.
- @param Handle An EFI_HII_HANDLE that corresponds to the desired
+ @param Handle An FRAMEWORK_EFI_HII_HANDLE that corresponds to the desired
handle to export. If the value is 0, the entire database will be exported.
In either case, the data will be exported in a format described by the
structure definition of EFI_HII_EXPORT_TABLE.
@@ -499,7 +371,7 @@ typedef EFI_STATUS
(EFIAPI *EFI_HII_EXPORT) (
IN EFI_HII_PROTOCOL *This,
- IN EFI_HII_HANDLE Handle,
+ IN FRAMEWORK_EFI_HII_HANDLE Handle,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
);
@@ -519,7 +391,7 @@ typedef EFI_STATUS
(EFIAPI *EFI_HII_RESET_STRINGS) (
IN EFI_HII_PROTOCOL *This,
- IN EFI_HII_HANDLE Handle
+ IN FRAMEWORK_EFI_HII_HANDLE Handle
);
/**
@@ -637,7 +509,7 @@ EFI_STATUS (EFIAPI *EFI_HII_NEW_STRING) (
IN EFI_HII_PROTOCOL *This,
IN CHAR16 *Language,
- IN EFI_HII_HANDLE Handle,
+ IN FRAMEWORK_EFI_HII_HANDLE Handle,
IN OUT STRING_REF *Reference,
IN CHAR16 *NewString
);
@@ -659,7 +531,7 @@ typedef EFI_STATUS
(EFIAPI *EFI_HII_GET_PRI_LANGUAGES) (
IN EFI_HII_PROTOCOL *This,
- IN EFI_HII_HANDLE Handle,
+ IN FRAMEWORK_EFI_HII_HANDLE Handle,
OUT EFI_STRING *LanguageString
);
@@ -682,7 +554,7 @@ typedef EFI_STATUS
(EFIAPI *EFI_HII_GET_SEC_LANGUAGES) (
IN EFI_HII_PROTOCOL *This,
- IN EFI_HII_HANDLE Handle,
+ IN FRAMEWORK_EFI_HII_HANDLE Handle,
IN CHAR16 *PrimaryLanguage,
OUT EFI_STRING *LanguageString
);
@@ -714,7 +586,7 @@ typedef EFI_STATUS
(EFIAPI *EFI_HII_GET_STRING) (
IN EFI_HII_PROTOCOL *This,
- IN EFI_HII_HANDLE Handle,
+ IN FRAMEWORK_EFI_HII_HANDLE Handle,
IN STRING_REF Token,
IN BOOLEAN Raw,
IN CHAR16 *LanguageString,
@@ -748,7 +620,7 @@ typedef EFI_STATUS
(EFIAPI *EFI_HII_GET_LINE) (
IN EFI_HII_PROTOCOL *This,
- IN EFI_HII_HANDLE Handle,
+ IN FRAMEWORK_EFI_HII_HANDLE Handle,
IN STRING_REF Token,
IN OUT UINT16 *Index,
IN UINT16 LineWidth,
@@ -782,7 +654,7 @@ typedef EFI_STATUS
(EFIAPI *EFI_HII_GET_FORMS) (
IN EFI_HII_PROTOCOL *This,
- IN EFI_HII_HANDLE Handle,
+ IN FRAMEWORK_EFI_HII_HANDLE Handle,
IN EFI_FORM_ID FormId,
IN OUT UINTN *BufferLength,
OUT UINT8 *Buffer
@@ -809,7 +681,7 @@ typedef EFI_STATUS
(EFIAPI *EFI_HII_GET_DEFAULT_IMAGE) (
IN EFI_HII_PROTOCOL *This,
- IN EFI_HII_HANDLE Handle,
+ IN FRAMEWORK_EFI_HII_HANDLE Handle,
IN UINTN DefaultMask,
OUT EFI_HII_VARIABLE_PACK_LIST **VariablePackList
);
@@ -835,7 +707,7 @@ typedef EFI_STATUS
(EFIAPI *EFI_HII_UPDATE_FORM) (
IN EFI_HII_PROTOCOL *This,
- IN EFI_HII_HANDLE Handle,
+ IN FRAMEWORK_EFI_HII_HANDLE Handle,
IN EFI_FORM_LABEL Label,
IN BOOLEAN AddData,
IN EFI_HII_UPDATE_DATA *Data
@@ -847,7 +719,7 @@ EFI_STATUS @param This A pointer to the EFI_HII_PROTOCOL instance.
@param DescriptorCount A pointer to the number of Descriptor entries being
described in the keyboard layout being retrieved.
- @param Descriptor A pointer to a buffer containing an array of EFI_KEY_DESCRIPTOR
+ @param Descriptor A pointer to a buffer containing an array of FRAMEWORK_EFI_KEY_DESCRIPTOR
entries. Each entry will reflect the definition of a specific physical key.
@retval EFI_SUCCESS The keyboard layout was retrieved successfully.
@@ -858,7 +730,7 @@ EFI_STATUS (EFIAPI *EFI_HII_GET_KEYBOARD_LAYOUT) (
IN EFI_HII_PROTOCOL *This,
OUT UINT16 *DescriptorCount,
- OUT EFI_KEY_DESCRIPTOR *Descriptor
+ OUT FRAMEWORK_EFI_KEY_DESCRIPTOR *Descriptor
);
/**
diff --git a/IntelFrameworkPkg/IntelFrameworkPkg.dec b/IntelFrameworkPkg/IntelFrameworkPkg.dec index 337389b..414102e 100644 --- a/IntelFrameworkPkg/IntelFrameworkPkg.dec +++ b/IntelFrameworkPkg/IntelFrameworkPkg.dec @@ -87,7 +87,7 @@ gEfiSmmIchnDispatchProtocolGuid = { 0xc50b323e, 0x9075, 0x4f2a, { 0xac, 0x8e, 0xd2, 0x59, 0x6a, 0x10, 0x85, 0xcc }}
gEfiFormBrowserProtocolGuid = {0xe5a1333e, 0xe1b4, 0x4d55, {0xce, 0xeb, 0x35, 0xc3, 0xef, 0x13, 0x34, 0x43 }}
gEfiFormCallbackProtocolGuid = { 0xF3E4543D, 0xCF35, 0x6CEF, { 0x35, 0xC4, 0x4F, 0xE6, 0x34, 0x4D, 0xFC, 0x54 }}
-
+ gEfiFormBrowserProtocolGuid = { 0xE5A1333E, 0xE1B4, 0x4D55, { 0xCE, 0xEB, 0x35, 0xC3, 0xEF, 0x13, 0x34, 0x43 }}
[Ppis.common]
gEfiPeiBootScriptExecuterPpiGuid = { 0xabd42895, 0x78cf, 0x4872, { 0x84, 0x44, 0x1b, 0x5c, 0x18, 0x0b, 0xfb, 0xff }}
diff --git a/IntelFrameworkPkg/IntelFrameworkPkg.dsc b/IntelFrameworkPkg/IntelFrameworkPkg.dsc index be7a5bc..e99d917 100644 --- a/IntelFrameworkPkg/IntelFrameworkPkg.dsc +++ b/IntelFrameworkPkg/IntelFrameworkPkg.dsc @@ -63,3 +63,5 @@ IntelFrameworkPkg/Library/FrameworkHiiLib/HiiLib.inf
IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrSupportLib.inf
IntelFrameworkPkg/Library/PeiSmbusLibSmbusPpi/PeiSmbusLibSmbusPpi.inf
+ IntelFrameworkPkg/Library/HiiLibFramework/HiiLibFramework.inf
+
diff --git a/IntelFrameworkPkg/Library/FrameworkHiiLib/HiiLib.c b/IntelFrameworkPkg/Library/FrameworkHiiLib/HiiLib.c index 913b471..1b4c0dd79 100644 --- a/IntelFrameworkPkg/Library/FrameworkHiiLib/HiiLib.c +++ b/IntelFrameworkPkg/Library/FrameworkHiiLib/HiiLib.c @@ -17,10 +17,67 @@ #include <FrameworkDxe.h>
+#include <Protocol/FrameworkHii.h>
+
#include <Library/FrameworkHiiLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/BaseMemoryLib.h>
+
+EFI_HII_PROTOCOL *mHii = NULL;
+
+EFI_STATUS
+EFIAPI
+FrameworkHiiLibConstructor (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+ EFI_STATUS Status;
+
+ Status = gBS->LocateProtocol (
+ &gEfiHiiProtocolGuid,
+ NULL,
+ (VOID **) &mHii
+ );
+ ASSERT_EFI_ERROR (Status);
+ ASSERT (mHii != NULL);
+
+ return EFI_SUCCESS;
+}
+
+
+EFI_HII_PACKAGES *
+InternalPreparePackages (
+ IN UINTN NumberOfPackages,
+ IN CONST EFI_GUID *Guid OPTIONAL,
+ VA_LIST Marker
+ )
+{
+ EFI_HII_PACKAGES *HiiPackages;
+ VOID **Package;
+ UINTN Index;
+
+ ASSERT (NumberOfPackages > 0);
+
+ HiiPackages = AllocateZeroPool (sizeof (EFI_HII_PACKAGES) + NumberOfPackages * sizeof (VOID *));
+ ASSERT (HiiPackages != NULL);
+
+ HiiPackages->GuidId = (EFI_GUID *) Guid;
+ HiiPackages->NumberOfPackages = NumberOfPackages;
+ Package = (VOID **) (((UINT8 *) HiiPackages) + sizeof (EFI_HII_PACKAGES));
+
+ for (Index = 0; Index < NumberOfPackages; Index++) {
+ *Package = VA_ARG (Marker, VOID *);
+ Package++;
+ }
+
+ return HiiPackages;
+
+}
+
/**
This function allocates pool for an EFI_HII_PACKAGES structure
@@ -43,28 +100,219 @@ PreparePackages ( )
{
VA_LIST Args;
- EFI_HII_PACKAGES *HiiPackages;
- VOID **Package;
- UINTN Index;
- ASSERT (NumberOfPackages > 0);
+ VA_START (Args, Guid);
- HiiPackages = AllocateZeroPool (sizeof (EFI_HII_PACKAGES) + NumberOfPackages * sizeof (VOID *));
- ASSERT (HiiPackages != NULL);
+ return InternalPreparePackages (NumberOfPackages, Guid, Args);
+}
- HiiPackages->GuidId = (EFI_GUID *) Guid;
- HiiPackages->NumberOfPackages = NumberOfPackages;
- Package = (VOID **) (((UINT8 *) HiiPackages) + sizeof (EFI_HII_PACKAGES));
- VA_START (Args, Guid);
+/**
+ This function allocates pool for an EFI_HII_PACKAGE_LIST structure
+ with additional space that is big enough to host all packages described by the variable
+ argument list of package pointers. The allocated structure is initialized using NumberOfPackages,
+ GuidId, and the variable length argument list of package pointers.
- for (Index = 0; Index < NumberOfPackages; Index++) {
- *Package = VA_ARG (Args, VOID *);
- Package++;
+ Then, EFI_HII_PACKAGE_LIST will be register to the default System HII Database. The
+ Handle to the newly registered Package List is returned throught HiiHandle.
+
+ @param NumberOfPackages The number of HII packages to register.
+ @param GuidId Package List GUID ID.
+ @param HiiHandle The ID used to retrieve the Package List later.
+ @param ... The variable argument list describing all HII Package.
+
+ @return
+ The allocated and initialized packages.
+
+**/
+
+EFI_STATUS
+EFIAPI
+HiiLibAddPackagesToHiiDatabase (
+ IN UINTN NumberOfPackages,
+ IN CONST EFI_GUID *GuidId,
+ IN EFI_HANDLE DriverHandle, OPTIONAL
+ OUT EFI_HII_HANDLE *HiiHandle, OPTIONAL
+ ...
+ )
+{
+ VA_LIST Args;
+ EFI_HII_PACKAGES *FrameworkHiiPacages;
+ FRAMEWORK_EFI_HII_HANDLE FrameworkHiiHandle;
+ EFI_STATUS Status;
+
+
+ VA_START (Args, HiiHandle);
+ FrameworkHiiPacages = InternalPreparePackages (NumberOfPackages, GuidId, Args);
+
+ Status = mHii->NewPack (mHii, FrameworkHiiPacages, &FrameworkHiiHandle);
+ if (HiiHandle != NULL) {
+ if (EFI_ERROR (Status)) {
+ *HiiHandle = NULL;
+ } else {
+ *HiiHandle = (EFI_HII_HANDLE) (UINTN) FrameworkHiiHandle;
+ }
}
- VA_END (Args);
+ FreePool (FrameworkHiiPacages);
+
+ return Status;
+}
- return HiiPackages;
+EFI_STATUS
+EFIAPI
+HiiLibAddFontPackageToHiiDatabase (
+ IN UINTN FontSize,
+ IN CONST UINT8 *FontBinary,
+ IN CONST EFI_GUID *GuidId,
+ OUT EFI_HII_HANDLE *HiiHandle OPTIONAL
+ )
+{
+ EFI_STATUS Status;
+ EFI_HII_FONT_PACK *FontPack;
+ UINT8 *Location;
+
+ FontPack = AllocateZeroPool (sizeof (EFI_HII_FONT_PACK) + FontSize);
+ ASSERT (FontPack != NULL);
+
+ FontPack->Header.Length = (UINT32) (sizeof (EFI_HII_FONT_PACK) + FontSize);
+ FontPack->Header.Type = EFI_HII_FONT;
+ FontPack->NumberOfNarrowGlyphs = (UINT16) (FontSize / sizeof (EFI_NARROW_GLYPH));
+
+ Location = (UINT8 *) (&FontPack->NumberOfWideGlyphs + sizeof (UINT8));
+ CopyMem (Location, FontBinary, FontSize);
+
+
+ //
+ // Register our Fonts into the global database
+ //
+ Status = HiiLibAddPackagesToHiiDatabase (1, NULL, HiiHandle, NULL, FontPack);
+ //
+ // Free the font database
+ //
+ FreePool (FontPack);
+ return Status;
}
+
+EFI_STATUS
+EFIAPI
+HiiLibRemovePackagesFromHiiDatabase (
+ IN EFI_HII_HANDLE HiiHandle
+ )
+{
+ return mHii->RemovePack (mHii, (FRAMEWORK_EFI_HII_HANDLE) (UINTN) HiiHandle);
+}
+
+
+/**
+ This function adds the string into String Package of each language.
+
+ @param PackageList Handle of the package list where this string will
+ be added.
+ @param StringId On return, contains the new strings id, which is
+ unique within PackageList.
+ @param String Points to the new null-terminated string.
+
+ @retval EFI_SUCCESS The new string was added successfully.
+ @retval EFI_NOT_FOUND The specified PackageList could not be found in
+ database.
+ @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of resources.
+ @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL is NULL.
+
+**/
+EFI_STATUS
+EFIAPI
+HiiLibCreateString (
+ IN EFI_HII_HANDLE PackageList,
+ OUT EFI_STRING_ID *StringId,
+ IN CONST EFI_STRING String
+ )
+{
+ FRAMEWORK_EFI_HII_HANDLE FrameworkHiiHandle;
+ EFI_STATUS Status;
+
+ FrameworkHiiHandle = (FRAMEWORK_EFI_HII_HANDLE) (UINTN) PackageList;
+ Status = mHii->NewString (
+ mHii,
+ NULL,
+ FrameworkHiiHandle,
+ StringId,
+ String
+ );
+
+ return Status;
+}
+
+
+EFI_STATUS
+EFIAPI
+HiiLibUpdateString (
+ IN EFI_HII_HANDLE PackageList,
+ IN EFI_STRING_ID StringId,
+ IN CONST EFI_STRING String
+ )
+{
+ FRAMEWORK_EFI_HII_HANDLE FrameworkHiiHandle;
+ EFI_STATUS Status;
+
+ FrameworkHiiHandle = (FRAMEWORK_EFI_HII_HANDLE) (UINTN) PackageList;
+ Status = mHii->NewString (
+ mHii,
+ NULL,
+ FrameworkHiiHandle,
+ &StringId,
+ String
+ );
+
+ return Status;
+}
+
+//
+// Just use the UEFI prototype
+//
+EFI_STATUS
+EFIAPI
+HiiLibGetStringFromGuidId (
+ IN EFI_GUID *ProducerGuid,
+ IN EFI_STRING_ID StringId,
+ OUT EFI_STRING *String
+ )
+{
+ return EFI_SUCCESS;
+}
+
+//
+// Just use the UEFI prototype
+//
+EFI_STATUS
+EFIAPI
+HiiLibGetStringFromHandle (
+ IN EFI_HII_HANDLE PackageList,
+ IN EFI_STRING_ID StringId,
+ OUT EFI_STRING *String
+ )
+{
+ return EFI_SUCCESS;
+}
+
+//
+// Just use the UEFI prototype
+//
+EFI_STATUS
+EFIAPI
+HiiLibCreateHiiDriverHandle (
+ OUT EFI_HANDLE *DriverHandle
+ )
+{
+ //
+ // Driver
+ // This implementation does nothing as DriverHandle concept only
+ // applies to UEFI HII specification.
+ //
+
+ *DriverHandle = NULL;
+
+ return EFI_SUCCESS;
+}
+
diff --git a/IntelFrameworkPkg/Library/FrameworkHiiLib/HiiLib.inf b/IntelFrameworkPkg/Library/FrameworkHiiLib/HiiLib.inf index 98ee9f9..d38275d 100644 --- a/IntelFrameworkPkg/Library/FrameworkHiiLib/HiiLib.inf +++ b/IntelFrameworkPkg/Library/FrameworkHiiLib/HiiLib.inf @@ -20,10 +20,12 @@ FILE_GUID = 1e2c4c2e-67e6-4e57-b3ae-cf5a5af72c2c
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
- LIBRARY_CLASS = FrameworkHiiLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
+ LIBRARY_CLASS = FrameworkHiiLib,HiiLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
+ CONSTRUCTOR = FrameworkHiiLibConstructor
+
#
# The following information is for reference only and not required by the build tools.
@@ -41,4 +43,12 @@ [LibraryClasses]
MemoryAllocationLib
DebugLib
+ BaseMemoryLib
+ UefiBootServicesTableLib
+
+[Protocols]
+ gEfiHiiProtocolGuid # ALWAYS_CONSUMED
+
+[Depex]
+ gEfiHiiProtocolGuid # ALWAYS_CONSUMED
diff --git a/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrCommon.c b/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrCommon.c index d9894c4..7e5182d 100644 --- a/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrCommon.c +++ b/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrCommon.c @@ -372,52 +372,52 @@ Returns: //
// Copy data to the new buffer until we run into the end_form
//
- for (; ((EFI_IFR_OP_HEADER *) Source)->OpCode != EFI_IFR_END_FORM_OP;) {
+ for (; ((FRAMEWORK_EFI_IFR_OP_HEADER *) Source)->OpCode != FRAMEWORK_EFI_IFR_END_FORM_OP;) {
//
// If the this opcode is an end_form_set we better be creating and endform
// Nonetheless, we will add data before the end_form_set. This also provides
// for interesting behavior in the code we will run, but has no bad side-effects
// since we will possibly do a 0 byte copy in this particular end-case.
//
- if (((EFI_IFR_OP_HEADER *) Source)->OpCode == EFI_IFR_END_FORM_SET_OP) {
+ if (((FRAMEWORK_EFI_IFR_OP_HEADER *) Source)->OpCode == FRAMEWORK_EFI_IFR_END_FORM_SET_OP) {
break;
}
//
// Copy data to new buffer
//
- CopyMem (Destination, Source, ((EFI_IFR_OP_HEADER *) Source)->Length);
+ CopyMem (Destination, Source, ((FRAMEWORK_EFI_IFR_OP_HEADER *) Source)->Length);
//
// Adjust Source/Destination to next op-code location
//
- Destination = Destination + (UINTN) ((EFI_IFR_OP_HEADER *) Source)->Length;
- Source = Source + (UINTN) ((EFI_IFR_OP_HEADER *) Source)->Length;
+ Destination = Destination + (UINTN) ((FRAMEWORK_EFI_IFR_OP_HEADER *) Source)->Length;
+ Source = Source + (UINTN) ((FRAMEWORK_EFI_IFR_OP_HEADER *) Source)->Length;
}
//
// Prior to the end_form is where we insert the new op-code data
//
- CopyMem (Destination, OpCodeData, ((EFI_IFR_OP_HEADER *) OpCodeData)->Length);
- Destination = Destination + (UINTN) ((EFI_IFR_OP_HEADER *) OpCodeData)->Length;
+ CopyMem (Destination, OpCodeData, ((FRAMEWORK_EFI_IFR_OP_HEADER *) OpCodeData)->Length);
+ Destination = Destination + (UINTN) ((FRAMEWORK_EFI_IFR_OP_HEADER *) OpCodeData)->Length;
- NewBuffer->Length = (UINT32) (NewBuffer->Length + (UINT32) (((EFI_IFR_OP_HEADER *) OpCodeData)->Length));
+ NewBuffer->Length = (UINT32) (NewBuffer->Length + (UINT32) (((FRAMEWORK_EFI_IFR_OP_HEADER *) OpCodeData)->Length));
//
// Copy end-form data to new buffer
//
- CopyMem (Destination, Source, ((EFI_IFR_OP_HEADER *) Source)->Length);
+ CopyMem (Destination, Source, ((FRAMEWORK_EFI_IFR_OP_HEADER *) Source)->Length);
//
// Adjust Source/Destination to next op-code location
//
- Destination = Destination + (UINTN) ((EFI_IFR_OP_HEADER *) Source)->Length;
- Source = Source + (UINTN) ((EFI_IFR_OP_HEADER *) Source)->Length;
+ Destination = Destination + (UINTN) ((FRAMEWORK_EFI_IFR_OP_HEADER *) Source)->Length;
+ Source = Source + (UINTN) ((FRAMEWORK_EFI_IFR_OP_HEADER *) Source)->Length;
//
// Copy end-formset data to new buffer
//
- CopyMem (Destination, Source, ((EFI_IFR_OP_HEADER *) Source)->Length);
+ CopyMem (Destination, Source, ((FRAMEWORK_EFI_IFR_OP_HEADER *) Source)->Length);
//
// Zero out the original buffer and copy the updated data in the new buffer to the old buffer
@@ -470,7 +470,7 @@ Returns: EFI_STATUS
ExtractDataFromHiiHandle (
- IN EFI_HII_HANDLE HiiHandle,
+ IN FRAMEWORK_EFI_HII_HANDLE HiiHandle,
IN OUT UINT16 *ImageLength,
OUT UINT8 *DefaultImage,
OUT EFI_GUID *Guid
@@ -560,31 +560,31 @@ Returns: //
RawData = (UINT8 *) ((UINTN) RawData + sizeof (EFI_HII_PACK_HEADER));
- for (Index = 0; RawData[Index] != EFI_IFR_END_FORM_SET_OP;) {
+ for (Index = 0; RawData[Index] != FRAMEWORK_EFI_IFR_END_FORM_SET_OP;) {
switch (RawData[Index]) {
- case EFI_IFR_FORM_SET_OP:
+ case FRAMEWORK_EFI_IFR_FORM_SET_OP:
//
// Copy the GUID information from this handle
//
- CopyMem (Guid, &((EFI_IFR_FORM_SET *) &RawData[Index])->Guid, sizeof (EFI_GUID));
+ CopyMem (Guid, &((FRAMEWORK_EFI_IFR_FORM_SET *) &RawData[Index])->Guid, sizeof (EFI_GUID));
break;
- case EFI_IFR_ONE_OF_OP:
- case EFI_IFR_CHECKBOX_OP:
- case EFI_IFR_NUMERIC_OP:
- case EFI_IFR_DATE_OP:
- case EFI_IFR_TIME_OP:
- case EFI_IFR_PASSWORD_OP:
- case EFI_IFR_STRING_OP:
+ case FRAMEWORK_EFI_IFR_ONE_OF_OP:
+ case FRAMEWORK_EFI_IFR_CHECKBOX_OP:
+ case FRAMEWORK_EFI_IFR_NUMERIC_OP:
+ case FRAMEWORK_EFI_IFR_DATE_OP:
+ case FRAMEWORK_EFI_IFR_TIME_OP:
+ case FRAMEWORK_EFI_IFR_PASSWORD_OP:
+ case FRAMEWORK_EFI_IFR_STRING_OP:
//
// Remember, multiple op-codes may reference the same item, so let's keep a running
// marker of what the highest QuestionId that wasn't zero length. This will accurately
// maintain the Size of the NvStore
//
- if (((EFI_IFR_ONE_OF *) &RawData[Index])->Width != 0) {
- Temp = ((EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId + ((EFI_IFR_ONE_OF *) &RawData[Index])->Width;
+ if (((FRAMEWORK_EFI_IFR_ONE_OF *) &RawData[Index])->Width != 0) {
+ Temp = ((FRAMEWORK_EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId + ((FRAMEWORK_EFI_IFR_ONE_OF *) &RawData[Index])->Width;
if (SizeOfNvStore < Temp) {
- SizeOfNvStore = ((EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId + ((EFI_IFR_ONE_OF *) &RawData[Index])->Width;
+ SizeOfNvStore = ((FRAMEWORK_EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId + ((FRAMEWORK_EFI_IFR_ONE_OF *) &RawData[Index])->Width;
}
}
}
@@ -608,26 +608,26 @@ Returns: //
// Copy the default image information to the user's buffer
//
- for (Index = 0; RawData[Index] != EFI_IFR_END_FORM_SET_OP;) {
+ for (Index = 0; RawData[Index] != FRAMEWORK_EFI_IFR_END_FORM_SET_OP;) {
switch (RawData[Index]) {
- case EFI_IFR_ONE_OF_OP:
- CachedStart = ((EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId;
+ case FRAMEWORK_EFI_IFR_ONE_OF_OP:
+ CachedStart = ((FRAMEWORK_EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId;
break;
- case EFI_IFR_ONE_OF_OPTION_OP:
- if (((EFI_IFR_ONE_OF_OPTION *) &RawData[Index])->Flags & EFI_IFR_FLAG_DEFAULT) {
- CopyMem (&DefaultImage[CachedStart], &((EFI_IFR_ONE_OF_OPTION *) &RawData[Index])->Value, 2);
+ case FRAMEWORK_EFI_IFR_ONE_OF_OPTION_OP:
+ if (((FRAMEWORK_EFI_IFR_ONE_OF_OPTION *) &RawData[Index])->Flags & FRAMEWORK_EFI_IFR_FLAG_DEFAULT) {
+ CopyMem (&DefaultImage[CachedStart], &((FRAMEWORK_EFI_IFR_ONE_OF_OPTION *) &RawData[Index])->Value, 2);
}
break;
- case EFI_IFR_CHECKBOX_OP:
- DefaultImage[((EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId] = ((EFI_IFR_CHECKBOX *) &RawData[Index])->Flags;
+ case FRAMEWORK_EFI_IFR_CHECKBOX_OP:
+ DefaultImage[((FRAMEWORK_EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId] = ((FRAMEWORK_EFI_IFR_CHECKBOX *) &RawData[Index])->Flags;
break;
- case EFI_IFR_NUMERIC_OP:
+ case FRAMEWORK_EFI_IFR_NUMERIC_OP:
CopyMem (
- &DefaultImage[((EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId],
- &((EFI_IFR_NUMERIC *) &RawData[Index])->Default,
+ &DefaultImage[((FRAMEWORK_EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId],
+ &((FRAMEWORK_EFI_IFR_NUMERIC *) &RawData[Index])->Default,
2
);
break;
@@ -648,7 +648,7 @@ Returns: }
-EFI_HII_HANDLE
+FRAMEWORK_EFI_HII_HANDLE
FindHiiHandle (
IN OUT EFI_HII_PROTOCOL **HiiProtocol, OPTIONAL
IN EFI_GUID *Guid
@@ -672,8 +672,8 @@ Returns: {
EFI_STATUS Status;
- EFI_HII_HANDLE *HiiHandleBuffer;
- EFI_HII_HANDLE HiiHandle;
+ FRAMEWORK_EFI_HII_HANDLE *HiiHandleBuffer;
+ FRAMEWORK_EFI_HII_HANDLE HiiHandle;
UINT16 HiiHandleBufferLength;
UINT32 NumberOfHiiHandles;
EFI_GUID HiiGuid;
@@ -741,7 +741,7 @@ Returns: goto lbl_exit;
}
- NumberOfHiiHandles = HiiHandleBufferLength / sizeof (EFI_HII_HANDLE);
+ NumberOfHiiHandles = HiiHandleBufferLength / sizeof (FRAMEWORK_EFI_HII_HANDLE );
//
// Iterate Hii handles and look for the one that matches our Guid
@@ -766,7 +766,7 @@ lbl_exit: EFI_STATUS
ValidateDataFromHiiHandle (
- IN EFI_HII_HANDLE HiiHandle,
+ IN FRAMEWORK_EFI_HII_HANDLE HiiHandle,
OUT BOOLEAN *Results
)
/*++
@@ -854,36 +854,36 @@ Returns: //
RawData = (UINT8 *) ((UINTN) RawData + sizeof (EFI_HII_PACK_HEADER));
- for (Index = 0; RawData[Index] != EFI_IFR_END_FORM_SET_OP;) {
- if (RawData[Index] == EFI_IFR_FORM_SET_OP) {
- CopyMem (&Guid, &((EFI_IFR_FORM_SET *) &RawData[Index])->Guid, sizeof (EFI_GUID));
+ for (Index = 0; RawData[Index] != FRAMEWORK_EFI_IFR_END_FORM_SET_OP;) {
+ if (RawData[Index] == FRAMEWORK_EFI_IFR_FORM_SET_OP) {
+ CopyMem (&Guid, &((FRAMEWORK_EFI_IFR_FORM_SET *) &RawData[Index])->Guid, sizeof (EFI_GUID));
break;
}
Index = RawData[Index + 1] + Index;
}
- for (Index = 0; RawData[Index] != EFI_IFR_END_FORM_SET_OP;) {
+ for (Index = 0; RawData[Index] != FRAMEWORK_EFI_IFR_END_FORM_SET_OP;) {
switch (RawData[Index]) {
- case EFI_IFR_FORM_SET_OP:
+ case FRAMEWORK_EFI_IFR_FORM_SET_OP:
break;
- case EFI_IFR_ONE_OF_OP:
- case EFI_IFR_CHECKBOX_OP:
- case EFI_IFR_NUMERIC_OP:
- case EFI_IFR_DATE_OP:
- case EFI_IFR_TIME_OP:
- case EFI_IFR_PASSWORD_OP:
- case EFI_IFR_STRING_OP:
+ case FRAMEWORK_EFI_IFR_ONE_OF_OP:
+ case FRAMEWORK_EFI_IFR_CHECKBOX_OP:
+ case FRAMEWORK_EFI_IFR_NUMERIC_OP:
+ case FRAMEWORK_EFI_IFR_DATE_OP:
+ case FRAMEWORK_EFI_IFR_TIME_OP:
+ case FRAMEWORK_EFI_IFR_PASSWORD_OP:
+ case FRAMEWORK_EFI_IFR_STRING_OP:
//
// Remember, multiple op-codes may reference the same item, so let's keep a running
// marker of what the highest QuestionId that wasn't zero length. This will accurately
// maintain the Size of the NvStore
//
- if (((EFI_IFR_ONE_OF *) &RawData[Index])->Width != 0) {
- Temp = ((EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId + ((EFI_IFR_ONE_OF *) &RawData[Index])->Width;
+ if (((FRAMEWORK_EFI_IFR_ONE_OF *) &RawData[Index])->Width != 0) {
+ Temp = ((FRAMEWORK_EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId + ((FRAMEWORK_EFI_IFR_ONE_OF *) &RawData[Index])->Width;
if (SizeOfNvStore < Temp) {
- SizeOfNvStore = ((EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId + ((EFI_IFR_ONE_OF *) &RawData[Index])->Width;
+ SizeOfNvStore = ((FRAMEWORK_EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId + ((FRAMEWORK_EFI_IFR_ONE_OF *) &RawData[Index])->Width;
}
}
}
@@ -942,25 +942,25 @@ Returns: // This allows for the possibility of stale (obsoleted) data in the variable
// can be overlooked without causing an error
//
- for (Index = 0; RawData[Index] != EFI_IFR_END_FORM_SET_OP;) {
+ for (Index = 0; RawData[Index] != FRAMEWORK_EFI_IFR_END_FORM_SET_OP;) {
switch (RawData[Index]) {
- case EFI_IFR_ONE_OF_OP:
+ case FRAMEWORK_EFI_IFR_ONE_OF_OP:
//
// A one_of has no data, its the option that does - cache the storage Id
//
- CachedStart = ((EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId;
+ CachedStart = ((FRAMEWORK_EFI_IFR_ONE_OF *) &RawData[Index])->QuestionId;
break;
- case EFI_IFR_ONE_OF_OPTION_OP:
+ case FRAMEWORK_EFI_IFR_ONE_OF_OPTION_OP:
//
// A one_of_option can be any value
//
- if (VariableData[CachedStart] == ((EFI_IFR_ONE_OF_OPTION *) &RawData[Index])->Value) {
+ if (VariableData[CachedStart] == ((FRAMEWORK_EFI_IFR_ONE_OF_OPTION *) &RawData[Index])->Value) {
GotMatch = TRUE;
}
break;
- case EFI_IFR_END_ONE_OF_OP:
+ case FRAMEWORK_EFI_IFR_END_ONE_OF_OP:
//
// At this point lets make sure that the data value in the NVRAM matches one of the options
//
@@ -970,20 +970,20 @@ Returns: }
break;
- case EFI_IFR_CHECKBOX_OP:
+ case FRAMEWORK_EFI_IFR_CHECKBOX_OP:
//
// A checkbox is a boolean, so 0 and 1 are valid
// Remember, QuestionId corresponds to the offset location of the data in the variable
//
- if (VariableData[((EFI_IFR_CHECKBOX *) &RawData[Index])->QuestionId] > 1) {
+ if (VariableData[((FRAMEWORK_EFI_IFR_CHECKBOX *) &RawData[Index])->QuestionId] > 1) {
*Results = FALSE;
return EFI_SUCCESS;
}
break;
- case EFI_IFR_NUMERIC_OP:
- if ((VariableData[((EFI_IFR_NUMERIC *)&RawData[Index])->QuestionId] < ((EFI_IFR_NUMERIC *)&RawData[Index])->Minimum) ||
- (VariableData[((EFI_IFR_NUMERIC *)&RawData[Index])->QuestionId] > ((EFI_IFR_NUMERIC *)&RawData[Index])->Maximum)) {
+ case FRAMEWORK_EFI_IFR_NUMERIC_OP:
+ if ((VariableData[((FRAMEWORK_EFI_IFR_NUMERIC *)&RawData[Index])->QuestionId] < ((FRAMEWORK_EFI_IFR_NUMERIC *)&RawData[Index])->Minimum) ||
+ (VariableData[((FRAMEWORK_EFI_IFR_NUMERIC *)&RawData[Index])->QuestionId] > ((FRAMEWORK_EFI_IFR_NUMERIC *)&RawData[Index])->Maximum)) {
*Results = FALSE;
return EFI_SUCCESS;
}
@@ -1003,3 +1003,4 @@ Returns: return EFI_SUCCESS;
}
+
diff --git a/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrOnTheFly.c b/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrOnTheFly.c index e9ab482..04de704 100644 --- a/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrOnTheFly.c +++ b/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrOnTheFly.c @@ -63,8 +63,8 @@ Returns: {
EFI_STATUS Status;
EFI_HII_IFR_PACK IfrPack;
- EFI_IFR_FORM_SET FormSet;
- EFI_IFR_END_FORM_SET EndFormSet;
+ FRAMEWORK_EFI_IFR_FORM_SET FormSet;
+ FRAMEWORK_EFI_IFR_END_FORM_SET EndFormSet;
UINT8 *Destination;
CHAR16 CurrentLanguage[4];
STRING_REF StringToken;
@@ -103,14 +103,14 @@ Returns: //
// Initialize the Ifr Package header data
//
- IfrPack.Header.Length = sizeof (EFI_HII_PACK_HEADER) + sizeof (EFI_IFR_FORM_SET) + sizeof (EFI_IFR_END_FORM_SET);
+ IfrPack.Header.Length = sizeof (EFI_HII_PACK_HEADER) + sizeof (FRAMEWORK_EFI_IFR_FORM_SET) + sizeof (FRAMEWORK_EFI_IFR_END_FORM_SET);
IfrPack.Header.Type = EFI_HII_IFR;
//
// Initialize FormSet with the appropriate information
//
- FormSet.Header.OpCode = EFI_IFR_FORM_SET_OP;
- FormSet.Header.Length = sizeof (EFI_IFR_FORM_SET);
+ FormSet.Header.OpCode = FRAMEWORK_EFI_IFR_FORM_SET_OP;
+ FormSet.Header.Length = sizeof (FRAMEWORK_EFI_IFR_FORM_SET);
FormSet.FormSetTitle = StringToken;
FormSet.Class = Class;
FormSet.SubClass = SubClass;
@@ -119,8 +119,8 @@ Returns: //
// Initialize the end formset data
//
- EndFormSet.Header.Length = sizeof (EFI_IFR_END_FORM_SET);
- EndFormSet.Header.OpCode = EFI_IFR_END_FORM_SET_OP;
+ EndFormSet.Header.Length = sizeof (FRAMEWORK_EFI_IFR_END_FORM_SET);
+ EndFormSet.Header.OpCode = FRAMEWORK_EFI_IFR_END_FORM_SET_OP;
Destination = (UINT8 *) *FormBuffer;
@@ -131,11 +131,11 @@ Returns: Destination = Destination + sizeof (EFI_HII_PACK_HEADER);
- CopyMem (Destination, &FormSet, sizeof (EFI_IFR_FORM_SET));
+ CopyMem (Destination, &FormSet, sizeof (FRAMEWORK_EFI_IFR_FORM_SET));
- Destination = Destination + sizeof (EFI_IFR_FORM_SET);
+ Destination = Destination + sizeof (FRAMEWORK_EFI_IFR_FORM_SET);
- CopyMem (Destination, &EndFormSet, sizeof (EFI_IFR_END_FORM_SET));
+ CopyMem (Destination, &EndFormSet, sizeof (FRAMEWORK_EFI_IFR_END_FORM_SET));
return EFI_SUCCESS;
}
@@ -170,8 +170,8 @@ Returns: --*/
{
EFI_STATUS Status;
- EFI_IFR_FORM Form;
- EFI_IFR_END_FORM EndForm;
+ FRAMEWORK_EFI_IFR_FORM Form;
+ FRAMEWORK_EFI_IFR_END_FORM EndForm;
CHAR16 CurrentLanguage[4];
STRING_REF StringToken;
@@ -186,8 +186,8 @@ Returns: return Status;
}
- Form.Header.OpCode = EFI_IFR_FORM_OP;
- Form.Header.Length = sizeof (EFI_IFR_FORM);
+ Form.Header.OpCode = FRAMEWORK_EFI_IFR_FORM_OP;
+ Form.Header.Length = sizeof (FRAMEWORK_EFI_IFR_FORM);
Form.FormId = FormId;
Form.FormTitle = StringToken;
@@ -197,8 +197,8 @@ Returns: return Status;
}
- EndForm.Header.OpCode = EFI_IFR_END_FORM_OP;
- EndForm.Header.Length = sizeof (EFI_IFR_END_FORM);
+ EndForm.Header.OpCode = FRAMEWORK_EFI_IFR_END_FORM_OP;
+ EndForm.Header.Length = sizeof (FRAMEWORK_EFI_IFR_END_FORM);
Status = AddOpCode (FormBuffer, &EndForm);
@@ -237,7 +237,7 @@ Returns: --*/
{
EFI_STATUS Status;
- EFI_IFR_SUBTITLE Subtitle;
+ FRAMEWORK_EFI_IFR_SUBTITLE Subtitle;
CHAR16 CurrentLanguage[4];
STRING_REF StringToken;
@@ -252,8 +252,8 @@ Returns: return Status;
}
- Subtitle.Header.OpCode = EFI_IFR_SUBTITLE_OP;
- Subtitle.Header.Length = sizeof (EFI_IFR_SUBTITLE);
+ Subtitle.Header.OpCode = FRAMEWORK_EFI_IFR_SUBTITLE_OP;
+ Subtitle.Header.Length = sizeof (FRAMEWORK_EFI_IFR_SUBTITLE);
Subtitle.SubTitle = StringToken;
Status = AddOpCode (FormBuffer, &Subtitle);
@@ -305,7 +305,7 @@ Returns: --*/
{
EFI_STATUS Status;
- EFI_IFR_TEXT Text;
+ FRAMEWORK_EFI_IFR_TEXT Text;
CHAR16 CurrentLanguage[4];
STRING_REF StringToken;
@@ -323,8 +323,8 @@ Returns: return Status;
}
- Text.Header.OpCode = EFI_IFR_TEXT_OP;
- Text.Header.Length = sizeof (EFI_IFR_TEXT);
+ Text.Header.OpCode = FRAMEWORK_EFI_IFR_TEXT_OP;
+ Text.Header.Length = sizeof (FRAMEWORK_EFI_IFR_TEXT);
Text.Text = StringToken;
//
@@ -338,7 +338,7 @@ Returns: Text.TextTwo = StringToken;
- Text.Flags = (UINT8) (Flags | EFI_IFR_FLAG_CREATED);
+ Text.Flags = (UINT8) (Flags | FRAMEWORK_EFI_IFR_FLAG_CREATED);
Text.Key = Key;
//
@@ -392,7 +392,7 @@ Returns: --*/
{
EFI_STATUS Status;
- EFI_IFR_REF Hyperlink;
+ FRAMEWORK_EFI_IFR_REF Hyperlink;
CHAR16 CurrentLanguage[4];
STRING_REF StringToken;
@@ -407,8 +407,8 @@ Returns: return Status;
}
- Hyperlink.Header.OpCode = EFI_IFR_REF_OP;
- Hyperlink.Header.Length = sizeof (EFI_IFR_REF);
+ Hyperlink.Header.OpCode = FRAMEWORK_EFI_IFR_REF_OP;
+ Hyperlink.Header.Length = sizeof (FRAMEWORK_EFI_IFR_REF);
Hyperlink.FormId = FormId;
Hyperlink.Prompt = StringToken;
@@ -468,9 +468,9 @@ Returns: {
EFI_STATUS Status;
UINTN Index;
- EFI_IFR_ONE_OF OneOf;
- EFI_IFR_ONE_OF_OPTION OneOfOption;
- EFI_IFR_END_ONE_OF EndOneOf;
+ FRAMEWORK_EFI_IFR_ONE_OF OneOf;
+ FRAMEWORK_EFI_IFR_ONE_OF_OPTION OneOfOption;
+ FRAMEWORK_EFI_IFR_END_ONE_OF EndOneOf;
CHAR16 CurrentLanguage[4];
STRING_REF StringToken;
@@ -495,8 +495,8 @@ Returns: return Status;
}
- OneOf.Header.OpCode = EFI_IFR_ONE_OF_OP;
- OneOf.Header.Length = sizeof (EFI_IFR_ONE_OF);
+ OneOf.Header.OpCode = FRAMEWORK_EFI_IFR_ONE_OF_OP;
+ OneOf.Header.Length = sizeof (FRAMEWORK_EFI_IFR_ONE_OF);
OneOf.QuestionId = QuestionId;
OneOf.Width = DataWidth;
OneOf.Prompt = StringToken;
@@ -519,8 +519,8 @@ Returns: }
for (Index = 0; Index < OptionCount; Index++) {
- OneOfOption.Header.OpCode = EFI_IFR_ONE_OF_OPTION_OP;
- OneOfOption.Header.Length = sizeof (EFI_IFR_ONE_OF_OPTION);
+ OneOfOption.Header.OpCode = FRAMEWORK_EFI_IFR_ONE_OF_OPTION_OP;
+ OneOfOption.Header.Length = sizeof (FRAMEWORK_EFI_IFR_ONE_OF_OPTION);
//
// Add string and get token back
@@ -529,7 +529,7 @@ Returns: OneOfOption.Option = StringToken;
OneOfOption.Value = OptionsList[Index].Value;
- OneOfOption.Flags = (UINT8) (OptionsList[Index].Flags | EFI_IFR_FLAG_CREATED);
+ OneOfOption.Flags = (UINT8) (OptionsList[Index].Flags | FRAMEWORK_EFI_IFR_FLAG_CREATED);
OneOfOption.Key = OptionsList[Index].Key;
Status = AddOpCode (FormBuffer, &OneOfOption);
@@ -539,8 +539,8 @@ Returns: }
}
- EndOneOf.Header.Length = sizeof (EFI_IFR_END_ONE_OF);
- EndOneOf.Header.OpCode = EFI_IFR_END_ONE_OF_OP;
+ EndOneOf.Header.Length = sizeof (FRAMEWORK_EFI_IFR_END_ONE_OF);
+ EndOneOf.Header.OpCode = FRAMEWORK_EFI_IFR_END_ONE_OF_OP;
Status = AddOpCode (FormBuffer, &EndOneOf);
@@ -595,9 +595,9 @@ Returns: {
EFI_STATUS Status;
UINTN Index;
- EFI_IFR_ORDERED_LIST OrderedList;
- EFI_IFR_ONE_OF_OPTION OrderedListOption;
- EFI_IFR_END_ONE_OF EndOrderedList;
+ FRAMEWORK_EFI_IFR_ORDERED_LIST OrderedList;
+ FRAMEWORK_EFI_IFR_ONE_OF_OPTION OrderedListOption;
+ FRAMEWORK_EFI_IFR_END_ONE_OF EndOrderedList;
CHAR16 CurrentLanguage[4];
STRING_REF StringToken;
@@ -615,8 +615,8 @@ Returns: return Status;
}
- OrderedList.Header.OpCode = EFI_IFR_ORDERED_LIST_OP;
- OrderedList.Header.Length = sizeof (EFI_IFR_ORDERED_LIST);
+ OrderedList.Header.OpCode = FRAMEWORK_EFI_IFR_ORDERED_LIST_OP;
+ OrderedList.Header.Length = sizeof (FRAMEWORK_EFI_IFR_ORDERED_LIST);
OrderedList.QuestionId = QuestionId;
OrderedList.MaxEntries = MaxEntries;
OrderedList.Prompt = StringToken;
@@ -639,8 +639,8 @@ Returns: }
for (Index = 0; Index < OptionCount; Index++) {
- OrderedListOption.Header.OpCode = EFI_IFR_ONE_OF_OPTION_OP;
- OrderedListOption.Header.Length = sizeof (EFI_IFR_ONE_OF_OPTION);
+ OrderedListOption.Header.OpCode = FRAMEWORK_EFI_IFR_ONE_OF_OPTION_OP;
+ OrderedListOption.Header.Length = sizeof (FRAMEWORK_EFI_IFR_ONE_OF_OPTION);
//
// Add string and get token back
@@ -649,7 +649,7 @@ Returns: OrderedListOption.Option = StringToken;
OrderedListOption.Value = OptionsList[Index].Value;
- OrderedListOption.Flags = (UINT8) (OptionsList[Index].Flags | EFI_IFR_FLAG_CREATED);
+ OrderedListOption.Flags = (UINT8) (OptionsList[Index].Flags | FRAMEWORK_EFI_IFR_FLAG_CREATED);
OrderedListOption.Key = OptionsList[Index].Key;
Status = AddOpCode (FormBuffer, &OrderedListOption);
@@ -659,8 +659,8 @@ Returns: }
}
- EndOrderedList.Header.Length = sizeof (EFI_IFR_END_ONE_OF);
- EndOrderedList.Header.OpCode = EFI_IFR_END_ONE_OF_OP;
+ EndOrderedList.Header.Length = sizeof (FRAMEWORK_EFI_IFR_END_ONE_OF);
+ EndOrderedList.Header.OpCode = FRAMEWORK_EFI_IFR_END_ONE_OF_OP;
Status = AddOpCode (FormBuffer, &EndOrderedList);
@@ -713,7 +713,7 @@ Returns: --*/
{
EFI_STATUS Status;
- EFI_IFR_CHECKBOX CheckBox;
+ FRAMEWORK_EFI_IFR_CHECKBOX CheckBox;
CHAR16 CurrentLanguage[4];
STRING_REF StringToken;
@@ -738,8 +738,8 @@ Returns: return Status;
}
- CheckBox.Header.OpCode = EFI_IFR_CHECKBOX_OP;
- CheckBox.Header.Length = sizeof (EFI_IFR_CHECKBOX);
+ CheckBox.Header.OpCode = FRAMEWORK_EFI_IFR_CHECKBOX_OP;
+ CheckBox.Header.Length = sizeof (FRAMEWORK_EFI_IFR_CHECKBOX);
CheckBox.QuestionId = QuestionId;
CheckBox.Width = DataWidth;
CheckBox.Prompt = StringToken;
@@ -754,7 +754,7 @@ Returns: }
CheckBox.Help = StringToken;
- CheckBox.Flags = (UINT8) (Flags | EFI_IFR_FLAG_CREATED);
+ CheckBox.Flags = (UINT8) (Flags | FRAMEWORK_EFI_IFR_FLAG_CREATED);
Status = AddOpCode (FormBuffer, &CheckBox);
@@ -822,7 +822,7 @@ Returns: --*/
{
EFI_STATUS Status;
- EFI_IFR_NUMERIC Numeric;
+ FRAMEWORK_EFI_IFR_NUMERIC Numeric;
CHAR16 CurrentLanguage[4];
STRING_REF StringToken;
@@ -847,8 +847,8 @@ Returns: return Status;
}
- Numeric.Header.OpCode = EFI_IFR_NUMERIC_OP;
- Numeric.Header.Length = sizeof (EFI_IFR_NUMERIC);
+ Numeric.Header.OpCode = FRAMEWORK_EFI_IFR_NUMERIC_OP;
+ Numeric.Header.Length = sizeof (FRAMEWORK_EFI_IFR_NUMERIC);
Numeric.QuestionId = QuestionId;
Numeric.Width = DataWidth;
Numeric.Prompt = StringToken;
@@ -867,7 +867,7 @@ Returns: Numeric.Maximum = Maximum;
Numeric.Step = Step;
Numeric.Default = Default;
- Numeric.Flags = (UINT8) (Flags | EFI_IFR_FLAG_CREATED);
+ Numeric.Flags = (UINT8) (Flags | FRAMEWORK_EFI_IFR_FLAG_CREATED);
Numeric.Key = Key;
Status = AddOpCode (FormBuffer, &Numeric);
@@ -928,7 +928,7 @@ Returns: --*/
{
EFI_STATUS Status;
- EFI_IFR_STRING String;
+ FRAMEWORK_EFI_IFR_STRING String;
CHAR16 CurrentLanguage[4];
STRING_REF StringToken;
@@ -946,8 +946,8 @@ Returns: return Status;
}
- String.Header.OpCode = EFI_IFR_STRING_OP;
- String.Header.Length = sizeof (EFI_IFR_STRING);
+ String.Header.OpCode = FRAMEWORK_EFI_IFR_STRING_OP;
+ String.Header.Length = sizeof (FRAMEWORK_EFI_IFR_STRING);
String.QuestionId = QuestionId;
String.Width = DataWidth;
String.Prompt = StringToken;
@@ -964,7 +964,7 @@ Returns: String.Help = StringToken;
String.MinSize = MinSize;
String.MaxSize = MaxSize;
- String.Flags = (UINT8) (Flags | EFI_IFR_FLAG_CREATED);
+ String.Flags = (UINT8) (Flags | FRAMEWORK_EFI_IFR_FLAG_CREATED);
String.Key = Key;
Status = AddOpCode (FormBuffer, &String);
diff --git a/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrOpCodeCreation.c b/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrOpCodeCreation.c index 05b1238..0e24058 100644 --- a/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrOpCodeCreation.c +++ b/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrOpCodeCreation.c @@ -51,13 +51,13 @@ Returns: --*/
{
- EFI_IFR_SUBTITLE Subtitle;
+ FRAMEWORK_EFI_IFR_SUBTITLE Subtitle;
- Subtitle.Header.OpCode = EFI_IFR_SUBTITLE_OP;
- Subtitle.Header.Length = sizeof (EFI_IFR_SUBTITLE);
+ Subtitle.Header.OpCode = FRAMEWORK_EFI_IFR_SUBTITLE_OP;
+ Subtitle.Header.Length = sizeof (FRAMEWORK_EFI_IFR_SUBTITLE);
Subtitle.SubTitle = StringToken;
- CopyMem (FormBuffer, &Subtitle, sizeof (EFI_IFR_SUBTITLE));
+ CopyMem (FormBuffer, &Subtitle, sizeof (FRAMEWORK_EFI_IFR_SUBTITLE));
return EFI_SUCCESS;
}
@@ -100,10 +100,10 @@ Returns: --*/
{
- EFI_IFR_TEXT Text;
+ FRAMEWORK_EFI_IFR_TEXT Text;
- Text.Header.OpCode = EFI_IFR_TEXT_OP;
- Text.Header.Length = sizeof (EFI_IFR_TEXT);
+ Text.Header.OpCode = FRAMEWORK_EFI_IFR_TEXT_OP;
+ Text.Header.Length = sizeof (FRAMEWORK_EFI_IFR_TEXT);
Text.Text = StringToken;
Text.TextTwo = StringTokenTwo;
@@ -111,7 +111,7 @@ Returns: Text.Flags = Flags;
Text.Key = Key;
- CopyMem (FormBuffer, &Text, sizeof (EFI_IFR_TEXT));
+ CopyMem (FormBuffer, &Text, sizeof (FRAMEWORK_EFI_IFR_TEXT));
return EFI_SUCCESS;
}
@@ -155,17 +155,17 @@ Returns: --*/
{
- EFI_IFR_REF Hyperlink;
+ FRAMEWORK_EFI_IFR_REF Hyperlink;
- Hyperlink.Header.OpCode = EFI_IFR_REF_OP;
- Hyperlink.Header.Length = sizeof (EFI_IFR_REF);
+ Hyperlink.Header.OpCode = FRAMEWORK_EFI_IFR_REF_OP;
+ Hyperlink.Header.Length = sizeof (FRAMEWORK_EFI_IFR_REF);
Hyperlink.FormId = FormId;
Hyperlink.Prompt = StringToken;
Hyperlink.Help = StringTokenTwo;
Hyperlink.Key = Key;
Hyperlink.Flags = Flags;
- CopyMem (FormBuffer, &Hyperlink, sizeof (EFI_IFR_REF));
+ CopyMem (FormBuffer, &Hyperlink, sizeof (FRAMEWORK_EFI_IFR_REF));
return EFI_SUCCESS;
}
@@ -218,9 +218,9 @@ Returns: --*/
{
UINTN Index;
- EFI_IFR_ONE_OF OneOf;
- EFI_IFR_ONE_OF_OPTION OneOfOption;
- EFI_IFR_END_ONE_OF EndOneOf;
+ FRAMEWORK_EFI_IFR_ONE_OF OneOf;
+ FRAMEWORK_EFI_IFR_ONE_OF_OPTION OneOfOption;
+ FRAMEWORK_EFI_IFR_END_ONE_OF EndOneOf;
UINT8 *LocalBuffer;
//
@@ -230,8 +230,8 @@ Returns: return EFI_DEVICE_ERROR;
}
- OneOf.Header.OpCode = EFI_IFR_ONE_OF_OP;
- OneOf.Header.Length = sizeof (EFI_IFR_ONE_OF);
+ OneOf.Header.OpCode = FRAMEWORK_EFI_IFR_ONE_OF_OP;
+ OneOf.Header.Length = sizeof (FRAMEWORK_EFI_IFR_ONE_OF);
OneOf.QuestionId = QuestionId;
OneOf.Width = DataWidth;
OneOf.Prompt = PromptToken;
@@ -240,30 +240,30 @@ Returns: LocalBuffer = (UINT8 *) FormBuffer;
- CopyMem (LocalBuffer, &OneOf, sizeof (EFI_IFR_ONE_OF));
+ CopyMem (LocalBuffer, &OneOf, sizeof (FRAMEWORK_EFI_IFR_ONE_OF));
- LocalBuffer = (UINT8 *) (LocalBuffer + sizeof (EFI_IFR_ONE_OF));
+ LocalBuffer = (UINT8 *) (LocalBuffer + sizeof (FRAMEWORK_EFI_IFR_ONE_OF));
for (Index = 0; Index < OptionCount; Index++) {
- OneOfOption.Header.OpCode = EFI_IFR_ONE_OF_OPTION_OP;
- OneOfOption.Header.Length = sizeof (EFI_IFR_ONE_OF_OPTION);
+ OneOfOption.Header.OpCode = FRAMEWORK_EFI_IFR_ONE_OF_OPTION_OP;
+ OneOfOption.Header.Length = sizeof (FRAMEWORK_EFI_IFR_ONE_OF_OPTION);
OneOfOption.Option = OptionsList[Index].StringToken;
OneOfOption.Value = OptionsList[Index].Value;
OneOfOption.Flags = OptionsList[Index].Flags;
OneOfOption.Key = OptionsList[Index].Key;
- CopyMem (LocalBuffer, &OneOfOption, sizeof (EFI_IFR_ONE_OF_OPTION));
+ CopyMem (LocalBuffer, &OneOfOption, sizeof (FRAMEWORK_EFI_IFR_ONE_OF_OPTION));
- LocalBuffer = (UINT8 *) (LocalBuffer + sizeof (EFI_IFR_ONE_OF_OPTION));
+ LocalBuffer = (UINT8 *) (LocalBuffer + sizeof (FRAMEWORK_EFI_IFR_ONE_OF_OPTION));
}
- EndOneOf.Header.Length = sizeof (EFI_IFR_END_ONE_OF);
- EndOneOf.Header.OpCode = EFI_IFR_END_ONE_OF_OP;
+ EndOneOf.Header.Length = sizeof (FRAMEWORK_EFI_IFR_END_ONE_OF);
+ EndOneOf.Header.OpCode = FRAMEWORK_EFI_IFR_END_ONE_OF_OP;
- CopyMem (LocalBuffer, &EndOneOf, sizeof (EFI_IFR_END_ONE_OF));
+ CopyMem (LocalBuffer, &EndOneOf, sizeof (FRAMEWORK_EFI_IFR_END_ONE_OF));
- LocalBuffer = (UINT8 *) (LocalBuffer + sizeof (EFI_IFR_END_ONE_OF));
+ LocalBuffer = (UINT8 *) (LocalBuffer + sizeof (FRAMEWORK_EFI_IFR_END_ONE_OF));
return EFI_SUCCESS;
}
@@ -313,13 +313,13 @@ Returns: --*/
{
UINTN Index;
- EFI_IFR_ORDERED_LIST OrderedList;
- EFI_IFR_ONE_OF_OPTION OrderedListOption;
- EFI_IFR_END_ONE_OF EndOrderedList;
+ FRAMEWORK_EFI_IFR_ORDERED_LIST OrderedList;
+ FRAMEWORK_EFI_IFR_ONE_OF_OPTION OrderedListOption;
+ FRAMEWORK_EFI_IFR_END_ONE_OF EndOrderedList;
UINT8 *LocalBuffer;
- OrderedList.Header.OpCode = EFI_IFR_ORDERED_LIST_OP;
- OrderedList.Header.Length = sizeof (EFI_IFR_ORDERED_LIST);
+ OrderedList.Header.OpCode = FRAMEWORK_EFI_IFR_ORDERED_LIST_OP;
+ OrderedList.Header.Length = sizeof (FRAMEWORK_EFI_IFR_ORDERED_LIST);
OrderedList.QuestionId = QuestionId;
OrderedList.MaxEntries = MaxEntries;
OrderedList.Prompt = PromptToken;
@@ -328,30 +328,30 @@ Returns: LocalBuffer = (UINT8 *) FormBuffer;
- CopyMem (LocalBuffer, &OrderedList, sizeof (EFI_IFR_ORDERED_LIST));
+ CopyMem (LocalBuffer, &OrderedList, sizeof (FRAMEWORK_EFI_IFR_ORDERED_LIST));
- LocalBuffer = (UINT8 *) (LocalBuffer + sizeof (EFI_IFR_ORDERED_LIST));
+ LocalBuffer = (UINT8 *) (LocalBuffer + sizeof (FRAMEWORK_EFI_IFR_ORDERED_LIST));
for (Index = 0; Index < OptionCount; Index++) {
- OrderedListOption.Header.OpCode = EFI_IFR_ONE_OF_OPTION_OP;
- OrderedListOption.Header.Length = sizeof (EFI_IFR_ONE_OF_OPTION);
+ OrderedListOption.Header.OpCode = FRAMEWORK_EFI_IFR_ONE_OF_OPTION_OP;
+ OrderedListOption.Header.Length = sizeof (FRAMEWORK_EFI_IFR_ONE_OF_OPTION);
OrderedListOption.Option = OptionsList[Index].StringToken;
OrderedListOption.Value = OptionsList[Index].Value;
OrderedListOption.Flags = OptionsList[Index].Flags;
OrderedListOption.Key = OptionsList[Index].Key;
- CopyMem (LocalBuffer, &OrderedListOption, sizeof (EFI_IFR_ONE_OF_OPTION));
+ CopyMem (LocalBuffer, &OrderedListOption, sizeof (FRAMEWORK_EFI_IFR_ONE_OF_OPTION));
- LocalBuffer = (UINT8 *) (LocalBuffer + sizeof (EFI_IFR_ONE_OF_OPTION));
+ LocalBuffer = (UINT8 *) (LocalBuffer + sizeof (FRAMEWORK_EFI_IFR_ONE_OF_OPTION));
}
- EndOrderedList.Header.Length = sizeof (EFI_IFR_END_ONE_OF);
- EndOrderedList.Header.OpCode = EFI_IFR_END_ONE_OF_OP;
+ EndOrderedList.Header.Length = sizeof (FRAMEWORK_EFI_IFR_END_ONE_OF);
+ EndOrderedList.Header.OpCode = FRAMEWORK_EFI_IFR_END_ONE_OF_OP;
- CopyMem (LocalBuffer, &EndOrderedList, sizeof (EFI_IFR_END_ONE_OF));
+ CopyMem (LocalBuffer, &EndOrderedList, sizeof (FRAMEWORK_EFI_IFR_END_ONE_OF));
- LocalBuffer = (UINT8 *) (LocalBuffer + sizeof (EFI_IFR_END_ONE_OF));
+ LocalBuffer = (UINT8 *) (LocalBuffer + sizeof (FRAMEWORK_EFI_IFR_END_ONE_OF));
return EFI_SUCCESS;
}
@@ -399,7 +399,7 @@ Returns: --*/
{
- EFI_IFR_CHECKBOX CheckBox;
+ FRAMEWORK_EFI_IFR_CHECKBOX CheckBox;
//
// We do not create op-code storage widths for checkbox in excess of 8 bits for now
@@ -408,8 +408,8 @@ Returns: return EFI_DEVICE_ERROR;
}
- CheckBox.Header.OpCode = EFI_IFR_CHECKBOX_OP;
- CheckBox.Header.Length = sizeof (EFI_IFR_CHECKBOX);
+ CheckBox.Header.OpCode = FRAMEWORK_EFI_IFR_CHECKBOX_OP;
+ CheckBox.Header.Length = sizeof (FRAMEWORK_EFI_IFR_CHECKBOX);
CheckBox.QuestionId = QuestionId;
CheckBox.Width = DataWidth;
CheckBox.Prompt = PromptToken;
@@ -418,7 +418,7 @@ Returns: CheckBox.Flags = Flags;
CheckBox.Key = Key;
- CopyMem (FormBuffer, &CheckBox, sizeof (EFI_IFR_CHECKBOX));
+ CopyMem (FormBuffer, &CheckBox, sizeof (FRAMEWORK_EFI_IFR_CHECKBOX));
return EFI_SUCCESS;
}
@@ -479,7 +479,7 @@ Returns: --*/
{
- EFI_IFR_NUMERIC Numeric;
+ FRAMEWORK_EFI_IFR_NUMERIC Numeric;
//
// We do not create op-code storage widths for numerics in excess of 16 bits for now
@@ -488,8 +488,8 @@ Returns: return EFI_DEVICE_ERROR;
}
- Numeric.Header.OpCode = EFI_IFR_NUMERIC_OP;
- Numeric.Header.Length = sizeof (EFI_IFR_NUMERIC);
+ Numeric.Header.OpCode = FRAMEWORK_EFI_IFR_NUMERIC_OP;
+ Numeric.Header.Length = sizeof (FRAMEWORK_EFI_IFR_NUMERIC);
Numeric.QuestionId = QuestionId;
Numeric.Width = DataWidth;
Numeric.Prompt = PromptToken;
@@ -502,7 +502,7 @@ Returns: Numeric.Flags = Flags;
Numeric.Key = Key;
- CopyMem (FormBuffer, &Numeric, sizeof (EFI_IFR_NUMERIC));
+ CopyMem (FormBuffer, &Numeric, sizeof (FRAMEWORK_EFI_IFR_NUMERIC));
return EFI_SUCCESS;
}
@@ -555,10 +555,10 @@ Returns: --*/
{
- EFI_IFR_STRING String;
+ FRAMEWORK_EFI_IFR_STRING String;
- String.Header.OpCode = EFI_IFR_STRING_OP;
- String.Header.Length = sizeof (EFI_IFR_STRING);
+ String.Header.OpCode = FRAMEWORK_EFI_IFR_STRING_OP;
+ String.Header.Length = sizeof (FRAMEWORK_EFI_IFR_STRING);
String.QuestionId = QuestionId;
String.Width = DataWidth;
String.Prompt = PromptToken;
@@ -569,7 +569,7 @@ Returns: String.Flags = Flags;
String.Key = Key;
- CopyMem (FormBuffer, &String, sizeof (EFI_IFR_STRING));
+ CopyMem (FormBuffer, &String, sizeof (FRAMEWORK_EFI_IFR_STRING));
return EFI_SUCCESS;
}
@@ -604,15 +604,15 @@ Returns: --*/
{
- EFI_IFR_BANNER Banner;
+ FRAMEWORK_EFI_IFR_BANNER Banner;
- Banner.Header.OpCode = EFI_IFR_BANNER_OP;
- Banner.Header.Length = sizeof (EFI_IFR_BANNER);
+ Banner.Header.OpCode = FRAMEWORK_EFI_IFR_BANNER_OP;
+ Banner.Header.Length = sizeof (FRAMEWORK_EFI_IFR_BANNER);
CopyMem (&Banner.Title, &Title, sizeof (UINT16));
CopyMem (&Banner.LineNumber, &LineNumber, sizeof (UINT16));
Banner.Alignment = Alignment;
- CopyMem (FormBuffer, &Banner, sizeof (EFI_IFR_BANNER));
+ CopyMem (FormBuffer, &Banner, sizeof (FRAMEWORK_EFI_IFR_BANNER));
return EFI_SUCCESS;
}
diff --git a/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrSupportLibInternal.h b/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrSupportLibInternal.h index 033b396..8dce61b 100644 --- a/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrSupportLibInternal.h +++ b/IntelFrameworkPkg/Library/FrameworkIfrSupportLib/IfrSupportLibInternal.h @@ -15,9 +15,7 @@ #ifndef __IFRSUPPORT_LIB_INTERNAL_H_
#define __IFRSUPPORT_LIB_INTERNAL_H_
-
-
-#include <PiDxe.h>
+#include <FrameworkDxe.h>
#include <Guid/GlobalVariable.h>
#include <Protocol/FrameworkHii.h>
|