Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r
Copyright (c) 2012, ARM Ltd. All rights reserved.<BR>\r
\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
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
#include <Library/PrintLib.h>\r
#include <Library/ArmDisassemblerLib.h>\r
#include <Library/SerialPortLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/UefiLib.h>\r
\r
#include <Guid/DebugImageInfoTable.h>\r
\r
\r
CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"\n%a Exception PC at 0x%08x CPSR 0x%08x ",\r
gExceptionTypeString[ExceptionType], SystemContext.SystemContextArm->PC, SystemContext.SystemContextArm->CPSR);\r
- SerialPortWrite ((UINT8 *) Buffer, CharCount);\r
+ SerialPortWrite ((UINT8 *)Buffer, CharCount);\r
+ if (gST->ConOut != NULL) {\r
+ AsciiPrint (Buffer);\r
+ }\r
\r
DEBUG_CODE_BEGIN ();\r
CHAR8 *Pdb;\r