]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseDebugLibNull/DebugLib.c
Update BaseDebugLibNull to not touch any global variables or PCD settings
[mirror_edk2.git] / MdePkg / Library / BaseDebugLibNull / DebugLib.c
index eeaf7859d311ee68eccfd42c1c1bb8d41917a5b3..c14944b7be6136be8f7491e0db107c92ea81d15c 100644 (file)
 \r
 **/\r
 \r
-//\r
-// Define the maximum debug and assert message length that this library supports \r
-//\r
-#define MAX_DEBUG_MESSAGE_LENGTH  0x100\r
-\r
 /**\r
 \r
   Prints a debug message to the debug output device if the specified error level is enabled.\r
@@ -39,20 +34,6 @@ DebugPrint (
   ...\r
   )\r
 {\r
-  CHAR8    Buffer[MAX_DEBUG_MESSAGE_LENGTH];\r
-  VA_LIST  Marker;\r
-\r
-  //\r
-  // If Format is NULL, then ASSERT().\r
-  //\r
-  ASSERT (Format != NULL);\r
-\r
-  //\r
-  // Print the assert message to a buffer\r
-  //\r
-  VA_START (Marker, Format);\r
-  AsciiVSPrint (Buffer, sizeof (Buffer), Format, Marker);\r
-  VA_END (Marker);\r
 }\r
 \r
 \r
@@ -87,21 +68,6 @@ DebugAssert (
   IN CONST CHAR8  *Description\r
   )\r
 {\r
-  CHAR8  Buffer[MAX_DEBUG_MESSAGE_LENGTH];\r
-\r
-  //\r
-  // Print the assert message to a buffer\r
-  //\r
-  AsciiSPrint (Buffer, sizeof (Buffer), "ASSERT %s(%d): %s\n", FileName, LineNumber, Description);\r
-\r
-  //\r
-  // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings\r
-  //\r
-  if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) {\r
-    CpuBreakpoint ();\r
-  } else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) {\r
-    CpuDeadLoop ();\r
-  }\r
 }\r
 \r
 \r
@@ -129,15 +95,7 @@ DebugClearMemory (
   IN UINTN  Length\r
   )\r
 {\r
-  //\r
-  // If Buffer is NULL, then ASSERT().\r
-  //\r
-  ASSERT (Buffer != NULL);\r
-\r
-  //\r
-  // SetMem() checks for the the ASSERT() condition on Length and returns Buffer\r
-  //\r
-  return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));\r
+  return Buffer;\r
 }\r
 \r
 \r
@@ -158,7 +116,7 @@ DebugAssertEnabled (
   VOID\r
   )\r
 {\r
-  return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0);\r
+  return FALSE;\r
 }\r
 \r
 \r
@@ -179,7 +137,7 @@ DebugPrintEnabled (
   VOID\r
   )\r
 {\r
-  return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0);\r
+  return FALSE;\r
 }\r
 \r
 \r
@@ -200,7 +158,7 @@ DebugCodeEnabled (
   VOID\r
   )\r
 {\r
-  return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0);\r
+  return FALSE;\r
 }\r
 \r
 \r
@@ -221,5 +179,5 @@ DebugClearMemoryEnabled (
   VOID\r
   )\r
 {\r
-  return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);\r
+  return FALSE;\r
 }\r