1. Add ISCSI iBFT CHAP types to IScsiBootFirmwareTable.h.

2. Fix ISCSI iBFT's CHAP type mismatch bug caused by 14918.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Dong, Guo <guo.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14953 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Fu Siyuan
2013-12-10 09:14:39 +00:00
committed by sfu5
parent 62eeb52af7
commit 0e0fb74a06
3 changed files with 23 additions and 8 deletions

View File

@@ -349,9 +349,16 @@ IScsiFillNICAndTargetSections (
Target->Header.Index = (UINT8) Index;
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;
Target->Port = SessionConfigData->NvData.TargetPort;
Target->CHAPType = AuthConfig->CHAPType;
Target->NicIndex = (UINT8) Index;
if (AuthConfig->CHAPType == ISCSI_CHAP_NONE) {
Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_NO_CHAP;
} if (AuthConfig->CHAPType == ISCSI_CHAP_UNI) {
Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_CHAP;
} else if (AuthConfig->CHAPType == ISCSI_CHAP_MUTUAL) {
Target->CHAPType = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_MUTUAL_CHAP;
}
IScsiMapV4ToV6Addr (&SessionConfigData->NvData.TargetIp, &Target->Ip);
CopyMem (Target->BootLun, SessionConfigData->NvData.BootLun, sizeof (Target->BootLun));
@@ -364,7 +371,7 @@ IScsiFillNICAndTargetSections (
Target->IScsiNameLength = Length;
Target->IScsiNameOffset = (UINT16) ((UINTN) *Heap - (UINTN) Table);
if (Target->CHAPType != ISCSI_CHAP_NONE) {
if (Target->CHAPType != EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_NO_CHAP) {
//
// CHAP Name
//
@@ -381,7 +388,7 @@ IScsiFillNICAndTargetSections (
Target->CHAPSecretLength = Length;
Target->CHAPSecretOffset = (UINT16) ((UINTN) *Heap - (UINTN) Table);
if (Target->CHAPType == ISCSI_CHAP_MUTUAL) {
if (Target->CHAPType == EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_MUTUAL_CHAP) {
//
// Reverse CHAP Name
//