]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c
1. Remove any references on other files from DebugTimer.c, to avoid un-used symbols...
[mirror_edk2.git] / SourceLevelDebugPkg / Library / DebugAgent / SecPeiDebugAgent / SecPeiDebugAgentLib.c
index 7a7ca423c7a4caaa3c113c850c450e0788af45b0..6e7ff8e22eda2d3268519568ff9498b3847426c6 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   SEC Core Debug Agent Library instance implementition.\r
 \r
-  Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2014, 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
 \r
 #include "SecPeiDebugAgentLib.h"\r
 \r
-BOOLEAN  mSkipBreakpoint = FALSE;\r
+GLOBAL_REMOVE_IF_UNREFERENCED BOOLEAN  mSkipBreakpoint = FALSE;\r
 \r
 \r
-EFI_PEI_VECTOR_HANDOFF_INFO_PPI mVectorHandoffInfoPpi = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_VECTOR_HANDOFF_INFO_PPI mVectorHandoffInfoPpi = {\r
   &mVectorHandoffInfoDebugAgent[0]\r
 };\r
 \r
 //\r
 // Ppis to be installed\r
 //\r
-EFI_PEI_PPI_DESCRIPTOR           mVectorHandoffInfoPpiList[] = { \r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR           mVectorHandoffInfoPpiList[] = {\r
   {\r
     (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
     &gEfiVectorHandoffInfoPpiGuid,\r
@@ -32,7 +32,7 @@ EFI_PEI_PPI_DESCRIPTOR           mVectorHandoffInfoPpiList[] = {
   }\r
 };\r
 \r
-EFI_PEI_NOTIFY_DESCRIPTOR mMemoryDiscoveredNotifyList[1] = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_NOTIFY_DESCRIPTOR mMemoryDiscoveredNotifyList[1] = {\r
   {\r
     (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
     &gEfiPeiMemoryDiscoveredPpiGuid,\r
@@ -98,7 +98,7 @@ DebugReadBreakSymbol (
       *BreakSymbol = *Data8;\r
       DebugAgentMsgPrint (DEBUG_AGENT_INFO, "Debug Timer attach symbol received %x", *BreakSymbol);\r
       return EFI_SUCCESS;\r
-    } \r
+    }\r
     if (*Data8 == DEBUG_STARTING_SYMBOL_NORMAL) {\r
       Status = ReadRemainingBreakPacket (Handle, &DebugHeader);\r
       if (Status == EFI_SUCCESS) {\r
@@ -111,7 +111,7 @@ DebugReadBreakSymbol (
       }\r
     }\r
   }\r
-  \r
+\r
   return EFI_NOT_FOUND;\r
 }\r
 \r
@@ -183,7 +183,7 @@ GetMailboxPointer (
   UINT64               *MailboxLocationInIdt;\r
   UINT64               *MailboxLocationInHob;\r
   DEBUG_AGENT_MAILBOX  *Mailbox;\r
-  \r
+\r
   //\r
   // Get mailbox from IDT entry firstly\r
   //\r
@@ -198,7 +198,7 @@ GetMailboxPointer (
     // If mailbox was setup in SEC or the current CPU arch is different from the init arch\r
     // Debug Agent initialized, return the mailbox from IDT entry directly.\r
     // Otherwise, we need to check the mailbox location saved in GUIDed HOB further.\r
-    // \r
+    //\r
     return Mailbox;\r
   }\r
 \r
@@ -239,7 +239,7 @@ GetDebugPortHandle (
   )\r
 {\r
   DEBUG_AGENT_MAILBOX    *DebugAgentMailbox;\r
-  \r
+\r
   DebugAgentMailbox = GetMailboxPointer ();\r
 \r
   return (DEBUG_PORT_HANDLE) (UINTN)(DebugAgentMailbox->DebugPortHandle);\r
@@ -266,7 +266,7 @@ DebugAgentCallbackMemoryDiscoveredPpi (
   EFI_STATUS                     Status;\r
   DEBUG_AGENT_MAILBOX            *Mailbox;\r
   BOOLEAN                        InterruptStatus;\r
-  EFI_PHYSICAL_ADDRESS           Address; \r
+  EFI_PHYSICAL_ADDRESS           Address;\r
   DEBUG_AGENT_MAILBOX            *NewMailbox;\r
   UINT64                         *MailboxLocationInHob;\r
 \r
@@ -320,7 +320,7 @@ DebugAgentCallbackMemoryDiscoveredPpi (
   // Restore interrupt state.\r
   //\r
   SetInterruptState (InterruptStatus);\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -374,8 +374,8 @@ InitializeDebugAgent (
   UINT64                           DebugPortHandle;\r
   UINT64                           MailboxLocation;\r
   UINT64                           *MailboxLocationPointer;\r
-  EFI_PHYSICAL_ADDRESS             Address; \r
-  \r
+  EFI_PHYSICAL_ADDRESS             Address;\r
+\r
   DisableInterrupts ();\r
 \r
   switch (InitFlag) {\r
@@ -591,7 +591,7 @@ InitializeDebugAgent (
 \r
   default:\r
     //\r
-    // Only DEBUG_AGENT_INIT_PREMEM_SEC and DEBUG_AGENT_INIT_POSTMEM_SEC are allowed for this \r
+    // Only DEBUG_AGENT_INIT_PREMEM_SEC and DEBUG_AGENT_INIT_POSTMEM_SEC are allowed for this\r
     // Debug Agent library instance.\r
     //\r
     DEBUG ((EFI_D_ERROR, "Debug Agent: The InitFlag value is not allowed!\n"));\r
@@ -659,7 +659,7 @@ InitializeDebugAgentPhase2 (
 \r
   if (Phase2Context->InitFlag == DEBUG_AGENT_INIT_PREMEM_SEC) {\r
     //\r
-    // If Temporary RAM region is below 128 MB, then send message to \r
+    // If Temporary RAM region is below 128 MB, then send message to\r
     // host to disable low memory filtering.\r
     //\r
     SecCoreData = (EFI_SEC_PEI_HAND_OFF *)Phase2Context->Context;\r