/** @file\r
Component description file for IScsi module.\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation.<BR>\r
+Copyright (c) 2004 - 2009, Intel Corporation.<BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
[Packages]\r
MdePkg/MdePkg.dec\r
MdeModulePkg/MdeModulePkg.dec\r
- IntelFrameworkPkg/IntelFrameworkPkg.dec\r
- IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
\r
[LibraryClasses]\r
UefiDriverEntryPoint\r
gEfiHiiDatabaseProtocolGuid\r
gEfiHiiConfigAccessProtocolGuid\r
gEfiPciIoProtocolGuid\r
- gEfiAcpiSupportProtocolGuid\r
+ gEfiAcpiTableProtocolGuid\r
gEfiDhcp4ProtocolGuid\r
gEfiDhcp4ServiceBindingProtocolGuid\r
\r
/** @file\r
Implementation for iSCSI Boot Firmware Table publication.\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation.<BR>\r
+Copyright (c) 2004 - 2009, Intel Corporation.<BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
#include "IScsiImpl.h"\r
\r
+BOOLEAN mIbftInstalled = FALSE;\r
+UINTN mTableKey;\r
+\r
/**\r
Initialize the header of the iSCSI Boot Firmware Table.\r
\r
)\r
{\r
EFI_STATUS Status;\r
- UINTN TableHandle;\r
- EFI_ACPI_SUPPORT_PROTOCOL *AcpiSupport;\r
+ EFI_ACPI_TABLE_PROTOCOL *AcpiTableProtocol;\r
EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_HEADER *Table;\r
UINTN HandleCount;\r
EFI_HANDLE *HandleBuffer;\r
UINT8 *Heap;\r
- INTN Index;\r
- EFI_ACPI_TABLE_VERSION Version;\r
- UINT32 Signature;\r
\r
- Status = gBS->LocateProtocol (&gEfiAcpiSupportProtocolGuid, NULL, (VOID **)&AcpiSupport);\r
+ Status = gBS->LocateProtocol (&gEfiAcpiTableProtocolGuid, NULL, (VOID **)&AcpiTableProtocol);\r
if (EFI_ERROR (Status)) {\r
return ;\r
}\r
- //\r
- // Try to remove the old iSCSI Boot Firmware Table.\r
- //\r
- for (Index = 0;; Index++) {\r
- Status = AcpiSupport->GetAcpiTable (\r
- AcpiSupport,\r
- Index,\r
- (VOID **)&Table,\r
- &Version,\r
- &TableHandle\r
- );\r
- if (EFI_ERROR (Status)) {\r
- break;\r
- }\r
-\r
- Signature = Table->Signature;\r
- gBS->FreePool (Table);\r
-\r
- if (Signature == EFI_ACPI_3_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE) {\r
- //\r
- // Remove the table.\r
- //\r
- Status = AcpiSupport->SetAcpiTable (\r
- AcpiSupport,\r
- NULL,\r
- FALSE,\r
- Version,\r
- &TableHandle\r
- );\r
- if (EFI_ERROR (Status)) {\r
- return ;\r
- }\r
\r
- break;\r
+ if (mIbftInstalled) {\r
+ Status = AcpiTableProtocol->UninstallAcpiTable (\r
+ AcpiTableProtocol,\r
+ mTableKey\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ return ;\r
}\r
+ mIbftInstalled = FALSE;\r
}\r
+\r
//\r
// Get all iSCSI private protocols.\r
//\r
IScsiFillInitiatorSection (Table, &Heap, HandleBuffer[0]);\r
IScsiFillNICAndTargetSections (Table, &Heap, HandleCount, HandleBuffer);\r
\r
- gBS->FreePool (HandleBuffer);\r
-\r
- TableHandle = 0;\r
+ FreePool (HandleBuffer);\r
\r
//\r
// Install or update the iBFT table.\r
//\r
- Status = AcpiSupport->SetAcpiTable (\r
- AcpiSupport,\r
- Table,\r
- TRUE,\r
- EFI_ACPI_TABLE_VERSION_3_0,\r
- &TableHandle\r
- );\r
- if (!EFI_ERROR (Status)) {\r
- AcpiSupport->PublishTables (AcpiSupport, EFI_ACPI_TABLE_VERSION_3_0);\r
+ Status = AcpiTableProtocol->InstallAcpiTable (\r
+ AcpiTableProtocol,\r
+ Table,\r
+ Table->Length,\r
+ &mTableKey\r
+ );\r
+ if (EFI_ERROR(Status)) {\r
+ return;\r
}\r
\r
- gBS->FreePool (Table);\r
+ mIbftInstalled = TRUE;\r
+ FreePool (Table);\r
}\r
/** @file\r
Some extra definitions for iBFT.\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation.<BR>\r
+Copyright (c) 2004 - 2009, Intel Corporation.<BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
#define _ISCSI_IBFT_H_\r
\r
#include <IndustryStandard/IScsiBootFirmwareTable.h>\r
-#include <Protocol/AcpiSupport.h>\r
+#include <Protocol/AcpiTable.h>\r
#include <Protocol/PciIo.h>\r
\r
#define IBFT_TABLE_VAR_NAME L"iBFT"\r