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
This commit is contained in:
qwang12 2008-06-05 06:19:12 +00:00
parent a8fb9d68f1
commit 137c54acda
3 changed files with 89 additions and 0 deletions

View File

@ -90,6 +90,7 @@
gEfiHiiConfigAccessProtocolGuid
gEfiFormCallbackProtocolGuid
gEfiUnicodeCollation2ProtocolGuid
gEfiFormBrowserProtocolGuid
[Depex]
gEfiHiiImageProtocolGuid AND

View File

@ -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;
}

View File

@ -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"