diff options
author | gikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-07-06 03:06:50 +0000 |
---|---|---|
committer | gikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-07-06 03:06:50 +0000 |
commit | 54fbbbd7e912c0b81c41831a82da2b995054c34e (patch) | |
tree | 10ba8d32f7ff75ab8e3d340e59f19e735ae5ff3e /MdeModulePkg | |
parent | e5fe626f525c30969547605c05f58bc34307a4fd (diff) | |
download | edk2-54fbbbd7e912c0b81c41831a82da2b995054c34e.tar.gz edk2-54fbbbd7e912c0b81c41831a82da2b995054c34e.tar.bz2 edk2-54fbbbd7e912c0b81c41831a82da2b995054c34e.zip |
Enhance iSCSI ibft table for copy oemid and oemtableID from acpi tables.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8752 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
4 files changed, 40 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h index 8f1aaeacb1..2e9736ec32 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h @@ -30,7 +30,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. //
// Vfr has a limit on the size, it's 255 bytes.
//
-#define ISCSI_NAME_IFR_MAX_SIZE 126
+#define ISCSI_NAME_IFR_MAX_SIZE 223
#define IP_MIN_SIZE 7
#define IP_MAX_SIZE 15
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf index b1415252c3..a3b6789eb7 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf @@ -95,4 +95,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. [Guids]
gEfiEventExitBootServicesGuid
- gEfiIfrTianoGuid ## CONSUMES ## Guid
+ gEfiIfrTianoGuid ## CONSUMES ## GUID
+ gEfiAcpiTableGuid ## CONSUMES ## GUID
+ gEfiAcpi10TableGuid ## CONSUMES ## GUID
+ gEfiAcpi20TableGuid ## CONSUMES ## GUID
\ No newline at end of file diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c index 6d2b184aad..d712331189 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c @@ -24,7 +24,9 @@ UINTN mTableKey; **/
VOID
IScsiInitIbfTableHeader (
- OUT EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_HEADER *Header
+ OUT EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_HEADER *Header,
+ IN UINT8 *OemId,
+ IN UINT64 *OemTableId
)
{
ZeroMem (Header, sizeof (EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_HEADER));
@@ -39,6 +41,9 @@ IScsiInitIbfTableHeader ( Header->OemId[2] = 'T';
Header->OemId[3] = 'E';
Header->OemId[4] = 'L';
+
+ CopyMem (Header->OemId, OemId, sizeof (Header->OemId));
+ Header->OemTableId = *OemTableId;
}
/**
@@ -449,12 +454,39 @@ IScsiPublishIbft ( EFI_HANDLE *HandleBuffer;
UINT8 *Heap;
UINT8 Checksum;
+ UINTN Index;
+ EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER *Rsdp;
+ EFI_ACPI_DESCRIPTION_HEADER *Rsdt;
Status = gBS->LocateProtocol (&gEfiAcpiTableProtocolGuid, NULL, (VOID **)&AcpiTableProtocol);
if (EFI_ERROR (Status)) {
return ;
}
+
+ //
+ // Find ACPI table RSD_PTR from system table
+ //
+ for (Index = 0, Rsdp = NULL; Index < gST->NumberOfTableEntries; Index++) {
+ if (CompareGuid (&(gST->ConfigurationTable[Index].VendorGuid), &gEfiAcpi20TableGuid) ||
+ CompareGuid (&(gST->ConfigurationTable[Index].VendorGuid), &gEfiAcpi10TableGuid) ||
+ CompareGuid (&(gST->ConfigurationTable[Index].VendorGuid), &gEfiAcpiTableGuid)
+ ) {
+ //
+ // A match was found.
+ //
+ Rsdp = (EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER *) gST->ConfigurationTable[Index].VendorTable;
+ break;
+ }
+ }
+
+ if (Rsdp == NULL) {
+ return ;
+ } else {
+ Rsdt = (EFI_ACPI_DESCRIPTION_HEADER *) (UINTN) Rsdp->RsdtAddress;
+ }
+
+
if (mIbftInstalled) {
Status = AcpiTableProtocol->UninstallAcpiTable (
AcpiTableProtocol,
@@ -492,7 +524,7 @@ IScsiPublishIbft ( //
// Fill in the various section of the iSCSI Boot Firmware Table.
//
- IScsiInitIbfTableHeader (Table);
+ IScsiInitIbfTableHeader (Table, Rsdt->OemId, &Rsdt->OemTableId);
IScsiInitControlSection (Table, HandleCount);
IScsiFillInitiatorSection (Table, &Heap, HandleBuffer[0]);
IScsiFillNICAndTargetSections (Table, &Heap, HandleCount, HandleBuffer);
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiImpl.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiImpl.h index ddcdb50cf5..66084964a0 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiImpl.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiImpl.h @@ -24,6 +24,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/UefiRuntimeServicesTableLib.h>
#include <Guid/EventGroup.h>
+#include <Guid/Acpi.h>
#include "IScsiCommon.h"
#include "IScsiDriver.h"
|