Add comments and DoxyGen format for these files.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5028 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4
2008-04-09 07:07:50 +00:00
parent 6cc9ca322c
commit 504214c487
67 changed files with 819 additions and 844 deletions

View File

@@ -1,6 +1,8 @@
/*++
/** @file
Copyright (c) 2006 - 2007, Intel Corporation
Capsule Architectural Protocol is added to produce UEFI2.0 capsule runtime services.
Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
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
@@ -9,15 +11,7 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
Capsule.h
Abstract:
Capsule Architectural Protocol is newly added to produce UEFI2.0 capsule runtime services.
--*/
**/
#ifndef __ARCH_PROTOCOL_CAPSULE_ARCH_H__
#define __ARCH_PROTOCOL_CAPSULE_ARCH_H__

View File

@@ -1,6 +1,8 @@
/*++
/** @file
The user Customized Decompress Protocol Interface
Copyright (c) 2006, Intel Corporation
Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
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
@@ -9,13 +11,7 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
CustomizedDecompress.h
Abstract:
The user Customized Decompress Protocol Interface
--*/
**/
#ifndef __CUSTOMIZED_DECOMPRESS_H__
#define __CUSTOMIZED_DECOMPRESS_H__
@@ -25,18 +21,7 @@ Abstract:
typedef struct _EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL;
typedef
EFI_STATUS
(EFIAPI *EFI_CUSTOMIZED_DECOMPRESS_GET_INFO) (
IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *This,
IN VOID *Source,
IN UINT32 SourceSize,
OUT UINT32 *DestinationSize,
OUT UINT32 *ScratchSize
);
/*++
Routine Description:
/**
The GetInfo() function retrieves the size of the uncompressed buffer
and the temporary scratch buffer required to decompress the buffer
@@ -53,42 +38,35 @@ Routine Description:
output it as DestinationSize. And ScratchSize is specific to the decompression
implementation.
Arguments:
@param This The protocol instance pointer
@param Source The source buffer containing the compressed data.
@param SourceSize The size, in bytes, of source buffer.
@param DestinationSize A pointer to the size, in bytes, of the uncompressed buffer
that will be generated when the compressed buffer specified
by Source and SourceSize is decompressed.
@param ScratchSize A pointer to the size, in bytes, of the scratch buffer that
is required to decompress the compressed buffer specified by
Source and SourceSize.
This - The protocol instance pointer
Source - The source buffer containing the compressed data.
SourceSize - The size, in bytes, of source buffer.
DestinationSize - A pointer to the size, in bytes, of the uncompressed buffer
that will be generated when the compressed buffer specified
by Source and SourceSize is decompressed.
ScratchSize - A pointer to the size, in bytes, of the scratch buffer that
is required to decompress the compressed buffer specified by
Source and SourceSize.
Returns:
EFI_SUCCESS - The size of the uncompressed data was returned in DestinationSize
and the size of the scratch buffer was returned in ScratchSize.
EFI_INVALID_PARAMETER - The size of the uncompressed data or the size of the scratch
buffer cannot be determined from the compressed data specified by
Source and SourceData.
@retval EFI_SUCCESS The size of the uncompressed data was returned in DestinationSize
and the size of the scratch buffer was returned in ScratchSize.
@retval EFI_INVALID_PARAMETER
The size of the uncompressed data or the size of the scratch
buffer cannot be determined from the compressed data specified by
Source and SourceData.
--*/
typedef
EFI_STATUS
(EFIAPI *EFI_CUSTOMIZED_DECOMPRESS_DECOMPRESS) (
IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *This,
IN VOID* Source,
IN UINT32 SourceSize,
IN OUT VOID* Destination,
IN UINT32 DestinationSize,
IN OUT VOID* Scratch,
IN UINT32 ScratchSize
(EFIAPI *EFI_CUSTOMIZED_DECOMPRESS_GET_INFO) (
IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *This,
IN VOID *Source,
IN UINT32 SourceSize,
OUT UINT32 *DestinationSize,
OUT UINT32 *ScratchSize
);
/*++
Routine Description:
/**
The Decompress() function extracts decompressed data to its original form.
@@ -103,29 +81,35 @@ Routine Description:
If the compressed source data specified by Source and SourceSize is not in
a valid compressed data format, then EFI_INVALID_PARAMETER is returned.
Arguments:
@param This The protocol instance pointer
@param Source The source buffer containing the compressed data.
@param SourceSize The size of source data.
@param Destination On output, the destination buffer that contains
the uncompressed data.
@param DestinationSize The size of destination buffer. The size of destination
buffer needed is obtained from GetInfo().
@param Scratch A temporary scratch buffer that is used to perform the
decompression.
@param ScratchSize The size of scratch buffer. The size of scratch buffer needed
is obtained from GetInfo().
This - The protocol instance pointer
Source - The source buffer containing the compressed data.
SourceSize - The size of source data.
Destination - On output, the destination buffer that contains
the uncompressed data.
DestinationSize - The size of destination buffer. The size of destination
buffer needed is obtained from GetInfo().
Scratch - A temporary scratch buffer that is used to perform the
decompression.
ScratchSize - The size of scratch buffer. The size of scratch buffer needed
is obtained from GetInfo().
Returns:
EFI_SUCCESS - Decompression completed successfully, and the uncompressed
buffer is returned in Destination.
EFI_INVALID_PARAMETER
- The source buffer specified by Source and SourceSize is
corrupted (not in a valid compressed format).
--*/
@retval EFI_SUCCESS Decompression completed successfully, and the uncompressed
buffer is returned in Destination.
@retval EFI_INVALID_PARAMETER
The source buffer specified by Source and SourceSize is
corrupted (not in a valid compressed format).
**/
typedef
EFI_STATUS
(EFIAPI *EFI_CUSTOMIZED_DECOMPRESS_DECOMPRESS) (
IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL *This,
IN VOID* Source,
IN UINT32 SourceSize,
IN OUT VOID* Destination,
IN UINT32 DestinationSize,
IN OUT VOID* Scratch,
IN UINT32 ScratchSize
);
struct _EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL {
EFI_CUSTOMIZED_DECOMPRESS_GET_INFO GetInfo;

View File

@@ -1,6 +1,8 @@
/*++
/** @file
Copyright (c) 2006, Intel Corporation
The Tiano Decompress Protocol Interface
Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
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
@@ -9,13 +11,7 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EdkDecompress.h
Abstract:
The Tiano Decompress Protocol Interface
--*/
**/
#ifndef __EDK_DECOMPRESS_H__
#define __EDK_DECOMPRESS_H__
@@ -25,18 +21,7 @@ Abstract:
typedef struct _EFI_TIANO_DECOMPRESS_PROTOCOL EFI_TIANO_DECOMPRESS_PROTOCOL;
typedef
EFI_STATUS
(EFIAPI *EFI_TIANO_DECOMPRESS_GET_INFO) (
IN EFI_TIANO_DECOMPRESS_PROTOCOL *This,
IN VOID *Source,
IN UINT32 SourceSize,
OUT UINT32 *DestinationSize,
OUT UINT32 *ScratchSize
);
/*++
Routine Description:
/**
The GetInfo() function retrieves the size of the uncompressed buffer
and the temporary scratch buffer required to decompress the buffer
@@ -53,42 +38,35 @@ Routine Description:
output it as DestinationSize. And ScratchSize is specific to the decompression
implementation.
Arguments:
@param This The protocol instance pointer
@param Source The source buffer containing the compressed data.
@param SourceSize The size, in bytes, of source buffer.
@param DestinationSize A pointer to the size, in bytes, of the uncompressed buffer
that will be generated when the compressed buffer specified
by Source and SourceSize is decompressed.
@param ScratchSize A pointer to the size, in bytes, of the scratch buffer that
is required to decompress the compressed buffer specified by
Source and SourceSize.
This - The protocol instance pointer
Source - The source buffer containing the compressed data.
SourceSize - The size, in bytes, of source buffer.
DestinationSize - A pointer to the size, in bytes, of the uncompressed buffer
that will be generated when the compressed buffer specified
by Source and SourceSize is decompressed.
ScratchSize - A pointer to the size, in bytes, of the scratch buffer that
is required to decompress the compressed buffer specified by
Source and SourceSize.
Returns:
EFI_SUCCESS - The size of the uncompressed data was returned in DestinationSize
and the size of the scratch buffer was returned in ScratchSize.
EFI_INVALID_PARAMETER - The size of the uncompressed data or the size of the scratch
buffer cannot be determined from the compressed data specified by
Source and SourceData.
@retval EFI_SUCCESS The size of the uncompressed data was returned in DestinationSize
and the size of the scratch buffer was returned in ScratchSize.
@retval EFI_INVALID_PARAMETER
The size of the uncompressed data or the size of the scratch
buffer cannot be determined from the compressed data specified by
Source and SourceData.
--*/
typedef
EFI_STATUS
(EFIAPI *EFI_TIANO_DECOMPRESS_DECOMPRESS) (
IN EFI_TIANO_DECOMPRESS_PROTOCOL *This,
IN VOID* Source,
IN UINT32 SourceSize,
IN OUT VOID* Destination,
IN UINT32 DestinationSize,
IN OUT VOID* Scratch,
IN UINT32 ScratchSize
(EFIAPI *EFI_TIANO_DECOMPRESS_GET_INFO) (
IN EFI_TIANO_DECOMPRESS_PROTOCOL *This,
IN VOID *Source,
IN UINT32 SourceSize,
OUT UINT32 *DestinationSize,
OUT UINT32 *ScratchSize
);
/*++
Routine Description:
/**
The Decompress() function extracts decompressed data to its original form.
@@ -103,29 +81,35 @@ Routine Description:
If the compressed source data specified by Source and SourceSize is not in
a valid compressed data format, then EFI_INVALID_PARAMETER is returned.
Arguments:
@param This The protocol instance pointer
@param Source The source buffer containing the compressed data.
@param SourceSize The size of source data.
@param Destination On output, the destination buffer that contains
the uncompressed data.
@param DestinationSize The size of destination buffer. The size of destination
buffer needed is obtained from GetInfo().
@param Scratch A temporary scratch buffer that is used to perform the
decompression.
@param ScratchSize The size of scratch buffer. The size of scratch buffer needed
is obtained from GetInfo().
This - The protocol instance pointer
Source - The source buffer containing the compressed data.
SourceSize - The size of source data.
Destination - On output, the destination buffer that contains
the uncompressed data.
DestinationSize - The size of destination buffer. The size of destination
buffer needed is obtained from GetInfo().
Scratch - A temporary scratch buffer that is used to perform the
decompression.
ScratchSize - The size of scratch buffer. The size of scratch buffer needed
is obtained from GetInfo().
Returns:
EFI_SUCCESS - Decompression completed successfully, and the uncompressed
buffer is returned in Destination.
EFI_INVALID_PARAMETER
- The source buffer specified by Source and SourceSize is
corrupted (not in a valid compressed format).
--*/
@retval EFI_SUCCESS Decompression completed successfully, and the uncompressed
buffer is returned in Destination.
@retval EFI_INVALID_PARAMETER
The source buffer specified by Source and SourceSize is
corrupted (not in a valid compressed format).
**/
typedef
EFI_STATUS
(EFIAPI *EFI_TIANO_DECOMPRESS_DECOMPRESS) (
IN EFI_TIANO_DECOMPRESS_PROTOCOL *This,
IN VOID* Source,
IN UINT32 SourceSize,
IN OUT VOID* Destination,
IN UINT32 DestinationSize,
IN OUT VOID* Scratch,
IN UINT32 ScratchSize
);
struct _EFI_TIANO_DECOMPRESS_PROTOCOL {
EFI_TIANO_DECOMPRESS_GET_INFO GetInfo;

View File

@@ -13,12 +13,6 @@
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: FirmwareVolumeDispatch.h
@par Revision Reference:
This protol will be defined in DXE CIS Spec.
Version 0.91C.
**/
#ifndef __FIRMWARE_VOLUME_DISPATCH_H__

View File

@@ -1,6 +1,8 @@
/*++
/** @file
Copyright (c) 2006 - 2007, Intel Corporation
FVB Extension protocol that extends the FVB Class in a component fashion.
Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
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
@@ -9,15 +11,7 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
FvbExtension.h
Abstract:
FVB Extension protocol that extends the FVB Class in a component fashion.
--*/
**/
#ifndef __FVB_EXTENSION_H__
#define __FVB_EXTENSION_H__
@@ -30,6 +24,21 @@ typedef struct _EFI_FVB_EXTENSION_PROTOCOL EFI_FVB_EXTENSION_PROTOCOL;
//
// FVB Extension Function Prototypes
//
/**
Erases and initializes a specified range of a firmware volume
@param[in] This Pointer to the FVB Extension protocol instance
@param[in] StartLba The starting logical block index to be erased
@param[in] OffsetStartLba Offset into the starting block at which to
begin erasing
@param[in] LastLba The last logical block index to be erased
@param[in] OffsetLastLba Offset into the last block at which to end erasing
@retval EFI_EFI_SUCCESS Range was erased
@retval EFI_INVALID_PARAMETER invalid parameter
@retval EFI_UNSUPPORTED Range can not be erased
**/
typedef
EFI_STATUS
(EFIAPI * EFI_FV_ERASE_CUSTOM_BLOCK) (
@@ -41,7 +50,7 @@ EFI_STATUS
);
//
// IPMI TRANSPORT PROTOCOL
// FVB Extension PROTOCOL
//
struct _EFI_FVB_EXTENSION_PROTOCOL {
EFI_FV_ERASE_CUSTOM_BLOCK EraseFvbCustomBlock;

View File

@@ -1,18 +1,5 @@
/*++
/** @file
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
LoadPe32Image.h
Abstract:
Load File protocol.
Load file protocol exists to supports the addition of new boot devices,
@@ -21,7 +8,16 @@ Abstract:
UEFI 2.0 can boot from any device that produces a LoadFile protocol.
--*/
Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __LOAD_PE32_IMAGE_H__
#define __LOAD_PE32_IMAGE_H__
@@ -35,6 +31,30 @@ Abstract:
typedef struct _EFI_PE32_IMAGE_PROTOCOL EFI_PE32_IMAGE_PROTOCOL;
/**
Loads an EFI image into memory and returns a handle to the image with extended parameters.
@param This Calling context
@param ParentImageHandle The caller's image handle.
@param FilePath The specific file path from which the image is loaded.
@param SourceBuffer If not NULL, a pointer to the memory location containing a copy of
the image to be loaded.
@param SourceSize The size in bytes of SourceBuffer.
@param DstBuffer The buffer to store the image.
@param NumberOfPages For input, specifies the space size of the image by caller if not NULL.
For output, specifies the actual space size needed.
@param ImageHandle Image handle for output.
@param EntryPoint Image entry point for output.
@param Attribute The bit mask of attributes to set for the load PE image.
@retval EFI_SUCCESS The image was loaded into memory.
@retval EFI_NOT_FOUND The FilePath was not found.
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
@retval EFI_UNSUPPORTED The image type is not supported, or the device path cannot be
parsed to locate the proper protocol for loading the file.
@retval EFI_OUT_OF_RESOURCES Image was not loaded due to insufficient resources.
**/
typedef
EFI_STATUS
(EFIAPI *LOAD_PE_IMAGE) (
@@ -50,6 +70,18 @@ EFI_STATUS
IN UINT32 Attribute
);
/**
Unload the specified image.
@param This Indicates the calling context.
@param ImageHandle The specified image handle.
@retval EFI_INVALID_PARAMETER Image handle is NULL.
@retval EFI_UNSUPPORTED Attempt to unload an unsupported image.
@retval EFI_SUCCESS Image successfully unloaded.
--*/
typedef
EFI_STATUS
(EFIAPI *UNLOAD_PE_IMAGE) (

View File

@@ -1,6 +1,8 @@
/*++
/** @file
Copyright (c) 2006 - 2007, Intel Corporation
This file defines the Print protocol.
Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
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
@@ -9,15 +11,7 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
Print.h
Abstract:
This file defines the Print protocol
--*/
**/
#ifndef __PPRINT_H__
#define __PPRINT_H__
@@ -30,7 +24,40 @@ Abstract:
//
typedef struct _EFI_PRINT_PROTOCOL EFI_PRINT_PROTOCOL;
/**
Produces a Null-terminated Unicode string in an output buffer based on
a Null-terminated Unicode format string and a VA_LIST argument list
Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
and BufferSize.
The Unicode string is produced by parsing the format string specified by FormatString.
Arguments are pulled from the variable argument list specified by Marker based on the
contents of the format string.
The number of Unicode characters in the produced output buffer is returned not including
the Null-terminator.
If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().
If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
If BufferSize > 1 and FormatString is NULL, then ASSERT().
If BufferSize > 1 and FormatString is not aligned on a 16-bit boundary, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
contains more than PcdMaximumUnicodeStringLength Unicode characters not including the
Null-terminator, then ASSERT().
@param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
Unicode string.
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
@param FormatString Null-terminated Unicode format string.
@param Marker VA_LIST marker for the variable argument list.
@return The number of Unicode characters in the produced output buffer not including the
Null-terminator.
**/
typedef
UINTN
(EFIAPI *UNI_VSPRINT) (
@@ -40,6 +67,39 @@ UINTN
IN VA_LIST Marker
);
/**
Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated
ASCII format string and a VA_LIST argument list
Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
and BufferSize.
The Unicode string is produced by parsing the format string specified by FormatString.
Arguments are pulled from the variable argument list specified by Marker based on the
contents of the format string.
The number of Unicode characters in the produced output buffer is returned not including
the Null-terminator.
If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().
If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
If BufferSize > 1 and FormatString is NULL, then ASSERT().
If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than
PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then
ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
contains more than PcdMaximumUnicodeStringLength Unicode characters not including the
Null-terminator, then ASSERT().
@param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
Unicode string.
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
@param FormatString Null-terminated Unicode format string.
@param Marker VA_LIST marker for the variable argument list.
@return The number of Unicode characters in the produced output buffer not including the
Null-terminator.
**/
typedef
UINTN
(EFIAPI *UNI_VSPRINT_ASCII) (
@@ -49,6 +109,47 @@ UINTN
IN VA_LIST Marker
);
/**
Converts a decimal value to a Null-terminated Unicode string.
Converts the decimal number specified by Value to a Null-terminated Unicode
string specified by Buffer containing at most Width characters. No padding of spaces
is ever performed. If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
The number of Unicode characters in Buffer is returned not including the Null-terminator.
If the conversion contains more than Width characters, then only the first
Width characters are returned, and the total number of characters
required to perform the conversion is returned.
Additional conversion parameters are specified in Flags.
The Flags bit LEFT_JUSTIFY is always ignored.
All conversions are left justified in Buffer.
If Width is 0, PREFIX_ZERO is ignored in Flags.
If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
are inserted every 3rd digit starting from the right.
If HEX_RADIX is set in Flags, then the output buffer will be
formatted in hexadecimal format.
If Value is < 0 and HEX_RADIX is not set in Flags, then the fist character in Buffer is a '-'.
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
then Buffer is padded with '0' characters so the combination of the optional '-'
sign character, '0' characters, digit characters for Value, and the Null-terminator
add up to Width characters.
If both COMMA_TYPE and HEX_RADIX are set in Flags, then ASSERT().
If Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
If unsupported bits are set in Flags, then ASSERT().
If both COMMA_TYPE and HEX_RADIX are set in Flags, then ASSERT().
If Width >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()
@param Buffer Pointer to the output buffer for the produced Null-terminated
Unicode string.
@param Flags The bitmask of flags that specify left justification, zero pad, and commas.
@param Value The 64-bit signed value to convert to a string.
@param Width The maximum number of Unicode characters to place in Buffer, not including
the Null-terminator.
@return The number of Unicode characters in Buffer not including the Null-terminator.
**/
typedef
UINTN
(EFIAPI *VALUE_TO_UNISTRING) (
@@ -58,6 +159,38 @@ UINTN
IN UINTN Width
);
/**
Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
ASCII format string and a VA_LIST argument list.
Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
and BufferSize.
The ASCII string is produced by parsing the format string specified by FormatString.
Arguments are pulled from the variable argument list specified by Marker based on
the contents of the format string.
The number of ASCII characters in the produced output buffer is returned not including
the Null-terminator.
If BufferSize is 0, then no output buffer is produced and 0 is returned.
If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().
If BufferSize > 0 and FormatString is NULL, then ASSERT().
If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than
PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then
ASSERT().
If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string
contains more than PcdMaximumAsciiStringLength ASCII characters not including the
Null-terminator, then ASSERT().
@param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
ASCII string.
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
@param FormatString Null-terminated Unicode format string.
@param Marker VA_LIST marker for the variable argument list.
@return The number of ASCII characters in the produced output buffer not including the
Null-terminator.
**/
typedef
UINTN
(EFIAPI *ASCII_VSPRINT) (
@@ -67,6 +200,39 @@ UINTN
IN VA_LIST Marker
);
/**
Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
ASCII format string and a VA_LIST argument list.
Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
and BufferSize.
The ASCII string is produced by parsing the format string specified by FormatString.
Arguments are pulled from the variable argument list specified by Marker based on
the contents of the format string.
The number of ASCII characters in the produced output buffer is returned not including
the Null-terminator.
If BufferSize is 0, then no output buffer is produced and 0 is returned.
If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().
If BufferSize > 0 and FormatString is NULL, then ASSERT().
If BufferSize > 0 and FormatString is not aligned on a 16-bit boundary, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
ASSERT().
If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string
contains more than PcdMaximumAsciiStringLength ASCII characters not including the
Null-terminator, then ASSERT().
@param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
ASCII string.
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
@param FormatString Null-terminated Unicode format string.
@param Marker VA_LIST marker for the variable argument list.
@return The number of ASCII characters in the produced output buffer not including the
Null-terminator.
**/
typedef
UINTN
(EFIAPI *ASCII_VSPRINT_UNI) (
@@ -76,6 +242,46 @@ UINTN
IN VA_LIST Marker
);
/**
Converts a decimal value to a Null-terminated ASCII string.
Converts the decimal number specified by Value to a Null-terminated ASCII string
specified by Buffer containing at most Width characters. No padding of spaces
is ever performed.
If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
The number of ASCII characters in Buffer is returned not including the Null-terminator.
If the conversion contains more than Width characters, then only the first Width
characters are returned, and the total number of characters required to perform
the conversion is returned.
Additional conversion parameters are specified in Flags.
The Flags bit LEFT_JUSTIFY is always ignored.
All conversions are left justified in Buffer.
If Width is 0, PREFIX_ZERO is ignored in Flags.
If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
are inserted every 3rd digit starting from the right.
If HEX_RADIX is set in Flags, then the output buffer will be
formatted in hexadecimal format.
If Value is < 0 and HEX_RADIX is not set in Flags, then the fist character in Buffer is a '-'.
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
then Buffer is padded with '0' characters so the combination of the optional '-'
sign character, '0' characters, digit characters for Value, and the Null-terminator
add up to Width characters.
If Buffer is NULL, then ASSERT().
If unsupported bits are set in Flags, then ASSERT().
If both COMMA_TYPE and HEX_RADIX are set in Flags, then ASSERT().
If Width >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()
@param Buffer Pointer to the output buffer for the produced Null-terminated
ASCII string.
@param Flags The bitmask of flags that specify left justification, zero pad, and commas.
@param Value The 64-bit signed value to convert to a string.
@param Width The maximum number of ASCII characters to place in Buffer, not including
the Null-terminator.
@return The number of ASCII characters in Buffer not including the Null-terminator.
**/
typedef
UINTN
(EFIAPI *VALUE_TO_ASCIISTRING) (

View File

@@ -1,6 +1,8 @@
/*++
/** @file
Copyright (c) 2006, Intel Corporation
Tcg addtional services to measure PeImage and ActionString
Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
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
@@ -9,14 +11,7 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
TcgPlatform.h
Abstract:
Tcg addtional services to measure PeImage and ActionString
--*/
**/
#ifndef _TCG_PLATFORM_PROTOCOL_H_
#define _TCG_PLATFORM_PROTOCOL_H_