]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Removed #ifdef SNP_DEBUG and used debug lib to output information
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 20 Mar 2007 02:44:09 +0000 (02:44 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 20 Mar 2007 02:44:09 +0000 (02:44 +0000)
2. Rename PcdPlatformNoCsmSupport to PcdPlatformCsmSupport.
3  Removed #ifdef EFI_NO_CSM and used PcdPlatformCsmSupport.
4. Removed #ifdef ALIGNMENT from C Variable.c and added 2 files Variable/Pei/Ipf/VariableWorker.c and Variable/Pei/VariableWorker.c

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

13 files changed:
EdkModulePkg/EdkModulePkg.fpd
EdkModulePkg/Universal/Network/PxeBc/Dxe/pxe_bc_dhcp.c
EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/PxeDhcp4InitSelect.c
EdkModulePkg/Universal/Network/Snp32_64/Dxe/Snp.h
EdkModulePkg/Universal/Network/Snp32_64/Dxe/callback.c
EdkModulePkg/Universal/Network/Snp32_64/Dxe/snp.c
EdkModulePkg/Universal/Variable/Pei/Ipf/VariableWorker.c [new file with mode: 0644]
EdkModulePkg/Universal/Variable/Pei/Variable.c
EdkModulePkg/Universal/Variable/Pei/Variable.h
EdkModulePkg/Universal/Variable/Pei/Variable.msa
EdkModulePkg/Universal/Variable/Pei/VariableWorker.c [new file with mode: 0644]
EdkNt32Pkg/Nt32.fpd
EdkUnixPkg/Unix.fpd

index fe8fcd8d1cef5f08cc80066848e3743aebd5f851..3dfed1183e30963dda54088414f63dbfdfe9bf18 100644 (file)
           <MaxDatumSize>4</MaxDatumSize>\r
           <Value>320</Value>\r
         </PcdData>\r
           <MaxDatumSize>4</MaxDatumSize>\r
           <Value>320</Value>\r
         </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdNtEmulatorEnable</C_Name>\r
-          <Token>0x0001003e</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
-          <MaxDatumSize>1</MaxDatumSize>\r
-          <Value>FALSE</Value>\r
-        </PcdData>\r
       </PcdBuildDefinition>\r
       <ModuleSaBuildOptions>\r
         <FvBinding>NULL</FvBinding>\r
       </PcdBuildDefinition>\r
       <ModuleSaBuildOptions>\r
         <FvBinding>NULL</FvBinding>\r
           <MaxDatumSize>4</MaxDatumSize>\r
           <Value>320</Value>\r
         </PcdData>\r
           <MaxDatumSize>4</MaxDatumSize>\r
           <Value>320</Value>\r
         </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdNtEmulatorEnable</C_Name>\r
-          <Token>0x0001003e</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
-          <MaxDatumSize>1</MaxDatumSize>\r
-          <Value>FALSE</Value>\r
-        </PcdData>\r
       </PcdBuildDefinition>\r
       <ModuleSaBuildOptions>\r
         <FvBinding>NULL</FvBinding>\r
       </PcdBuildDefinition>\r
       <ModuleSaBuildOptions>\r
         <FvBinding>NULL</FvBinding>\r
           <MaxDatumSize>4</MaxDatumSize>\r
           <Value>320</Value>\r
         </PcdData>\r
           <MaxDatumSize>4</MaxDatumSize>\r
           <Value>320</Value>\r
         </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdNtEmulatorEnable</C_Name>\r
-          <Token>0x0001003e</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
-          <MaxDatumSize>1</MaxDatumSize>\r
-          <Value>FALSE</Value>\r
-        </PcdData>\r
       </PcdBuildDefinition>\r
       <ModuleSaBuildOptions>\r
         <FvBinding>NULL</FvBinding>\r
       </PcdBuildDefinition>\r
       <ModuleSaBuildOptions>\r
         <FvBinding>NULL</FvBinding>\r
           <MaxDatumSize>4</MaxDatumSize>\r
           <Value>320</Value>\r
         </PcdData>\r
           <MaxDatumSize>4</MaxDatumSize>\r
           <Value>320</Value>\r
         </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdNtEmulatorEnable</C_Name>\r
-          <Token>0x0001003e</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
-          <MaxDatumSize>1</MaxDatumSize>\r
-          <Value>FALSE</Value>\r
-        </PcdData>\r
       </PcdBuildDefinition>\r
       <ModuleSaBuildOptions>\r
         <FvBinding>NULL</FvBinding>\r
       </PcdBuildDefinition>\r
       <ModuleSaBuildOptions>\r
         <FvBinding>NULL</FvBinding>\r
index bb7022ba749c2d3aa63120c39f780f3cbd82488e..101c030bc84ba468afd4d0cd7d5cf91942d75589 100644 (file)
@@ -1,17 +1,17 @@
 /*++\r
 \r
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \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
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006, Intel Corporation\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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 Module Name:\r
   pxe_bc_dhcp.c\r
 \r
 Module Name:\r
   pxe_bc_dhcp.c\r
-  \r
+\r
 Abstract:\r
   DHCP and PXE discovery protocol implementations.\r
 \r
 Abstract:\r
   DHCP and PXE discovery protocol implementations.\r
 \r
@@ -411,7 +411,7 @@ Routine description:
 \r
 Arguments:\r
   Smbios - Pointer to SMBIOS structure\r
 \r
 Arguments:\r
   Smbios - Pointer to SMBIOS structure\r
-  StringNumber - String number to return. 0 is used to skip all strings and \r
+  StringNumber - String number to return. 0 is used to skip all strings and\r
     point to the next SMBIOS structure.\r
 \r
 Returns:\r
     point to the next SMBIOS structure.\r
 \r
 Returns:\r
@@ -1165,11 +1165,11 @@ Parameters:
   Private := Pointer to PxeBc interface\r
   ExtraEdit := Pointer to extra option checking function\r
   OpFlags := UdpRead() option flags\r
   Private := Pointer to PxeBc interface\r
   ExtraEdit := Pointer to extra option checking function\r
   OpFlags := UdpRead() option flags\r
-  ServerIpPtr := \r
-  ServerPortPtr := \r
-  ClientIpPtr := \r
-  ClientPortPtr := \r
-  DhcpRxBuf := \r
+  ServerIpPtr :=\r
+  ServerPortPtr :=\r
+  ClientIpPtr :=\r
+  ClientPortPtr :=\r
+  DhcpRxBuf :=\r
   TimeoutEvent :=\r
 \r
 Returns:\r
   TimeoutEvent :=\r
 \r
 Returns:\r
@@ -2309,7 +2309,7 @@ Routine description:
 \r
 Parameters:\r
   This := Pointer to PxeBc interface\r
 \r
 Parameters:\r
   This := Pointer to PxeBc interface\r
-  SortOffers := \r
+  SortOffers :=\r
 \r
 Returns:\r
 --*/\r
 \r
 Returns:\r
 --*/\r
@@ -2466,12 +2466,12 @@ DoDiscover (
   PXE_SERVER_LISTS    *ServerListPtr\r
   )\r
 /*++\r
   PXE_SERVER_LISTS    *ServerListPtr\r
   )\r
 /*++\r
-Routine description: \r
+Routine description:\r
   This function tries to complete the PXE Bootserver and/or boot image\r
   discovery sequence.  When this command completes successfully, the\r
   PXEdiscover and PXEreply fields in the BC instance data structure are\r
   updated.  If the Info pointer is set to NULL, the discovery information\r
   This function tries to complete the PXE Bootserver and/or boot image\r
   discovery sequence.  When this command completes successfully, the\r
   PXEdiscover and PXEreply fields in the BC instance data structure are\r
   updated.  If the Info pointer is set to NULL, the discovery information\r
-  in the DHCPack and ProxyOffer packets must be valid and will be used. \r
+  in the DHCPack and ProxyOffer packets must be valid and will be used.\r
   If Info is not set to NULL, the discovery methods in the Info field\r
   must be set and will be used.  When discovering any layer number other\r
   than zero (the credential flag does not count), only unicast discovery\r
   If Info is not set to NULL, the discovery methods in the Info field\r
   must be set and will be used.  When discovering any layer number other\r
   than zero (the credential flag does not count), only unicast discovery\r
@@ -2479,12 +2479,12 @@ Routine description:
 \r
 Parameters:\r
   Private := Pointer to PxeBc interface\r
 \r
 Parameters:\r
   Private := Pointer to PxeBc interface\r
-  OpFlags := \r
-  Type := \r
-  LayerPtr := \r
-  UseBis := \r
-  DestPtr := \r
-  ServerListPtr := \r
+  OpFlags :=\r
+  Type :=\r
+  LayerPtr :=\r
+  UseBis :=\r
+  DestPtr :=\r
+  ServerListPtr :=\r
 \r
 Returns:\r
 --*/\r
 \r
 Returns:\r
 --*/\r
@@ -2771,12 +2771,12 @@ Routine Description:
 \r
 Parameters:\r
   Private := Pointer to PxeBc interface\r
 \r
 Parameters:\r
   Private := Pointer to PxeBc interface\r
-  Type := \r
-  LayerPtr := \r
-  UseBis := \r
-  DiscoverInfoPtr := \r
-  McastServerListPtr := \r
-  ServerListPtr := \r
+  Type :=\r
+  LayerPtr :=\r
+  UseBis :=\r
+  DiscoverInfoPtr :=\r
+  McastServerListPtr :=\r
+  ServerListPtr :=\r
 \r
 Returns:\r
 --*/\r
 \r
 Returns:\r
 --*/\r
@@ -2907,11 +2907,11 @@ BcDiscover (
 Routine description:\r
 \r
 Parameters:\r
 Routine description:\r
 \r
 Parameters:\r
-  This := \r
-  Type := \r
-  LayerPtr := \r
-  UseBis := \r
-  DiscoverInfoPtr := \r
+  This :=\r
+  Type :=\r
+  LayerPtr :=\r
+  UseBis :=\r
+  DiscoverInfoPtr :=\r
 \r
 Returns:\r
 --*/\r
 \r
 Returns:\r
 --*/\r
index 3cb7f3f4bec6d5a84133aa7187ab35f344c96cda..1b500c57b3dcdd46c477fc248b74a95ee5462ec7 100644 (file)
@@ -19,11 +19,6 @@ Abstract:
 \r
 #include "PxeDhcp4.h"\r
 \r
 \r
 #include "PxeDhcp4.h"\r
 \r
-#define DebugPrint(x)\r
-//\r
-// #define DebugPrint(x) Aprint x\r
-//\r
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
 STATIC\r
 INTN\r
 offer_verify (\r
 STATIC\r
 INTN\r
 offer_verify (\r
@@ -400,7 +395,7 @@ PxeDhcp4Init (
     Private->offer_list = NULL;\r
     Private->callback   = NULL;\r
 \r
     Private->offer_list = NULL;\r
     Private->callback   = NULL;\r
 \r
-    DebugPrint (("%a:%d:%r\n", __FILE__, __LINE__, EfiStatus));\r
+    DEBUG ((EFI_D_ERROR, "%r\n", EfiStatus));\r
     return EfiStatus;\r
   }\r
 \r
     return EfiStatus;\r
   }\r
 \r
@@ -687,7 +682,7 @@ PxeDhcp4Select (
   EfiStatus = add_opt (&request, srvid);\r
 \r
   if (EFI_ERROR (EfiStatus)) {\r
   EfiStatus = add_opt (&request, srvid);\r
 \r
   if (EFI_ERROR (EfiStatus)) {\r
-    DebugPrint (("%a:%d:%r\n", __FILE__, __LINE__, EfiStatus));\r
+    DEBUG ((EFI_D_ERROR, "%r\n", EfiStatus));\r
     Private->callback = NULL;\r
     return EfiStatus;\r
   }\r
     Private->callback = NULL;\r
     return EfiStatus;\r
   }\r
@@ -702,7 +697,7 @@ PxeDhcp4Select (
   EfiStatus = add_opt (&request, op);\r
 \r
   if (EFI_ERROR (EfiStatus)) {\r
   EfiStatus = add_opt (&request, op);\r
 \r
   if (EFI_ERROR (EfiStatus)) {\r
-    DebugPrint (("%a:%d:%r\n", __FILE__, __LINE__, EfiStatus));\r
+    DEBUG ((EFI_D_ERROR, "%r\n", EfiStatus));\r
     Private->callback = NULL;\r
     return EfiStatus;\r
   }\r
     Private->callback = NULL;\r
     return EfiStatus;\r
   }\r
@@ -724,7 +719,7 @@ PxeDhcp4Select (
                 );\r
 \r
   if (EFI_ERROR (EfiStatus)) {\r
                 );\r
 \r
   if (EFI_ERROR (EfiStatus)) {\r
-    DebugPrint (("%a:%d:%r\n", __FILE__, __LINE__, EfiStatus));\r
+    DEBUG ((EFI_D_ERROR, "%r\n", EfiStatus));\r
     Private->callback = NULL;\r
     return EfiStatus;\r
   }\r
     Private->callback = NULL;\r
     return EfiStatus;\r
   }\r
index 31cbc8eb830c832d5d42508ea5c49c5a9ed6ec94..038c2e66b0765c7fd9b6c05b9ba5682e1d2f5af2 100644 (file)
@@ -1,12 +1,12 @@
 /*++\r
 /*++\r
-Copyright (c) 2006, Intel Corporation                                                         \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
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006, Intel Corporation\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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 Module name:\r
     snp.h\r
 \r
 Module name:\r
     snp.h\r
@@ -22,17 +22,8 @@ Revision history:
 \r
 #include "IndustryStandard/pci22.h"\r
 \r
 \r
 #include "IndustryStandard/pci22.h"\r
 \r
-#define SNP_DEBUG       0\r
 #define FOUR_GIGABYTES  (UINT64) 0x100000000ULL\r
 \r
 #define FOUR_GIGABYTES  (UINT64) 0x100000000ULL\r
 \r
-#if SNP_DEBUG\r
-#undef D_NET\r
-#define D_NET                 D_WARN\r
-#define SNP_PRINT(DebugInfo)  Print (DebugInfo)\r
-#else\r
-#define SNP_PRINT(DebugInfo)\r
-#endif\r
-\r
 #define SNP_DRIVER_SIGNATURE  EFI_SIGNATURE_32 ('s', 'n', 'd', 's')\r
 #define MAX_MAP_LENGTH        100\r
 \r
 #define SNP_DRIVER_SIGNATURE  EFI_SIGNATURE_32 ('s', 'n', 'd', 's')\r
 #define MAX_MAP_LENGTH        100\r
 \r
@@ -455,13 +446,4 @@ VOID
 \r
 #define SNP_MEM_PAGES(x)  (((x) - 1) / 4096 + 1)\r
 \r
 \r
 #define SNP_MEM_PAGES(x)  (((x) - 1) / 4096 + 1)\r
 \r
-#if SNP_DEBUG\r
-extern\r
-VOID\r
-snp_wait_for_key (\r
-  VOID\r
-  )\r
-;\r
-#endif\r
-\r
 #endif /*  _SNP_H  */\r
 #endif /*  _SNP_H  */\r
index 2a9c953f894a62cfef745b0fc2f2cafec22fa8b3..16e40c609b486fe8830cabbae893c0e2249a20f8 100644 (file)
@@ -1,12 +1,12 @@
 /*++\r
 /*++\r
-Copyright (c) 2006, Intel Corporation                                                         \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
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006, Intel Corporation\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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 Module name:\r
  callback.c\r
 \r
 Module name:\r
  callback.c\r
@@ -482,7 +482,7 @@ Returns:
   }\r
 \r
   if (Index >= MAX_MAP_LENGTH) {\r
   }\r
 \r
   if (Index >= MAX_MAP_LENGTH) {\r
-    SNP_PRINT (L"SNP maplist is FULL\n");\r
+    DEBUG ((EFI_D_INFO, "SNP maplist is FULL\n"));\r
     *DevAddrPtr = 0;\r
     return ;\r
   }\r
     *DevAddrPtr = 0;\r
     return ;\r
   }\r
index 7146e462c7ae6c0ecfbe2b88ded5bbb1d2a0c2a5..4b6cda9b1e5c43ba896521f84f4a75f9a33f11a2 100644 (file)
@@ -1,12 +1,12 @@
 /*++\r
 /*++\r
-Copyright (c) 2006, Intel Corporation                                                         \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
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006, Intel Corporation\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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 Module name:\r
     snp.c\r
 \r
 Module name:\r
     snp.c\r
@@ -41,10 +41,8 @@ Returns:
 \r
 --*/\r
 {\r
 \r
 --*/\r
 {\r
-#if SNP_DEBUG\r
-  Aprint ("\nissue_hwundi_command() - This should not be called!");\r
-  snp_wait_for_key ();\r
-#endif\r
+  DEBUG ((EFI_D_ERROR, "\nissue_hwundi_command() - This should not be called!"));\r
+\r
   if (cdb == 0) {\r
     return EFI_INVALID_PARAMETER;\r
 \r
   if (cdb == 0) {\r
     return EFI_INVALID_PARAMETER;\r
 \r
@@ -65,7 +63,7 @@ calc_8bit_cksum (
 \r
 Routine Description:\r
  Compute 8-bit checksum of a buffer.\r
 \r
 Routine Description:\r
  Compute 8-bit checksum of a buffer.\r
\r
+\r
 Arguments:\r
  ptr - Pointer to buffer.\r
  len - Length of buffer in bytes.\r
 Arguments:\r
  ptr - Pointer to buffer.\r
  len - Length of buffer in bytes.\r
@@ -147,19 +145,13 @@ SimpleNetworkDriverSupported (
                   );\r
   if (Status == EFI_ALREADY_STARTED)\r
   {\r
                   );\r
   if (Status == EFI_ALREADY_STARTED)\r
   {\r
-#if SNP_DEBUG\r
-    Aprint ("Support(): Already Started. on handle %x\n", Controller);\r
-#endif\r
+    DEBUG ((EFI_D_INFO, "Support(): Already Started. on handle %x\n", Controller));\r
     return EFI_ALREADY_STARTED;\r
   }\r
 \r
   if (!EFI_ERROR (Status))\r
   {\r
     return EFI_ALREADY_STARTED;\r
   }\r
 \r
   if (!EFI_ERROR (Status))\r
   {\r
-\r
-#if SNP_DEBUG\r
-    Aprint ("Support(): UNDI3.1 found on handle %x\n", Controller);\r
-    snp_wait_for_key ();\r
-#endif\r
+    DEBUG ((EFI_D_INFO, "Support(): UNDI3.1 found on handle %x\n", Controller));\r
     IsUndi31 = TRUE;\r
   } else {\r
     //\r
     IsUndi31 = TRUE;\r
   } else {\r
     //\r
@@ -177,10 +169,7 @@ SimpleNetworkDriverSupported (
       return Status;\r
     }\r
 \r
       return Status;\r
     }\r
 \r
-#if SNP_DEBUG\r
-    Aprint ("Support(): UNDI3.0 found on handle %x\n", Controller);\r
-    snp_wait_for_key ();\r
-#endif\r
+    DEBUG ((EFI_D_INFO, "Support(): UNDI3.0 found on handle %x\n", Controller));\r
   }\r
   //\r
   // check the version, we don't want to connect to the undi16\r
   }\r
   //\r
   // check the version, we don't want to connect to the undi16\r
@@ -244,10 +233,7 @@ SimpleNetworkDriverSupported (
   }\r
 \r
   Status = EFI_SUCCESS;\r
   }\r
 \r
   Status = EFI_SUCCESS;\r
-#if SNP_DEBUG\r
-  Aprint ("Support(): supported on %x\n", Controller);\r
-  snp_wait_for_key ();\r
-#endif\r
+  DEBUG ((EFI_D_INFO, "Support(): supported on %x\n", Controller));\r
 \r
 Done:\r
   if (IsUndi31) {\r
 \r
 Done:\r
   if (IsUndi31) {\r
@@ -374,10 +360,8 @@ Arguments:
     // probably not a 3.1 UNDI\r
     //\r
     UndiNew = TRUE;\r
     // probably not a 3.1 UNDI\r
     //\r
     UndiNew = TRUE;\r
-#if SNP_DEBUG\r
-    Aprint ("Start(): UNDI3.1 found\n");\r
-    snp_wait_for_key ();\r
-#endif\r
+    DEBUG ((EFI_D_INFO, "Start(): UNDI3.1 found\n"));\r
+\r
   } else {\r
     UndiNew = FALSE;\r
     Status = gBS->OpenProtocol (\r
   } else {\r
     UndiNew = FALSE;\r
     Status = gBS->OpenProtocol (\r
@@ -399,10 +383,7 @@ Arguments:
       return Status;\r
     }\r
 \r
       return Status;\r
     }\r
 \r
-#if SNP_DEBUG\r
-    Aprint ("Start(): UNDI3.0 found\n");\r
-    snp_wait_for_key ();\r
-#endif\r
+    DEBUG ((EFI_D_INFO, "Start(): UNDI3.0 found\n"));\r
   }\r
 \r
   pxe = (PXE_UNDI *) (UINTN) (Nii->ID);\r
   }\r
 \r
   pxe = (PXE_UNDI *) (UINTN) (Nii->ID);\r
@@ -996,7 +977,7 @@ Returns:
                     Controller\r
                     );\r
   }\r
                     Controller\r
                     );\r
   }\r
-  \r
+\r
   Status = gBS->CloseProtocol (\r
                   Controller,\r
                   &gEfiDevicePathProtocolGuid,\r
   Status = gBS->CloseProtocol (\r
                   Controller,\r
                   &gEfiDevicePathProtocolGuid,\r
@@ -1077,7 +1058,7 @@ add_v2p (
 \r
 Routine Description:\r
  This routine maps the given CPU address to a Device address. It creates a\r
 \r
 Routine Description:\r
  This routine maps the given CPU address to a Device address. It creates a\r
- an entry in the map list with the virtual and physical addresses and the \r
+ an entry in the map list with the virtual and physical addresses and the\r
  un map cookie.\r
 \r
 Arguments:\r
  un map cookie.\r
 \r
 Arguments:\r
@@ -1138,7 +1119,7 @@ find_v2p (
 /*++\r
 \r
 Routine Description:\r
 /*++\r
 \r
 Routine Description:\r
- This routine searches the linked list of mapped address nodes (for undi3.0 \r
+ This routine searches the linked list of mapped address nodes (for undi3.0\r
  interface) to find the node that corresponds to the given virtual address and\r
  returns a pointer to that node.\r
 \r
  interface) to find the node that corresponds to the given virtual address and\r
  returns a pointer to that node.\r
 \r
@@ -1176,9 +1157,9 @@ del_v2p (
 /*++\r
 \r
 Routine Description:\r
 /*++\r
 \r
 Routine Description:\r
- This routine unmaps the given virtual address and frees the memory allocated \r
+ This routine unmaps the given virtual address and frees the memory allocated\r
  for the map list node corresponding to that address.\r
  for the map list node corresponding to that address.\r
\r
+\r
 Arguments:\r
  vaddr - virtual address (or CPU address) to be unmapped\r
 \r
 Arguments:\r
  vaddr - virtual address (or CPU address) to be unmapped\r
 \r
@@ -1210,11 +1191,9 @@ Returns:
 \r
     gBS->FreePool (v);\r
 \r
 \r
     gBS->FreePool (v);\r
 \r
-#if SNP_DEBUG\r
     if (Status) {\r
     if (Status) {\r
-      Print (L"Unmap failed with status = %x\n", Status);\r
+      DEBUG ((EFI_D_ERROR, "Unmap failed with status = %x\n", Status));\r
     }\r
     }\r
-#endif\r
     return Status;\r
   }\r
 \r
     return Status;\r
   }\r
 \r
@@ -1223,42 +1202,13 @@ Returns:
       v->next = t->next;\r
       Status  = mPciIoFncs->Unmap (mPciIoFncs, t->unmap);\r
       gBS->FreePool (t);\r
       v->next = t->next;\r
       Status  = mPciIoFncs->Unmap (mPciIoFncs, t->unmap);\r
       gBS->FreePool (t);\r
-#if SNP_DEBUG\r
+\r
       if (Status) {\r
       if (Status) {\r
-        Print (L"Unmap failed with status = %x\n", Status);\r
+        DEBUG ((EFI_D_ERROR, "Unmap failed with status = %x\n", Status));\r
       }\r
       }\r
-#endif\r
       return Status;\r
     }\r
   }\r
 \r
   return EFI_NOT_FOUND;\r
 }\r
       return Status;\r
     }\r
   }\r
 \r
   return EFI_NOT_FOUND;\r
 }\r
-\r
-#if SNP_DEBUG\r
-VOID\r
-snp_wait_for_key (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
- Wait for a key stroke, used for debugging purposes\r
-\r
-Arguments:\r
- none\r
-\r
-Returns:\r
- none\r
-\r
---*/\r
-{\r
-  EFI_INPUT_KEY key;\r
-\r
-  Aprint ("\nPress any key to continue\n");\r
-\r
-  while (gST->ConIn->ReadKeyStroke (gST->ConIn, &key) == EFI_NOT_READY) {\r
-    ;\r
-  }\r
-}\r
-#endif\r
diff --git a/EdkModulePkg/Universal/Variable/Pei/Ipf/VariableWorker.c b/EdkModulePkg/Universal/Variable/Pei/Ipf/VariableWorker.c
new file mode 100644 (file)
index 0000000..302bc14
--- /dev/null
@@ -0,0 +1,44 @@
+/*++\r
+\r
+Copyright (c) 2007, Intel Corporation\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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+\r
+  VariableWorker.c\r
+\r
+Abstract:\r
+\r
+  Framework PEIM to provide the Variable functionality\r
+\r
+--*/\r
+\r
+#include <Variable.h>\r
+\r
+\r
+VARIABLE_HEADER *\r
+GetVariableByIndex (\r
+  IN VARIABLE_INDEX_TABLE        *IndexTable,\r
+  IN UINT32                      Count\r
+  )\r
+{\r
+  return (VARIABLE_HEADER *) (UINTN) ((((UINT32)IndexTable->Index[Count]) << 2) + ((UINT32)(UINTN)IndexTable->StartPtr & 0xFFFC0000) );\r
+}\r
+\r
+VOID\r
+VariableIndexTableUpdate (\r
+  IN OUT  VARIABLE_INDEX_TABLE   *IndexTable,\r
+  IN      VARIABLE_HEADER        *Variable\r
+  )\r
+{\r
+  IndexTable->Index[IndexTable->Length++] = (UINT16) (((UINT32)(UINTN) Variable) >> 2);\r
+\r
+  return;\r
+}\r
+\r
index 33772f8513ddb1ff3564deeee9d0ab7866090033..06604195478b1ad29480d0b9754117815f6cccd9 100644 (file)
@@ -8,7 +8,6 @@ http://opensource.org/licenses/bsd-license.php
                                                                                           \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
                                                                                           \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
 Module Name:\r
 \r
   Variable.c\r
 Module Name:\r
 \r
   Variable.c\r
@@ -50,7 +49,7 @@ Routine Description:
   Provide the functionality of the variable services.\r
 \r
 Arguments:\r
   Provide the functionality of the variable services.\r
 \r
 Arguments:\r
-  \r
+\r
   FfsHeadher  - The FFS file header\r
   PeiServices - General purpose services available to every PEIM.\r
 \r
   FfsHeadher  - The FFS file header\r
   PeiServices - General purpose services available to every PEIM.\r
 \r
@@ -192,7 +191,7 @@ Returns:
 \r
   EFI_SUCCESS    - Found match variable\r
   EFI_NOT_FOUND  - Variable not found\r
 \r
   EFI_SUCCESS    - Found match variable\r
   EFI_NOT_FOUND  - Variable not found\r
\r
+\r
 --*/\r
 {\r
   if (VariableName[0] == 0) {\r
 --*/\r
 {\r
   if (VariableName[0] == 0) {\r
@@ -265,7 +264,7 @@ Returns:
   // No Variable Address equals zero, so 0 as initial value is safe.\r
   //\r
   MaxIndex = 0;\r
   // No Variable Address equals zero, so 0 as initial value is safe.\r
   //\r
   MaxIndex = 0;\r
-  \r
+\r
   GuidHob = GetFirstGuidHob (&gEfiVariableIndexTableGuid);\r
   if (GuidHob == NULL) {\r
     IndexTable = BuildGuidHob (&gEfiVariableIndexTableGuid, sizeof (VARIABLE_INDEX_TABLE));\r
   GuidHob = GetFirstGuidHob (&gEfiVariableIndexTableGuid);\r
   if (GuidHob == NULL) {\r
     IndexTable = BuildGuidHob (&gEfiVariableIndexTableGuid, sizeof (VARIABLE_INDEX_TABLE));\r
@@ -277,13 +276,8 @@ Returns:
     IndexTable = GET_GUID_HOB_DATA (GuidHob);\r
     for (Count = 0; Count < IndexTable->Length; Count++)\r
     {\r
     IndexTable = GET_GUID_HOB_DATA (GuidHob);\r
     for (Count = 0; Count < IndexTable->Length; Count++)\r
     {\r
-#if ALIGNMENT <= 1\r
-      MaxIndex = (VARIABLE_HEADER *) (UINTN) (IndexTable->Index[Count] + ((UINTN) IndexTable->StartPtr & 0xFFFF0000));\r
-#else\r
-#if ALIGNMENT >= 4\r
-          MaxIndex = (VARIABLE_HEADER *) (UINTN) ((((UINT32)IndexTable->Index[Count]) << 2) + ((UINT32)(UINTN)IndexTable->StartPtr & 0xFFFC0000) );       \r
-#endif\r
-#endif\r
+      MaxIndex = GetVariableByIndex (IndexTable, Count);\r
+\r
       if (CompareWithValidVariable (MaxIndex, VariableName, VendorGuid, PtrTrack) == EFI_SUCCESS) {\r
         PtrTrack->StartPtr  = IndexTable->StartPtr;\r
         PtrTrack->EndPtr    = IndexTable->EndPtr;\r
       if (CompareWithValidVariable (MaxIndex, VariableName, VendorGuid, PtrTrack) == EFI_SUCCESS) {\r
         PtrTrack->StartPtr  = IndexTable->StartPtr;\r
         PtrTrack->EndPtr    = IndexTable->EndPtr;\r
@@ -308,7 +302,7 @@ Returns:
       VariableBase = (UINT8 *) (UINTN) PcdGet32 (PcdFlashNvStorageVariableBase);\r
       VariableStoreHeader = (VARIABLE_STORE_HEADER *) (VariableBase + \\r
                             ((EFI_FIRMWARE_VOLUME_HEADER *) (VariableBase)) -> HeaderLength);\r
       VariableBase = (UINT8 *) (UINTN) PcdGet32 (PcdFlashNvStorageVariableBase);\r
       VariableStoreHeader = (VARIABLE_STORE_HEADER *) (VariableBase + \\r
                             ((EFI_FIRMWARE_VOLUME_HEADER *) (VariableBase)) -> HeaderLength);\r
-      \r
+\r
       if (GetVariableStoreStatus (VariableStoreHeader) != EfiValid) {\r
         return EFI_UNSUPPORTED;\r
       }\r
       if (GetVariableStoreStatus (VariableStoreHeader) != EfiValid) {\r
         return EFI_UNSUPPORTED;\r
       }\r
@@ -342,13 +336,7 @@ Returns:
       //\r
       if (IndexTable->Length < VARIABLE_INDEX_TABLE_VOLUME)\r
       {\r
       //\r
       if (IndexTable->Length < VARIABLE_INDEX_TABLE_VOLUME)\r
       {\r
-#if ALIGNMENT <= 1\r
-        IndexTable->Index[IndexTable->Length++] = (UINT16) (UINTN) Variable;\r
-#else\r
-#if ALIGNMENT >= 4\r
-            IndexTable->Index[IndexTable->Length++] = (UINT16) (((UINT32)(UINTN) Variable) >> 2);\r
-#endif\r
-#endif\r
+        VariableIndexTableUpdate (IndexTable, Variable);\r
       }\r
 \r
       if (CompareWithValidVariable (Variable, VariableName, VendorGuid, PtrTrack) == EFI_SUCCESS) {\r
       }\r
 \r
       if (CompareWithValidVariable (Variable, VariableName, VendorGuid, PtrTrack) == EFI_SUCCESS) {\r
index ac7c579029422e767aab7ddbd5cbd01f0ca44f62..d400af4d144c6a13ff98f3b7083c9a12f64e2540 100644 (file)
@@ -1,18 +1,18 @@
 /*++\r
 \r
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \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
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006, Intel Corporation\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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 Module Name:\r
 \r
   Variable.h\r
 \r
 Module Name:\r
 \r
   Variable.h\r
-   \r
+\r
 Abstract:\r
 \r
   Tiano PEIM to provide the variable functionality\r
 Abstract:\r
 \r
   Tiano PEIM to provide the variable functionality\r
@@ -24,7 +24,7 @@ Abstract:
 \r
 //\r
 // BugBug: We need relcate the head file.\r
 \r
 //\r
 // BugBug: We need relcate the head file.\r
-// \r
+//\r
 #include <Common/Variable.h>\r
 #include <VarMachine.h>\r
 \r
 #include <Common/Variable.h>\r
 #include <VarMachine.h>\r
 \r
@@ -150,4 +150,16 @@ Returns:
 --*/\r
 ;\r
 \r
 --*/\r
 ;\r
 \r
+VARIABLE_HEADER *\r
+GetVariableByIndex (\r
+  IN VARIABLE_INDEX_TABLE        *IndexTable,\r
+  IN UINT32                      Count\r
+  );\r
+\r
+VOID\r
+VariableIndexTableUpdate (\r
+  IN OUT  VARIABLE_INDEX_TABLE   *IndexTable,\r
+  IN      VARIABLE_HEADER        *Variable\r
+  );\r
+\r
 #endif // _PEI_VARIABLE_H\r
 #endif // _PEI_VARIABLE_H\r
index 0313c2e700374409589547d98464af997f0d156b..565ae31a1306f75ed9cee49efc380e587acaafaa 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
+<?xml version="1.0" encoding="UTF-8"?>\r
 <ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
   <MsaHeader>\r
     <ModuleName>PeiVariable</ModuleName>\r
 <ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
   <MsaHeader>\r
     <ModuleName>PeiVariable</ModuleName>\r
@@ -42,6 +42,8 @@
     <Filename>Variable.h</Filename>\r
     <Filename>Variable.c</Filename>\r
     <Filename>Variable.dxs</Filename>\r
     <Filename>Variable.h</Filename>\r
     <Filename>Variable.c</Filename>\r
     <Filename>Variable.dxs</Filename>\r
+    <Filename SupArchList="IA32 X64 EBC">VariableWorker.c</Filename>\r
+    <Filename SupArchList="IPF">Ipf/VariableWorker.c</Filename>\r
     <Filename SupArchList="IA32">Ia32/VarMachine.h</Filename>\r
     <Filename SupArchList="EBC">Ebc/VarMachine.h</Filename>\r
     <Filename SupArchList="X64">x64/VarMachine.h</Filename>\r
     <Filename SupArchList="IA32">Ia32/VarMachine.h</Filename>\r
     <Filename SupArchList="EBC">Ebc/VarMachine.h</Filename>\r
     <Filename SupArchList="X64">x64/VarMachine.h</Filename>\r
diff --git a/EdkModulePkg/Universal/Variable/Pei/VariableWorker.c b/EdkModulePkg/Universal/Variable/Pei/VariableWorker.c
new file mode 100644 (file)
index 0000000..ae64cb0
--- /dev/null
@@ -0,0 +1,44 @@
+/*++\r
+\r
+Copyright (c) 2007, Intel Corporation\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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+\r
+  VariableWorker.c\r
+\r
+Abstract:\r
+\r
+  Framework PEIM to provide the Variable functionality\r
+\r
+--*/\r
+\r
+#include <Variable.h>\r
+\r
+\r
+VARIABLE_HEADER *\r
+GetVariableByIndex (\r
+  IN VARIABLE_INDEX_TABLE        *IndexTable,\r
+  IN UINT32                      Count\r
+  )\r
+{\r
+  return (VARIABLE_HEADER *) (UINTN) (IndexTable->Index[Count] + ((UINTN) IndexTable->StartPtr & 0xFFFF0000));\r
+}\r
+\r
+VOID\r
+VariableIndexTableUpdate (\r
+  IN OUT  VARIABLE_INDEX_TABLE   *IndexTable,\r
+  IN      VARIABLE_HEADER        *Variable\r
+  )\r
+{\r
+  IndexTable->Index[IndexTable->Length++] = (UINT16) (UINTN) Variable;\r
+\r
+  return;\r
+}\r
+\r
index 1fac2da6e6e7c55839216171387a10f6e27f2c9b..f9b0c58ecc34fd71e4a05d337108ba9c9dd2b13e 100644 (file)
           <MaxDatumSize>4</MaxDatumSize>\r
           <Value>320</Value>\r
         </PcdData>\r
           <MaxDatumSize>4</MaxDatumSize>\r
           <Value>320</Value>\r
         </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdNtEmulatorEnable</C_Name>\r
-          <Token>0x0001003e</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
-          <MaxDatumSize>1</MaxDatumSize>\r
-          <Value>FALSE</Value>\r
-        </PcdData>\r
       </PcdBuildDefinition>\r
       <ModuleSaBuildOptions>\r
         <FvBinding>NULL</FvBinding>\r
       </PcdBuildDefinition>\r
       <ModuleSaBuildOptions>\r
         <FvBinding>NULL</FvBinding>\r
index c5ffd9c603bfdcb58228b365406d908239b4b488..372a368ad14703a44b05ca3adf1beb7965e8b2d3 100644 (file)
           <MaxDatumSize>4</MaxDatumSize>\r
           <Value>320</Value>\r
         </PcdData>\r
           <MaxDatumSize>4</MaxDatumSize>\r
           <Value>320</Value>\r
         </PcdData>\r
-        <PcdData ItemType="FEATURE_FLAG">\r
-          <C_Name>PcdNtEmulatorEnable</C_Name>\r
-          <Token>0x0001003e</Token>\r
-          <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
-          <DatumType>BOOLEAN</DatumType>\r
-          <MaxDatumSize>1</MaxDatumSize>\r
-          <Value>FALSE</Value>\r
-        </PcdData>\r
       </PcdBuildDefinition>\r
       <ModuleSaBuildOptions>\r
         <FvBinding>NULL</FvBinding>\r
       </PcdBuildDefinition>\r
       <ModuleSaBuildOptions>\r
         <FvBinding>NULL</FvBinding>\r