summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg/Compatibility
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-06-05 06:19:12 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-06-05 06:19:12 +0000
commit137c54acda014f768fd18e7ff3bff232ce803884 (patch)
tree799de628645d3782a5239c8ffe623147507597a9 /EdkCompatibilityPkg/Compatibility
parenta8fb9d68f101ef5e6074f721ec43ce476d22e092 (diff)
downloadedk2-platforms-137c54acda014f768fd18e7ff3bff232ce803884.tar.xz
Install a Framework SetupBrowser protocol interface. But this interface will return EFI_UNSUPPORTED. This is to satisfy that some platform/chipset code may located this protocol but never invoke either of these two interfaces in the protocol.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5331 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Compatibility')
-rw-r--r--EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/FrameworkHiiToUefiHiiThunk.inf1
-rw-r--r--EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/HiiDatabase.c51
-rw-r--r--EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/HiiDatabase.h37
3 files changed, 89 insertions, 0 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/FrameworkHiiToUefiHiiThunk.inf b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/FrameworkHiiToUefiHiiThunk.inf
index 7f61e7063f..8085587794 100644
--- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/FrameworkHiiToUefiHiiThunk.inf
+++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/FrameworkHiiToUefiHiiThunk.inf
@@ -90,6 +90,7 @@
gEfiHiiConfigAccessProtocolGuid
gEfiFormCallbackProtocolGuid
gEfiUnicodeCollation2ProtocolGuid
+ gEfiFormBrowserProtocolGuid
[Depex]
gEfiHiiImageProtocolGuid AND
diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/HiiDatabase.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/HiiDatabase.c
index 26bd38d5ba..e33b2e2772 100644
--- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/HiiDatabase.c
+++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/HiiDatabase.c
@@ -63,6 +63,16 @@ EFI_HII_THUNK_PRIVATE_DATA mHiiThunkPrivateDataTempate = {
},
};
+EFI_FORMBROWSER_THUNK_PRIVATE_DATA mBrowserThunkPrivateDataTemplate = {
+ EFI_FORMBROWSER_THUNK_PRIVATE_DATA_SIGNATURE,
+ (EFI_HANDLE) NULL,
+ {
+ ThunkSendForm,
+ ThunkCreatePopUp
+ }
+};
+
+
CONST EFI_HII_DATABASE_PROTOCOL *mHiiDatabase;
CONST EFI_HII_FONT_PROTOCOL *mHiiFontProtocol;
CONST EFI_HII_IMAGE_PROTOCOL *mHiiImageProtocol;
@@ -447,6 +457,14 @@ Returns:
);
ASSERT_EFI_ERROR (Status);
+ Status = gBS->InstallProtocolInterface (
+ &mBrowserThunkPrivateDataTemplate.Handle,
+ &gEfiFormBrowserProtocolGuid,
+ EFI_NATIVE_INTERFACE,
+ (VOID *) &mBrowserThunkPrivateDataTemplate.FormBrowser
+ );
+ ASSERT_EFI_ERROR (Status);
+
return Status;
}
@@ -619,4 +637,37 @@ Returns:
return EFI_SUCCESS;
}
+EFI_STATUS
+EFIAPI
+ThunkSendForm (
+ IN EFI_FORM_BROWSER_PROTOCOL *This,
+ IN BOOLEAN UseDatabase,
+ IN FRAMEWORK_EFI_HII_HANDLE *Handle,
+ IN UINTN HandleCount,
+ IN FRAMEWORK_EFI_IFR_PACKET *Packet, OPTIONAL
+ IN EFI_HANDLE CallbackHandle, OPTIONAL
+ IN UINT8 *NvMapOverride, OPTIONAL
+ IN FRAMEWORK_EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
+ OUT BOOLEAN *ResetRequired OPTIONAL
+ )
+{
+ ASSERT (FALSE);
+ return EFI_UNSUPPORTED;
+}
+
+EFI_STATUS
+EFIAPI
+ThunkCreatePopUp (
+ IN UINTN NumberOfLines,
+ IN BOOLEAN HotKey,
+ IN UINTN MaximumStringSize,
+ OUT CHAR16 *StringBuffer,
+ OUT EFI_INPUT_KEY *KeyValue,
+ IN CHAR16 *String,
+ ...
+ )
+{
+ ASSERT (FALSE);
+ return EFI_UNSUPPORTED;
+}
diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/HiiDatabase.h b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/HiiDatabase.h
index 6e9c28a841..85822ab17a 100644
--- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/HiiDatabase.h
+++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/HiiDatabase.h
@@ -23,6 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Guid/GlobalVariable.h>
#include <Protocol/FrameworkFormCallback.h>
#include <Protocol/FrameworkHii.h>
+#include <Protocol/FrameworkFormBrowser.h>
//
// UEFI HII Protocols
@@ -142,6 +143,14 @@ typedef struct {
LIST_ENTRY ConfigAccessBufferStorageListHead;
} HII_TRHUNK_CONFIG_ACCESS_PROTOCOL_INSTANCE;
+#define EFI_FORMBROWSER_THUNK_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('F', 'B', 'T', 'd')
+typedef struct {
+ UINTN Signature;
+ EFI_HANDLE Handle;
+ EFI_FORM_BROWSER_PROTOCOL FormBrowser;
+} EFI_FORMBROWSER_THUNK_PRIVATE_DATA;
+
+
//
// Extern Variables
//
@@ -355,6 +364,34 @@ HiiCompareLanguage (
)
;
+
+
+EFI_STATUS
+EFIAPI
+ThunkSendForm (
+ IN EFI_FORM_BROWSER_PROTOCOL *This,
+ IN BOOLEAN UseDatabase,
+ IN FRAMEWORK_EFI_HII_HANDLE *Handle,
+ IN UINTN HandleCount,
+ IN FRAMEWORK_EFI_IFR_PACKET *Packet, OPTIONAL
+ IN EFI_HANDLE CallbackHandle, OPTIONAL
+ IN UINT8 *NvMapOverride, OPTIONAL
+ IN FRAMEWORK_EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
+ OUT BOOLEAN *ResetRequired OPTIONAL
+ );
+
+EFI_STATUS
+EFIAPI
+ThunkCreatePopUp (
+ IN UINTN NumberOfLines,
+ IN BOOLEAN HotKey,
+ IN UINTN MaximumStringSize,
+ OUT CHAR16 *StringBuffer,
+ OUT EFI_INPUT_KEY *KeyValue,
+ IN CHAR16 *String,
+ ...
+ );
+
#include "Utility.h"
#include "ConfigAccess.h"