public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/3] Error Level is not used correctly
@ 2017-04-10  6:19 Jeff Fan
  2017-04-10  6:19 ` [PATCH 1/3] MdeModulePkg: " Jeff Fan
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jeff Fan @ 2017-04-10  6:19 UTC (permalink / raw)
  To: edk2-devel

Some modules mis-used error level when outputting debug message.

Jeff Fan (3):
  MdeModulePkg: Error Level is not used correctly
  SecurityPkg: Error Level is not used correctly
  UefiCpuPkg: Error Level is not used correctly

 .../Acpi/BootScriptExecutorDxe/ScriptExecute.c     | 10 ++--
 .../Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c   |  4 +-
 .../Acpi/S3SaveStateDxe/AcpiS3ContextSave.c        |  2 +-
 MdeModulePkg/Universal/CapsulePei/UefiCapsule.c    |  2 +-
 .../CapsuleRuntimeDxe/X64/SaveLongModeContext.c    |  4 +-
 .../Universal/LockBox/SmmLockBox/SmmLockBox.c      | 10 ++--
 .../PlatformDriOverrideDxe/PlatDriOverrideDxe.c    |  4 +-
 .../Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.c   |  4 +-
 .../Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.c   |  4 +-
 SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c                  |  2 +-
 SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c                  |  4 +-
 SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c                  |  4 +-
 SecurityPkg/Tcg/TrEEPei/TrEEPei.c                  |  4 +-
 UefiCpuPkg/CpuDxe/CpuPageTable.c                   |  2 +-
 UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c  | 68 +++++++++++-----------
 15 files changed, 64 insertions(+), 64 deletions(-)

-- 
2.9.3.windows.2



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] MdeModulePkg: Error Level is not used correctly
  2017-04-10  6:19 [PATCH 0/3] Error Level is not used correctly Jeff Fan
@ 2017-04-10  6:19 ` Jeff Fan
  2017-04-11  7:16   ` Tian, Feng
  2017-04-10  6:19 ` [PATCH 2/3] SecurityPkg: " Jeff Fan
  2017-04-10  6:19 ` [PATCH 3/3] UefiCpuPkg: " Jeff Fan
  2 siblings, 1 reply; 7+ messages in thread
From: Jeff Fan @ 2017-04-10  6:19 UTC (permalink / raw)
  To: edk2-devel; +Cc: Feng Tian

Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
 .../Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c       | 10 +++++-----
 .../Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c     |  4 ++--
 MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c |  2 +-
 MdeModulePkg/Universal/CapsulePei/UefiCapsule.c                |  2 +-
 .../Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c      |  4 ++--
 MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c         | 10 +++++-----
 .../Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c      |  4 ++--
 7 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c
index 5147e66..4545d6e 100644
--- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c
+++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c
@@ -103,7 +103,7 @@ S3BootScriptExecutorEntryFunction (
       //
       // X64 S3 Resume
       //
-      DEBUG ((EFI_D_ERROR, "Call AsmDisablePaging64() to return to S3 Resume in PEI Phase\n"));
+      DEBUG ((DEBUG_INFO, "Call AsmDisablePaging64() to return to S3 Resume in PEI Phase\n"));
       PeiS3ResumeState->AsmTransferControl = (EFI_PHYSICAL_ADDRESS)(UINTN)AsmTransferControl32;
 
       if ((Facs != NULL) &&
@@ -128,7 +128,7 @@ S3BootScriptExecutorEntryFunction (
       //
       // IA32 S3 Resume
       //
-      DEBUG ((EFI_D_ERROR, "Call SwitchStack() to return to S3 Resume in PEI Phase\n"));
+      DEBUG ((DEBUG_INFO, "Call SwitchStack() to return to S3 Resume in PEI Phase\n"));
       PeiS3ResumeState->AsmTransferControl = (EFI_PHYSICAL_ADDRESS)(UINTN)AsmTransferControl;
 
       SwitchStack (
@@ -160,7 +160,7 @@ S3BootScriptExecutorEntryFunction (
       //
       // X64 long mode waking vector
       //
-      DEBUG (( EFI_D_ERROR, "Transfer to 64bit OS waking vector - %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
+      DEBUG ((DEBUG_INFO, "Transfer to 64bit OS waking vector - %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
       if (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) {
         SwitchStack (
           (SWITCH_STACK_ENTRY_POINT)(UINTN)Facs->XFirmwareWakingVector,
@@ -177,7 +177,7 @@ S3BootScriptExecutorEntryFunction (
       //
       // IA32 protected mode waking vector (Page disabled)
       //
-      DEBUG (( EFI_D_ERROR, "Transfer to 32bit OS waking vector - %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
+      DEBUG ((DEBUG_INFO, "Transfer to 32bit OS waking vector - %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
       if (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) {
         AsmDisablePaging64 (
           0x10,
@@ -199,7 +199,7 @@ S3BootScriptExecutorEntryFunction (
     //
     // 16bit Realmode waking vector
     //
-    DEBUG (( EFI_D_ERROR, "Transfer to 16bit OS waking vector - %x\r\n", (UINTN)Facs->FirmwareWakingVector));
+    DEBUG ((DEBUG_INFO, "Transfer to 16bit OS waking vector - %x\r\n", (UINTN)Facs->FirmwareWakingVector));
     AsmTransferControl (Facs->FirmwareWakingVector, 0x0);
   }
 
diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c
index d433cf1..70eecf5 100644
--- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c
+++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c
@@ -3,7 +3,7 @@
 
   Set a IDT entry for interrupt vector 3 for debug purpose for x64 platform
 
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
 Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
 
 
@@ -234,7 +234,7 @@ PageFaultHandler (
   UINTN          PTIndex;
 
   PFAddress = AsmReadCr2 ();
-  DEBUG ((EFI_D_ERROR, "BootScript - PageFaultHandler: Cr2 - %lx\n", PFAddress));
+  DEBUG ((DEBUG_INFO, "BootScript - PageFaultHandler: Cr2 - %lx\n", PFAddress));
 
   if (PFAddress >= mPhyMask + SIZE_4KB) {
     return FALSE;
diff --git a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c
index dcfd61c..3c05558 100644
--- a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c
+++ b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c
@@ -407,7 +407,7 @@ S3AllocatePageTablesBuffer (
     }
 
     TotalPageTableSize += ExtraPageTablePages;
-    DEBUG ((EFI_D_ERROR, "AcpiS3ContextSave TotalPageTableSize - 0x%x pages\n", TotalPageTableSize));
+    DEBUG ((DEBUG_INFO, "AcpiS3ContextSave TotalPageTableSize - 0x%x pages\n", TotalPageTableSize));
 
     //
     // By architecture only one PageMapLevel4 exists - so lets allocate storage for it.
diff --git a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c
index d61d5ff..cca455e 100644
--- a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c
+++ b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c
@@ -763,7 +763,7 @@ GetCapsuleDescriptors (
                                         (VOID *) &CapsuleDataPtr64
                                         );
         if (EFI_ERROR (Status)) {
-          DEBUG ((EFI_D_ERROR, "Capsule -- capsule variable not set\n"));
+          DEBUG ((DEBUG_INFO, "Capsule -- capsule variable not set\n"));
           return EFI_NOT_FOUND;
         }
         //
diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c b/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c
index 7e0dd5c..b0512fd 100644
--- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c
+++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c
@@ -2,7 +2,7 @@
   Create the variable to save the base address of page table and stack
   for transferring into long mode in IA32 capsule PEI.
 
-Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2017, 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
@@ -160,7 +160,7 @@ PrepareContextForCapsulePei (
     TotalPagesNum = NumberOfPml4EntriesNeeded + 1;
   }
   TotalPagesNum += ExtraPageTablePages;
-  DEBUG ((EFI_D_ERROR, "CapsuleRuntimeDxe X64 TotalPagesNum - 0x%x pages\n", TotalPagesNum));
+  DEBUG ((DEBUG_INFO, "CapsuleRuntimeDxe X64 TotalPagesNum - 0x%x pages\n", TotalPagesNum));
 
   LongModeBuffer.PageTableAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateReservedMemoryBelow4G (EFI_PAGES_TO_SIZE (TotalPagesNum));
   ASSERT (LongModeBuffer.PageTableAddress != 0);
diff --git a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c
index f1880d4..2dc8815 100644
--- a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c
+++ b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c
@@ -9,7 +9,7 @@
   SmmLockBoxHandler(), SmmLockBoxRestore(), SmmLockBoxUpdate(), SmmLockBoxSave()
   will receive untrusted input and do basic validation.
 
-Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
 
 This program and the accompanying materials
 are licensed and made available under the terms and conditions
@@ -267,7 +267,7 @@ SmmLockBoxHandler (
   EFI_SMM_LOCK_BOX_PARAMETER_HEADER *LockBoxParameterHeader;
   UINTN                             TempCommBufferSize;
 
-  DEBUG ((EFI_D_ERROR, "SmmLockBox SmmLockBoxHandler Enter\n"));
+  DEBUG ((DEBUG_INFO, "SmmLockBox SmmLockBoxHandler Enter\n"));
 
   //
   // If input is invalid, stop processing this SMI
@@ -294,9 +294,9 @@ SmmLockBoxHandler (
 
   LockBoxParameterHeader->ReturnStatus = (UINT64)-1;
 
-  DEBUG ((EFI_D_ERROR, "SmmLockBox LockBoxParameterHeader - %x\n", (UINTN)LockBoxParameterHeader));
+  DEBUG ((DEBUG_INFO, "SmmLockBox LockBoxParameterHeader - %x\n", (UINTN)LockBoxParameterHeader));
 
-  DEBUG ((EFI_D_ERROR, "SmmLockBox Command - %x\n", (UINTN)LockBoxParameterHeader->Command));
+  DEBUG ((DEBUG_INFO, "SmmLockBox Command - %x\n", (UINTN)LockBoxParameterHeader->Command));
 
   switch (LockBoxParameterHeader->Command) {
   case EFI_SMM_LOCK_BOX_COMMAND_SAVE:
@@ -341,7 +341,7 @@ SmmLockBoxHandler (
 
   LockBoxParameterHeader->Command = (UINT32)-1;
 
-  DEBUG ((EFI_D_ERROR, "SmmLockBox SmmLockBoxHandler Exit\n"));
+  DEBUG ((DEBUG_INFO, "SmmLockBox SmmLockBoxHandler Exit\n"));
 
   return EFI_SUCCESS;
 }
diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
index eddd75a..76c240b 100644
--- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
+++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
@@ -13,7 +13,7 @@
   4. It save all the mapping info in NV variables which will be consumed
      by platform override protocol driver to publish the platform override protocol.
 
-Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2017, 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
@@ -1500,7 +1500,7 @@ GetDriver (
 
     Status = InitOverridesMapping (&mMappingDataBase);
     if (EFI_ERROR (Status)){
-      DEBUG ((DEBUG_ERROR, "The status to Get Platform Driver Override Variable is %r\n", Status));
+      DEBUG ((DEBUG_INFO, "The status to Get Platform Driver Override Variable is %r\n", Status));
       InitializeListHead (&mMappingDataBase);
       return EFI_NOT_FOUND;
     }
-- 
2.9.3.windows.2



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] SecurityPkg: Error Level is not used correctly
  2017-04-10  6:19 [PATCH 0/3] Error Level is not used correctly Jeff Fan
  2017-04-10  6:19 ` [PATCH 1/3] MdeModulePkg: " Jeff Fan
@ 2017-04-10  6:19 ` Jeff Fan
  2017-04-11  8:52   ` Yao, Jiewen
  2017-04-10  6:19 ` [PATCH 3/3] UefiCpuPkg: " Jeff Fan
  2 siblings, 1 reply; 7+ messages in thread
From: Jeff Fan @ 2017-04-10  6:19 UTC (permalink / raw)
  To: edk2-devel; +Cc: Jiewen Yao

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
 SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.c | 4 ++--
 SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.c | 4 ++--
 SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c                                | 2 +-
 SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c                                | 4 ++--
 SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c                                | 4 ++--
 SecurityPkg/Tcg/TrEEPei/TrEEPei.c                                | 4 ++--
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.c b/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.c
index 1e8c354..eedc439 100644
--- a/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.c
+++ b/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.c
@@ -3,7 +3,7 @@
   via PcdTpmInstanceGuid. Platform need make choice that which one will be final one.
   At most one TPM2 instance can be finally registered, and other will return unsupported.
 
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>
+Copyright (c) 2013 - 2017, 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
@@ -89,7 +89,7 @@ Tpm2RegisterTpm2DeviceLib (
   )
 {
   if (!CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &Tpm2Device->ProviderGuid)){
-    DEBUG ((EFI_D_ERROR, "WARNING: Tpm2RegisterTpm2DeviceLib - does not support %g registration\n", &Tpm2Device->ProviderGuid));
+    DEBUG ((DEBUG_WARN, "WARNING: Tpm2RegisterTpm2DeviceLib - does not support %g registration\n", &Tpm2Device->ProviderGuid));
     return EFI_UNSUPPORTED;
   }
 
diff --git a/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.c b/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.c
index 0211399..7470fe3 100644
--- a/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.c
+++ b/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.c
@@ -3,7 +3,7 @@
   via PcdTpmInstanceGuid. Platform need make choice that which one will be final one.
   At most one TPM2 instance can be finally registered, and other will return unsupported.
 
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>
+Copyright (c) 2013 - 2017, 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
@@ -120,7 +120,7 @@ Tpm2RegisterTpm2DeviceLib (
   TPM2_DEVICE_INTERFACE *Tpm2DeviceInterface;
 
   if (!CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &Tpm2Device->ProviderGuid)){
-    DEBUG ((EFI_D_ERROR, "WARNING: Tpm2RegisterTpm2DeviceLib - does not support %g registration\n", &Tpm2Device->ProviderGuid));
+    DEBUG ((DEBUG_WARN, "WARNING: Tpm2RegisterTpm2DeviceLib - does not support %g registration\n", &Tpm2Device->ProviderGuid));
     return EFI_UNSUPPORTED;
   }
 
diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
index 53de666..c2c52e3 100644
--- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
+++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
@@ -2466,7 +2466,7 @@ DriverEntry (
 
   if (CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceNoneGuid) ||
       CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceTpm12Guid)){
-    DEBUG ((EFI_D_ERROR, "No TPM2 instance required!\n"));
+    DEBUG ((DEBUG_INFO, "No TPM2 instance required!\n"));
     return EFI_UNSUPPORTED;
   }
 
diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
index 209d843..69adad4 100644
--- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
+++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
@@ -1,7 +1,7 @@
 /** @file
   Initialize TPM2 device and measure FVs before handing off control to DXE.
 
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2017, 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 
@@ -736,7 +736,7 @@ PeimEntryMA (
 
   if (CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceNoneGuid) ||
       CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceTpm12Guid)){
-    DEBUG ((EFI_D_ERROR, "No TPM2 instance required!\n"));
+    DEBUG ((DEBUG_INFO, "No TPM2 instance required!\n"));
     return EFI_UNSUPPORTED;
   }
 
diff --git a/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c b/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c
index fb69fa1..95e9d74 100644
--- a/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c
+++ b/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c
@@ -1,7 +1,7 @@
 /** @file
   This module implements TrEE Protocol.
   
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2013 - 2017, 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 
@@ -1733,7 +1733,7 @@ DriverEntry (
 
   if (CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceNoneGuid) ||
       CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceTpm12Guid)){
-    DEBUG ((EFI_D_ERROR, "No TPM2 instance required!\n"));
+    DEBUG ((DEBUG_INFO, "No TPM2 instance required!\n"));
     return EFI_UNSUPPORTED;
   }
 
diff --git a/SecurityPkg/Tcg/TrEEPei/TrEEPei.c b/SecurityPkg/Tcg/TrEEPei/TrEEPei.c
index 8d8639d..b561245 100644
--- a/SecurityPkg/Tcg/TrEEPei/TrEEPei.c
+++ b/SecurityPkg/Tcg/TrEEPei/TrEEPei.c
@@ -1,7 +1,7 @@
 /** @file
   Initialize TPM2 device and measure FVs before handing off control to DXE.
 
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2013 - 2017, 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 
@@ -597,7 +597,7 @@ PeimEntryMA (
 
   if (CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceNoneGuid) ||
       CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceTpm12Guid)){
-    DEBUG ((EFI_D_ERROR, "No TPM2 instance required!\n"));
+    DEBUG ((DEBUG_INFO, "No TPM2 instance required!\n"));
     return EFI_UNSUPPORTED;
   }
 
-- 
2.9.3.windows.2



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] UefiCpuPkg: Error Level is not used correctly
  2017-04-10  6:19 [PATCH 0/3] Error Level is not used correctly Jeff Fan
  2017-04-10  6:19 ` [PATCH 1/3] MdeModulePkg: " Jeff Fan
  2017-04-10  6:19 ` [PATCH 2/3] SecurityPkg: " Jeff Fan
@ 2017-04-10  6:19 ` Jeff Fan
  2017-04-11  7:16   ` Tian, Feng
  2 siblings, 1 reply; 7+ messages in thread
From: Jeff Fan @ 2017-04-10  6:19 UTC (permalink / raw)
  To: edk2-devel; +Cc: Feng Tian, Jiewen Yao

Cc: Feng Tian <feng.tian@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
 UefiCpuPkg/CpuDxe/CpuPageTable.c                  |  2 +-
 UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c | 68 +++++++++++------------
 2 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/UefiCpuPkg/CpuDxe/CpuPageTable.c b/UefiCpuPkg/CpuDxe/CpuPageTable.c
index ab664b4..2c61e75 100644
--- a/UefiCpuPkg/CpuDxe/CpuPageTable.c
+++ b/UefiCpuPkg/CpuDxe/CpuPageTable.c
@@ -634,10 +634,10 @@ ConvertMemoryPageAttributes (
   switch(CurrentPagingContext.MachineType) {
   case IMAGE_FILE_MACHINE_I386:
     if (CurrentPagingContext.ContextData.Ia32.PageTableBase == 0) {
-      DEBUG ((DEBUG_ERROR, "PageTable is 0!\n"));
       if (Attributes == 0) {
         return EFI_SUCCESS;
       } else {
+        DEBUG ((DEBUG_ERROR, "PageTable is 0!\n"));
         return EFI_UNSUPPORTED;
       }
     }
diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
index a9d1042..e53ed21 100644
--- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
+++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
@@ -4,7 +4,7 @@
   This module will execute the boot script saved during last boot and after that,
   control is passed to OS waking up handler.
 
-  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
   Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
 
   This program and the accompanying materials
@@ -531,7 +531,7 @@ S3ResumeBootOs (
       //
       // X64 long mode waking vector
       //
-      DEBUG (( EFI_D_ERROR, "Transfer to 64bit OS waking vector - %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
+      DEBUG ((DEBUG_INFO, "Transfer to 64bit OS waking vector - %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
       if (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) {
         AsmEnablePaging64 (
           0x38,
@@ -557,7 +557,7 @@ S3ResumeBootOs (
       //
       // IA32 protected mode waking vector (Page disabled)
       //
-      DEBUG (( EFI_D_ERROR, "Transfer to 32bit OS waking vector - %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
+      DEBUG ((DEBUG_INFO, "Transfer to 32bit OS waking vector - %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
       SwitchStack (
         (SWITCH_STACK_ENTRY_POINT) (UINTN) Facs->XFirmwareWakingVector,
         NULL,
@@ -569,7 +569,7 @@ S3ResumeBootOs (
     //
     // 16bit Realmode waking vector
     //
-    DEBUG (( EFI_D_ERROR, "Transfer to 16bit OS waking vector - %x\r\n", (UINTN)Facs->FirmwareWakingVector));
+    DEBUG ((DEBUG_INFO, "Transfer to 16bit OS waking vector - %x\r\n", (UINTN)Facs->FirmwareWakingVector));
     AsmTransferControl (Facs->FirmwareWakingVector, 0x0);
   }
 
@@ -630,7 +630,7 @@ RestoreS3PageTables (
     //
     // The assumption is : whole page table is allocated in CONTINUOUS memory and CR3 points to TOP page.
     //
-    DEBUG ((EFI_D_ERROR, "S3NvsPageTableAddress - %x (%x)\n", (UINTN)S3NvsPageTableAddress, (UINTN)Build4GPageTableOnly));
+    DEBUG ((DEBUG_INFO, "S3NvsPageTableAddress - %x (%x)\n", (UINTN)S3NvsPageTableAddress, (UINTN)Build4GPageTableOnly));
 
     //
     // By architecture only one PageMapLevel4 exists - so lets allocate storage for it.
@@ -783,7 +783,7 @@ S3ResumeExecuteBootScript (
   PEI_S3_RESUME_STATE        *PeiS3ResumeState;
   BOOLEAN                    InterruptStatus;
 
-  DEBUG ((EFI_D_ERROR, "S3ResumeExecuteBootScript()\n"));
+  DEBUG ((DEBUG_INFO, "S3ResumeExecuteBootScript()\n"));
 
   //
   // Attempt to use content from SMRAM first
@@ -810,13 +810,13 @@ S3ResumeExecuteBootScript (
                               (VOID **) &SmmAccess
                               );
     if (!EFI_ERROR (Status)) {
-      DEBUG ((EFI_D_ERROR, "Close all SMRAM regions before executing boot script\n"));
+      DEBUG ((DEBUG_INFO, "Close all SMRAM regions before executing boot script\n"));
   
       for (Index = 0, Status = EFI_SUCCESS; !EFI_ERROR (Status); Index++) {
         Status = SmmAccess->Close ((EFI_PEI_SERVICES **)GetPeiServicesTablePointer (), SmmAccess, Index);
       }
 
-      DEBUG ((EFI_D_ERROR, "Lock all SMRAM regions before executing boot script\n"));
+      DEBUG ((DEBUG_INFO, "Lock all SMRAM regions before executing boot script\n"));
   
       for (Index = 0, Status = EFI_SUCCESS; !EFI_ERROR (Status); Index++) {
         Status = SmmAccess->Lock ((EFI_PEI_SERVICES **)GetPeiServicesTablePointer (), SmmAccess, Index);
@@ -881,7 +881,7 @@ S3ResumeExecuteBootScript (
       );
     ASSERT (FALSE);
   }
-  DEBUG (( EFI_D_ERROR, "PeiS3ResumeState - %x\r\n", PeiS3ResumeState));
+  DEBUG ((DEBUG_INFO, "PeiS3ResumeState - %x\r\n", PeiS3ResumeState));
   PeiS3ResumeState->ReturnCs           = 0x10;
   PeiS3ResumeState->ReturnEntryPoint   = (EFI_PHYSICAL_ADDRESS)(UINTN)S3ResumeBootOs;
   PeiS3ResumeState->ReturnStackPointer = (EFI_PHYSICAL_ADDRESS)STACK_ALIGN_DOWN (&Status);
@@ -901,7 +901,7 @@ S3ResumeExecuteBootScript (
     //
     // X64 S3 Resume
     //
-    DEBUG (( EFI_D_ERROR, "Enable X64 and transfer control to Standalone Boot Script Executor\r\n"));
+    DEBUG ((DEBUG_INFO, "Enable X64 and transfer control to Standalone Boot Script Executor\r\n"));
 
     //
     // Switch to long mode to complete resume.
@@ -917,7 +917,7 @@ S3ResumeExecuteBootScript (
     //
     // IA32 S3 Resume
     //
-    DEBUG (( EFI_D_ERROR, "transfer control to Standalone Boot Script Executor\r\n"));
+    DEBUG ((DEBUG_INFO, "transfer control to Standalone Boot Script Executor\r\n"));
     SwitchStack (
       (SWITCH_STACK_ENTRY_POINT) (UINTN) EfiBootScriptExecutorVariable->BootScriptExecutorEntrypoint,
       (VOID *)AcpiS3Context,
@@ -985,7 +985,7 @@ S3RestoreConfig2 (
   TempAcpiS3Context = 0;
   TempEfiBootScriptExecutorVariable = 0;
 
-  DEBUG ((EFI_D_ERROR, "Enter S3 PEIM\r\n"));
+  DEBUG ((DEBUG_INFO, "Enter S3 PEIM\r\n"));
 
   VarSize = sizeof (EFI_PHYSICAL_ADDRESS);
   Status = RestoreLockBox (
@@ -1023,15 +1023,15 @@ S3RestoreConfig2 (
   EfiBootScriptExecutorVariable = (BOOT_SCRIPT_EXECUTOR_VARIABLE *) (UINTN) TempEfiBootScriptExecutorVariable;
   ASSERT (EfiBootScriptExecutorVariable != NULL);
 
-  DEBUG (( EFI_D_ERROR, "AcpiS3Context = %x\n", AcpiS3Context));
-  DEBUG (( EFI_D_ERROR, "Waking Vector = %x\n", ((EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE *) ((UINTN) (AcpiS3Context->AcpiFacsTable)))->FirmwareWakingVector));
-  DEBUG (( EFI_D_ERROR, "AcpiS3Context->AcpiFacsTable = %x\n", AcpiS3Context->AcpiFacsTable));
-  DEBUG (( EFI_D_ERROR, "AcpiS3Context->IdtrProfile = %x\n", AcpiS3Context->IdtrProfile));  
-  DEBUG (( EFI_D_ERROR, "AcpiS3Context->S3NvsPageTableAddress = %x\n", AcpiS3Context->S3NvsPageTableAddress));
-  DEBUG (( EFI_D_ERROR, "AcpiS3Context->S3DebugBufferAddress = %x\n", AcpiS3Context->S3DebugBufferAddress));
-  DEBUG (( EFI_D_ERROR, "AcpiS3Context->BootScriptStackBase = %x\n", AcpiS3Context->BootScriptStackBase));
-  DEBUG (( EFI_D_ERROR, "AcpiS3Context->BootScriptStackSize = %x\n", AcpiS3Context->BootScriptStackSize));
-  DEBUG (( EFI_D_ERROR, "EfiBootScriptExecutorVariable->BootScriptExecutorEntrypoint = %x\n", EfiBootScriptExecutorVariable->BootScriptExecutorEntrypoint));
+  DEBUG (( DEBUG_INFO, "AcpiS3Context = %x\n", AcpiS3Context));
+  DEBUG (( DEBUG_INFO, "Waking Vector = %x\n", ((EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE *) ((UINTN) (AcpiS3Context->AcpiFacsTable)))->FirmwareWakingVector));
+  DEBUG (( DEBUG_INFO, "AcpiS3Context->AcpiFacsTable = %x\n", AcpiS3Context->AcpiFacsTable));
+  DEBUG (( DEBUG_INFO, "AcpiS3Context->IdtrProfile = %x\n", AcpiS3Context->IdtrProfile));  
+  DEBUG (( DEBUG_INFO, "AcpiS3Context->S3NvsPageTableAddress = %x\n", AcpiS3Context->S3NvsPageTableAddress));
+  DEBUG (( DEBUG_INFO, "AcpiS3Context->S3DebugBufferAddress = %x\n", AcpiS3Context->S3DebugBufferAddress));
+  DEBUG (( DEBUG_INFO, "AcpiS3Context->BootScriptStackBase = %x\n", AcpiS3Context->BootScriptStackBase));
+  DEBUG (( DEBUG_INFO, "AcpiS3Context->BootScriptStackSize = %x\n", AcpiS3Context->BootScriptStackSize));
+  DEBUG (( DEBUG_INFO, "EfiBootScriptExecutorVariable->BootScriptExecutorEntrypoint = %x\n", EfiBootScriptExecutorVariable->BootScriptExecutorEntrypoint));
 
   //
   // Additional step for BootScript integrity - we only handle BootScript and BootScriptExecutor.
@@ -1081,19 +1081,19 @@ S3RestoreConfig2 (
     SmmS3ResumeState->ReturnContext2     = (EFI_PHYSICAL_ADDRESS)(UINTN)EfiBootScriptExecutorVariable;
     SmmS3ResumeState->ReturnStackPointer = (EFI_PHYSICAL_ADDRESS)STACK_ALIGN_DOWN (&Status);
 
-    DEBUG (( EFI_D_ERROR, "SMM S3 Signature                = %x\n", SmmS3ResumeState->Signature));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Stack Base               = %x\n", SmmS3ResumeState->SmmS3StackBase));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Stack Size               = %x\n", SmmS3ResumeState->SmmS3StackSize));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Resume Entry Point       = %x\n", SmmS3ResumeState->SmmS3ResumeEntryPoint));
-    DEBUG (( EFI_D_ERROR, "SMM S3 CR0                      = %x\n", SmmS3ResumeState->SmmS3Cr0));
-    DEBUG (( EFI_D_ERROR, "SMM S3 CR3                      = %x\n", SmmS3ResumeState->SmmS3Cr3));
-    DEBUG (( EFI_D_ERROR, "SMM S3 CR4                      = %x\n", SmmS3ResumeState->SmmS3Cr4));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Return CS                = %x\n", SmmS3ResumeState->ReturnCs));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Return Entry Point       = %x\n", SmmS3ResumeState->ReturnEntryPoint));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Return Context1          = %x\n", SmmS3ResumeState->ReturnContext1));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Return Context2          = %x\n", SmmS3ResumeState->ReturnContext2));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Return Stack Pointer     = %x\n", SmmS3ResumeState->ReturnStackPointer));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Smst                     = %x\n", SmmS3ResumeState->Smst));
+    DEBUG (( DEBUG_INFO, "SMM S3 Signature                = %x\n", SmmS3ResumeState->Signature));
+    DEBUG (( DEBUG_INFO, "SMM S3 Stack Base               = %x\n", SmmS3ResumeState->SmmS3StackBase));
+    DEBUG (( DEBUG_INFO, "SMM S3 Stack Size               = %x\n", SmmS3ResumeState->SmmS3StackSize));
+    DEBUG (( DEBUG_INFO, "SMM S3 Resume Entry Point       = %x\n", SmmS3ResumeState->SmmS3ResumeEntryPoint));
+    DEBUG (( DEBUG_INFO, "SMM S3 CR0                      = %x\n", SmmS3ResumeState->SmmS3Cr0));
+    DEBUG (( DEBUG_INFO, "SMM S3 CR3                      = %x\n", SmmS3ResumeState->SmmS3Cr3));
+    DEBUG (( DEBUG_INFO, "SMM S3 CR4                      = %x\n", SmmS3ResumeState->SmmS3Cr4));
+    DEBUG (( DEBUG_INFO, "SMM S3 Return CS                = %x\n", SmmS3ResumeState->ReturnCs));
+    DEBUG (( DEBUG_INFO, "SMM S3 Return Entry Point       = %x\n", SmmS3ResumeState->ReturnEntryPoint));
+    DEBUG (( DEBUG_INFO, "SMM S3 Return Context1          = %x\n", SmmS3ResumeState->ReturnContext1));
+    DEBUG (( DEBUG_INFO, "SMM S3 Return Context2          = %x\n", SmmS3ResumeState->ReturnContext2));
+    DEBUG (( DEBUG_INFO, "SMM S3 Return Stack Pointer     = %x\n", SmmS3ResumeState->ReturnStackPointer));
+    DEBUG (( DEBUG_INFO, "SMM S3 Smst                     = %x\n", SmmS3ResumeState->Smst));
 
     if (SmmS3ResumeState->Signature == SMM_S3_RESUME_SMM_32) {
       SwitchStack (
-- 
2.9.3.windows.2



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] MdeModulePkg: Error Level is not used correctly
  2017-04-10  6:19 ` [PATCH 1/3] MdeModulePkg: " Jeff Fan
@ 2017-04-11  7:16   ` Tian, Feng
  0 siblings, 0 replies; 7+ messages in thread
From: Tian, Feng @ 2017-04-11  7:16 UTC (permalink / raw)
  To: Fan, Jeff, edk2-devel@lists.01.org; +Cc: Tian, Feng

Reviewed-by: Feng Tian <feng.tian@intel.com>

-----Original Message-----
From: Fan, Jeff 
Sent: Monday, April 10, 2017 2:20 PM
To: edk2-devel@lists.01.org
Cc: Tian, Feng <feng.tian@intel.com>
Subject: [PATCH 1/3] MdeModulePkg: Error Level is not used correctly

Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
 .../Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c       | 10 +++++-----
 .../Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c     |  4 ++--
 MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c |  2 +-
 MdeModulePkg/Universal/CapsulePei/UefiCapsule.c                |  2 +-
 .../Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c      |  4 ++--
 MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c         | 10 +++++-----
 .../Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c      |  4 ++--
 7 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c
index 5147e66..4545d6e 100644
--- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c
+++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c
@@ -103,7 +103,7 @@ S3BootScriptExecutorEntryFunction (
       //
       // X64 S3 Resume
       //
-      DEBUG ((EFI_D_ERROR, "Call AsmDisablePaging64() to return to S3 Resume in PEI Phase\n"));
+      DEBUG ((DEBUG_INFO, "Call AsmDisablePaging64() to return to S3 
+ Resume in PEI Phase\n"));
       PeiS3ResumeState->AsmTransferControl = (EFI_PHYSICAL_ADDRESS)(UINTN)AsmTransferControl32;
 
       if ((Facs != NULL) &&
@@ -128,7 +128,7 @@ S3BootScriptExecutorEntryFunction (
       //
       // IA32 S3 Resume
       //
-      DEBUG ((EFI_D_ERROR, "Call SwitchStack() to return to S3 Resume in PEI Phase\n"));
+      DEBUG ((DEBUG_INFO, "Call SwitchStack() to return to S3 Resume in 
+ PEI Phase\n"));
       PeiS3ResumeState->AsmTransferControl = (EFI_PHYSICAL_ADDRESS)(UINTN)AsmTransferControl;
 
       SwitchStack (
@@ -160,7 +160,7 @@ S3BootScriptExecutorEntryFunction (
       //
       // X64 long mode waking vector
       //
-      DEBUG (( EFI_D_ERROR, "Transfer to 64bit OS waking vector - %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
+      DEBUG ((DEBUG_INFO, "Transfer to 64bit OS waking vector - 
+ %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
       if (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) {
         SwitchStack (
           (SWITCH_STACK_ENTRY_POINT)(UINTN)Facs->XFirmwareWakingVector,
@@ -177,7 +177,7 @@ S3BootScriptExecutorEntryFunction (
       //
       // IA32 protected mode waking vector (Page disabled)
       //
-      DEBUG (( EFI_D_ERROR, "Transfer to 32bit OS waking vector - %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
+      DEBUG ((DEBUG_INFO, "Transfer to 32bit OS waking vector - 
+ %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
       if (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) {
         AsmDisablePaging64 (
           0x10,
@@ -199,7 +199,7 @@ S3BootScriptExecutorEntryFunction (
     //
     // 16bit Realmode waking vector
     //
-    DEBUG (( EFI_D_ERROR, "Transfer to 16bit OS waking vector - %x\r\n", (UINTN)Facs->FirmwareWakingVector));
+    DEBUG ((DEBUG_INFO, "Transfer to 16bit OS waking vector - %x\r\n", 
+ (UINTN)Facs->FirmwareWakingVector));
     AsmTransferControl (Facs->FirmwareWakingVector, 0x0);
   }
 
diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c
index d433cf1..70eecf5 100644
--- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c
+++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.
+++ c
@@ -3,7 +3,7 @@
 
   Set a IDT entry for interrupt vector 3 for debug purpose for x64 platform
 
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
 Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
 
 
@@ -234,7 +234,7 @@ PageFaultHandler (
   UINTN          PTIndex;
 
   PFAddress = AsmReadCr2 ();
-  DEBUG ((EFI_D_ERROR, "BootScript - PageFaultHandler: Cr2 - %lx\n", PFAddress));
+  DEBUG ((DEBUG_INFO, "BootScript - PageFaultHandler: Cr2 - %lx\n", 
+ PFAddress));
 
   if (PFAddress >= mPhyMask + SIZE_4KB) {
     return FALSE;
diff --git a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c
index dcfd61c..3c05558 100644
--- a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c
+++ b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c
@@ -407,7 +407,7 @@ S3AllocatePageTablesBuffer (
     }
 
     TotalPageTableSize += ExtraPageTablePages;
-    DEBUG ((EFI_D_ERROR, "AcpiS3ContextSave TotalPageTableSize - 0x%x pages\n", TotalPageTableSize));
+    DEBUG ((DEBUG_INFO, "AcpiS3ContextSave TotalPageTableSize - 0x%x 
+ pages\n", TotalPageTableSize));
 
     //
     // By architecture only one PageMapLevel4 exists - so lets allocate storage for it.
diff --git a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c
index d61d5ff..cca455e 100644
--- a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c
+++ b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c
@@ -763,7 +763,7 @@ GetCapsuleDescriptors (
                                         (VOID *) &CapsuleDataPtr64
                                         );
         if (EFI_ERROR (Status)) {
-          DEBUG ((EFI_D_ERROR, "Capsule -- capsule variable not set\n"));
+          DEBUG ((DEBUG_INFO, "Capsule -- capsule variable not 
+ set\n"));
           return EFI_NOT_FOUND;
         }
         //
diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c b/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c
index 7e0dd5c..b0512fd 100644
--- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c
+++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c
@@ -2,7 +2,7 @@
   Create the variable to save the base address of page table and stack
   for transferring into long mode in IA32 capsule PEI.
 
-Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2017, 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 @@ -160,7 +160,7 @@ PrepareContextForCapsulePei (
     TotalPagesNum = NumberOfPml4EntriesNeeded + 1;
   }
   TotalPagesNum += ExtraPageTablePages;
-  DEBUG ((EFI_D_ERROR, "CapsuleRuntimeDxe X64 TotalPagesNum - 0x%x pages\n", TotalPagesNum));
+  DEBUG ((DEBUG_INFO, "CapsuleRuntimeDxe X64 TotalPagesNum - 0x%x 
+ pages\n", TotalPagesNum));
 
   LongModeBuffer.PageTableAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateReservedMemoryBelow4G (EFI_PAGES_TO_SIZE (TotalPagesNum));
   ASSERT (LongModeBuffer.PageTableAddress != 0); diff --git a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c
index f1880d4..2dc8815 100644
--- a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c
+++ b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c
@@ -9,7 +9,7 @@
   SmmLockBoxHandler(), SmmLockBoxRestore(), SmmLockBoxUpdate(), SmmLockBoxSave()
   will receive untrusted input and do basic validation.
 
-Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
 
 This program and the accompanying materials  are licensed and made available under the terms and conditions @@ -267,7 +267,7 @@ SmmLockBoxHandler (
   EFI_SMM_LOCK_BOX_PARAMETER_HEADER *LockBoxParameterHeader;
   UINTN                             TempCommBufferSize;
 
-  DEBUG ((EFI_D_ERROR, "SmmLockBox SmmLockBoxHandler Enter\n"));
+  DEBUG ((DEBUG_INFO, "SmmLockBox SmmLockBoxHandler Enter\n"));
 
   //
   // If input is invalid, stop processing this SMI @@ -294,9 +294,9 @@ SmmLockBoxHandler (
 
   LockBoxParameterHeader->ReturnStatus = (UINT64)-1;
 
-  DEBUG ((EFI_D_ERROR, "SmmLockBox LockBoxParameterHeader - %x\n", (UINTN)LockBoxParameterHeader));
+  DEBUG ((DEBUG_INFO, "SmmLockBox LockBoxParameterHeader - %x\n", 
+ (UINTN)LockBoxParameterHeader));
 
-  DEBUG ((EFI_D_ERROR, "SmmLockBox Command - %x\n", (UINTN)LockBoxParameterHeader->Command));
+  DEBUG ((DEBUG_INFO, "SmmLockBox Command - %x\n", 
+ (UINTN)LockBoxParameterHeader->Command));
 
   switch (LockBoxParameterHeader->Command) {
   case EFI_SMM_LOCK_BOX_COMMAND_SAVE:
@@ -341,7 +341,7 @@ SmmLockBoxHandler (
 
   LockBoxParameterHeader->Command = (UINT32)-1;
 
-  DEBUG ((EFI_D_ERROR, "SmmLockBox SmmLockBoxHandler Exit\n"));
+  DEBUG ((DEBUG_INFO, "SmmLockBox SmmLockBoxHandler Exit\n"));
 
   return EFI_SUCCESS;
 }
diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
index eddd75a..76c240b 100644
--- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
+++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
@@ -13,7 +13,7 @@
   4. It save all the mapping info in NV variables which will be consumed
      by platform override protocol driver to publish the platform override protocol.
 
-Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2017, 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 @@ -1500,7 +1500,7 @@ GetDriver (
 
     Status = InitOverridesMapping (&mMappingDataBase);
     if (EFI_ERROR (Status)){
-      DEBUG ((DEBUG_ERROR, "The status to Get Platform Driver Override Variable is %r\n", Status));
+      DEBUG ((DEBUG_INFO, "The status to Get Platform Driver Override 
+ Variable is %r\n", Status));
       InitializeListHead (&mMappingDataBase);
       return EFI_NOT_FOUND;
     }
--
2.9.3.windows.2



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] UefiCpuPkg: Error Level is not used correctly
  2017-04-10  6:19 ` [PATCH 3/3] UefiCpuPkg: " Jeff Fan
@ 2017-04-11  7:16   ` Tian, Feng
  0 siblings, 0 replies; 7+ messages in thread
From: Tian, Feng @ 2017-04-11  7:16 UTC (permalink / raw)
  To: Fan, Jeff, edk2-devel@lists.01.org; +Cc: Yao, Jiewen, Tian, Feng

Reviewed-by: Feng Tian <feng.tian@intel.com>

-----Original Message-----
From: Fan, Jeff 
Sent: Monday, April 10, 2017 2:20 PM
To: edk2-devel@lists.01.org
Cc: Tian, Feng <feng.tian@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>
Subject: [PATCH 3/3] UefiCpuPkg: Error Level is not used correctly

Cc: Feng Tian <feng.tian@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
 UefiCpuPkg/CpuDxe/CpuPageTable.c                  |  2 +-
 UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c | 68 +++++++++++------------
 2 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/UefiCpuPkg/CpuDxe/CpuPageTable.c b/UefiCpuPkg/CpuDxe/CpuPageTable.c
index ab664b4..2c61e75 100644
--- a/UefiCpuPkg/CpuDxe/CpuPageTable.c
+++ b/UefiCpuPkg/CpuDxe/CpuPageTable.c
@@ -634,10 +634,10 @@ ConvertMemoryPageAttributes (
   switch(CurrentPagingContext.MachineType) {
   case IMAGE_FILE_MACHINE_I386:
     if (CurrentPagingContext.ContextData.Ia32.PageTableBase == 0) {
-      DEBUG ((DEBUG_ERROR, "PageTable is 0!\n"));
       if (Attributes == 0) {
         return EFI_SUCCESS;
       } else {
+        DEBUG ((DEBUG_ERROR, "PageTable is 0!\n"));
         return EFI_UNSUPPORTED;
       }
     }
diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
index a9d1042..e53ed21 100644
--- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
+++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
@@ -4,7 +4,7 @@
   This module will execute the boot script saved during last boot and after that,
   control is passed to OS waking up handler.
 
-  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2017, Intel Corporation. All rights 
+ reserved.<BR>
   Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
 
   This program and the accompanying materials @@ -531,7 +531,7 @@ S3ResumeBootOs (
       //
       // X64 long mode waking vector
       //
-      DEBUG (( EFI_D_ERROR, "Transfer to 64bit OS waking vector - %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
+      DEBUG ((DEBUG_INFO, "Transfer to 64bit OS waking vector - 
+ %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
       if (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) {
         AsmEnablePaging64 (
           0x38,
@@ -557,7 +557,7 @@ S3ResumeBootOs (
       //
       // IA32 protected mode waking vector (Page disabled)
       //
-      DEBUG (( EFI_D_ERROR, "Transfer to 32bit OS waking vector - %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
+      DEBUG ((DEBUG_INFO, "Transfer to 32bit OS waking vector - 
+ %x\r\n", (UINTN)Facs->XFirmwareWakingVector));
       SwitchStack (
         (SWITCH_STACK_ENTRY_POINT) (UINTN) Facs->XFirmwareWakingVector,
         NULL,
@@ -569,7 +569,7 @@ S3ResumeBootOs (
     //
     // 16bit Realmode waking vector
     //
-    DEBUG (( EFI_D_ERROR, "Transfer to 16bit OS waking vector - %x\r\n", (UINTN)Facs->FirmwareWakingVector));
+    DEBUG ((DEBUG_INFO, "Transfer to 16bit OS waking vector - %x\r\n", 
+ (UINTN)Facs->FirmwareWakingVector));
     AsmTransferControl (Facs->FirmwareWakingVector, 0x0);
   }
 
@@ -630,7 +630,7 @@ RestoreS3PageTables (
     //
     // The assumption is : whole page table is allocated in CONTINUOUS memory and CR3 points to TOP page.
     //
-    DEBUG ((EFI_D_ERROR, "S3NvsPageTableAddress - %x (%x)\n", (UINTN)S3NvsPageTableAddress, (UINTN)Build4GPageTableOnly));
+    DEBUG ((DEBUG_INFO, "S3NvsPageTableAddress - %x (%x)\n", 
+ (UINTN)S3NvsPageTableAddress, (UINTN)Build4GPageTableOnly));
 
     //
     // By architecture only one PageMapLevel4 exists - so lets allocate storage for it.
@@ -783,7 +783,7 @@ S3ResumeExecuteBootScript (
   PEI_S3_RESUME_STATE        *PeiS3ResumeState;
   BOOLEAN                    InterruptStatus;
 
-  DEBUG ((EFI_D_ERROR, "S3ResumeExecuteBootScript()\n"));
+  DEBUG ((DEBUG_INFO, "S3ResumeExecuteBootScript()\n"));
 
   //
   // Attempt to use content from SMRAM first @@ -810,13 +810,13 @@ S3ResumeExecuteBootScript (
                               (VOID **) &SmmAccess
                               );
     if (!EFI_ERROR (Status)) {
-      DEBUG ((EFI_D_ERROR, "Close all SMRAM regions before executing boot script\n"));
+      DEBUG ((DEBUG_INFO, "Close all SMRAM regions before executing 
+ boot script\n"));
   
       for (Index = 0, Status = EFI_SUCCESS; !EFI_ERROR (Status); Index++) {
         Status = SmmAccess->Close ((EFI_PEI_SERVICES **)GetPeiServicesTablePointer (), SmmAccess, Index);
       }
 
-      DEBUG ((EFI_D_ERROR, "Lock all SMRAM regions before executing boot script\n"));
+      DEBUG ((DEBUG_INFO, "Lock all SMRAM regions before executing boot 
+ script\n"));
   
       for (Index = 0, Status = EFI_SUCCESS; !EFI_ERROR (Status); Index++) {
         Status = SmmAccess->Lock ((EFI_PEI_SERVICES **)GetPeiServicesTablePointer (), SmmAccess, Index); @@ -881,7 +881,7 @@ S3ResumeExecuteBootScript (
       );
     ASSERT (FALSE);
   }
-  DEBUG (( EFI_D_ERROR, "PeiS3ResumeState - %x\r\n", PeiS3ResumeState));
+  DEBUG ((DEBUG_INFO, "PeiS3ResumeState - %x\r\n", PeiS3ResumeState));
   PeiS3ResumeState->ReturnCs           = 0x10;
   PeiS3ResumeState->ReturnEntryPoint   = (EFI_PHYSICAL_ADDRESS)(UINTN)S3ResumeBootOs;
   PeiS3ResumeState->ReturnStackPointer = (EFI_PHYSICAL_ADDRESS)STACK_ALIGN_DOWN (&Status); @@ -901,7 +901,7 @@ S3ResumeExecuteBootScript (
     //
     // X64 S3 Resume
     //
-    DEBUG (( EFI_D_ERROR, "Enable X64 and transfer control to Standalone Boot Script Executor\r\n"));
+    DEBUG ((DEBUG_INFO, "Enable X64 and transfer control to Standalone 
+ Boot Script Executor\r\n"));
 
     //
     // Switch to long mode to complete resume.
@@ -917,7 +917,7 @@ S3ResumeExecuteBootScript (
     //
     // IA32 S3 Resume
     //
-    DEBUG (( EFI_D_ERROR, "transfer control to Standalone Boot Script Executor\r\n"));
+    DEBUG ((DEBUG_INFO, "transfer control to Standalone Boot Script 
+ Executor\r\n"));
     SwitchStack (
       (SWITCH_STACK_ENTRY_POINT) (UINTN) EfiBootScriptExecutorVariable->BootScriptExecutorEntrypoint,
       (VOID *)AcpiS3Context,
@@ -985,7 +985,7 @@ S3RestoreConfig2 (
   TempAcpiS3Context = 0;
   TempEfiBootScriptExecutorVariable = 0;
 
-  DEBUG ((EFI_D_ERROR, "Enter S3 PEIM\r\n"));
+  DEBUG ((DEBUG_INFO, "Enter S3 PEIM\r\n"));
 
   VarSize = sizeof (EFI_PHYSICAL_ADDRESS);
   Status = RestoreLockBox (
@@ -1023,15 +1023,15 @@ S3RestoreConfig2 (
   EfiBootScriptExecutorVariable = (BOOT_SCRIPT_EXECUTOR_VARIABLE *) (UINTN) TempEfiBootScriptExecutorVariable;
   ASSERT (EfiBootScriptExecutorVariable != NULL);
 
-  DEBUG (( EFI_D_ERROR, "AcpiS3Context = %x\n", AcpiS3Context));
-  DEBUG (( EFI_D_ERROR, "Waking Vector = %x\n", ((EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE *) ((UINTN) (AcpiS3Context->AcpiFacsTable)))->FirmwareWakingVector));
-  DEBUG (( EFI_D_ERROR, "AcpiS3Context->AcpiFacsTable = %x\n", AcpiS3Context->AcpiFacsTable));
-  DEBUG (( EFI_D_ERROR, "AcpiS3Context->IdtrProfile = %x\n", AcpiS3Context->IdtrProfile));
-  DEBUG (( EFI_D_ERROR, "AcpiS3Context->S3NvsPageTableAddress = %x\n", AcpiS3Context->S3NvsPageTableAddress));
-  DEBUG (( EFI_D_ERROR, "AcpiS3Context->S3DebugBufferAddress = %x\n", AcpiS3Context->S3DebugBufferAddress));
-  DEBUG (( EFI_D_ERROR, "AcpiS3Context->BootScriptStackBase = %x\n", AcpiS3Context->BootScriptStackBase));
-  DEBUG (( EFI_D_ERROR, "AcpiS3Context->BootScriptStackSize = %x\n", AcpiS3Context->BootScriptStackSize));
-  DEBUG (( EFI_D_ERROR, "EfiBootScriptExecutorVariable->BootScriptExecutorEntrypoint = %x\n", EfiBootScriptExecutorVariable->BootScriptExecutorEntrypoint));
+  DEBUG (( DEBUG_INFO, "AcpiS3Context = %x\n", AcpiS3Context));  DEBUG 
+ (( DEBUG_INFO, "Waking Vector = %x\n", 
+ ((EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE *) ((UINTN) 
+ (AcpiS3Context->AcpiFacsTable)))->FirmwareWakingVector));
+  DEBUG (( DEBUG_INFO, "AcpiS3Context->AcpiFacsTable = %x\n", 
+ AcpiS3Context->AcpiFacsTable));  DEBUG (( DEBUG_INFO, 
+ "AcpiS3Context->IdtrProfile = %x\n", AcpiS3Context->IdtrProfile));  
+ DEBUG (( DEBUG_INFO, "AcpiS3Context->S3NvsPageTableAddress = %x\n", 
+ AcpiS3Context->S3NvsPageTableAddress));
+  DEBUG (( DEBUG_INFO, "AcpiS3Context->S3DebugBufferAddress = %x\n", 
+ AcpiS3Context->S3DebugBufferAddress));
+  DEBUG (( DEBUG_INFO, "AcpiS3Context->BootScriptStackBase = %x\n", 
+ AcpiS3Context->BootScriptStackBase));
+  DEBUG (( DEBUG_INFO, "AcpiS3Context->BootScriptStackSize = %x\n", 
+ AcpiS3Context->BootScriptStackSize));
+  DEBUG (( DEBUG_INFO, 
+ "EfiBootScriptExecutorVariable->BootScriptExecutorEntrypoint = %x\n", 
+ EfiBootScriptExecutorVariable->BootScriptExecutorEntrypoint));
 
   //
   // Additional step for BootScript integrity - we only handle BootScript and BootScriptExecutor.
@@ -1081,19 +1081,19 @@ S3RestoreConfig2 (
     SmmS3ResumeState->ReturnContext2     = (EFI_PHYSICAL_ADDRESS)(UINTN)EfiBootScriptExecutorVariable;
     SmmS3ResumeState->ReturnStackPointer = (EFI_PHYSICAL_ADDRESS)STACK_ALIGN_DOWN (&Status);
 
-    DEBUG (( EFI_D_ERROR, "SMM S3 Signature                = %x\n", SmmS3ResumeState->Signature));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Stack Base               = %x\n", SmmS3ResumeState->SmmS3StackBase));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Stack Size               = %x\n", SmmS3ResumeState->SmmS3StackSize));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Resume Entry Point       = %x\n", SmmS3ResumeState->SmmS3ResumeEntryPoint));
-    DEBUG (( EFI_D_ERROR, "SMM S3 CR0                      = %x\n", SmmS3ResumeState->SmmS3Cr0));
-    DEBUG (( EFI_D_ERROR, "SMM S3 CR3                      = %x\n", SmmS3ResumeState->SmmS3Cr3));
-    DEBUG (( EFI_D_ERROR, "SMM S3 CR4                      = %x\n", SmmS3ResumeState->SmmS3Cr4));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Return CS                = %x\n", SmmS3ResumeState->ReturnCs));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Return Entry Point       = %x\n", SmmS3ResumeState->ReturnEntryPoint));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Return Context1          = %x\n", SmmS3ResumeState->ReturnContext1));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Return Context2          = %x\n", SmmS3ResumeState->ReturnContext2));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Return Stack Pointer     = %x\n", SmmS3ResumeState->ReturnStackPointer));
-    DEBUG (( EFI_D_ERROR, "SMM S3 Smst                     = %x\n", SmmS3ResumeState->Smst));
+    DEBUG (( DEBUG_INFO, "SMM S3 Signature                = %x\n", SmmS3ResumeState->Signature));
+    DEBUG (( DEBUG_INFO, "SMM S3 Stack Base               = %x\n", SmmS3ResumeState->SmmS3StackBase));
+    DEBUG (( DEBUG_INFO, "SMM S3 Stack Size               = %x\n", SmmS3ResumeState->SmmS3StackSize));
+    DEBUG (( DEBUG_INFO, "SMM S3 Resume Entry Point       = %x\n", SmmS3ResumeState->SmmS3ResumeEntryPoint));
+    DEBUG (( DEBUG_INFO, "SMM S3 CR0                      = %x\n", SmmS3ResumeState->SmmS3Cr0));
+    DEBUG (( DEBUG_INFO, "SMM S3 CR3                      = %x\n", SmmS3ResumeState->SmmS3Cr3));
+    DEBUG (( DEBUG_INFO, "SMM S3 CR4                      = %x\n", SmmS3ResumeState->SmmS3Cr4));
+    DEBUG (( DEBUG_INFO, "SMM S3 Return CS                = %x\n", SmmS3ResumeState->ReturnCs));
+    DEBUG (( DEBUG_INFO, "SMM S3 Return Entry Point       = %x\n", SmmS3ResumeState->ReturnEntryPoint));
+    DEBUG (( DEBUG_INFO, "SMM S3 Return Context1          = %x\n", SmmS3ResumeState->ReturnContext1));
+    DEBUG (( DEBUG_INFO, "SMM S3 Return Context2          = %x\n", SmmS3ResumeState->ReturnContext2));
+    DEBUG (( DEBUG_INFO, "SMM S3 Return Stack Pointer     = %x\n", SmmS3ResumeState->ReturnStackPointer));
+    DEBUG (( DEBUG_INFO, "SMM S3 Smst                     = %x\n", SmmS3ResumeState->Smst));
 
     if (SmmS3ResumeState->Signature == SMM_S3_RESUME_SMM_32) {
       SwitchStack (
--
2.9.3.windows.2



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] SecurityPkg: Error Level is not used correctly
  2017-04-10  6:19 ` [PATCH 2/3] SecurityPkg: " Jeff Fan
@ 2017-04-11  8:52   ` Yao, Jiewen
  0 siblings, 0 replies; 7+ messages in thread
From: Yao, Jiewen @ 2017-04-11  8:52 UTC (permalink / raw)
  To: Fan, Jeff, edk2-devel@lists.01.org

Reviewed-by: jiewen.yao@intel.com

> -----Original Message-----
> From: Fan, Jeff
> Sent: Monday, April 10, 2017 2:20 PM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen.yao@intel.com>
> Subject: [PATCH 2/3] SecurityPkg: Error Level is not used correctly
> 
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff.fan@intel.com>
> ---
>  SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.c | 4 ++--
>  SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.c | 4 ++--
>  SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c                                | 2 +-
>  SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c                                | 4 ++--
>  SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c                                | 4 ++--
>  SecurityPkg/Tcg/TrEEPei/TrEEPei.c                                | 4 ++--
>  6 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git
> a/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.c
> b/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.c
> index 1e8c354..eedc439 100644
> --- a/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.c
> +++ b/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.c
> @@ -3,7 +3,7 @@
>    via PcdTpmInstanceGuid. Platform need make choice that which one will be
> final one.
>    At most one TPM2 instance can be finally registered, and other will return
> unsupported.
> 
> -Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>
> +Copyright (c) 2013 - 2017, 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
> @@ -89,7 +89,7 @@ Tpm2RegisterTpm2DeviceLib (
>    )
>  {
>    if (!CompareGuid (PcdGetPtr(PcdTpmInstanceGuid),
> &Tpm2Device->ProviderGuid)){
> -    DEBUG ((EFI_D_ERROR, "WARNING: Tpm2RegisterTpm2DeviceLib - does
> not support %g registration\n", &Tpm2Device->ProviderGuid));
> +    DEBUG ((DEBUG_WARN, "WARNING: Tpm2RegisterTpm2DeviceLib - does
> not support %g registration\n", &Tpm2Device->ProviderGuid));
>      return EFI_UNSUPPORTED;
>    }
> 
> diff --git a/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.c
> b/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.c
> index 0211399..7470fe3 100644
> --- a/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.c
> +++ b/SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.c
> @@ -3,7 +3,7 @@
>    via PcdTpmInstanceGuid. Platform need make choice that which one will be
> final one.
>    At most one TPM2 instance can be finally registered, and other will return
> unsupported.
> 
> -Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>
> +Copyright (c) 2013 - 2017, 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
> @@ -120,7 +120,7 @@ Tpm2RegisterTpm2DeviceLib (
>    TPM2_DEVICE_INTERFACE *Tpm2DeviceInterface;
> 
>    if (!CompareGuid (PcdGetPtr(PcdTpmInstanceGuid),
> &Tpm2Device->ProviderGuid)){
> -    DEBUG ((EFI_D_ERROR, "WARNING: Tpm2RegisterTpm2DeviceLib - does
> not support %g registration\n", &Tpm2Device->ProviderGuid));
> +    DEBUG ((DEBUG_WARN, "WARNING: Tpm2RegisterTpm2DeviceLib - does
> not support %g registration\n", &Tpm2Device->ProviderGuid));
>      return EFI_UNSUPPORTED;
>    }
> 
> diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
> b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
> index 53de666..c2c52e3 100644
> --- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
> +++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
> @@ -2466,7 +2466,7 @@ DriverEntry (
> 
>    if (CompareGuid (PcdGetPtr(PcdTpmInstanceGuid),
> &gEfiTpmDeviceInstanceNoneGuid) ||
>        CompareGuid (PcdGetPtr(PcdTpmInstanceGuid),
> &gEfiTpmDeviceInstanceTpm12Guid)){
> -    DEBUG ((EFI_D_ERROR, "No TPM2 instance required!\n"));
> +    DEBUG ((DEBUG_INFO, "No TPM2 instance required!\n"));
>      return EFI_UNSUPPORTED;
>    }
> 
> diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
> b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
> index 209d843..69adad4 100644
> --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
> +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
> @@ -1,7 +1,7 @@
>  /** @file
>    Initialize TPM2 device and measure FVs before handing off control to DXE.
> 
> -Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2015 - 2017, 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
> @@ -736,7 +736,7 @@ PeimEntryMA (
> 
>    if (CompareGuid (PcdGetPtr(PcdTpmInstanceGuid),
> &gEfiTpmDeviceInstanceNoneGuid) ||
>        CompareGuid (PcdGetPtr(PcdTpmInstanceGuid),
> &gEfiTpmDeviceInstanceTpm12Guid)){
> -    DEBUG ((EFI_D_ERROR, "No TPM2 instance required!\n"));
> +    DEBUG ((DEBUG_INFO, "No TPM2 instance required!\n"));
>      return EFI_UNSUPPORTED;
>    }
> 
> diff --git a/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c
> b/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c
> index fb69fa1..95e9d74 100644
> --- a/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c
> +++ b/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c
> @@ -1,7 +1,7 @@
>  /** @file
>    This module implements TrEE Protocol.
> 
> -Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2013 - 2017, 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
> @@ -1733,7 +1733,7 @@ DriverEntry (
> 
>    if (CompareGuid (PcdGetPtr(PcdTpmInstanceGuid),
> &gEfiTpmDeviceInstanceNoneGuid) ||
>        CompareGuid (PcdGetPtr(PcdTpmInstanceGuid),
> &gEfiTpmDeviceInstanceTpm12Guid)){
> -    DEBUG ((EFI_D_ERROR, "No TPM2 instance required!\n"));
> +    DEBUG ((DEBUG_INFO, "No TPM2 instance required!\n"));
>      return EFI_UNSUPPORTED;
>    }
> 
> diff --git a/SecurityPkg/Tcg/TrEEPei/TrEEPei.c
> b/SecurityPkg/Tcg/TrEEPei/TrEEPei.c
> index 8d8639d..b561245 100644
> --- a/SecurityPkg/Tcg/TrEEPei/TrEEPei.c
> +++ b/SecurityPkg/Tcg/TrEEPei/TrEEPei.c
> @@ -1,7 +1,7 @@
>  /** @file
>    Initialize TPM2 device and measure FVs before handing off control to DXE.
> 
> -Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2013 - 2017, 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
> @@ -597,7 +597,7 @@ PeimEntryMA (
> 
>    if (CompareGuid (PcdGetPtr(PcdTpmInstanceGuid),
> &gEfiTpmDeviceInstanceNoneGuid) ||
>        CompareGuid (PcdGetPtr(PcdTpmInstanceGuid),
> &gEfiTpmDeviceInstanceTpm12Guid)){
> -    DEBUG ((EFI_D_ERROR, "No TPM2 instance required!\n"));
> +    DEBUG ((DEBUG_INFO, "No TPM2 instance required!\n"));
>      return EFI_UNSUPPORTED;
>    }
> 
> --
> 2.9.3.windows.2



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-04-11  8:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-10  6:19 [PATCH 0/3] Error Level is not used correctly Jeff Fan
2017-04-10  6:19 ` [PATCH 1/3] MdeModulePkg: " Jeff Fan
2017-04-11  7:16   ` Tian, Feng
2017-04-10  6:19 ` [PATCH 2/3] SecurityPkg: " Jeff Fan
2017-04-11  8:52   ` Yao, Jiewen
2017-04-10  6:19 ` [PATCH 3/3] UefiCpuPkg: " Jeff Fan
2017-04-11  7:16   ` Tian, Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox