/** @file
Implementation for iSCSI Boot Firmware Table publication.
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
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
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "IScsiImpl.h"
/**
Initialize the header of the iSCSI Boot Firmware Table.
@param[out] Header The header of the iSCSI Boot Firmware Table.
@param[in] OemId The OEM ID.
@param[in] OemTableId The OEM table ID for the iBFT.
**/
)
{
}
/**
Initialize the control section of the iSCSI Boot Firmware Table.
@param[in] Table The ACPI table.
@param[in] HandleCount The number of the handles associated with iSCSI sessions, it's
equal to the number of iSCSI sessions.
**/
)
{
//
// Each session occupies two offsets, one for the NIC section,
// the other for the Target section.
//
if (NumOffset > 4) {
//
// exist.
//
}
}
/**
Add one item into the heap.
@param[in, out] Heap On input, the current address of the heap; On output, the address of
the heap after the item is added.
@param[in] Data The data to add into the heap.
@param[in] Len Length of the Data in byte.
**/
)
{
//
// Add one byte for the NULL delimiter.
//
}
/**
Fill the Initiator section of the iSCSI Boot Firmware Table.
@param[in] Table The ACPI table.
@param[in, out] Heap The heap.
@param[in] Handle The handle associated with the iSCSI session.
**/
)
{
//
// Initiator section immediately follows the control section.
//
Initiator = (EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE *) ((UINT8 *) Control + IBFT_ROUNDUP (Control->Header.Length));
Initiator->Header.Length = (UINT16) sizeof (EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE);
Initiator->Header.Flags = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_FLAG_BLOCK_VALID | EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_FLAG_BOOT_SELECTED;
//
// Get the identifier from the handle.
//
return ;
}
//
// Fill the iSCSI Initiator Name into the heap.
//
}
/**
Map the v4 IP address into v6 IP address.
@param[in] V4 The v4 IP address.
@param[out] V6 The v6 IP address.
**/
)
{
}
}
/**
Get the NIC's PCI location and return it accroding to the composited
format defined in iSCSI Boot Firmware Table.
@param[in] Controller The handle of the controller.
@return UINT16 The composited representation of the NIC PCI location.
@retval 0 Other errors as indicated.
**/
)
{
(VOID **)&DevicePath
);
return 0;
}
);
return 0;
}
return 0;
}
return 0;
}
}
/**
Fill the NIC and target sections in iSCSI Boot Firmware Table.
@param[in] Table The buffer of the ACPI table.
@param[in, out] Heap The heap buffer used to store the variable length parameters such as iSCSI name.
@param[in] HandleCount Count The number of handles having iSCSI private protocol installed.
@param[in] Handles The handle buffer.
**/
)
{
//
// Get the offset of the first Nic and Target section.
//
Control->InitiatorOffset + IBFT_ROUNDUP (sizeof (EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE)));
return ;
}
//
// Fill the Nic section.
//
//
// Get the subnet mask prefix length.
//
Nic->SubnetMaskPrefixLength = IScsiGetSubnetMaskPrefixLength (&SessionConfigData->NvData.SubnetMask);
} else {
}
//
// Map the various v4 addresses into v6 addresses.
//
//
// Get the PCI location of the Nic.
//
//
// Fill the Target section.
//
Target->Header.Flags = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_BLOCK_VALID | EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_BOOT_SELECTED;
//
//
//
// CHAP Name
//
//
// CHAP Secret
//
//
// Reverse CHAP Name
//
//
// Reverse CHAP Secret
//
}
}
//
//
}
}
/**
Publish and remove the iSCSI Boot Firmware Table according to the iSCSI
session status.
**/
)
{
return ;
}
//
// Find ACPI table RSD_PTR from system table
//
) {
//
// A match was found.
//
break;
}
}
return ;
} else {
}
if (mIbftInstalled) {
);
return ;
}
}
//
// Get all iSCSI private protocols.
//
NULL,
);
return ;
}
//
// Allocate 4k bytes to hold the ACPI table.
//
return ;
}
//
// Fill in the various section of the iSCSI Boot Firmware Table.
//
//
// Install or update the iBFT table.
//
);
return;
}
}