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
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Component description file for IScsi module.
|
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
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
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]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
MdeModulePkg/MdeModulePkg.dec
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
IntelFrameworkPkg/IntelFrameworkPkg.dec
|
|
||||||
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
|
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
UefiDriverEntryPoint
|
UefiDriverEntryPoint
|
||||||
@@ -89,7 +87,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
gEfiHiiDatabaseProtocolGuid
|
gEfiHiiDatabaseProtocolGuid
|
||||||
gEfiHiiConfigAccessProtocolGuid
|
gEfiHiiConfigAccessProtocolGuid
|
||||||
gEfiPciIoProtocolGuid
|
gEfiPciIoProtocolGuid
|
||||||
gEfiAcpiSupportProtocolGuid
|
gEfiAcpiTableProtocolGuid
|
||||||
gEfiDhcp4ProtocolGuid
|
gEfiDhcp4ProtocolGuid
|
||||||
gEfiDhcp4ServiceBindingProtocolGuid
|
gEfiDhcp4ServiceBindingProtocolGuid
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Implementation for iSCSI Boot Firmware Table publication.
|
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
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
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"
|
#include "IScsiImpl.h"
|
||||||
|
|
||||||
|
BOOLEAN mIbftInstalled = FALSE;
|
||||||
|
UINTN mTableKey;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Initialize the header of the iSCSI Boot Firmware Table.
|
Initialize the header of the iSCSI Boot Firmware Table.
|
||||||
|
|
||||||
@@ -440,56 +443,28 @@ IScsiPublishIbft (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINTN TableHandle;
|
EFI_ACPI_TABLE_PROTOCOL *AcpiTableProtocol;
|
||||||
EFI_ACPI_SUPPORT_PROTOCOL *AcpiSupport;
|
|
||||||
EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_HEADER *Table;
|
EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_HEADER *Table;
|
||||||
UINTN HandleCount;
|
UINTN HandleCount;
|
||||||
EFI_HANDLE *HandleBuffer;
|
EFI_HANDLE *HandleBuffer;
|
||||||
UINT8 *Heap;
|
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)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
//
|
|
||||||
// Try to remove the old iSCSI Boot Firmware Table.
|
if (mIbftInstalled) {
|
||||||
//
|
Status = AcpiTableProtocol->UninstallAcpiTable (
|
||||||
for (Index = 0;; Index++) {
|
AcpiTableProtocol,
|
||||||
Status = AcpiSupport->GetAcpiTable (
|
mTableKey
|
||||||
AcpiSupport,
|
);
|
||||||
Index,
|
|
||||||
(VOID **)&Table,
|
|
||||||
&Version,
|
|
||||||
&TableHandle
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
break;
|
return ;
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
mIbftInstalled = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get all iSCSI private protocols.
|
// Get all iSCSI private protocols.
|
||||||
//
|
//
|
||||||
@@ -521,23 +496,21 @@ IScsiPublishIbft (
|
|||||||
IScsiFillInitiatorSection (Table, &Heap, HandleBuffer[0]);
|
IScsiFillInitiatorSection (Table, &Heap, HandleBuffer[0]);
|
||||||
IScsiFillNICAndTargetSections (Table, &Heap, HandleCount, HandleBuffer);
|
IScsiFillNICAndTargetSections (Table, &Heap, HandleCount, HandleBuffer);
|
||||||
|
|
||||||
gBS->FreePool (HandleBuffer);
|
FreePool (HandleBuffer);
|
||||||
|
|
||||||
TableHandle = 0;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Install or update the iBFT table.
|
// Install or update the iBFT table.
|
||||||
//
|
//
|
||||||
Status = AcpiSupport->SetAcpiTable (
|
Status = AcpiTableProtocol->InstallAcpiTable (
|
||||||
AcpiSupport,
|
AcpiTableProtocol,
|
||||||
Table,
|
Table,
|
||||||
TRUE,
|
Table->Length,
|
||||||
EFI_ACPI_TABLE_VERSION_3_0,
|
&mTableKey
|
||||||
&TableHandle
|
);
|
||||||
);
|
if (EFI_ERROR(Status)) {
|
||||||
if (!EFI_ERROR (Status)) {
|
return;
|
||||||
AcpiSupport->PublishTables (AcpiSupport, EFI_ACPI_TABLE_VERSION_3_0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gBS->FreePool (Table);
|
mIbftInstalled = TRUE;
|
||||||
|
FreePool (Table);
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Some extra definitions for iBFT.
|
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
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
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_
|
#define _ISCSI_IBFT_H_
|
||||||
|
|
||||||
#include <IndustryStandard/IScsiBootFirmwareTable.h>
|
#include <IndustryStandard/IScsiBootFirmwareTable.h>
|
||||||
#include <Protocol/AcpiSupport.h>
|
#include <Protocol/AcpiTable.h>
|
||||||
#include <Protocol/PciIo.h>
|
#include <Protocol/PciIo.h>
|
||||||
|
|
||||||
#define IBFT_TABLE_VAR_NAME L"iBFT"
|
#define IBFT_TABLE_VAR_NAME L"iBFT"
|
||||||
|
Reference in New Issue
Block a user