Add some function/header comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5037 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
Custom decompress Guid definitions
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. 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
|
||||||
@ -9,20 +10,12 @@ http://opensource.org/licenses/bsd-license.php
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
|
||||||
|
|
||||||
CustomDecompress.h
|
|
||||||
|
|
||||||
Abstract:
|
|
||||||
|
|
||||||
Custom decompress Guid definitions
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef __EFI_CUSTOM_DECOMPRESS_GUID_H__
|
#ifndef __EFI_CUSTOM_DECOMPRESS_GUID_H__
|
||||||
#define __EFI_CUSTOM_DECOMPRESS_GUID_H__
|
#define __EFI_CUSTOM_DECOMPRESS_GUID_H__
|
||||||
|
|
||||||
#define TINAO_CUSTOM_DECOMPRESS_GUID \
|
#define TIANO_CUSTOM_DECOMPRESS_GUID \
|
||||||
{ 0xA31280AD, 0x481E, 0x41B6, { 0x95, 0xE8, 0x12, 0x7F, 0x4C, 0x98, 0x47, 0x79 } }
|
{ 0xA31280AD, 0x481E, 0x41B6, { 0x95, 0xE8, 0x12, 0x7F, 0x4C, 0x98, 0x47, 0x79 } }
|
||||||
|
|
||||||
extern GUID gTianoCustomDecompressGuid;
|
extern GUID gTianoCustomDecompressGuid;
|
||||||
|
@ -36,5 +36,4 @@ extern EFI_GUID gEfiMemoryProducerGuid;
|
|||||||
|
|
||||||
extern EFI_GUID gEfiMiscProducerGuid;
|
extern EFI_GUID gEfiMiscProducerGuid;
|
||||||
|
|
||||||
|
#endif // _DATAHUB_PRODUCER_H_
|
||||||
#endif
|
|
||||||
|
@ -32,4 +32,5 @@ typedef struct {
|
|||||||
|
|
||||||
extern EFI_GUID gEfiDataHubStatusCodeRecordGuid;
|
extern EFI_GUID gEfiDataHubStatusCodeRecordGuid;
|
||||||
|
|
||||||
#endif
|
#endif // __STATUS_CODE_H__
|
||||||
|
|
||||||
|
@ -20,4 +20,5 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
extern EFI_GUID gEfiPciHotplugDeviceGuid;
|
extern EFI_GUID gEfiPciHotplugDeviceGuid;
|
||||||
|
|
||||||
#endif
|
#endif // __PCI_HOTPLUG_DEVICE_GUID_H_
|
||||||
|
|
||||||
|
@ -37,4 +37,5 @@ typedef struct {
|
|||||||
EFI_PCI_OPTION_ROM_DESCRIPTOR *PciOptionRomDescriptors;
|
EFI_PCI_OPTION_ROM_DESCRIPTOR *PciOptionRomDescriptors;
|
||||||
} EFI_PCI_OPTION_ROM_TABLE;
|
} EFI_PCI_OPTION_ROM_TABLE;
|
||||||
|
|
||||||
#endif
|
#endif // __PCI_OPTION_ROM_TABLE_GUID_H_
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
OEM hook status code library functions with no library constructor/destructor
|
OEM hook status code library functions with no library constructor/destructor
|
||||||
|
|
||||||
@ -11,8 +10,6 @@
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name: OemHookStatusCodeLib.h
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef __OEM_HOOK_STATUSCODE_LIB__
|
#ifndef __OEM_HOOK_STATUSCODE_LIB__
|
||||||
@ -70,4 +67,5 @@ OemHookStatusCodeReport (
|
|||||||
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif
|
#endif // __OEM_HOOK_STATUSCODE_LIB__
|
||||||
|
|
||||||
|
@ -22,6 +22,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
typedef struct _EFI_VGA_MINI_PORT_PROTOCOL EFI_VGA_MINI_PORT_PROTOCOL;
|
typedef struct _EFI_VGA_MINI_PORT_PROTOCOL EFI_VGA_MINI_PORT_PROTOCOL;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Sets the text display mode of a VGA controller
|
||||||
|
|
||||||
|
@param This Protocol instance pointer.
|
||||||
|
@param Mode Mode number. 0 - 80x25 1-80x50
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The mode was set
|
||||||
|
@retval EFI_DEVICE_ERROR The device is not functioning properly.
|
||||||
|
|
||||||
|
**/
|
||||||
typedef
|
typedef
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
(EFIAPI *EFI_VGA_MINI_PORT_SET_MODE) (
|
(EFIAPI *EFI_VGA_MINI_PORT_SET_MODE) (
|
||||||
@ -29,20 +39,6 @@ EFI_STATUS
|
|||||||
IN UINTN ModeNumber
|
IN UINTN ModeNumber
|
||||||
);
|
);
|
||||||
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Sets the text display mode of a VGA controller
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
Mode - Mode number. 0 - 80x25 1-80x50
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The mode was set
|
|
||||||
EFI_DEVICE_ERROR - The device is not functioning properly.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
struct _EFI_VGA_MINI_PORT_PROTOCOL {
|
struct _EFI_VGA_MINI_PORT_PROTOCOL {
|
||||||
EFI_VGA_MINI_PORT_SET_MODE SetMode;
|
EFI_VGA_MINI_PORT_SET_MODE SetMode;
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Report Status Code Library for DXE Phase.
|
Implementation for ReportStatusCodeLib library class. This
|
||||||
|
library instance can be used to any phase: SEC/PEI/DXE.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation<BR>
|
Copyright (c) 2006 - 2007, Intel Corporation<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
@ -12,7 +13,6 @@
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
|
||||||
#include <Base.h>
|
#include <Base.h>
|
||||||
#include <Framework/StatusCode.h>
|
#include <Framework/StatusCode.h>
|
||||||
#include <Guid/StatusCodeDataTypeId.h>
|
#include <Guid/StatusCodeDataTypeId.h>
|
||||||
@ -528,3 +528,4 @@ ReportDebugCodeEnabled (
|
|||||||
{
|
{
|
||||||
return (BOOLEAN) ((PcdGet8(PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED) != 0);
|
return (BOOLEAN) ((PcdGet8(PcdReportStatusCodePropertyMask) & REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
/**@file
|
/**@file
|
||||||
UEFI and Custom Decompress Library
|
UEFI and Custom Decompress Library
|
||||||
|
The function of UefiTianoDecompress() is interface for this module,
|
||||||
|
it will do tiano or uefi decompress with different verison parameter.
|
||||||
|
See EFI specification 1.1 Chapter 17 to get LZ77 compress/decompress.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
@ -15,25 +18,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include <Guid/CustomDecompress.h>
|
#include <Guid/CustomDecompress.h>
|
||||||
#include "BaseUefiTianoCustomDecompressLibInternals.h"
|
#include "BaseUefiTianoCustomDecompressLibInternals.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
Shift mBitBuf NumOfBits left. Read in NumOfBits of bits from source.
|
||||||
|
|
||||||
|
@param Sd The global scratch data
|
||||||
|
@param NumOfBits The number of bits to shift and read.
|
||||||
|
**/
|
||||||
VOID
|
VOID
|
||||||
FillBuf (
|
FillBuf (
|
||||||
IN SCRATCH_DATA *Sd,
|
IN SCRATCH_DATA *Sd,
|
||||||
IN UINT16 NumOfBits
|
IN UINT16 NumOfBits
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Shift mBitBuf NumOfBits left. Read in NumOfBits of bits from source.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
Sd - The global scratch data
|
|
||||||
NumOfBits - The number of bits to shift and read.
|
|
||||||
|
|
||||||
Returns: (VOID)
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
Sd->mBitBuf = (UINT32) (Sd->mBitBuf << NumOfBits);
|
Sd->mBitBuf = (UINT32) (Sd->mBitBuf << NumOfBits);
|
||||||
|
|
||||||
@ -64,29 +59,24 @@ Returns: (VOID)
|
|||||||
Sd->mBitBuf |= Sd->mSubBitBuf >> Sd->mBitCount;
|
Sd->mBitBuf |= Sd->mSubBitBuf >> Sd->mBitCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT32
|
/**
|
||||||
GetBits (
|
Get NumOfBits of bits out from mBitBuf
|
||||||
IN SCRATCH_DATA *Sd,
|
|
||||||
IN UINT16 NumOfBits
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent
|
Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent
|
||||||
NumOfBits of bits from source. Returns NumOfBits of bits that are
|
NumOfBits of bits from source. Returns NumOfBits of bits that are
|
||||||
popped out.
|
popped out.
|
||||||
|
|
||||||
Arguments:
|
@param Sd The global scratch data.
|
||||||
|
@param NumOfBits The number of bits to pop and read.
|
||||||
|
|
||||||
Sd - The global scratch data.
|
@return The bits that are popped out.
|
||||||
NumOfBits - The number of bits to pop and read.
|
|
||||||
|
|
||||||
Returns:
|
**/
|
||||||
|
UINT32
|
||||||
The bits that are popped out.
|
GetBits (
|
||||||
|
IN SCRATCH_DATA *Sd,
|
||||||
--*/
|
IN UINT16 NumOfBits
|
||||||
|
)
|
||||||
{
|
{
|
||||||
UINT32 OutBits;
|
UINT32 OutBits;
|
||||||
|
|
||||||
@ -97,6 +87,22 @@ Returns:
|
|||||||
return OutBits;
|
return OutBits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Creates Huffman Code mapping table according to code length array.
|
||||||
|
|
||||||
|
Creates Huffman Code mapping table for Extra Set, Char&Len Set
|
||||||
|
and Position Set according to code length array.
|
||||||
|
|
||||||
|
@param Sd The global scratch data
|
||||||
|
@param NumOfChar Number of symbols in the symbol set
|
||||||
|
@param BitLen Code length array
|
||||||
|
@param TableBits The width of the mapping table
|
||||||
|
@param Table The table
|
||||||
|
|
||||||
|
@retval 0 OK.
|
||||||
|
@retval BAD_TABLE The table is corrupted.
|
||||||
|
|
||||||
|
**/
|
||||||
UINT16
|
UINT16
|
||||||
MakeTable (
|
MakeTable (
|
||||||
IN SCRATCH_DATA *Sd,
|
IN SCRATCH_DATA *Sd,
|
||||||
@ -105,26 +111,6 @@ MakeTable (
|
|||||||
IN UINT16 TableBits,
|
IN UINT16 TableBits,
|
||||||
OUT UINT16 *Table
|
OUT UINT16 *Table
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Creates Huffman Code mapping table according to code length array.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
Sd - The global scratch data
|
|
||||||
NumOfChar - Number of symbols in the symbol set
|
|
||||||
BitLen - Code length array
|
|
||||||
TableBits - The width of the mapping table
|
|
||||||
Table - The table
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
0 - OK.
|
|
||||||
BAD_TABLE - The table is corrupted.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
UINT16 Count[17];
|
UINT16 Count[17];
|
||||||
UINT16 Weight[17];
|
UINT16 Weight[17];
|
||||||
@ -235,25 +221,17 @@ Returns:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Decodes a position value.
|
||||||
|
|
||||||
|
@param Sd the global scratch data
|
||||||
|
|
||||||
|
@return The position value decoded.
|
||||||
|
**/
|
||||||
UINT32
|
UINT32
|
||||||
DecodeP (
|
DecodeP (
|
||||||
IN SCRATCH_DATA *Sd
|
IN SCRATCH_DATA *Sd
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Decodes a position value.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
Sd - the global scratch data
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
The position value decoded.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
UINT16 Val;
|
UINT16 Val;
|
||||||
UINT32 Mask;
|
UINT32 Mask;
|
||||||
@ -288,6 +266,21 @@ Returns:
|
|||||||
return Pos;
|
return Pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Reads code lengths for the Extra Set or the Position Set.
|
||||||
|
|
||||||
|
Read in the Extra Set or Pointion Set Length Arrary, then
|
||||||
|
generate the Huffman code mapping for them.
|
||||||
|
|
||||||
|
@param Sd The global scratch data.
|
||||||
|
@param nn Number of symbols.
|
||||||
|
@param nbit Number of bits needed to represent nn.
|
||||||
|
@param Special The special symbol that needs to be taken care of.
|
||||||
|
|
||||||
|
@retval 0 OK.
|
||||||
|
@retval BAD_TABLE Table is corrupted.
|
||||||
|
|
||||||
|
**/
|
||||||
UINT16
|
UINT16
|
||||||
ReadPTLen (
|
ReadPTLen (
|
||||||
IN SCRATCH_DATA *Sd,
|
IN SCRATCH_DATA *Sd,
|
||||||
@ -295,25 +288,6 @@ ReadPTLen (
|
|||||||
IN UINT16 nbit,
|
IN UINT16 nbit,
|
||||||
IN UINT16 Special
|
IN UINT16 Special
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Reads code lengths for the Extra Set or the Position Set
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
Sd - The global scratch data
|
|
||||||
nn - Number of symbols
|
|
||||||
nbit - Number of bits needed to represent nn
|
|
||||||
Special - The special symbol that needs to be taken care of
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
0 - OK.
|
|
||||||
BAD_TABLE - Table is corrupted.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
UINT16 Number;
|
UINT16 Number;
|
||||||
UINT16 CharC;
|
UINT16 CharC;
|
||||||
@ -369,23 +343,19 @@ Returns:
|
|||||||
return MakeTable (Sd, nn, Sd->mPTLen, 8, Sd->mPTTable);
|
return MakeTable (Sd, nn, Sd->mPTLen, 8, Sd->mPTTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Reads code lengths for Char&Len Set.
|
||||||
|
|
||||||
|
Read in and decode the Char&Len Set Code Length Array, then
|
||||||
|
generate the Huffman Code mapping table for the Char&Len Set.
|
||||||
|
|
||||||
|
@param Sd the global scratch data
|
||||||
|
|
||||||
|
**/
|
||||||
VOID
|
VOID
|
||||||
ReadCLen (
|
ReadCLen (
|
||||||
SCRATCH_DATA *Sd
|
SCRATCH_DATA *Sd
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Reads code lengths for Char&Len Set.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
Sd - the global scratch data
|
|
||||||
|
|
||||||
Returns: (VOID)
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
UINT16 Number;
|
UINT16 Number;
|
||||||
UINT16 CharC;
|
UINT16 CharC;
|
||||||
@ -462,25 +432,22 @@ Returns: (VOID)
|
|||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Decode a character/length value.
|
||||||
|
|
||||||
|
Read one value from mBitBuf, Get one code from mBitBuf. If it is at block boundary, generates
|
||||||
|
Huffman code mapping table for Extra Set, Code&Len Set and
|
||||||
|
Position Set.
|
||||||
|
|
||||||
|
@param Sd The global scratch data.
|
||||||
|
|
||||||
|
@return The value decoded.
|
||||||
|
|
||||||
|
**/
|
||||||
UINT16
|
UINT16
|
||||||
DecodeC (
|
DecodeC (
|
||||||
SCRATCH_DATA *Sd
|
SCRATCH_DATA *Sd
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Decode a character/length value.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
Sd - The global scratch data.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
The value decoded.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
UINT16 Index2;
|
UINT16 Index2;
|
||||||
UINT32 Mask;
|
UINT32 Mask;
|
||||||
@ -527,23 +494,15 @@ Returns:
|
|||||||
return Index2;
|
return Index2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Decode the source data ad put the resulting data into the destination buffer.
|
||||||
|
|
||||||
|
@param Sd - The global scratch data
|
||||||
|
**/
|
||||||
VOID
|
VOID
|
||||||
Decode (
|
Decode (
|
||||||
SCRATCH_DATA *Sd
|
SCRATCH_DATA *Sd
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Decode the source data and put the resulting data into the destination buffer.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
Sd - The global scratch data
|
|
||||||
|
|
||||||
Returns: (VOID)
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
UINT16 BytesRemain;
|
UINT16 BytesRemain;
|
||||||
UINT32 DataIdx;
|
UINT32 DataIdx;
|
||||||
@ -595,6 +554,17 @@ Done:
|
|||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
The internal implementation of *_DECOMPRESS_PROTOCOL.GetInfo().
|
||||||
|
|
||||||
|
@param Source The source buffer containing the compressed data.
|
||||||
|
@param SourceSize The size of source buffer
|
||||||
|
@param DestinationSize The size of destination buffer.
|
||||||
|
@param ScratchSize The size of scratch buffer.
|
||||||
|
|
||||||
|
@retval RETURN_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.
|
||||||
|
@retval RETURN_INVALID_PARAMETER - The source data is corrupted
|
||||||
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
UefiDecompressGetInfo (
|
UefiDecompressGetInfo (
|
||||||
@ -603,25 +573,6 @@ UefiDecompressGetInfo (
|
|||||||
OUT UINT32 *DestinationSize,
|
OUT UINT32 *DestinationSize,
|
||||||
OUT UINT32 *ScratchSize
|
OUT UINT32 *ScratchSize
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
The internal implementation of *_DECOMPRESS_PROTOCOL.GetInfo().
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
Source - The source buffer containing the compressed data.
|
|
||||||
SourceSize - The size of source buffer
|
|
||||||
DestinationSize - The size of destination buffer.
|
|
||||||
ScratchSize - The size of scratch buffer.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
RETURN_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.
|
|
||||||
RETURN_INVALID_PARAMETER - The source data is corrupted
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
UINT32 CompressedSize;
|
UINT32 CompressedSize;
|
||||||
|
|
||||||
@ -644,6 +595,17 @@ Returns:
|
|||||||
return RETURN_SUCCESS;
|
return RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
The internal implementation of *_DECOMPRESS_PROTOCOL.Decompress().
|
||||||
|
|
||||||
|
@param Source The source buffer containing the compressed data.
|
||||||
|
@param Destination The destination buffer to store the decompressed data
|
||||||
|
@param Scratch The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.
|
||||||
|
@param Version 1 for UEFI Decompress algoruthm, 2 for Tiano Decompess algorithm
|
||||||
|
|
||||||
|
@retval RETURN_SUCCESS Decompression is successfull
|
||||||
|
@retval RETURN_INVALID_PARAMETER The source data is corrupted
|
||||||
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
UefiTianoDecompress (
|
UefiTianoDecompress (
|
||||||
@ -652,25 +614,6 @@ UefiTianoDecompress (
|
|||||||
IN OUT VOID *Scratch,
|
IN OUT VOID *Scratch,
|
||||||
IN UINT32 Version
|
IN UINT32 Version
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
The internal implementation of *_DECOMPRESS_PROTOCOL.Decompress().
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
Source - The source buffer containing the compressed data.
|
|
||||||
Destination - The destination buffer to store the decompressed data
|
|
||||||
Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.
|
|
||||||
Version - 1 for UEFI Decompress algoruthm, 2 for Tiano Decompess algorithm
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
RETURN_SUCCESS - Decompression is successfull
|
|
||||||
RETURN_INVALID_PARAMETER - The source data is corrupted
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
volatile UINT32 Index;
|
volatile UINT32 Index;
|
||||||
UINT32 CompSize;
|
UINT32 CompSize;
|
||||||
@ -743,6 +686,16 @@ Returns:
|
|||||||
return RETURN_SUCCESS;
|
return RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
The internal implementation of *_DECOMPRESS_PROTOCOL.Decompress().
|
||||||
|
|
||||||
|
@param Source - The source buffer containing the compressed data.
|
||||||
|
@param Destination - The destination buffer to store the decompressed data
|
||||||
|
@param Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.
|
||||||
|
|
||||||
|
@retval RETURN_SUCCESS - Decompression is successfull
|
||||||
|
@retval RETURN_INVALID_PARAMETER - The source data is corrupted
|
||||||
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
UefiDecompress (
|
UefiDecompress (
|
||||||
@ -750,28 +703,22 @@ UefiDecompress (
|
|||||||
IN OUT VOID *Destination,
|
IN OUT VOID *Destination,
|
||||||
IN OUT VOID *Scratch
|
IN OUT VOID *Scratch
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
The internal implementation of *_DECOMPRESS_PROTOCOL.Decompress().
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
Source - The source buffer containing the compressed data.
|
|
||||||
Destination - The destination buffer to store the decompressed data
|
|
||||||
Scratch - The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
RETURN_SUCCESS - Decompression is successfull
|
|
||||||
RETURN_INVALID_PARAMETER - The source data is corrupted
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
return UefiTianoDecompress (Source, Destination, Scratch, 1);
|
return UefiTianoDecompress (Source, Destination, Scratch, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
The internal implementation of Tiano decompress GetInfo.
|
||||||
|
|
||||||
|
@param InputSection Buffer containing the input GUIDed section to be processed.
|
||||||
|
@param OutputBufferSize The size of OutputBuffer.
|
||||||
|
@param ScratchBufferSize The size of ScratchBuffer.
|
||||||
|
@param SectionAttribute The attribute of the input guided section.
|
||||||
|
|
||||||
|
@retval RETURN_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.
|
||||||
|
@retval RETURN_INVALID_PARAMETER - The source data is corrupted
|
||||||
|
The GUID in InputSection does not match this instance guid.
|
||||||
|
**/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
TianoDecompressGetInfo (
|
TianoDecompressGetInfo (
|
||||||
@ -780,25 +727,7 @@ TianoDecompressGetInfo (
|
|||||||
OUT UINT32 *ScratchBufferSize,
|
OUT UINT32 *ScratchBufferSize,
|
||||||
OUT UINT16 *SectionAttribute
|
OUT UINT16 *SectionAttribute
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
The internal implementation of Tiano decompress GetInfo.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
InputSection Buffer containing the input GUIDed section to be processed.
|
|
||||||
OutputBufferSize The size of OutputBuffer.
|
|
||||||
ScratchBufferSize The size of ScratchBuffer.
|
|
||||||
SectionAttribute The attribute of the input guided section.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
RETURN_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.
|
|
||||||
RETURN_INVALID_PARAMETER - The source data is corrupted
|
|
||||||
The GUID in InputSection does not match this instance guid.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
ASSERT (SectionAttribute != NULL);
|
ASSERT (SectionAttribute != NULL);
|
||||||
|
|
||||||
@ -827,6 +756,22 @@ Returns:
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
The implementation of Tiano Decompress().
|
||||||
|
|
||||||
|
@param InputSection Buffer containing the input GUIDed section to be processed.
|
||||||
|
@param OutputBuffer OutputBuffer to point to the start of the section's contents.
|
||||||
|
if guided data is not prcessed. Otherwise,
|
||||||
|
OutputBuffer to contain the output data, which is allocated by the caller.
|
||||||
|
@param ScratchBuffer A pointer to a caller-allocated buffer for function internal use.
|
||||||
|
@param AuthenticationStatus A pointer to a caller-allocated UINT32 that indicates the
|
||||||
|
authentication status of the output buffer.
|
||||||
|
|
||||||
|
@retval RETURN_SUCCESS Decompression is successfull
|
||||||
|
@retval RETURN_INVALID_PARAMETER The source data is corrupted, or
|
||||||
|
The GUID in InputSection does not match this instance guid.
|
||||||
|
|
||||||
|
--*/
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
TianoDecompress (
|
TianoDecompress (
|
||||||
@ -835,28 +780,6 @@ TianoDecompress (
|
|||||||
IN VOID *ScratchBuffer, OPTIONAL
|
IN VOID *ScratchBuffer, OPTIONAL
|
||||||
OUT UINT32 *AuthenticationStatus
|
OUT UINT32 *AuthenticationStatus
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
The implementation of Tiano Decompress().
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
InputSection Buffer containing the input GUIDed section to be processed.
|
|
||||||
OutputBuffer OutputBuffer to point to the start of the section's contents.
|
|
||||||
if guided data is not prcessed. Otherwise,
|
|
||||||
OutputBuffer to contain the output data, which is allocated by the caller.
|
|
||||||
ScratchBuffer A pointer to a caller-allocated buffer for function internal use.
|
|
||||||
AuthenticationStatus A pointer to a caller-allocated UINT32 that indicates the
|
|
||||||
authentication status of the output buffer.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
RETURN_SUCCESS - Decompression is successfull
|
|
||||||
RETURN_INVALID_PARAMETER - The source data is corrupted, or
|
|
||||||
The GUID in InputSection does not match this instance guid.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
ASSERT (OutputBuffer != NULL);
|
ASSERT (OutputBuffer != NULL);
|
||||||
|
|
||||||
@ -886,11 +809,11 @@ Returns:
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Register TianoDecompress handler.
|
Register TianoDecompress handler.
|
||||||
|
|
||||||
@retval RETURN_SUCCESS Register successfully.
|
@retval RETURN_SUCCESS Register successfully.
|
||||||
@retval RETURN_OUT_OF_RESOURCES No enough memory to store this handler.
|
@retval RETURN_OUT_OF_RESOURCES No enough memory to store this handler.
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "ReportStatusCodeLibInternal.h"
|
#include "ReportStatusCodeLibInternal.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Locatet he report status code service.
|
Locate he report status code service.
|
||||||
|
|
||||||
@return EFI_REPORT_STATUS_CODE function point to
|
@return EFI_REPORT_STATUS_CODE function point to
|
||||||
ReportStatusCode.
|
ReportStatusCode.
|
||||||
@ -40,7 +40,47 @@ InternalGetReportStatusCode (
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Reports a status code with full parameters.
|
||||||
|
|
||||||
|
The function reports a status code. If ExtendedData is NULL and ExtendedDataSize
|
||||||
|
is 0, then an extended data buffer is not reported. If ExtendedData is not
|
||||||
|
NULL and ExtendedDataSize is not 0, then an extended data buffer is allocated.
|
||||||
|
ExtendedData is assumed not have the standard status code header, so this function
|
||||||
|
is responsible for allocating a buffer large enough for the standard header and
|
||||||
|
the extended data passed into this function. The standard header is filled in
|
||||||
|
with a GUID specified by ExtendedDataGuid. If ExtendedDataGuid is NULL, then a
|
||||||
|
GUID of gEfiStatusCodeSpecificDatauid is used. The status code is reported with
|
||||||
|
an instance specified by Instance and a caller ID specified by CallerId. If
|
||||||
|
CallerId is NULL, then a caller ID of gEfiCallerIdGuid is used.
|
||||||
|
|
||||||
|
ReportStatusCodeEx()must actively prevent recursion. If ReportStatusCodeEx()
|
||||||
|
is called while processing another any other Report Status Code Library function,
|
||||||
|
then ReportStatusCodeEx() must return EFI_DEVICE_ERROR immediately.
|
||||||
|
|
||||||
|
If ExtendedData is NULL and ExtendedDataSize is not zero, then ASSERT().
|
||||||
|
If ExtendedData is not NULL and ExtendedDataSize is zero, then ASSERT().
|
||||||
|
|
||||||
|
@param Type Status code type.
|
||||||
|
@param Value Status code value.
|
||||||
|
@param Instance Status code instance number.
|
||||||
|
@param CallerId Pointer to a GUID that identifies the caller of this
|
||||||
|
function. If this parameter is NULL, then a caller
|
||||||
|
ID of gEfiCallerIdGuid is used.
|
||||||
|
@param ExtendedDataGuid Pointer to the GUID for the extended data buffer.
|
||||||
|
If this parameter is NULL, then a the status code
|
||||||
|
standard header is filled in with
|
||||||
|
gEfiStatusCodeSpecificDataGuid.
|
||||||
|
@param ExtendedData Pointer to the extended data buffer. This is an
|
||||||
|
optional parameter that may be NULL.
|
||||||
|
@param ExtendedDataSize The size, in bytes, of the extended data buffer.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The status code was reported.
|
||||||
|
@retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate
|
||||||
|
the extended data section if it was specified.
|
||||||
|
@retval EFI_UNSUPPORTED Report status code is not supported
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
InternalReportStatusCodeEx (
|
InternalReportStatusCodeEx (
|
||||||
|
@ -13,8 +13,6 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
#include "ReportStatusCodeLibInternal.h"
|
#include "ReportStatusCodeLibInternal.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EFI_REPORT_STATUS_CODE mReportStatusCode = NULL;
|
EFI_REPORT_STATUS_CODE mReportStatusCode = NULL;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Locatet he report status code service.
|
Locate he report status code service.
|
||||||
|
|
||||||
@return EFI_REPORT_STATUS_CODE function point to
|
@return EFI_REPORT_STATUS_CODE function point to
|
||||||
ReportStatusCode.
|
ReportStatusCode.
|
||||||
|
@ -37,37 +37,30 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
Return the graphics image file named FileNameGuid into Image and return it's
|
||||||
|
size in ImageSize. All Firmware Volumes (FV) in the system are searched for the
|
||||||
|
file name.
|
||||||
|
|
||||||
|
@param FileNameGuid - File Name of graphics file in the FV(s).
|
||||||
|
|
||||||
|
@param Image - Pointer to pointer to return graphics image. If NULL, a
|
||||||
|
buffer will be allocated.
|
||||||
|
|
||||||
|
@param ImageSize - Size of the graphics Image in bytes. Zero if no image found.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS - Image and ImageSize are valid.
|
||||||
|
@retval EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size
|
||||||
|
@retval EFI_NOT_FOUND - FileNameGuid not found
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
GetGraphicsBitMapFromFV (
|
GetGraphicsBitMapFromFV (
|
||||||
IN EFI_GUID *FileNameGuid,
|
IN EFI_GUID *FileNameGuid,
|
||||||
OUT VOID **Image,
|
OUT VOID **Image,
|
||||||
OUT UINTN *ImageSize
|
OUT UINTN *ImageSize
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Return the graphics image file named FileNameGuid into Image and return it's
|
|
||||||
size in ImageSize. All Firmware Volumes (FV) in the system are searched for the
|
|
||||||
file name.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
FileNameGuid - File Name of graphics file in the FV(s).
|
|
||||||
|
|
||||||
Image - Pointer to pointer to return graphics image. If NULL, a
|
|
||||||
buffer will be allocated.
|
|
||||||
|
|
||||||
ImageSize - Size of the graphics Image in bytes. Zero if no image found.
|
|
||||||
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS - Image and ImageSize are valid.
|
|
||||||
EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size
|
|
||||||
EFI_NOT_FOUND - FileNameGuid not found
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINTN FvProtocolCount;
|
UINTN FvProtocolCount;
|
||||||
@ -120,6 +113,31 @@ Returns:
|
|||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Convert a *.BMP graphics image to a GOP/UGA blt buffer. If a NULL Blt buffer
|
||||||
|
is passed in a GopBlt buffer will be allocated by this routine. If a GopBlt
|
||||||
|
buffer is passed in it will be used if it is big enough.
|
||||||
|
|
||||||
|
@param BmpImage - Pointer to BMP file
|
||||||
|
|
||||||
|
@param BmpImageSize - Number of bytes in BmpImage
|
||||||
|
|
||||||
|
@param GopBlt - Buffer containing GOP version of BmpImage.
|
||||||
|
|
||||||
|
@param GopBltSize - Size of GopBlt in bytes.
|
||||||
|
|
||||||
|
@param PixelHeight - Height of GopBlt/BmpImage in pixels
|
||||||
|
|
||||||
|
@param PixelWidth - Width of GopBlt/BmpImage in pixels
|
||||||
|
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS - GopBlt and GopBltSize are returned.
|
||||||
|
@retval EFI_UNSUPPORTED - BmpImage is not a valid *.BMP image
|
||||||
|
@retval EFI_BUFFER_TOO_SMALL - The passed in GopBlt buffer is not big enough.
|
||||||
|
GopBltSize will contain the required size.
|
||||||
|
@retval EFI_OUT_OF_RESOURCES - No enough buffer to allocate
|
||||||
|
|
||||||
|
**/
|
||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
ConvertBmpToGopBlt (
|
ConvertBmpToGopBlt (
|
||||||
@ -130,38 +148,7 @@ ConvertBmpToGopBlt (
|
|||||||
OUT UINTN *PixelHeight,
|
OUT UINTN *PixelHeight,
|
||||||
OUT UINTN *PixelWidth
|
OUT UINTN *PixelWidth
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Convert a *.BMP graphics image to a GOP/UGA blt buffer. If a NULL Blt buffer
|
|
||||||
is passed in a GopBlt buffer will be allocated by this routine. If a GopBlt
|
|
||||||
buffer is passed in it will be used if it is big enough.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
BmpImage - Pointer to BMP file
|
|
||||||
|
|
||||||
BmpImageSize - Number of bytes in BmpImage
|
|
||||||
|
|
||||||
GopBlt - Buffer containing GOP version of BmpImage.
|
|
||||||
|
|
||||||
GopBltSize - Size of GopBlt in bytes.
|
|
||||||
|
|
||||||
PixelHeight - Height of GopBlt/BmpImage in pixels
|
|
||||||
|
|
||||||
PixelWidth - Width of GopBlt/BmpImage in pixels
|
|
||||||
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS - GopBlt and GopBltSize are returned.
|
|
||||||
EFI_UNSUPPORTED - BmpImage is not a valid *.BMP image
|
|
||||||
EFI_BUFFER_TOO_SMALL - The passed in GopBlt buffer is not big enough.
|
|
||||||
GopBltSize will contain the required size.
|
|
||||||
EFI_OUT_OF_RESOURCES - No enough buffer to allocate
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
UINT8 *Image;
|
UINT8 *Image;
|
||||||
UINT8 *ImageHeader;
|
UINT8 *ImageHeader;
|
||||||
@ -296,30 +283,23 @@ Returns:
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
EFI_STATUS
|
|
||||||
LockKeyboards (
|
|
||||||
IN CHAR16 *Password
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Use Console Control Protocol to lock the Console In Spliter virtual handle.
|
Use Console Control Protocol to lock the Console In Spliter virtual handle.
|
||||||
This is the ConInHandle and ConIn handle in the EFI system table. All key
|
This is the ConInHandle and ConIn handle in the EFI system table. All key
|
||||||
presses will be ignored until the Password is typed in. The only way to
|
presses will be ignored until the Password is typed in. The only way to
|
||||||
disable the password is to type it in to a ConIn device.
|
disable the password is to type it in to a ConIn device.
|
||||||
|
|
||||||
Arguments:
|
@param Password - Password used to lock ConIn device
|
||||||
Password - Password used to lock ConIn device
|
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
|
|
||||||
displayed.
|
displayed.
|
||||||
EFI_UNSUPPORTED - Logo not found
|
@retval EFI_UNSUPPORTED - Logo not found
|
||||||
|
|
||||||
--*/
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
LockKeyboards (
|
||||||
|
IN CHAR16 *Password
|
||||||
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;
|
EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;
|
||||||
@ -333,30 +313,22 @@ Returns:
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Use Console Control to turn off UGA based Simple Text Out consoles from going
|
||||||
|
to the UGA device. Put up LogoFile on every UGA device that is a console
|
||||||
|
|
||||||
|
@param LogoFile - File name of logo to display on the center of the screen.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
|
||||||
|
displayed.
|
||||||
|
@retval EFI_UNSUPPORTED - Logo not found
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EnableQuietBoot (
|
EnableQuietBoot (
|
||||||
IN EFI_GUID *LogoFile
|
IN EFI_GUID *LogoFile
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Use Console Control to turn off UGA based Simple Text Out consoles from going
|
|
||||||
to the UGA device. Put up LogoFile on every UGA device that is a console
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
LogoFile - File name of logo to display on the center of the screen.
|
|
||||||
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
|
|
||||||
displayed.
|
|
||||||
EFI_UNSUPPORTED - Logo not found
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;
|
EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;
|
||||||
@ -571,28 +543,18 @@ Returns:
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Use Console Control to turn on GOP/UGA based Simple Text Out consoles. The GOP/UGA
|
||||||
|
Simple Text Out screens will now be synced up with all non GOP/UGA output devices
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS - GOP/UGA devices are back in text mode and synced up.
|
||||||
|
@retval EFI_UNSUPPORTED - Logo not found
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
DisableQuietBoot (
|
DisableQuietBoot (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Use Console Control to turn on GOP/UGA based Simple Text Out consoles. The GOP/UGA
|
|
||||||
Simple Text Out screens will now be synced up with all non GOP/UGA output devices
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
NONE
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS - GOP/UGA devices are back in text mode and synced up.
|
|
||||||
EFI_UNSUPPORTED - Logo not found
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;
|
EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;
|
||||||
@ -624,6 +586,32 @@ static EFI_GRAPHICS_OUTPUT_BLT_PIXEL mEfiColors[16] = {
|
|||||||
{ 0xff, 0xff, 0xff, 0x00 }
|
{ 0xff, 0xff, 0xff, 0x00 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
Display string worker for: Print, PrintAt, IPrint, IPrintAt
|
||||||
|
|
||||||
|
@param GraphicsOutput - Graphics output protocol interface
|
||||||
|
|
||||||
|
@param UgaDraw - UGA draw protocol interface
|
||||||
|
|
||||||
|
@param Sto - Simple text out protocol interface
|
||||||
|
|
||||||
|
@param X - X coordinate to start printing
|
||||||
|
|
||||||
|
@param Y - Y coordinate to start printing
|
||||||
|
|
||||||
|
@param Foreground - Foreground color
|
||||||
|
|
||||||
|
@param Background - Background color
|
||||||
|
|
||||||
|
@param fmt - Format string
|
||||||
|
|
||||||
|
@param args - Print arguments
|
||||||
|
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS - success
|
||||||
|
@retval EFI_OUT_OF_RESOURCES - out of resources
|
||||||
|
|
||||||
|
**/
|
||||||
STATIC
|
STATIC
|
||||||
UINTN
|
UINTN
|
||||||
_IPrint (
|
_IPrint (
|
||||||
@ -637,38 +625,7 @@ _IPrint (
|
|||||||
IN CHAR16 *fmt,
|
IN CHAR16 *fmt,
|
||||||
IN VA_LIST args
|
IN VA_LIST args
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Display string worker for: Print, PrintAt, IPrint, IPrintAt
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
GraphicsOutput - Graphics output protocol interface
|
|
||||||
|
|
||||||
UgaDraw - UGA draw protocol interface
|
|
||||||
|
|
||||||
Sto - Simple text out protocol interface
|
|
||||||
|
|
||||||
X - X coordinate to start printing
|
|
||||||
|
|
||||||
Y - Y coordinate to start printing
|
|
||||||
|
|
||||||
Foreground - Foreground color
|
|
||||||
|
|
||||||
Background - Background color
|
|
||||||
|
|
||||||
fmt - Format string
|
|
||||||
|
|
||||||
args - Print arguments
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS - success
|
|
||||||
EFI_OUT_OF_RESOURCES - out of resources
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
VOID *Buffer;
|
VOID *Buffer;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@ -812,7 +769,25 @@ Error:
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Prints a formatted unicode string to the default console
|
||||||
|
|
||||||
|
@param X - X coordinate to start printing
|
||||||
|
|
||||||
|
@param Y - Y coordinate to start printing
|
||||||
|
|
||||||
|
@param ForeGround - Foreground color
|
||||||
|
|
||||||
|
@param BackGround - Background color
|
||||||
|
|
||||||
|
@param Fmt - Format string
|
||||||
|
|
||||||
|
@param ... - Print arguments
|
||||||
|
|
||||||
|
|
||||||
|
@retval Length of string printed to the console
|
||||||
|
|
||||||
|
**/
|
||||||
UINTN
|
UINTN
|
||||||
PrintXY (
|
PrintXY (
|
||||||
IN UINTN X,
|
IN UINTN X,
|
||||||
@ -822,31 +797,6 @@ PrintXY (
|
|||||||
IN CHAR16 *Fmt,
|
IN CHAR16 *Fmt,
|
||||||
...
|
...
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Prints a formatted unicode string to the default console
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
X - X coordinate to start printing
|
|
||||||
|
|
||||||
Y - Y coordinate to start printing
|
|
||||||
|
|
||||||
ForeGround - Foreground color
|
|
||||||
|
|
||||||
BackGround - Background color
|
|
||||||
|
|
||||||
Fmt - Format string
|
|
||||||
|
|
||||||
... - Print arguments
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
Length of string printed to the console
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
EFI_HANDLE Handle;
|
EFI_HANDLE Handle;
|
||||||
|
|
||||||
@ -894,3 +844,4 @@ Returns:
|
|||||||
|
|
||||||
return _IPrint (GraphicsOutput, UgaDraw, Sto, X, Y, ForeGround, BackGround, Fmt, Args);
|
return _IPrint (GraphicsOutput, UgaDraw, Sto, X, Y, ForeGround, BackGround, Fmt, Args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name: OemHookStatusCodeLibNull.c
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include <PiPei.h>
|
#include <PiPei.h>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Report Status Code Library for DXE Phase.
|
Report Status Code Library for PEI Phase.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation<BR>
|
Copyright (c) 2006, Intel Corporation<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Report Status Code Library for DXE Phase.
|
Report Status Code Library for SMM Runtime driver.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation<BR>
|
Copyright (c) 2006 - 2007, Intel Corporation<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
|
@ -42,7 +42,7 @@ STATIC
|
|||||||
BOOLEAN mHaveExitedBootServices = FALSE;
|
BOOLEAN mHaveExitedBootServices = FALSE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Locatet he report status code service.
|
Locate he report status code service.
|
||||||
|
|
||||||
@return EFI_REPORT_STATUS_CODE function point to
|
@return EFI_REPORT_STATUS_CODE function point to
|
||||||
ReportStatusCode.
|
ReportStatusCode.
|
||||||
@ -92,7 +92,7 @@ ReportStatusCodeLibVirtualAddressChange (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Updatet the In Runtime Indicator.
|
Update the In Runtime Indicator.
|
||||||
|
|
||||||
@param[in] Event The Event that is being processed
|
@param[in] Event The Event that is being processed
|
||||||
@param[in] Context Event Context
|
@param[in] Context Event Context
|
||||||
@ -191,7 +191,13 @@ ReportStatusCodeLibConstruct (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Desctructor of library will close events.
|
||||||
|
|
||||||
|
@param ImageHandle callder module's image handle
|
||||||
|
@param SystemTable pointer to EFI system table.
|
||||||
|
@return the status of close event.
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ReportStatusCodeLibDestruct (
|
ReportStatusCodeLibDestruct (
|
||||||
@ -215,7 +221,6 @@ ReportStatusCodeLibDestruct (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Reports a status code with full parameters.
|
Reports a status code with full parameters.
|
||||||
|
|
||||||
@ -299,3 +304,4 @@ InternalReportStatusCodeEx (
|
|||||||
}
|
}
|
||||||
return InternalReportStatusCode (Type, Value, Instance, CallerId, mStatusCodeData);
|
return InternalReportStatusCode (Type, Value, Instance, CallerId, mStatusCodeData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user