mirror of https://github.com/acidanthera/audk.git
EFI_STATUS_CODE_DATA_MAX_SIZE is just for the maximum size of an EFI_DEBUG_INFO structure. Seemly, it is not suitable to be used in SerialStatusCodeHandler, so update SerialStatusCodeHandler to use MAX_DEBUG_MESSAGE_LENGTH (0x100) as the max printed string size to align with other DebugLib’s behavior.
Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13445 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
e5c1acc536
commit
90eaa3c1e0
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Serial I/O status code reporting worker.
|
Serial I/O status code reporting worker.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -50,7 +50,7 @@ SerialStatusCodeReportWorker (
|
||||||
CHAR8 *Filename;
|
CHAR8 *Filename;
|
||||||
CHAR8 *Description;
|
CHAR8 *Description;
|
||||||
CHAR8 *Format;
|
CHAR8 *Format;
|
||||||
CHAR8 Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE];
|
CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
|
||||||
UINT32 ErrorLevel;
|
UINT32 ErrorLevel;
|
||||||
UINT32 LineNumber;
|
UINT32 LineNumber;
|
||||||
UINTN CharCount;
|
UINTN CharCount;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Internal include file for Status Code Handler PEIM.
|
Internal include file for Status Code Handler PEIM.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -32,6 +32,11 @@
|
||||||
#include <Library/PeimEntryPoint.h>
|
#include <Library/PeimEntryPoint.h>
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
|
|
||||||
|
//
|
||||||
|
// Define the maximum message length
|
||||||
|
//
|
||||||
|
#define MAX_DEBUG_MESSAGE_LENGTH 0x100
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Convert status code value and extended data to readable ASCII string, send string to serial I/O device.
|
Convert status code value and extended data to readable ASCII string, send string to serial I/O device.
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Serial I/O status code reporting worker.
|
Serial I/O status code reporting worker.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -46,7 +46,7 @@ SerialStatusCodeReportWorker (
|
||||||
CHAR8 *Filename;
|
CHAR8 *Filename;
|
||||||
CHAR8 *Description;
|
CHAR8 *Description;
|
||||||
CHAR8 *Format;
|
CHAR8 *Format;
|
||||||
CHAR8 Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE];
|
CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
|
||||||
UINT32 ErrorLevel;
|
UINT32 ErrorLevel;
|
||||||
UINT32 LineNumber;
|
UINT32 LineNumber;
|
||||||
UINTN CharCount;
|
UINTN CharCount;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Internal include file for Status Code Handler Driver.
|
Internal include file for Status Code Handler Driver.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -35,6 +35,11 @@
|
||||||
#include <Library/UefiRuntimeLib.h>
|
#include <Library/UefiRuntimeLib.h>
|
||||||
#include <Library/SerialPortLib.h>
|
#include <Library/SerialPortLib.h>
|
||||||
|
|
||||||
|
//
|
||||||
|
// Define the maximum message length
|
||||||
|
//
|
||||||
|
#define MAX_DEBUG_MESSAGE_LENGTH 0x100
|
||||||
|
|
||||||
//
|
//
|
||||||
// Runtime memory status code worker definition
|
// Runtime memory status code worker definition
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Serial I/O status code reporting worker.
|
Serial I/O status code reporting worker.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -46,7 +46,7 @@ SerialStatusCodeReportWorker (
|
||||||
CHAR8 *Filename;
|
CHAR8 *Filename;
|
||||||
CHAR8 *Description;
|
CHAR8 *Description;
|
||||||
CHAR8 *Format;
|
CHAR8 *Format;
|
||||||
CHAR8 Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE];
|
CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
|
||||||
UINT32 ErrorLevel;
|
UINT32 ErrorLevel;
|
||||||
UINT32 LineNumber;
|
UINT32 LineNumber;
|
||||||
UINTN CharCount;
|
UINTN CharCount;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Internal include file for Status Code Handler Driver.
|
Internal include file for Status Code Handler Driver.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -32,6 +32,11 @@
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/MemoryAllocationLib.h>
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
|
|
||||||
|
//
|
||||||
|
// Define the maximum message length
|
||||||
|
//
|
||||||
|
#define MAX_DEBUG_MESSAGE_LENGTH 0x100
|
||||||
|
|
||||||
//
|
//
|
||||||
// Runtime memory status code worker definition
|
// Runtime memory status code worker definition
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue