diff options
author | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-04-17 08:49:00 +0000 |
---|---|---|
committer | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-04-17 08:49:00 +0000 |
commit | 85b990a8eb253f71d10021aad0059e0625349269 (patch) | |
tree | 13849b8540190eee52f1600af9387f8182569688 /MdeModulePkg/Universal/Network | |
parent | 46a989f7ad9bc27fb9c9f064aa3b84ed8bd02294 (diff) | |
download | edk2-85b990a8eb253f71d10021aad0059e0625349269.zip edk2-85b990a8eb253f71d10021aad0059e0625349269.tar.gz edk2-85b990a8eb253f71d10021aad0059e0625349269.tar.bz2 |
Remove iScsi driver's dependency on IntelFrameworkPkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8126 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network')
-rw-r--r-- | MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf | 6 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c | 79 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.h | 4 |
3 files changed, 30 insertions, 59 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf index 3587c30..ae90551 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf @@ -1,7 +1,7 @@ /** @file
Component description file for IScsi module.
-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
@@ -65,8 +65,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. [Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
- IntelFrameworkPkg/IntelFrameworkPkg.dec
- IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
[LibraryClasses]
UefiDriverEntryPoint
@@ -89,7 +87,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. gEfiHiiDatabaseProtocolGuid
gEfiHiiConfigAccessProtocolGuid
gEfiPciIoProtocolGuid
- gEfiAcpiSupportProtocolGuid
+ gEfiAcpiTableProtocolGuid
gEfiDhcp4ProtocolGuid
gEfiDhcp4ServiceBindingProtocolGuid
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c index 0f92fad..60a11b2 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c @@ -1,7 +1,7 @@ /** @file
Implementation for iSCSI Boot Firmware Table publication.
-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
@@ -14,6 +14,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "IScsiImpl.h"
+BOOLEAN mIbftInstalled = FALSE;
+UINTN mTableKey;
+
/**
Initialize the header of the iSCSI Boot Firmware Table.
@@ -440,56 +443,28 @@ IScsiPublishIbft ( )
{
EFI_STATUS Status;
- UINTN TableHandle;
- EFI_ACPI_SUPPORT_PROTOCOL *AcpiSupport;
+ EFI_ACPI_TABLE_PROTOCOL *AcpiTableProtocol;
EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_HEADER *Table;
UINTN HandleCount;
EFI_HANDLE *HandleBuffer;
UINT8 *Heap;
- INTN Index;
- EFI_ACPI_TABLE_VERSION Version;
- UINT32 Signature;
- Status = gBS->LocateProtocol (&gEfiAcpiSupportProtocolGuid, NULL, (VOID **)&AcpiSupport);
+ Status = gBS->LocateProtocol (&gEfiAcpiTableProtocolGuid, NULL, (VOID **)&AcpiTableProtocol);
if (EFI_ERROR (Status)) {
return ;
}
- //
- // Try to remove the old iSCSI Boot Firmware Table.
- //
- for (Index = 0;; Index++) {
- Status = AcpiSupport->GetAcpiTable (
- AcpiSupport,
- Index,
- (VOID **)&Table,
- &Version,
- &TableHandle
- );
- if (EFI_ERROR (Status)) {
- break;
- }
-
- Signature = Table->Signature;
- gBS->FreePool (Table);
-
- if (Signature == EFI_ACPI_3_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE) {
- //
- // Remove the table.
- //
- Status = AcpiSupport->SetAcpiTable (
- AcpiSupport,
- NULL,
- FALSE,
- Version,
- &TableHandle
- );
- if (EFI_ERROR (Status)) {
- return ;
- }
- break;
+ if (mIbftInstalled) {
+ Status = AcpiTableProtocol->UninstallAcpiTable (
+ AcpiTableProtocol,
+ mTableKey
+ );
+ if (EFI_ERROR (Status)) {
+ return ;
}
+ mIbftInstalled = FALSE;
}
+
//
// Get all iSCSI private protocols.
//
@@ -521,23 +496,21 @@ IScsiPublishIbft ( IScsiFillInitiatorSection (Table, &Heap, HandleBuffer[0]);
IScsiFillNICAndTargetSections (Table, &Heap, HandleCount, HandleBuffer);
- gBS->FreePool (HandleBuffer);
-
- TableHandle = 0;
+ FreePool (HandleBuffer);
//
// Install or update the iBFT table.
//
- Status = AcpiSupport->SetAcpiTable (
- AcpiSupport,
- Table,
- TRUE,
- EFI_ACPI_TABLE_VERSION_3_0,
- &TableHandle
- );
- if (!EFI_ERROR (Status)) {
- AcpiSupport->PublishTables (AcpiSupport, EFI_ACPI_TABLE_VERSION_3_0);
+ Status = AcpiTableProtocol->InstallAcpiTable (
+ AcpiTableProtocol,
+ Table,
+ Table->Length,
+ &mTableKey
+ );
+ if (EFI_ERROR(Status)) {
+ return;
}
- gBS->FreePool (Table);
+ mIbftInstalled = TRUE;
+ FreePool (Table);
}
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.h index a21990e..679a412 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.h @@ -1,7 +1,7 @@ /** @file
Some extra definitions for iBFT.
-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
@@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define _ISCSI_IBFT_H_
#include <IndustryStandard/IScsiBootFirmwareTable.h>
-#include <Protocol/AcpiSupport.h>
+#include <Protocol/AcpiTable.h>
#include <Protocol/PciIo.h>
#define IBFT_TABLE_VAR_NAME L"iBFT"
|