summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint
diff options
context:
space:
mode:
authordavidhuang <davidhuang@6f19259b-4bc3-4df7-8a09-765794883524>2009-11-20 04:01:15 +0000
committerdavidhuang <davidhuang@6f19259b-4bc3-4df7-8a09-765794883524>2009-11-20 04:01:15 +0000
commit6cfbf7adff681490789ce9c20bf9344aee6a225e (patch)
treebf373b499a686838ebdae074c6658e17c3160469 /IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint
parent21020c7c8ba9c652a7ddb111b3ea898c3f511c05 (diff)
downloadedk2-platforms-6cfbf7adff681490789ce9c20bf9344aee6a225e.tar.xz
1. PI SMBIOS Checkin. Major change include:
1) Produce PI SMBIOS protocol in MdeModulePkg 2) Update all consumers (in CorePkgs and native platform pkgs) to consume SMBIOS protocol instead of DataHub 3) Pass ECC tool; Verify Nt32, Duet, Unix platform git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9455 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c61
1 files changed, 1 insertions, 60 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
index f575592dbc..7a4183d6b3 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
@@ -1,7 +1,7 @@
/** @file
Utility routines used by boot maintenance modules.
-Copyright (c) 2004 - 2008, Intel Corporation. <BR>
+Copyright (c) 2004 - 2009, Intel Corporation. <BR>
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
@@ -431,64 +431,5 @@ EfiLibStrFromDatahub (
IN EFI_DEVICE_PATH_PROTOCOL *DevPath
)
{
- EFI_STATUS Status;
- UINT16 *Desc;
- EFI_DATA_HUB_PROTOCOL *Datahub;
- UINT64 Count;
- EFI_DATA_RECORD_HEADER *Record;
- EFI_SUBCLASS_TYPE1_HEADER *DataHdr;
- EFI_GUID MiscGuid;
- EFI_MISC_ONBOARD_DEVICE_DATA *Ob;
- EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *Port;
- EFI_TIME CurTime;
-
- CopyGuid (&MiscGuid, &gEfiMiscSubClassGuid);
-
- Status = gBS->LocateProtocol (
- &gEfiDataHubProtocolGuid,
- NULL,
- (VOID **) &Datahub
- );
- if (EFI_ERROR (Status)) {
- return NULL;
- }
-
- Status = gRT->GetTime (&CurTime, NULL);
- if (EFI_ERROR (Status)) {
- return NULL;
- }
-
- Count = 0;
- do {
- Status = Datahub->GetNextRecord (Datahub, &Count, NULL, &Record);
-
- if (EFI_ERROR (Status)) {
- break;
- }
-
- if (Record->DataRecordClass == EFI_DATA_RECORD_CLASS_DATA && CompareGuid (&Record->DataRecordGuid, &MiscGuid)) {
- //
- // This record is what we need
- //
- DataHdr = (EFI_SUBCLASS_TYPE1_HEADER *) (Record + 1);
- if (EFI_MISC_ONBOARD_DEVICE_RECORD_NUMBER == DataHdr->RecordType) {
- Ob = (EFI_MISC_ONBOARD_DEVICE_DATA *) (DataHdr + 1);
- if (BdsLibMatchDevicePaths ((EFI_DEVICE_PATH_PROTOCOL *) &Ob->OnBoardDevicePath, DevPath)) {
- GetProducerString (&Record->ProducerName, Ob->OnBoardDeviceDescription, &Desc);
- return Desc;
- }
- }
-
- if (EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_RECORD_NUMBER == DataHdr->RecordType) {
- Port = (EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR_DATA *) (DataHdr + 1);
- if (BdsLibMatchDevicePaths ((EFI_DEVICE_PATH_PROTOCOL *) &Port->PortPath, DevPath)) {
- GetProducerString (&Record->ProducerName, Port->PortExternalConnectorDesignator, &Desc);
- return Desc;
- }
- }
- }
-
- } while (TimeCompare (&Record->LogTime, &CurTime) && Count != 0);
-
return NULL;
}