]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Update the maximum length to 224 in ISCSI_CONFIG_IFR_NVDATA() to store 223 byte...
authortye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 1 Feb 2010 05:01:07 +0000 (05:01 +0000)
committertye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 1 Feb 2010 05:01:07 +0000 (05:01 +0000)
2. Update the minimum length to 4 in VFR file for target/initiator name for requiring prefix “iqn.”
3. Fix the 64bit unalignment exception at IPF due to Rsdt is 32 bit alignment but OemTableId field of Rsdt is UINT64 type.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9896 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxe.vfr
MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h
MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c

index 666fa04170e30cbc712f278f51b86ea00765e572..e4a27d757e14d90e5eef753c1d3ad84d92a994c1 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Vfr file for iSCSI config.\r
   \r
-Copyright (c) 2004 - 2008, Intel Corporation.<BR>\r
+Copyright (c) 2004 - 2010, 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
@@ -34,7 +34,7 @@ formset
             help    = STRING_TOKEN(STR_ISCSI_CONFIG_INIT_NAME_HELP),\r
             flags   = INTERACTIVE,\r
             key     = KEY_INITIATOR_NAME,\r
-            minsize = 8,\r
+            minsize = ISCSI_NAME_IFR_MIN_SIZE,\r
             maxsize = ISCSI_NAME_IFR_MAX_SIZE,\r
     endstring;\r
 \r
@@ -105,7 +105,7 @@ formset
             help    = STRING_TOKEN(STR_ISCSI_TARGET_NAME),\r
             flags   = INTERACTIVE,\r
             key     = KEY_TARGET_NAME,\r
-            minsize = 8,\r
+            minsize = ISCSI_NAME_IFR_MIN_SIZE,\r
             maxsize = ISCSI_NAME_IFR_MAX_SIZE,\r
     endstring;\r
 \r
index 2e9736ec3271fbf33d851aaab0b54365b3ae9ffb..24942f57ba143187244ee5d8fae554c1885bddca 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Define NVData structures used by the iSCSI configuration component\r
 \r
-Copyright (c) 2004 - 2007, Intel Corporation.<BR>\r
+Copyright (c) 2004 - 2010, 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
@@ -30,6 +30,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 // Vfr has a limit on the size, it's 255 bytes.\r
 //\r
+#define ISCSI_NAME_IFR_MIN_SIZE   4\r
 #define ISCSI_NAME_IFR_MAX_SIZE   223\r
 \r
 #define IP_MIN_SIZE               7\r
@@ -77,7 +78,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #pragma pack(1)\r
 typedef struct {\r
-  CHAR16  InitiatorName[ISCSI_NAME_IFR_MAX_SIZE];\r
+  CHAR16  InitiatorName[ISCSI_NAME_MAX_SIZE];\r
 \r
   UINT8   Enabled;\r
 \r
@@ -86,7 +87,7 @@ typedef struct {
   CHAR16  SubnetMask[IP4_STR_MAX_SIZE];\r
   CHAR16  Gateway[IP4_STR_MAX_SIZE];\r
 \r
-  CHAR16  TargetName[ISCSI_NAME_IFR_MAX_SIZE];\r
+  CHAR16  TargetName[ISCSI_NAME_MAX_SIZE];\r
   CHAR16  TargetIp[IP4_STR_MAX_SIZE];\r
   UINT16  TargetPort;\r
   CHAR16  BootLun[ISCSI_LUN_STR_MAX_LEN];\r
index 6ca8a217f573251a39bac8ff44cd094f7383f3b0..cbf699f0d2bca647586edb7de111a2cfd0c0cef2 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation for iSCSI Boot Firmware Table publication.\r
 \r
-Copyright (c) 2004 - 2009, Intel Corporation.<BR>\r
+Copyright (c) 2004 - 2010, 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
@@ -45,7 +45,7 @@ IScsiInitIbfTableHeader (
   Header->OemId[4]  = 'L';\r
   \r
   CopyMem (Header->OemId, OemId, sizeof (Header->OemId));\r
-  Header->OemTableId = *OemTableId;\r
+  CopyMem (&Header->OemTableId, OemTableId, sizeof (UINT64));\r
 }\r
 \r
 /**\r