From 5fd5fcd321e3d778aa51f1a47732c8d886c1ff4c Mon Sep 17 00:00:00 2001 From: qwang12 Date: Mon, 21 Jan 2008 14:42:45 +0000 Subject: UEFI HII: Merge UEFI HII support changes from branch. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4601 6f19259b-4bc3-4df7-8a09-765794883524 --- .../MiscSubClassPlatformDxe.inf | 5 ++--- .../MiscSubClassPlatformDxe.msa | 3 --- .../MiscSubclassDriverEntryPoint.c | 18 +----------------- 3 files changed, 3 insertions(+), 23 deletions(-) (limited to 'Nt32Pkg/MiscSubClassPlatformDxe') diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubClassPlatformDxe.inf b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubClassPlatformDxe.inf index 92a2ea4381..fc543f0e95 100644 --- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubClassPlatformDxe.inf +++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubClassPlatformDxe.inf @@ -69,7 +69,7 @@ BaseMemoryLib UefiDriverEntryPoint UefiLib - FrameworkHiiLib + HiiLib DebugLib BaseLib PcdLib @@ -83,12 +83,11 @@ [Protocols] gEfiWinNtIoProtocolGuid # PROTOCOL_NOTIFY SOMETIMES_CONSUMED - gEfiHiiProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiDataHubProtocolGuid # PROTOCOL ALWAYS_CONSUMED [Pcd.common] gEfiNt32PkgTokenSpaceGuid.PcdWinNtMemorySize [Depex] - gEfiDataHubProtocolGuid AND gEfiHiiProtocolGuid + gEfiDataHubProtocolGuid \ No newline at end of file diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubClassPlatformDxe.msa b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubClassPlatformDxe.msa index 533ec7e1da..06f27b5bb6 100644 --- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubClassPlatformDxe.msa +++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubClassPlatformDxe.msa @@ -94,9 +94,6 @@ gEfiDataHubProtocolGuid - - gEfiHiiProtocolGuid - gEfiWinNtIoProtocolGuid diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c index 138ed7f439..a08b6ef683 100644 --- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c +++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c @@ -148,8 +148,6 @@ Returns: { EFI_MISC_SUBCLASS_DRIVER_DATA RecordData; EFI_DATA_HUB_PROTOCOL *DataHub; - EFI_HII_PROTOCOL *Hii; - EFI_HII_PACKAGES *PackageList; EFI_HII_HANDLE HiiHandle; EFI_STATUS Status; UINTN Index; @@ -180,23 +178,9 @@ Returns: return EFI_DEVICE_ERROR; } // - // Locate hii protocol. - // - Status = gBS->LocateProtocol (&gEfiHiiProtocolGuid, NULL, &Hii); - - if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Could not locate Hii protocol. %r\n", Status)); - return Status; - } else if (Hii == NULL) { - DEBUG ((EFI_D_ERROR, "LocateProtocol(Hii) returned NULL pointer!\n")); - return EFI_DEVICE_ERROR; - } - // // Add our default strings to the HII database. They will be modified later. // - PackageList = PreparePackages (1, &gEfiMiscSubClassGuid, MiscSubclassStrings); - Status = Hii->NewPack (Hii, PackageList, &HiiHandle); - FreePool (PackageList); + HiiLibAddPackagesToHiiDatabase (1, &gEfiMiscSubClassGuid, NULL, &HiiHandle, MiscSubclassStrings); if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "Could not log default strings to Hii. %r\n", Status)); -- cgit v1.2.3