HiiGetGlyph,\r
HiiGetFontInfo\r
},\r
-#ifndef DISABLE_UNUSED_HII_PROTOCOLS\r
+#ifndef _DISABLE_UNUSED_HII_PROTOCOLS_\r
{\r
HiiNewImage,\r
HiiGetImage,\r
NULL\r
};\r
\r
-STATIC\r
+/**\r
+ The default event handler for gHiiKeyboardLayoutChanged\r
+ event group.\r
+\r
+ This is internal function.\r
+\r
+ @param Event The event that triggered this notification function.\r
+ @param Context Pointer to the notification functions context.\r
+\r
+**/\r
VOID\r
EFIAPI\r
KeyboardLayoutChangeNullEvent (\r
return;\r
}\r
\r
+/**\r
+ Initialize HII Database.\r
+\r
+\r
+ @param ImageHandle The image handle.\r
+ @param SystemTable The system table.\r
+\r
+ @retval EFI_SUCCESS The Hii database is setup correctly.\r
+ @return Other value if failed to create the default event for\r
+ gHiiKeyboardLayoutChanged. Check gBS->CreateEventEx for\r
+ details. Or failed to insatll the protocols.\r
+ Check gBS->InstallMultipleProtocolInterfaces for details.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
InitializeHiiDatabase (\r
IN EFI_HANDLE ImageHandle,\r
IN EFI_SYSTEM_TABLE *SystemTable\r
)\r
-/*++\r
-\r
-Routine Description:\r
- Initialize HII Database\r
-\r
-Arguments:\r
- (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)\r
-\r
-Returns:\r
- EFI_SUCCESS -\r
- other -\r
-\r
---*/\r
{\r
EFI_STATUS Status;\r
EFI_HANDLE Handle;\r
- EFI_HANDLE *HandleBuffer;\r
- UINTN HandleCount;\r
\r
//\r
// There will be only one HII Database in the system\r
// If there is another out there, someone is trying to install us\r
// again. Fail that scenario.\r
//\r
- Status = gBS->LocateHandleBuffer (\r
- ByProtocol,\r
- &gEfiHiiDatabaseProtocolGuid,\r
- NULL,\r
- &HandleCount,\r
- &HandleBuffer\r
- );\r
-\r
- //\r
- // If there was no error, assume there is an installation and fail to load\r
- //\r
- if (!EFI_ERROR (Status)) {\r
- if (HandleBuffer != NULL) {\r
- gBS->FreePool (HandleBuffer);\r
- }\r
- return EFI_DEVICE_ERROR;\r
- }\r
-\r
+ ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiHiiDatabaseProtocolGuid);\r
+ ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiHiiFontProtocolGuid);\r
+ ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiHiiImageProtocolGuid);\r
+ ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiHiiStringProtocolGuid);\r
+ ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiHiiConfigRoutingProtocolGuid);\r
+ \r
InitializeListHead (&mPrivate.DatabaseList);\r
InitializeListHead (&mPrivate.DatabaseNotifyList);\r
InitializeListHead (&mPrivate.HiiHandleList);\r
&Handle,\r
&gEfiHiiFontProtocolGuid,\r
&mPrivate.HiiFont,\r
-#ifndef DISABLE_UNUSED_HII_PROTOCOLS\r
+#ifndef _DISABLE_UNUSED_HII_PROTOCOLS_\r
&gEfiHiiImageProtocolGuid,\r
&mPrivate.HiiImage,\r
#endif\r