X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FHiiDatabaseDxe%2FDatabase.c;h=4fd83f807281f9b7c70ae590aea85b04b38f97fc;hb=4a4297160fda8ff9646a7ae0cad7989a8aaeb619;hp=3d70207952918b21966ec741736f9c536cb16849;hpb=c59634eab662fe4cc79a27827f9fc90f40f78523;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c index 3d70207952..4fd83f8072 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c @@ -1,9 +1,8 @@ /** @file Implementation for EFI_HII_DATABASE_PROTOCOL. - -Copyright (c) 2007 - 2008, Intel Corporation -All rights reserved. This program and the accompanying materials +Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -16,11 +15,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "HiiDatabase.h" -// -// Global variables -// -EFI_GUID mHiiDatabaseNotifyGuid = HII_DATABASE_NOTIFY_GUID; - +EFI_HII_PACKAGE_LIST_HEADER *gRTDatabaseInfoBuffer = NULL; +EFI_STRING gRTConfigRespBuffer = NULL; +UINTN gDatabaseInfoSize = 0; +UINTN gConfigRespSize = 0; +BOOLEAN gExportConfigResp = TRUE; /** This function generates a HII_DATABASE_RECORD node and adds into hii database. @@ -87,7 +86,7 @@ GenerateHiiDatabaseRecord ( // Backup the number of Hii handles // Private->HiiHandleCount++; - HiiHandle->Key = Private->HiiHandleCount; + HiiHandle->Key = (UINTN) Private->HiiHandleCount; // // Insert the handle to hii handle list of the whole database. // @@ -357,7 +356,7 @@ InvokeRegisteredFunction ( @param NotifyType The type of change concerning the database. @param PackageList Pointer to a package list which will be inserted to. - @param Package Created GUID pacakge + @param Package Created GUID package @retval EFI_SUCCESS Guid Package is inserted successfully. @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the new @@ -659,7 +658,7 @@ ExportFormPackages ( for (Link = PackageList->FormPkgHdr.ForwardLink; Link != &PackageList->FormPkgHdr; Link = Link->ForwardLink) { FormPackage = CR (Link, HII_IFR_PACKAGE_INSTANCE, IfrEntry, HII_IFR_PACKAGE_SIGNATURE); PackageLength += FormPackage->FormPkgHdr.Length; - if (PackageLength + *ResultSize + UsedSize <= BufferSize) { + if ((Buffer != NULL) && (PackageLength + *ResultSize + UsedSize <= BufferSize)) { // // Invoke registered notification if exists // @@ -741,7 +740,16 @@ RemoveFormPackages ( PackageList->PackageListHdr.PackageLength -= Package->FormPkgHdr.Length; FreePool (Package->IfrData); FreePool (Package); - + // + // If Hii runtime support feature is enabled, + // will export Hii info for runtime use after ReadyToBoot event triggered. + // If some driver add/update/remove packages from HiiDatabase after ReadyToBoot, + // will need to export the content of HiiDatabase. + // But if form packages removed, also need to export the ConfigResp string + // + if (gExportAfterReadyToBoot) { + gExportConfigResp = TRUE; + } } return EFI_SUCCESS; @@ -776,7 +784,6 @@ InsertStringPackage ( IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, OUT HII_STRING_PACKAGE_INSTANCE **Package - ) { HII_STRING_PACKAGE_INSTANCE *StringPackage; @@ -806,10 +813,10 @@ InsertStringPackage ( if (Language == NULL) { return EFI_OUT_OF_RESOURCES; } - AsciiStrCpy (Language, (CHAR8 *) PackageHdr + HeaderSize - LanguageSize); + AsciiStrCpyS (Language, LanguageSize / sizeof (CHAR8), (CHAR8 *) PackageHdr + HeaderSize - LanguageSize); for (Link = PackageList->StringPkgHdr.ForwardLink; Link != &PackageList->StringPkgHdr; Link = Link->ForwardLink) { StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE); - if (R8_EfiLibCompareLanguage (Language, StringPackage->StringPkgHdr->Language)) { + if (HiiCompareLanguage (Language, StringPackage->StringPkgHdr->Language)) { FreePool (Language); return EFI_UNSUPPORTED; } @@ -858,7 +865,7 @@ InsertStringPackage ( // // Collect all font block info // - Status = FindStringBlock (Private, StringPackage, (EFI_STRING_ID) (-1), NULL, NULL, NULL, NULL); + Status = FindStringBlock (Private, StringPackage, (EFI_STRING_ID) (-1), NULL, NULL, NULL, &StringPackage->MaxStringId, NULL); if (EFI_ERROR (Status)) { return Status; } @@ -890,6 +897,83 @@ Error: } +/** + Adjust all string packages in a single package list to have the same max string ID. + + @param PackageList Pointer to a package list which will be adjusted. + + @retval EFI_SUCCESS Adjust all string packages successfully. + @retval others Can't adjust string packages. + +**/ +EFI_STATUS +AdjustStringPackage ( + IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList +) +{ + LIST_ENTRY *Link; + HII_STRING_PACKAGE_INSTANCE *StringPackage; + UINT32 Skip2BlockSize; + UINT32 OldBlockSize; + UINT8 *StringBlock; + UINT8 *BlockPtr; + EFI_STRING_ID MaxStringId; + UINT16 SkipCount; + + MaxStringId = 0; + for (Link = PackageList->StringPkgHdr.ForwardLink; + Link != &PackageList->StringPkgHdr; + Link = Link->ForwardLink + ) { + StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE); + if (MaxStringId < StringPackage->MaxStringId) { + MaxStringId = StringPackage->MaxStringId; + } + } + + for (Link = PackageList->StringPkgHdr.ForwardLink; + Link != &PackageList->StringPkgHdr; + Link = Link->ForwardLink + ) { + StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE); + if (StringPackage->MaxStringId < MaxStringId) { + OldBlockSize = StringPackage->StringPkgHdr->Header.Length - StringPackage->StringPkgHdr->HdrSize; + // + // Create SKIP2 EFI_HII_SIBT_SKIP2_BLOCKs to reserve the missing string IDs. + // + SkipCount = (UINT16) (MaxStringId - StringPackage->MaxStringId); + Skip2BlockSize = (UINT32) sizeof (EFI_HII_SIBT_SKIP2_BLOCK); + + StringBlock = (UINT8 *) AllocateZeroPool (OldBlockSize + Skip2BlockSize); + if (StringBlock == NULL) { + return EFI_OUT_OF_RESOURCES; + } + // + // Copy original string blocks, except the EFI_HII_SIBT_END. + // + CopyMem (StringBlock, StringPackage->StringBlock, OldBlockSize - sizeof (EFI_HII_SIBT_END_BLOCK)); + // + // Create SKIP2 EFI_HII_SIBT_SKIP2_BLOCK blocks + // + BlockPtr = StringBlock + OldBlockSize - sizeof (EFI_HII_SIBT_END_BLOCK); + *BlockPtr = EFI_HII_SIBT_SKIP2; + CopyMem (BlockPtr + 1, &SkipCount, sizeof (UINT16)); + BlockPtr += sizeof (EFI_HII_SIBT_SKIP2_BLOCK); + + // + // Append a EFI_HII_SIBT_END block to the end. + // + *BlockPtr = EFI_HII_SIBT_END; + FreePool (StringPackage->StringBlock); + StringPackage->StringBlock = StringBlock; + StringPackage->StringPkgHdr->Header.Length += Skip2BlockSize; + PackageList->PackageListHdr.PackageLength += Skip2BlockSize; + StringPackage->MaxStringId = MaxStringId; + } + } + + return EFI_SUCCESS; +} /** This function exports String packages to a buffer. @@ -1113,7 +1197,7 @@ InsertFontPackage ( } FontInfo->FontStyle = FontPkgHdr->FontStyle; FontInfo->FontSize = FontPkgHdr->Cell.Height; - StrCpy (FontInfo->FontName, FontPkgHdr->FontFamily); + StrCpyS (FontInfo->FontName, (FontInfoSize - OFFSET_OF(EFI_FONT_INFO,FontName)) / sizeof (CHAR16), FontPkgHdr->FontFamily); if (IsFontInfoExisted (Private, FontInfo, NULL, NULL, NULL)) { Status = EFI_UNSUPPORTED; @@ -1468,7 +1552,7 @@ InsertImagePackage ( if (ImageInfoOffset != 0) { ImageSize = ImagePackage->ImagePkgHdr.Header.Length - sizeof (EFI_HII_IMAGE_PACKAGE_HDR) - PaletteSize; - ImagePackage->ImageBlock = (UINT8 *) AllocateZeroPool (ImageSize); + ImagePackage->ImageBlock = AllocateZeroPool (ImageSize); if (ImagePackage->ImageBlock == NULL) { FreePool (ImagePackage->PaletteBlock); FreePool (ImagePackage); @@ -2343,11 +2427,19 @@ AddPackages ( EFI_HII_PACKAGE_HEADER *PackageHdrPtr; EFI_HII_PACKAGE_HEADER PackageHeader; UINT32 OldPackageListLen; + BOOLEAN StringPkgIsAdd; // // Initialize Variables // - FontPackage = NULL; + StringPkgIsAdd = FALSE; + FontPackage = NULL; + StringPackage = NULL; + GuidPackage = NULL; + FormPackage = NULL; + ImagePackage = NULL; + SimpleFontPackage = NULL; + KeyboardLayoutPackage = NULL; // // Process the package list header @@ -2404,6 +2496,16 @@ AddPackages ( (UINT8) (PackageHeader.Type), DatabaseRecord->Handle ); + // + // If Hii runtime support feature is enabled, + // will export Hii info for runtime use after ReadyToBoot event triggered. + // If some driver add/update/remove packages from HiiDatabase after ReadyToBoot, + // will need to export the content of HiiDatabase. + // But if form packages added/updated, also need to export the ConfigResp string. + // + if (gExportAfterReadyToBoot) { + gExportConfigResp = TRUE; + } break; case EFI_HII_PACKAGE_KEYBOARD_LAYOUT: Status = InsertKeyboardLayoutPackage ( @@ -2434,6 +2536,7 @@ AddPackages ( if (EFI_ERROR (Status)) { return Status; } + ASSERT (StringPackage != NULL); Status = InvokeRegisteredFunction ( Private, NotifyType, @@ -2441,6 +2544,7 @@ AddPackages ( (UINT8) (PackageHeader.Type), DatabaseRecord->Handle ); + StringPkgIsAdd = TRUE; break; case EFI_HII_PACKAGE_FONTS: Status = InsertFontPackage ( @@ -2518,6 +2622,13 @@ AddPackages ( PackageHdrPtr = (EFI_HII_PACKAGE_HEADER *) ((UINT8 *) PackageHdrPtr + PackageHeader.Length); CopyMem (&PackageHeader, PackageHdrPtr, sizeof (EFI_HII_PACKAGE_HEADER)); } + + // + // Adjust String Package to make sure all string packages have the same max string ID. + // + if (!EFI_ERROR (Status) && StringPkgIsAdd) { + Status = AdjustStringPackage (DatabaseRecord->PackageList); + } return Status; } @@ -2556,7 +2667,7 @@ ExportPackageList ( UINTN ResultSize; EFI_HII_PACKAGE_HEADER EndofPackageList; - ASSERT (Private != NULL || PackageList != NULL || UsedSize != NULL); + ASSERT (Private != NULL && PackageList != NULL && UsedSize != NULL); ASSERT (Private->Signature == HII_DATABASE_PRIVATE_DATA_SIGNATURE); ASSERT (IsHiiHandleValid (Handle)); @@ -2689,6 +2800,141 @@ ExportPackageList ( return EFI_SUCCESS; } +/** +This function mainly use to get and update ConfigResp string. + +@param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance. + +@retval EFI_SUCCESS Get the information successfully. +@retval EFI_OUT_OF_RESOURCES Not enough memory to store the Configuration Setting data. + +**/ +EFI_STATUS +HiiGetConfigRespInfo( + IN CONST EFI_HII_DATABASE_PROTOCOL *This + ) +{ + EFI_STATUS Status; + HII_DATABASE_PRIVATE_DATA *Private; + EFI_STRING ConfigAltResp; + UINTN ConfigSize; + + ConfigAltResp = NULL; + ConfigSize = 0; + + Private = HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS (This); + + // + // Get ConfigResp string + // + Status = HiiConfigRoutingExportConfig(&Private->ConfigRouting,&ConfigAltResp); + + if (!EFI_ERROR (Status)){ + ConfigSize = StrSize(ConfigAltResp); + if (ConfigSize > gConfigRespSize){ + gConfigRespSize = ConfigSize; + if (gRTConfigRespBuffer != NULL){ + FreePool(gRTConfigRespBuffer); + } + gRTConfigRespBuffer = (EFI_STRING)AllocateRuntimeZeroPool(ConfigSize); + if (gRTConfigRespBuffer == NULL){ + FreePool(ConfigAltResp); + DEBUG ((DEBUG_ERROR, "Not enough memory resource to get the ConfigResp string.\n")); + return EFI_OUT_OF_RESOURCES; + } + } else { + ZeroMem(gRTConfigRespBuffer,gConfigRespSize); + } + CopyMem(gRTConfigRespBuffer,ConfigAltResp,ConfigSize); + gBS->InstallConfigurationTable (&gEfiHiiConfigRoutingProtocolGuid, gRTConfigRespBuffer); + FreePool(ConfigAltResp); + } + + return EFI_SUCCESS; + +} + +/** +This is an internal function,mainly use to get HiiDatabase information. + +@param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance. + +@retval EFI_SUCCESS Get the information successfully. +@retval EFI_OUT_OF_RESOURCES Not enough memory to store the Hiidatabase data. + +**/ +EFI_STATUS +HiiGetDatabaseInfo( + IN CONST EFI_HII_DATABASE_PROTOCOL *This + ) +{ + EFI_STATUS Status; + EFI_HII_PACKAGE_LIST_HEADER *DatabaseInfo; + UINTN DatabaseInfoSize; + + DatabaseInfo = NULL; + DatabaseInfoSize = 0; + + // + // Get HiiDatabase information. + // + Status = HiiExportPackageLists(This, NULL, &DatabaseInfoSize, DatabaseInfo); + + ASSERT(Status == EFI_BUFFER_TOO_SMALL); + + if(DatabaseInfoSize > gDatabaseInfoSize ) { + gDatabaseInfoSize = DatabaseInfoSize; + if (gRTDatabaseInfoBuffer != NULL){ + FreePool(gRTDatabaseInfoBuffer); + } + gRTDatabaseInfoBuffer = AllocateRuntimeZeroPool(DatabaseInfoSize); + if (gRTDatabaseInfoBuffer == NULL){ + DEBUG ((DEBUG_ERROR, "Not enough memory resource to get the HiiDatabase info.\n")); + return EFI_OUT_OF_RESOURCES; + } + } else { + ZeroMem(gRTDatabaseInfoBuffer,gDatabaseInfoSize); + } + Status = HiiExportPackageLists(This, NULL, &DatabaseInfoSize, gRTDatabaseInfoBuffer); + ASSERT_EFI_ERROR (Status); + gBS->InstallConfigurationTable (&gEfiHiiDatabaseProtocolGuid, gRTDatabaseInfoBuffer); + + return EFI_SUCCESS; + +} + +/** +This function mainly use to get and update configuration settings information. + +@param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance. + +@retval EFI_SUCCESS Get the information successfully. +@retval EFI_OUT_OF_RESOURCES Not enough memory to store the Configuration Setting data. + +**/ +EFI_STATUS +HiiGetConfigurationSetting( + IN CONST EFI_HII_DATABASE_PROTOCOL *This + ) +{ + EFI_STATUS Status; + + // + // Get the HiiDatabase info. + // + Status = HiiGetDatabaseInfo(This); + + // + // Get ConfigResp string + // + if (gExportConfigResp) { + Status = HiiGetConfigRespInfo (This); + gExportConfigResp = FALSE; + } + return Status; + +} + /** This function adds the packages in the package list to the database and returns a handle. If there is a @@ -2700,6 +2946,8 @@ ExportPackageList ( @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER structure. @param DriverHandle Associate the package list with this EFI handle. + If a NULL is specified, this data will not be associate + with any drivers and cannot have a callback induced. @param Handle A pointer to the EFI_HII_HANDLE instance. @retval EFI_SUCCESS The package list associated with the Handle was @@ -2715,7 +2963,7 @@ EFIAPI HiiNewPackageList ( IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList, - IN CONST EFI_HANDLE DriverHandle, + IN CONST EFI_HANDLE DriverHandle, OPTIONAL OUT EFI_HII_HANDLE *Handle ) { @@ -2740,9 +2988,8 @@ HiiNewPackageList ( DatabaseRecord = CR (Link, HII_DATABASE_RECORD, DatabaseEntry, HII_DATABASE_RECORD_SIGNATURE); if (CompareGuid ( &(DatabaseRecord->PackageList->PackageListHdr.PackageListGuid), - &PackageListGuid - ) - ) { + &PackageListGuid) && + DatabaseRecord->DriverHandle == DriverHandle) { return EFI_INVALID_PARAMETER; } } @@ -2780,12 +3027,21 @@ HiiNewPackageList ( } *Handle = DatabaseRecord->Handle; + + // + // Check whether need to get the Database and configuration setting info. + // Only after ReadyToBoot, need to do the export. + // + if (gExportAfterReadyToBoot) { + HiiGetConfigurationSetting(This); + } + return EFI_SUCCESS; } /** - This function removes the package list that is associated with a handle Handle + This function removes the package list that is associated with Handle from the HII database. Before removing the package, any registered functions with the notification type REMOVE_PACK and the same package type will be called. @@ -2796,7 +3052,7 @@ HiiNewPackageList ( @retval EFI_SUCCESS The data associated with the Handle was removed from the HII database. - @retval EFI_NOT_FOUND The specified andle is not in database. + @retval EFI_NOT_FOUND The specified handle is not in database. @retval EFI_INVALID_PARAMETER The Handle was not valid. **/ @@ -2885,6 +3141,13 @@ HiiRemovePackageList ( FreePool (Node->PackageList); FreePool (Node); + // + // Check whether need to get the Database and configuration setting info. + // Only after ReadyToBoot, need to do the export. + // + if (gExportAfterReadyToBoot) { + HiiGetConfigurationSetting(This); + } return EFI_SUCCESS; } } @@ -2992,7 +3255,19 @@ HiiUpdatePackageList ( // // Add all of the packages within the new package list // - return AddPackages (Private, EFI_HII_DATABASE_NOTIFY_ADD_PACK, PackageList, Node); + Status = AddPackages (Private, EFI_HII_DATABASE_NOTIFY_ADD_PACK, PackageList, Node); + + // + // Check whether need to get the Database and configuration setting info. + // Only after ReadyToBoot, need to do the export. + // + if (gExportAfterReadyToBoot) { + if (Status == EFI_SUCCESS){ + HiiGetConfigurationSetting(This); + } + } + + return Status; } } @@ -3019,18 +3294,19 @@ HiiUpdatePackageList ( buffer that is required for the handles found. @param Handle An array of EFI_HII_HANDLE instances returned. - @retval EFI_SUCCESS The matching handles are outputed successfully. - HandleBufferLength is updated with the actual length. + @retval EFI_SUCCESS The matching handles are outputted successfully. + HandleBufferLength is updated with the actual length. @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that Handle is too small to support the number of handles. HandleBufferLength is updated with a value that will enable the data to fit. @retval EFI_NOT_FOUND No matching handle could not be found in database. - @retval EFI_INVALID_PARAMETER Handle or HandleBufferLength was NULL. - + @retval EFI_INVALID_PARAMETER HandleBufferLength was NULL. + @retval EFI_INVALID_PARAMETER The value referenced by HandleBufferLength was not + zero and Handle was NULL. @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but - PackageGuid is not NULL, PackageType is a EFI_HII_ - PACKAGE_TYPE_GUID but PackageGuid is NULL. + PackageGuid is not NULL, PackageType is a EFI_HII_ + PACKAGE_TYPE_GUID but PackageGuid is NULL. **/ EFI_STATUS @@ -3124,7 +3400,7 @@ HiiListPackageLists ( } break; // - // Pesudo-type EFI_HII_PACKAGE_TYPE_ALL will cause all package handles + // Pseudo-type EFI_HII_PACKAGE_TYPE_ALL will cause all package handles // to be listed. // case EFI_HII_PACKAGE_TYPE_ALL: @@ -3181,9 +3457,11 @@ HiiListPackageLists ( Handle is too small to support the number of handles. HandleBufferLength is updated with a value that will enable the data to fit. - @retval EFI_NOT_FOUND The specifiecd Handle could not be found in the + @retval EFI_NOT_FOUND The specified Handle could not be found in the current database. - @retval EFI_INVALID_PARAMETER Handle or Buffer or BufferSize was NULL. + @retval EFI_INVALID_PARAMETER BufferSize was NULL. + @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero + and Buffer was NULL. **/ EFI_STATUS @@ -3201,13 +3479,13 @@ HiiExportPackageLists ( HII_DATABASE_RECORD *Node; UINTN UsedSize; - if (This == NULL || BufferSize == NULL || Handle == NULL) { + if (This == NULL || BufferSize == NULL) { return EFI_INVALID_PARAMETER; } if (*BufferSize > 0 && Buffer == NULL) { return EFI_INVALID_PARAMETER; } - if (!IsHiiHandleValid (Handle)) { + if ((Handle != NULL) && (!IsHiiHandleValid (Handle))) { return EFI_NOT_FOUND; } @@ -3229,8 +3507,7 @@ HiiExportPackageLists ( (EFI_HII_PACKAGE_LIST_HEADER *)((UINT8 *) Buffer + UsedSize) ); ASSERT_EFI_ERROR (Status); - } - else if (Handle != NULL && Node->Handle == Handle) { + } else if (Handle != NULL && Node->Handle == Handle) { Status = ExportPackageList ( Private, Handle, @@ -3334,7 +3611,7 @@ HiiRegisterPackageNotify ( // Status = gBS->InstallMultipleProtocolInterfaces ( &Notify->NotifyHandle, - &mHiiDatabaseNotifyGuid, + &gEfiCallerIdGuid, NULL, NULL ); @@ -3392,7 +3669,7 @@ HiiUnregisterPackageNotify ( Status = gBS->OpenProtocol ( NotificationHandle, - &mHiiDatabaseNotifyGuid, + &gEfiCallerIdGuid, NULL, NULL, NULL, @@ -3413,7 +3690,7 @@ HiiUnregisterPackageNotify ( RemoveEntryList (&Notify->DatabaseNotifyEntry); Status = gBS->UninstallMultipleProtocolInterfaces ( Notify->NotifyHandle, - &mHiiDatabaseNotifyGuid, + &gEfiCallerIdGuid, NULL, NULL ); @@ -3446,7 +3723,9 @@ HiiUnregisterPackageNotify ( number of GUIDs. KeyGuidBufferLength is updated with a value that will enable the data to fit. - @retval EFI_INVALID_PARAMETER The KeyGuidBuffer or KeyGuidBufferLength was NULL. + @retval EFI_INVALID_PARAMETER The KeyGuidBufferLength is NULL. + @retval EFI_INVALID_PARAMETER The value referenced by KeyGuidBufferLength is not + zero and KeyGuidBuffer is NULL. @retval EFI_NOT_FOUND There was no keyboard layout. **/