]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update PEI/DXE/SMM dispatchers to include DEBUG ((DEBUG_DISPATCH, )) macros to log...
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 4 Dec 2010 20:05:09 +0000 (20:05 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 4 Dec 2010 20:05:09 +0000 (20:05 +0000)
This logging can be enabled by setting the DEBUG_DISPATCH bit(0x80) of the PCD gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel.

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

MdeModulePkg/Core/Dxe/Dispatcher/Dependency.c
MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
MdeModulePkg/Core/Pei/Dependency/Dependency.c
MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
MdeModulePkg/Core/PiSmmCore/Dependency.c
MdeModulePkg/Core/PiSmmCore/Dispatcher.c

index 55eed231fd34b61eb8ce8ee66d75ea057cbdc89d..0ec9690890a2121bcd2b48698aceb445786efa35 100644 (file)
@@ -5,7 +5,7 @@
   if a driver can be scheduled for execution.  The criteria for\r
   schedulability is that the dependency expression is satisfied.\r
 \r
   if a driver can be scheduled for execution.  The criteria for\r
   schedulability is that the dependency expression is satisfied.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
 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
 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
@@ -220,6 +220,8 @@ CoreIsSchedulable (
   EFI_GUID    DriverGuid;\r
   VOID        *Interface;\r
 \r
   EFI_GUID    DriverGuid;\r
   VOID        *Interface;\r
 \r
+  DEBUG ((DEBUG_DISPATCH, "Evaluate DXE DEPEX for FFS(%g)\n", &DriverEntry->FileName));\r
+\r
   Operator = FALSE;\r
   Operator2 = FALSE;\r
 \r
   Operator = FALSE;\r
   Operator2 = FALSE;\r
 \r
@@ -236,9 +238,12 @@ CoreIsSchedulable (
     // A NULL Depex means treat the driver like an UEFI 2.0 thing.\r
     //\r
     Status = CoreAllEfiServicesAvailable ();\r
     // A NULL Depex means treat the driver like an UEFI 2.0 thing.\r
     //\r
     Status = CoreAllEfiServicesAvailable ();\r
+    DEBUG ((DEBUG_DISPATCH, "  All UEFI Services Available                     = "));\r
     if (EFI_ERROR (Status)) {\r
     if (EFI_ERROR (Status)) {\r
+      DEBUG ((DEBUG_DISPATCH, "FALSE\n  RESULT = FALSE\n"));\r
       return FALSE;\r
     }\r
       return FALSE;\r
     }\r
+    DEBUG ((DEBUG_DISPATCH, "TRUE\n  RESULT = TRUE\n"));\r
     return TRUE;\r
   }\r
 \r
     return TRUE;\r
   }\r
 \r
@@ -257,6 +262,7 @@ CoreIsSchedulable (
     // past the end of the dependency expression.\r
     //\r
     if (((UINTN)Iterator - (UINTN)DriverEntry->Depex) >= DriverEntry->DepexSize) {\r
     // past the end of the dependency expression.\r
     //\r
     if (((UINTN)Iterator - (UINTN)DriverEntry->Depex) >= DriverEntry->DepexSize) {\r
+      DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Attempt to fetch past end of depex)\n"));\r
       return FALSE;\r
     }\r
 \r
       return FALSE;\r
     }\r
 \r
@@ -272,6 +278,7 @@ CoreIsSchedulable (
       // If the code flow arrives at this point, there was a BEFORE or AFTER\r
       // that were not the first opcodes.\r
       //\r
       // If the code flow arrives at this point, there was a BEFORE or AFTER\r
       // that were not the first opcodes.\r
       //\r
+      DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected BEFORE or AFTER opcode)\n"));\r
       ASSERT (FALSE);\r
     case EFI_DEP_SOR:\r
       //\r
       ASSERT (FALSE);\r
     case EFI_DEP_SOR:\r
       //\r
@@ -279,8 +286,11 @@ CoreIsSchedulable (
       // at any other location, then the dependency expression evaluates to FALSE\r
       //\r
       if (Iterator != DriverEntry->Depex) {\r
       // at any other location, then the dependency expression evaluates to FALSE\r
       //\r
       if (Iterator != DriverEntry->Depex) {\r
+        DEBUG ((DEBUG_DISPATCH, "  SOR\n"));\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected SOR opcode)\n"));\r
         return FALSE;\r
       }\r
         return FALSE;\r
       }\r
+      DEBUG ((DEBUG_DISPATCH, "  SOR                                             = Requested\n"));\r
       //\r
       // Otherwise, it is the first opcode and should be treated as a NOP.\r
       //\r
       //\r
       // Otherwise, it is the first opcode and should be treated as a NOP.\r
       //\r
@@ -296,12 +306,15 @@ CoreIsSchedulable (
       Status = CoreLocateProtocol (&DriverGuid, NULL, &Interface);\r
 \r
       if (EFI_ERROR (Status)) {\r
       Status = CoreLocateProtocol (&DriverGuid, NULL, &Interface);\r
 \r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  PUSH GUID(%g) = FALSE\n", &DriverGuid));\r
         Status = PushBool (FALSE);\r
       } else {\r
         Status = PushBool (FALSE);\r
       } else {\r
+        DEBUG ((DEBUG_DISPATCH, "  PUSH GUID(%g) = TRUE\n", &DriverGuid));\r
         *Iterator = EFI_DEP_REPLACE_TRUE;\r
         Status = PushBool (TRUE);\r
       }\r
       if (EFI_ERROR (Status)) {\r
         *Iterator = EFI_DEP_REPLACE_TRUE;\r
         Status = PushBool (TRUE);\r
       }\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
 \r
         return FALSE;\r
       }\r
 \r
@@ -309,75 +322,97 @@ CoreIsSchedulable (
       break;\r
 \r
     case EFI_DEP_AND:\r
       break;\r
 \r
     case EFI_DEP_AND:\r
+      DEBUG ((DEBUG_DISPATCH, "  AND\n"));\r
       Status = PopBool (&Operator);\r
       if (EFI_ERROR (Status)) {\r
       Status = PopBool (&Operator);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
 \r
       Status = PopBool (&Operator2);\r
       if (EFI_ERROR (Status)) {\r
         return FALSE;\r
       }\r
 \r
       Status = PopBool (&Operator2);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
 \r
       Status = PushBool ((BOOLEAN)(Operator && Operator2));\r
       if (EFI_ERROR (Status)) {\r
         return FALSE;\r
       }\r
 \r
       Status = PushBool ((BOOLEAN)(Operator && Operator2));\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_OR:\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_OR:\r
+      DEBUG ((DEBUG_DISPATCH, "  OR\n"));\r
       Status = PopBool (&Operator);\r
       if (EFI_ERROR (Status)) {\r
       Status = PopBool (&Operator);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
 \r
       Status = PopBool (&Operator2);\r
       if (EFI_ERROR (Status)) {\r
         return FALSE;\r
       }\r
 \r
       Status = PopBool (&Operator2);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
 \r
       Status = PushBool ((BOOLEAN)(Operator || Operator2));\r
       if (EFI_ERROR (Status)) {\r
         return FALSE;\r
       }\r
 \r
       Status = PushBool ((BOOLEAN)(Operator || Operator2));\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_NOT:\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_NOT:\r
+      DEBUG ((DEBUG_DISPATCH, "  NOT\n"));\r
       Status = PopBool (&Operator);\r
       if (EFI_ERROR (Status)) {\r
       Status = PopBool (&Operator);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
 \r
       Status = PushBool ((BOOLEAN)(!Operator));\r
       if (EFI_ERROR (Status)) {\r
         return FALSE;\r
       }\r
 \r
       Status = PushBool ((BOOLEAN)(!Operator));\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_TRUE:\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_TRUE:\r
+      DEBUG ((DEBUG_DISPATCH, "  TRUE\n"));\r
       Status = PushBool (TRUE);\r
       if (EFI_ERROR (Status)) {\r
       Status = PushBool (TRUE);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_FALSE:\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_FALSE:\r
+      DEBUG ((DEBUG_DISPATCH, "  FALSE\n"));\r
       Status = PushBool (FALSE);\r
       if (EFI_ERROR (Status)) {\r
       Status = PushBool (FALSE);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_END:\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_END:\r
+      DEBUG ((DEBUG_DISPATCH, "  END\n"));\r
       Status = PopBool (&Operator);\r
       if (EFI_ERROR (Status)) {\r
       Status = PopBool (&Operator);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
         return FALSE;\r
       }\r
+      DEBUG ((DEBUG_DISPATCH, "  RESULT = %a\n", Operator ? "TRUE" : "FALSE"));\r
       return Operator;\r
 \r
     case EFI_DEP_REPLACE_TRUE:\r
       return Operator;\r
 \r
     case EFI_DEP_REPLACE_TRUE:\r
+      CopyMem (&DriverGuid, Iterator + 1, sizeof (EFI_GUID));\r
+      DEBUG ((DEBUG_DISPATCH, "  PUSH GUID(%g) = TRUE\n", &DriverGuid));\r
+      \r
       Status = PushBool (TRUE);\r
       if (EFI_ERROR (Status)) {\r
       Status = PushBool (TRUE);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
 \r
         return FALSE;\r
       }\r
 \r
@@ -385,6 +420,7 @@ CoreIsSchedulable (
       break;\r
 \r
     default:\r
       break;\r
 \r
     default:\r
+      DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unknown opcode)\n"));\r
       goto Done;\r
     }\r
 \r
       goto Done;\r
     }\r
 \r
index 9e06881c85ad001995deb0300d02554f9c609b0c..79b895bcfa68bb065044601c7284dbab264caf13 100644 (file)
@@ -333,9 +333,14 @@ CoreSchedule (
       DriverEntry->Dependent    = TRUE;\r
       CoreReleaseDispatcherLock ();\r
 \r
       DriverEntry->Dependent    = TRUE;\r
       CoreReleaseDispatcherLock ();\r
 \r
+      DEBUG ((DEBUG_DISPATCH, "Schedule FFS(%g) - EFI_SUCCESS\n", DriverName));\r
+      \r
       return EFI_SUCCESS;\r
     }\r
   }\r
       return EFI_SUCCESS;\r
     }\r
   }\r
+  \r
+  DEBUG ((DEBUG_DISPATCH, "Schedule FFS(%g) - EFI_NOT_FOUND\n", DriverName));\r
+  \r
   return EFI_NOT_FOUND;\r
 }\r
 \r
   return EFI_NOT_FOUND;\r
 }\r
 \r
@@ -572,6 +577,12 @@ CoreDispatcher (
           CoreInsertOnScheduledQueueWhileProcessingBeforeAndAfter (DriverEntry);\r
           ReadyToRun = TRUE;\r
         }\r
           CoreInsertOnScheduledQueueWhileProcessingBeforeAndAfter (DriverEntry);\r
           ReadyToRun = TRUE;\r
         }\r
+      } else {\r
+        if (DriverEntry->Unrequested) {\r
+          DEBUG ((DEBUG_DISPATCH, "Evaluate DXE DEPEX for FFS(%g)\n", &DriverEntry->FileName));\r
+          DEBUG ((DEBUG_DISPATCH, "  SOR                                             = Not Requested\n"));\r
+          DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE\n"));\r
+        }\r
       }\r
     }\r
   } while (ReadyToRun);\r
       }\r
     }\r
   } while (ReadyToRun);\r
@@ -611,12 +622,17 @@ CoreInsertOnScheduledQueueWhileProcessingBeforeAndAfter (
   //\r
   for (Link = mDiscoveredList.ForwardLink; Link != &mDiscoveredList; Link = Link->ForwardLink) {\r
     DriverEntry = CR(Link, EFI_CORE_DRIVER_ENTRY, Link, EFI_CORE_DRIVER_ENTRY_SIGNATURE);\r
   //\r
   for (Link = mDiscoveredList.ForwardLink; Link != &mDiscoveredList; Link = Link->ForwardLink) {\r
     DriverEntry = CR(Link, EFI_CORE_DRIVER_ENTRY, Link, EFI_CORE_DRIVER_ENTRY_SIGNATURE);\r
-    if (DriverEntry->Before && DriverEntry->Dependent) {\r
+    if (DriverEntry->Before && DriverEntry->Dependent && DriverEntry != InsertedDriverEntry) {\r
+      DEBUG ((DEBUG_DISPATCH, "Evaluate DXE DEPEX for FFS(%g)\n", &DriverEntry->FileName));\r
+      DEBUG ((DEBUG_DISPATCH, "  BEFORE FFS(%g) = ", &DriverEntry->BeforeAfterGuid));\r
       if (CompareGuid (&InsertedDriverEntry->FileName, &DriverEntry->BeforeAfterGuid)) {\r
         //\r
         // Recursively process BEFORE\r
         //\r
       if (CompareGuid (&InsertedDriverEntry->FileName, &DriverEntry->BeforeAfterGuid)) {\r
         //\r
         // Recursively process BEFORE\r
         //\r
+        DEBUG ((DEBUG_DISPATCH, "TRUE\n  END\n  RESULT = TRUE\n"));\r
         CoreInsertOnScheduledQueueWhileProcessingBeforeAndAfter (DriverEntry);\r
         CoreInsertOnScheduledQueueWhileProcessingBeforeAndAfter (DriverEntry);\r
+      } else {\r
+        DEBUG ((DEBUG_DISPATCH, "FALSE\n  END\n  RESULT = FALSE\n"));\r
       }\r
     }\r
   }\r
       }\r
     }\r
   }\r
@@ -637,12 +653,17 @@ CoreInsertOnScheduledQueueWhileProcessingBeforeAndAfter (
   //\r
   for (Link = mDiscoveredList.ForwardLink; Link != &mDiscoveredList; Link = Link->ForwardLink) {\r
     DriverEntry = CR(Link, EFI_CORE_DRIVER_ENTRY, Link, EFI_CORE_DRIVER_ENTRY_SIGNATURE);\r
   //\r
   for (Link = mDiscoveredList.ForwardLink; Link != &mDiscoveredList; Link = Link->ForwardLink) {\r
     DriverEntry = CR(Link, EFI_CORE_DRIVER_ENTRY, Link, EFI_CORE_DRIVER_ENTRY_SIGNATURE);\r
-    if (DriverEntry->After && DriverEntry->Dependent) {\r
+    if (DriverEntry->After && DriverEntry->Dependent && DriverEntry != InsertedDriverEntry) {\r
+      DEBUG ((DEBUG_DISPATCH, "Evaluate DXE DEPEX for FFS(%g)\n", &DriverEntry->FileName));\r
+      DEBUG ((DEBUG_DISPATCH, "  AFTER FFS(%g) = ", &DriverEntry->BeforeAfterGuid));\r
       if (CompareGuid (&InsertedDriverEntry->FileName, &DriverEntry->BeforeAfterGuid)) {\r
         //\r
         // Recursively process AFTER\r
         //\r
       if (CompareGuid (&InsertedDriverEntry->FileName, &DriverEntry->BeforeAfterGuid)) {\r
         //\r
         // Recursively process AFTER\r
         //\r
+        DEBUG ((DEBUG_DISPATCH, "TRUE\n  END\n  RESULT = TRUE\n"));\r
         CoreInsertOnScheduledQueueWhileProcessingBeforeAndAfter (DriverEntry);\r
         CoreInsertOnScheduledQueueWhileProcessingBeforeAndAfter (DriverEntry);\r
+      } else {\r
+        DEBUG ((DEBUG_DISPATCH, "FALSE\n  END\n  RESULT = FALSE\n"));\r
       }\r
     }\r
   }\r
       }\r
     }\r
   }\r
@@ -1139,23 +1160,24 @@ CoreFwVolEventProtocolNotify (
     // drivers not in the current FV and these must be skipped since the a priori list\r
     // is only valid for the FV that it resided in.\r
     //\r
     // drivers not in the current FV and these must be skipped since the a priori list\r
     // is only valid for the FV that it resided in.\r
     //\r
-    CoreAcquireDispatcherLock ();\r
 \r
     for (Index = 0; Index < AprioriEntryCount; Index++) {\r
       for (Link = mDiscoveredList.ForwardLink; Link != &mDiscoveredList; Link = Link->ForwardLink) {\r
         DriverEntry = CR(Link, EFI_CORE_DRIVER_ENTRY, Link, EFI_CORE_DRIVER_ENTRY_SIGNATURE);\r
         if (CompareGuid (&DriverEntry->FileName, &AprioriFile[Index]) &&\r
             (FvHandle == DriverEntry->FvHandle)) {\r
 \r
     for (Index = 0; Index < AprioriEntryCount; Index++) {\r
       for (Link = mDiscoveredList.ForwardLink; Link != &mDiscoveredList; Link = Link->ForwardLink) {\r
         DriverEntry = CR(Link, EFI_CORE_DRIVER_ENTRY, Link, EFI_CORE_DRIVER_ENTRY_SIGNATURE);\r
         if (CompareGuid (&DriverEntry->FileName, &AprioriFile[Index]) &&\r
             (FvHandle == DriverEntry->FvHandle)) {\r
+          CoreAcquireDispatcherLock ();\r
           DriverEntry->Dependent = FALSE;\r
           DriverEntry->Scheduled = TRUE;\r
           InsertTailList (&mScheduledQueue, &DriverEntry->ScheduledLink);\r
           DriverEntry->Dependent = FALSE;\r
           DriverEntry->Scheduled = TRUE;\r
           InsertTailList (&mScheduledQueue, &DriverEntry->ScheduledLink);\r
+          CoreReleaseDispatcherLock ();\r
+          DEBUG ((DEBUG_DISPATCH, "Evaluate DXE DEPEX for FFS(%g)\n", &DriverEntry->FileName));\r
+          DEBUG ((DEBUG_DISPATCH, "  RESULT = TRUE (Apriori)\n"));\r
           break;\r
         }\r
       }\r
     }\r
 \r
           break;\r
         }\r
       }\r
     }\r
 \r
-    CoreReleaseDispatcherLock ();\r
-\r
     //\r
     // Free data allocated by Fv->ReadSection ()\r
     //\r
     //\r
     // Free data allocated by Fv->ReadSection ()\r
     //\r
index 1ef14086bab2508c56073b3deee95369b84bd7b6..eea0feba96bf6fffd2fdf7e1ff291400b85bce2c 100644 (file)
@@ -5,7 +5,7 @@
   if a driver can be scheduled for execution.  The criteria for\r
   schedulability is that the dependency expression is satisfied.\r
 \r
   if a driver can be scheduled for execution.  The criteria for\r
   schedulability is that the dependency expression is satisfied.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
 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
 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
@@ -123,6 +123,7 @@ PeimDispatchReadiness (
         // EvalStack on the push\r
         //\r
         if (StackPtr > &EvalStack[MAX_GRAMMAR_SIZE-1]) {\r
         // EvalStack on the push\r
         //\r
         if (StackPtr > &EvalStack[MAX_GRAMMAR_SIZE-1]) {\r
+          DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Underflow Error)\n"));\r
           return FALSE;\r
         }\r
 \r
           return FALSE;\r
         }\r
 \r
@@ -132,11 +133,17 @@ PeimDispatchReadiness (
         //\r
         StackPtr->Operator = (VOID *) Iterator;\r
         Iterator = Iterator + sizeof (EFI_GUID);\r
         //\r
         StackPtr->Operator = (VOID *) Iterator;\r
         Iterator = Iterator + sizeof (EFI_GUID);\r
+        DEBUG ((DEBUG_DISPATCH, "  PUSH GUID(%g) = %a\n", StackPtr->Operator, IsPpiInstalled (PeiServices, StackPtr) ? "TRUE" : "FALSE"));\r
         StackPtr++;\r
         break;\r
 \r
       case (EFI_DEP_AND):    \r
       case (EFI_DEP_OR):     \r
         StackPtr++;\r
         break;\r
 \r
       case (EFI_DEP_AND):    \r
       case (EFI_DEP_OR):     \r
+        if (*(Iterator - 1) == EFI_DEP_AND) {\r
+          DEBUG ((DEBUG_DISPATCH, "  AND\n"));\r
+        } else {\r
+          DEBUG ((DEBUG_DISPATCH, "  OR\n"));\r
+        }\r
         //\r
         // Check to make sure the dependency grammar doesn't underflow the\r
         // EvalStack on the two POPs for the AND operation.  Don't need to\r
         //\r
         // Check to make sure the dependency grammar doesn't underflow the\r
         // EvalStack on the two POPs for the AND operation.  Don't need to\r
@@ -144,6 +151,7 @@ PeimDispatchReadiness (
         // did two POPs.\r
         //\r
         if (StackPtr < &EvalStack[2]) {\r
         // did two POPs.\r
         //\r
         if (StackPtr < &EvalStack[2]) {\r
+          DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Underflow Error)\n"));\r
           return FALSE;\r
         }\r
 \r
           return FALSE;\r
         }\r
 \r
@@ -176,18 +184,22 @@ PeimDispatchReadiness (
         break;\r
         \r
       case (EFI_DEP_END):\r
         break;\r
         \r
       case (EFI_DEP_END):\r
+        DEBUG ((DEBUG_DISPATCH, "  END\n"));\r
         StackPtr--;\r
         //\r
         // Check to make sure EvalStack is balanced.  If not, then there is\r
         // an error in the dependency grammar, so return EFI_INVALID_PARAMETER.\r
         //\r
         if (StackPtr != &EvalStack[0]) {\r
         StackPtr--;\r
         //\r
         // Check to make sure EvalStack is balanced.  If not, then there is\r
         // an error in the dependency grammar, so return EFI_INVALID_PARAMETER.\r
         //\r
         if (StackPtr != &EvalStack[0]) {\r
+          DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Underflow Error)\n"));\r
           return FALSE;\r
         }\r
           return FALSE;\r
         }\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = %a\n", IsPpiInstalled (PeiServices, StackPtr) ? "TRUE" : "FALSE"));\r
         return IsPpiInstalled (PeiServices, StackPtr);\r
         break;\r
 \r
       case (EFI_DEP_NOT):    \r
         return IsPpiInstalled (PeiServices, StackPtr);\r
         break;\r
 \r
       case (EFI_DEP_NOT):    \r
+        DEBUG ((DEBUG_DISPATCH, "  NOT\n"));\r
         //\r
         // Check to make sure the dependency grammar doesn't underflow the\r
         // EvalStack on the POP for the NOT operation.  Don't need to\r
         //\r
         // Check to make sure the dependency grammar doesn't underflow the\r
         // EvalStack on the POP for the NOT operation.  Don't need to\r
@@ -195,6 +207,7 @@ PeimDispatchReadiness (
         // did a POP.\r
         //\r
         if (StackPtr < &EvalStack[1]) {\r
         // did a POP.\r
         //\r
         if (StackPtr < &EvalStack[1]) {\r
+          DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Underflow Error)\n"));\r
           return FALSE;\r
         }\r
         (StackPtr-1)->Result = (BOOLEAN) !IsPpiInstalled (PeiServices, (StackPtr-1));\r
           return FALSE;\r
         }\r
         (StackPtr-1)->Result = (BOOLEAN) !IsPpiInstalled (PeiServices, (StackPtr-1));\r
@@ -203,11 +216,17 @@ PeimDispatchReadiness (
 \r
       case (EFI_DEP_TRUE):\r
       case (EFI_DEP_FALSE):\r
 \r
       case (EFI_DEP_TRUE):\r
       case (EFI_DEP_FALSE):\r
+        if (*(Iterator - 1) == EFI_DEP_TRUE) {\r
+          DEBUG ((DEBUG_DISPATCH, "  TRUE\n"));\r
+        } else {\r
+          DEBUG ((DEBUG_DISPATCH, "  FALSE\n"));\r
+        }\r
         //\r
         // Check to make sure the dependency grammar doesn't overflow the\r
         // EvalStack on the push\r
         //\r
         if (StackPtr > &EvalStack[MAX_GRAMMAR_SIZE-1]) {\r
         //\r
         // Check to make sure the dependency grammar doesn't overflow the\r
         // EvalStack on the push\r
         //\r
         if (StackPtr > &EvalStack[MAX_GRAMMAR_SIZE-1]) {\r
+          DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Underflow Error)\n"));\r
           return FALSE;\r
         }\r
         //\r
           return FALSE;\r
         }\r
         //\r
@@ -225,6 +244,7 @@ PeimDispatchReadiness (
         break;\r
 \r
       default:\r
         break;\r
 \r
       default:\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Invalid opcode)\n"));\r
         //\r
         // The grammar should never arrive here\r
         //\r
         //\r
         // The grammar should never arrive here\r
         //\r
index 6198114bb1a6a59477311f8db24765a0c4af70b7..3dd7549df88265c7dbabed3ead761001352d9768 100644 (file)
@@ -1078,11 +1078,20 @@ DepexSatisfied (
 {\r
   EFI_STATUS           Status;\r
   VOID                 *DepexData;\r
 {\r
   EFI_STATUS           Status;\r
   VOID                 *DepexData;\r
+  EFI_FV_FILE_INFO     FileInfo;\r
 \r
 \r
+  Status = PeiServicesFfsGetFileInfo (FileHandle, &FileInfo);\r
+  if (EFI_ERROR (Status)) {\r
+    DEBUG ((DEBUG_DISPATCH, "Evaluate PEI DEPEX for FFS(Unknown)\n"));\r
+  } else {\r
+    DEBUG ((DEBUG_DISPATCH, "Evaluate PEI DEPEX for FFS(%g)\n", &FileInfo.FileName));\r
+  }\r
+  \r
   if (PeimCount < Private->AprioriCount) {\r
     //\r
     // If its in the A priori file then we set Depex to TRUE\r
     //\r
   if (PeimCount < Private->AprioriCount) {\r
     //\r
     // If its in the A priori file then we set Depex to TRUE\r
     //\r
+    DEBUG ((DEBUG_DISPATCH, "  RESULT = TRUE (Apriori)\n"));\r
     return TRUE;\r
   }\r
 \r
     return TRUE;\r
   }\r
 \r
@@ -1099,6 +1108,7 @@ DepexSatisfied (
     //\r
     // If there is no DEPEX, assume the module can be executed\r
     //\r
     //\r
     // If there is no DEPEX, assume the module can be executed\r
     //\r
+    DEBUG ((DEBUG_DISPATCH, "  RESULT = TRUE (No DEPEX)\n"));\r
     return TRUE;\r
   }\r
 \r
     return TRUE;\r
   }\r
 \r
index cf8c3e9ff75548d64c9475f0b4a009bb3656db81..4bf8502cf8be7aac6e9a3d15c1ab72fefc777bb7 100644 (file)
@@ -183,6 +183,8 @@ SmmIsSchedulable (
   EFI_GUID    DriverGuid;\r
   VOID        *Interface;\r
 \r
   EFI_GUID    DriverGuid;\r
   VOID        *Interface;\r
 \r
+  DEBUG ((DEBUG_DISPATCH, "Evaluate SMM DEPEX for FFS(%g)\n", &DriverEntry->FileName));\r
+  \r
   Operator = FALSE;\r
   Operator2 = FALSE;\r
 \r
   Operator = FALSE;\r
   Operator2 = FALSE;\r
 \r
@@ -199,6 +201,7 @@ SmmIsSchedulable (
     // A NULL Depex means that the SMM driver is not built correctly.  \r
     // All SMM drivers must have a valid depex expressiion.\r
     //\r
     // A NULL Depex means that the SMM driver is not built correctly.  \r
     // All SMM drivers must have a valid depex expressiion.\r
     //\r
+    DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Depex is empty)\n"));\r
     ASSERT (FALSE);\r
     return FALSE;\r
   }\r
     ASSERT (FALSE);\r
     return FALSE;\r
   }\r
@@ -218,6 +221,7 @@ SmmIsSchedulable (
     // past the end of the dependency expression.\r
     //\r
     if (((UINTN)Iterator - (UINTN)DriverEntry->Depex) >= DriverEntry->DepexSize) {\r
     // past the end of the dependency expression.\r
     //\r
     if (((UINTN)Iterator - (UINTN)DriverEntry->Depex) >= DriverEntry->DepexSize) {\r
+      DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Attempt to fetch past end of depex)\n"));\r
       return FALSE;\r
     }\r
 \r
       return FALSE;\r
     }\r
 \r
@@ -233,6 +237,7 @@ SmmIsSchedulable (
       // If the code flow arrives at this point, there was a BEFORE or AFTER\r
       // that were not the first opcodes.\r
       //\r
       // If the code flow arrives at this point, there was a BEFORE or AFTER\r
       // that were not the first opcodes.\r
       //\r
+      DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected BEFORE or AFTER opcode)\n"));\r
       ASSERT (FALSE);\r
     case EFI_DEP_SOR:\r
       //\r
       ASSERT (FALSE);\r
     case EFI_DEP_SOR:\r
       //\r
@@ -240,8 +245,11 @@ SmmIsSchedulable (
       // at any other location, then the dependency expression evaluates to FALSE\r
       //\r
       if (Iterator != DriverEntry->Depex) {\r
       // at any other location, then the dependency expression evaluates to FALSE\r
       //\r
       if (Iterator != DriverEntry->Depex) {\r
+        DEBUG ((DEBUG_DISPATCH, "  SOR\n"));\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected SOR opcode)\n"));\r
         return FALSE;\r
       }\r
         return FALSE;\r
       }\r
+      DEBUG ((DEBUG_DISPATCH, "  SOR                                             = Requested\n"));\r
       //\r
       // Otherwise, it is the first opcode and should be treated as a NOP.\r
       //\r
       //\r
       // Otherwise, it is the first opcode and should be treated as a NOP.\r
       //\r
@@ -263,12 +271,15 @@ SmmIsSchedulable (
       }\r
 \r
       if (EFI_ERROR (Status)) {\r
       }\r
 \r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  PUSH GUID(%g) = FALSE\n", &DriverGuid));\r
         Status = PushBool (FALSE);\r
       } else {\r
         Status = PushBool (FALSE);\r
       } else {\r
+        DEBUG ((DEBUG_DISPATCH, "  PUSH GUID(%g) = TRUE\n", &DriverGuid));\r
         *Iterator = EFI_DEP_REPLACE_TRUE;\r
         Status = PushBool (TRUE);\r
       }\r
       if (EFI_ERROR (Status)) {\r
         *Iterator = EFI_DEP_REPLACE_TRUE;\r
         Status = PushBool (TRUE);\r
       }\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
 \r
         return FALSE;\r
       }\r
 \r
@@ -276,75 +287,96 @@ SmmIsSchedulable (
       break;\r
 \r
     case EFI_DEP_AND:\r
       break;\r
 \r
     case EFI_DEP_AND:\r
+      DEBUG ((DEBUG_DISPATCH, "  AND\n"));\r
       Status = PopBool (&Operator);\r
       if (EFI_ERROR (Status)) {\r
       Status = PopBool (&Operator);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
 \r
       Status = PopBool (&Operator2);\r
       if (EFI_ERROR (Status)) {\r
         return FALSE;\r
       }\r
 \r
       Status = PopBool (&Operator2);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
 \r
       Status = PushBool ((BOOLEAN)(Operator && Operator2));\r
       if (EFI_ERROR (Status)) {\r
         return FALSE;\r
       }\r
 \r
       Status = PushBool ((BOOLEAN)(Operator && Operator2));\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_OR:\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_OR:\r
+      DEBUG ((DEBUG_DISPATCH, "  OR\n"));\r
       Status = PopBool (&Operator);\r
       if (EFI_ERROR (Status)) {\r
       Status = PopBool (&Operator);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
 \r
       Status = PopBool (&Operator2);\r
       if (EFI_ERROR (Status)) {\r
         return FALSE;\r
       }\r
 \r
       Status = PopBool (&Operator2);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
 \r
       Status = PushBool ((BOOLEAN)(Operator || Operator2));\r
       if (EFI_ERROR (Status)) {\r
         return FALSE;\r
       }\r
 \r
       Status = PushBool ((BOOLEAN)(Operator || Operator2));\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_NOT:\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_NOT:\r
+      DEBUG ((DEBUG_DISPATCH, "  NOT\n"));\r
       Status = PopBool (&Operator);\r
       if (EFI_ERROR (Status)) {\r
       Status = PopBool (&Operator);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
 \r
       Status = PushBool ((BOOLEAN)(!Operator));\r
       if (EFI_ERROR (Status)) {\r
         return FALSE;\r
       }\r
 \r
       Status = PushBool ((BOOLEAN)(!Operator));\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_TRUE:\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_TRUE:\r
+      DEBUG ((DEBUG_DISPATCH, "  TRUE\n"));\r
       Status = PushBool (TRUE);\r
       if (EFI_ERROR (Status)) {\r
       Status = PushBool (TRUE);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_FALSE:\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_FALSE:\r
+      DEBUG ((DEBUG_DISPATCH, "  FALSE\n"));\r
       Status = PushBool (FALSE);\r
       if (EFI_ERROR (Status)) {\r
       Status = PushBool (FALSE);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_END:\r
         return FALSE;\r
       }\r
       break;\r
 \r
     case EFI_DEP_END:\r
+      DEBUG ((DEBUG_DISPATCH, "  END\n"));\r
       Status = PopBool (&Operator);\r
       if (EFI_ERROR (Status)) {\r
       Status = PopBool (&Operator);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
         return FALSE;\r
       }\r
+      DEBUG ((DEBUG_DISPATCH, "  RESULT = %a\n", Operator ? "TRUE" : "FALSE"));\r
       return Operator;\r
 \r
     case EFI_DEP_REPLACE_TRUE:\r
       return Operator;\r
 \r
     case EFI_DEP_REPLACE_TRUE:\r
+      CopyMem (&DriverGuid, Iterator + 1, sizeof (EFI_GUID));\r
+      DEBUG ((DEBUG_DISPATCH, "  PUSH GUID(%g) = TRUE\n", &DriverGuid));\r
       Status = PushBool (TRUE);\r
       if (EFI_ERROR (Status)) {\r
       Status = PushBool (TRUE);\r
       if (EFI_ERROR (Status)) {\r
+        DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unexpected error)\n"));\r
         return FALSE;\r
       }\r
 \r
         return FALSE;\r
       }\r
 \r
@@ -352,6 +384,7 @@ SmmIsSchedulable (
       break;\r
 \r
     default:\r
       break;\r
 \r
     default:\r
+      DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE (Unknown opcode)\n"));\r
       goto Done;\r
     }\r
 \r
       goto Done;\r
     }\r
 \r
index 405f6dea481675725c55f9eef13695f2ae8b1ff7..d83224e322aa33dd05394852f8bcd6df23a49087 100644 (file)
@@ -782,9 +782,14 @@ SmmSchedule (
       DriverEntry->Unrequested  = FALSE;\r
       DriverEntry->Dependent    = TRUE;\r
 \r
       DriverEntry->Unrequested  = FALSE;\r
       DriverEntry->Dependent    = TRUE;\r
 \r
+      DEBUG ((DEBUG_DISPATCH, "Schedule FFS(%g) - EFI_SUCCESS\n", DriverName));\r
+\r
       return EFI_SUCCESS;\r
     }\r
   }\r
       return EFI_SUCCESS;\r
     }\r
   }\r
+  \r
+  DEBUG ((DEBUG_DISPATCH, "Schedule FFS(%g) - EFI_NOT_FOUND\n", DriverName));\r
+  \r
   return EFI_NOT_FOUND;\r
 }\r
 \r
   return EFI_NOT_FOUND;\r
 }\r
 \r
@@ -925,6 +930,12 @@ SmmDispatcher (
           SmmInsertOnScheduledQueueWhileProcessingBeforeAndAfter (DriverEntry);\r
           ReadyToRun = TRUE;\r
         }\r
           SmmInsertOnScheduledQueueWhileProcessingBeforeAndAfter (DriverEntry);\r
           ReadyToRun = TRUE;\r
         }\r
+      } else {\r
+        if (DriverEntry->Unrequested) {\r
+          DEBUG ((DEBUG_DISPATCH, "Evaluate SMM DEPEX for FFS(%g)\n", &DriverEntry->FileName));\r
+          DEBUG ((DEBUG_DISPATCH, "  SOR                                             = Not Requested\n"));\r
+          DEBUG ((DEBUG_DISPATCH, "  RESULT = FALSE\n"));\r
+        }\r
       }\r
     }\r
   } while (ReadyToRun);\r
       }\r
     }\r
   } while (ReadyToRun);\r
@@ -974,12 +985,17 @@ SmmInsertOnScheduledQueueWhileProcessingBeforeAndAfter (
   //\r
   for (Link = mDiscoveredList.ForwardLink; Link != &mDiscoveredList; Link = Link->ForwardLink) {\r
     DriverEntry = CR(Link, EFI_SMM_DRIVER_ENTRY, Link, EFI_SMM_DRIVER_ENTRY_SIGNATURE);\r
   //\r
   for (Link = mDiscoveredList.ForwardLink; Link != &mDiscoveredList; Link = Link->ForwardLink) {\r
     DriverEntry = CR(Link, EFI_SMM_DRIVER_ENTRY, Link, EFI_SMM_DRIVER_ENTRY_SIGNATURE);\r
-    if (DriverEntry->Before && DriverEntry->Dependent) {\r
+    if (DriverEntry->Before && DriverEntry->Dependent && DriverEntry != InsertedDriverEntry) {\r
+      DEBUG ((DEBUG_DISPATCH, "Evaluate SMM DEPEX for FFS(%g)\n", &DriverEntry->FileName));\r
+      DEBUG ((DEBUG_DISPATCH, "  BEFORE FFS(%g) = ", &DriverEntry->BeforeAfterGuid));\r
       if (CompareGuid (&InsertedDriverEntry->FileName, &DriverEntry->BeforeAfterGuid)) {\r
         //\r
         // Recursively process BEFORE\r
         //\r
       if (CompareGuid (&InsertedDriverEntry->FileName, &DriverEntry->BeforeAfterGuid)) {\r
         //\r
         // Recursively process BEFORE\r
         //\r
+        DEBUG ((DEBUG_DISPATCH, "TRUE\n  END\n  RESULT = TRUE\n"));\r
         SmmInsertOnScheduledQueueWhileProcessingBeforeAndAfter (DriverEntry);\r
         SmmInsertOnScheduledQueueWhileProcessingBeforeAndAfter (DriverEntry);\r
+      } else {\r
+        DEBUG ((DEBUG_DISPATCH, "FALSE\n  END\n  RESULT = FALSE\n"));\r
       }\r
     }\r
   }\r
       }\r
     }\r
   }\r
@@ -998,12 +1014,17 @@ SmmInsertOnScheduledQueueWhileProcessingBeforeAndAfter (
   //\r
   for (Link = mDiscoveredList.ForwardLink; Link != &mDiscoveredList; Link = Link->ForwardLink) {\r
     DriverEntry = CR(Link, EFI_SMM_DRIVER_ENTRY, Link, EFI_SMM_DRIVER_ENTRY_SIGNATURE);\r
   //\r
   for (Link = mDiscoveredList.ForwardLink; Link != &mDiscoveredList; Link = Link->ForwardLink) {\r
     DriverEntry = CR(Link, EFI_SMM_DRIVER_ENTRY, Link, EFI_SMM_DRIVER_ENTRY_SIGNATURE);\r
-    if (DriverEntry->After && DriverEntry->Dependent) {\r
+    if (DriverEntry->After && DriverEntry->Dependent && DriverEntry != InsertedDriverEntry) {\r
+      DEBUG ((DEBUG_DISPATCH, "Evaluate SMM DEPEX for FFS(%g)\n", &DriverEntry->FileName));\r
+      DEBUG ((DEBUG_DISPATCH, "  AFTER FFS(%g) = ", &DriverEntry->BeforeAfterGuid));\r
       if (CompareGuid (&InsertedDriverEntry->FileName, &DriverEntry->BeforeAfterGuid)) {\r
         //\r
         // Recursively process AFTER\r
         //\r
       if (CompareGuid (&InsertedDriverEntry->FileName, &DriverEntry->BeforeAfterGuid)) {\r
         //\r
         // Recursively process AFTER\r
         //\r
+        DEBUG ((DEBUG_DISPATCH, "TRUE\n  END\n  RESULT = TRUE\n"));\r
         SmmInsertOnScheduledQueueWhileProcessingBeforeAndAfter (DriverEntry);\r
         SmmInsertOnScheduledQueueWhileProcessingBeforeAndAfter (DriverEntry);\r
+      } else {\r
+        DEBUG ((DEBUG_DISPATCH, "FALSE\n  END\n  RESULT = FALSE\n"));\r
       }\r
     }\r
   }\r
       }\r
     }\r
   }\r
@@ -1340,6 +1361,8 @@ SmmDriverDispatchHandler (
           DriverEntry->Dependent = FALSE;\r
           DriverEntry->Scheduled = TRUE;\r
           InsertTailList (&mScheduledQueue, &DriverEntry->ScheduledLink);\r
           DriverEntry->Dependent = FALSE;\r
           DriverEntry->Scheduled = TRUE;\r
           InsertTailList (&mScheduledQueue, &DriverEntry->ScheduledLink);\r
+          DEBUG ((DEBUG_DISPATCH, "Evaluate SMM DEPEX for FFS(%g)\n", &DriverEntry->FileName));\r
+          DEBUG ((DEBUG_DISPATCH, "  RESULT = TRUE (Apriori)\n"));\r
           break;\r
         }\r
       }\r
           break;\r
         }\r
       }\r