mirror of https://github.com/acidanthera/audk.git
Replaced MAX_EXTENDED_DATA_SIZE by EFI_STATUS_CODE_DATA_MAX_SIZE.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11023 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
cd73414527
commit
72cfa6f70b
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Report Status Code Library for DXE Phase.
|
Report Status Code Library for DXE Phase.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2010, 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
|
||||||
|
@ -25,12 +25,6 @@
|
||||||
#include <Guid/StatusCodeDataTypeId.h>
|
#include <Guid/StatusCodeDataTypeId.h>
|
||||||
#include <Guid/StatusCodeDataTypeDebug.h>
|
#include <Guid/StatusCodeDataTypeDebug.h>
|
||||||
|
|
||||||
//
|
|
||||||
// Define the maximum extended data size that is supported when a status code is
|
|
||||||
// reported at TPL_HIGH_LEVEL.
|
|
||||||
//
|
|
||||||
#define MAX_EXTENDED_DATA_SIZE 0x200
|
|
||||||
|
|
||||||
EFI_STATUS_CODE_PROTOCOL *mReportStatusCodeLibStatusCodeProtocol = NULL;
|
EFI_STATUS_CODE_PROTOCOL *mReportStatusCodeLibStatusCodeProtocol = NULL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -491,7 +485,7 @@ ReportStatusCodeEx (
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_STATUS_CODE_DATA *StatusCodeData;
|
EFI_STATUS_CODE_DATA *StatusCodeData;
|
||||||
EFI_TPL Tpl;
|
EFI_TPL Tpl;
|
||||||
UINT64 Buffer[MAX_EXTENDED_DATA_SIZE / sizeof (UINT64)];
|
UINT64 Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE / sizeof (UINT64)];
|
||||||
|
|
||||||
ASSERT (!((ExtendedData == NULL) && (ExtendedDataSize != 0)));
|
ASSERT (!((ExtendedData == NULL) && (ExtendedDataSize != 0)));
|
||||||
ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));
|
ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));
|
||||||
|
@ -518,10 +512,10 @@ ReportStatusCodeEx (
|
||||||
//
|
//
|
||||||
// If a buffer could not be allocated, then see if the local variable Buffer can be used
|
// If a buffer could not be allocated, then see if the local variable Buffer can be used
|
||||||
//
|
//
|
||||||
if (ExtendedDataSize > (MAX_EXTENDED_DATA_SIZE - sizeof (EFI_STATUS_CODE_DATA))) {
|
if (ExtendedDataSize > (EFI_STATUS_CODE_DATA_MAX_SIZE - sizeof (EFI_STATUS_CODE_DATA))) {
|
||||||
//
|
//
|
||||||
// The local variable Buffer not large enough to hold the extended data associated
|
// The local variable Buffer not large enough to hold the extended data associated
|
||||||
// with the status code being reported.
|
// with the status code being reported.
|
||||||
//
|
//
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Instance of Report Status Code Library for PEI Phase.
|
Instance of Report Status Code Library for PEI Phase.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2010, 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
|
||||||
|
@ -23,11 +23,6 @@
|
||||||
#include <Library/OemHookStatusCodeLib.h>
|
#include <Library/OemHookStatusCodeLib.h>
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
|
|
||||||
//
|
|
||||||
// Define the maximum extended data size that is supported in the PEI phase
|
|
||||||
//
|
|
||||||
#define MAX_EXTENDED_DATA_SIZE 0x200
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Internal worker function that reports a status code through the PEI Status Code Service or
|
Internal worker function that reports a status code through the PEI Status Code Service or
|
||||||
OEM Hook Status Code Library.
|
OEM Hook Status Code Library.
|
||||||
|
@ -458,7 +453,7 @@ ReportStatusCodeEx (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS_CODE_DATA *StatusCodeData;
|
EFI_STATUS_CODE_DATA *StatusCodeData;
|
||||||
UINT64 Buffer[MAX_EXTENDED_DATA_SIZE / sizeof (UINT64)];
|
UINT64 Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE / sizeof (UINT64)];
|
||||||
|
|
||||||
//
|
//
|
||||||
// If ExtendedData is NULL and ExtendedDataSize is not zero, then ASSERT().
|
// If ExtendedData is NULL and ExtendedDataSize is not zero, then ASSERT().
|
||||||
|
@ -469,10 +464,10 @@ ReportStatusCodeEx (
|
||||||
//
|
//
|
||||||
ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));
|
ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));
|
||||||
|
|
||||||
if (ExtendedDataSize > (MAX_EXTENDED_DATA_SIZE - sizeof (EFI_STATUS_CODE_DATA))) {
|
if (ExtendedDataSize > (EFI_STATUS_CODE_DATA_MAX_SIZE - sizeof (EFI_STATUS_CODE_DATA))) {
|
||||||
//
|
//
|
||||||
// The local variable Buffer not large enough to hold the extended data associated
|
// The local variable Buffer not large enough to hold the extended data associated
|
||||||
// with the status code being reported.
|
// with the status code being reported.
|
||||||
//
|
//
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
|
|
Loading…
Reference in New Issue