mirror of https://github.com/acidanthera/audk.git
Fixed build issues for DxeCoreHobLib and BaseUefiDecompressLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2752 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
149ae2f5fd
commit
8693ca5d75
|
@ -23,8 +23,8 @@
|
||||||
This function copies Length bytes from SourceBuffer to DestinationBuffer, and returns
|
This function copies Length bytes from SourceBuffer to DestinationBuffer, and returns
|
||||||
DestinationBuffer. The implementation must be reentrant, and it must handle the case
|
DestinationBuffer. The implementation must be reentrant, and it must handle the case
|
||||||
where SourceBuffer overlaps DestinationBuffer.
|
where SourceBuffer overlaps DestinationBuffer.
|
||||||
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
|
||||||
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
|
||||||
|
|
||||||
@param DestinationBuffer Pointer to the destination buffer of the memory copy.
|
@param DestinationBuffer Pointer to the destination buffer of the memory copy.
|
||||||
@param SourceBuffer Pointer to the source buffer of the memory copy.
|
@param SourceBuffer Pointer to the source buffer of the memory copy.
|
||||||
|
@ -45,7 +45,7 @@ CopyMem (
|
||||||
Fills a target buffer with a byte value, and returns the target buffer.
|
Fills a target buffer with a byte value, and returns the target buffer.
|
||||||
|
|
||||||
This function fills Length bytes of Buffer with Value, and returns Buffer.
|
This function fills Length bytes of Buffer with Value, and returns Buffer.
|
||||||
If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
|
||||||
|
|
||||||
@param Buffer Memory to set.
|
@param Buffer Memory to set.
|
||||||
@param Length Number of bytes to set.
|
@param Length Number of bytes to set.
|
||||||
|
@ -148,7 +148,7 @@ SetMem64 (
|
||||||
|
|
||||||
This function fills Length bytes of Buffer with zeros, and returns Buffer.
|
This function fills Length bytes of Buffer with zeros, and returns Buffer.
|
||||||
If Length > 0 and Buffer is NULL, then ASSERT().
|
If Length > 0 and Buffer is NULL, then ASSERT().
|
||||||
If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
|
||||||
|
|
||||||
@param Buffer Pointer to the target buffer to fill with zeros.
|
@param Buffer Pointer to the target buffer to fill with zeros.
|
||||||
@param Length Number of bytes in Buffer to fill with zeros.
|
@param Length Number of bytes in Buffer to fill with zeros.
|
||||||
|
@ -172,8 +172,8 @@ ZeroMem (
|
||||||
mismatched byte in DestinationBuffer.
|
mismatched byte in DestinationBuffer.
|
||||||
If Length > 0 and DestinationBuffer is NULL and Length > 0, then ASSERT().
|
If Length > 0 and DestinationBuffer is NULL and Length > 0, then ASSERT().
|
||||||
If Length > 0 and SourceBuffer is NULL and Length > 0, then ASSERT().
|
If Length > 0 and SourceBuffer is NULL and Length > 0, then ASSERT().
|
||||||
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
|
||||||
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
|
||||||
|
|
||||||
@param DestinationBuffer Pointer to the destination buffer to compare.
|
@param DestinationBuffer Pointer to the destination buffer to compare.
|
||||||
@param SourceBuffer Pointer to the source buffer to compare.
|
@param SourceBuffer Pointer to the source buffer to compare.
|
||||||
|
@ -201,7 +201,7 @@ CompareMem (
|
||||||
then a pointer to the matching byte in the target buffer is returned. If no match is found,
|
then a pointer to the matching byte in the target buffer is returned. If no match is found,
|
||||||
then NULL is returned. If Length is 0, then NULL is returned.
|
then NULL is returned. If Length is 0, then NULL is returned.
|
||||||
If Length > 0 and Buffer is NULL, then ASSERT().
|
If Length > 0 and Buffer is NULL, then ASSERT().
|
||||||
If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
|
||||||
|
|
||||||
@param Buffer Pointer to the target buffer to scan.
|
@param Buffer Pointer to the target buffer to scan.
|
||||||
@param Length Number of bytes in Buffer to scan.
|
@param Length Number of bytes in Buffer to scan.
|
||||||
|
@ -229,7 +229,7 @@ ScanMem8 (
|
||||||
If Length > 0 and Buffer is NULL, then ASSERT().
|
If Length > 0 and Buffer is NULL, then ASSERT().
|
||||||
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
|
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
|
||||||
If Length is not aligned on a 16-bit boundary, then ASSERT().
|
If Length is not aligned on a 16-bit boundary, then ASSERT().
|
||||||
If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
|
||||||
|
|
||||||
@param Buffer Pointer to the target buffer to scan.
|
@param Buffer Pointer to the target buffer to scan.
|
||||||
@param Length Number of bytes in Buffer to scan.
|
@param Length Number of bytes in Buffer to scan.
|
||||||
|
@ -257,7 +257,7 @@ ScanMem16 (
|
||||||
If Length > 0 and Buffer is NULL, then ASSERT().
|
If Length > 0 and Buffer is NULL, then ASSERT().
|
||||||
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
|
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
|
||||||
If Length is not aligned on a 32-bit boundary, then ASSERT().
|
If Length is not aligned on a 32-bit boundary, then ASSERT().
|
||||||
If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
|
||||||
|
|
||||||
@param Buffer Pointer to the target buffer to scan.
|
@param Buffer Pointer to the target buffer to scan.
|
||||||
@param Length Number of bytes in Buffer to scan.
|
@param Length Number of bytes in Buffer to scan.
|
||||||
|
@ -285,7 +285,7 @@ ScanMem32 (
|
||||||
If Length > 0 and Buffer is NULL, then ASSERT().
|
If Length > 0 and Buffer is NULL, then ASSERT().
|
||||||
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
|
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
|
||||||
If Length is not aligned on a 64-bit boundary, then ASSERT().
|
If Length is not aligned on a 64-bit boundary, then ASSERT().
|
||||||
If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
|
||||||
|
|
||||||
@param Buffer Pointer to the target buffer to scan.
|
@param Buffer Pointer to the target buffer to scan.
|
||||||
@param Length Number of bytes in Buffer to scan.
|
@param Length Number of bytes in Buffer to scan.
|
||||||
|
@ -357,7 +357,7 @@ CompareGuid (
|
||||||
If Length > 0 and Buffer is NULL, then ASSERT().
|
If Length > 0 and Buffer is NULL, then ASSERT().
|
||||||
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
|
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
|
||||||
If Length is not aligned on a 128-bit boundary, then ASSERT().
|
If Length is not aligned on a 128-bit boundary, then ASSERT().
|
||||||
If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT().
|
||||||
|
|
||||||
@param Buffer Pointer to the target buffer to scan.
|
@param Buffer Pointer to the target buffer to scan.
|
||||||
@param Length Number of bytes in Buffer to scan.
|
@param Length Number of bytes in Buffer to scan.
|
||||||
|
|
|
@ -17,11 +17,6 @@
|
||||||
#ifndef __BASE_UEFI_DECOMPRESS_LIB_INTERNALS_H__
|
#ifndef __BASE_UEFI_DECOMPRESS_LIB_INTERNALS_H__
|
||||||
#define __BASE_UEFI_DECOMPRESS_LIB_INTERNALS_H__
|
#define __BASE_UEFI_DECOMPRESS_LIB_INTERNALS_H__
|
||||||
|
|
||||||
//
|
|
||||||
// Include common header file for this module.
|
|
||||||
//
|
|
||||||
#include "CommonHeader.h"
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Decompression algorithm begins here
|
// Decompression algorithm begins here
|
||||||
//
|
//
|
||||||
|
@ -94,8 +89,8 @@ FillBuf (
|
||||||
/**
|
/**
|
||||||
Get NumOfBits of bits out from mBitBuf
|
Get NumOfBits of bits out from mBitBuf
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
@param Sd The global scratch data.
|
@param Sd The global scratch data.
|
||||||
|
@ -113,7 +108,7 @@ GetBits (
|
||||||
/**
|
/**
|
||||||
Creates Huffman Code mapping table according to code length array.
|
Creates Huffman Code mapping table according to code length array.
|
||||||
|
|
||||||
Creates Huffman Code mapping table for Extra Set, Char&Len Set
|
Creates Huffman Code mapping table for Extra Set, Char&Len Set
|
||||||
and Position Set according to code length array.
|
and Position Set according to code length array.
|
||||||
|
|
||||||
@param Sd The global scratch data
|
@param Sd The global scratch data
|
||||||
|
@ -139,7 +134,7 @@ MakeTable (
|
||||||
Decodes a position value.
|
Decodes a position value.
|
||||||
|
|
||||||
Get a position value according to Position Huffman Table.
|
Get a position value according to Position Huffman Table.
|
||||||
|
|
||||||
@param Sd the global scratch data
|
@param Sd the global scratch data
|
||||||
|
|
||||||
@return The position value decoded.
|
@return The position value decoded.
|
||||||
|
@ -175,7 +170,7 @@ ReadPTLen (
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Reads code lengths for Char&Len Set.
|
Reads code lengths for Char&Len Set.
|
||||||
|
|
||||||
Read in and decode the Char&Len Set Code Length Array, then
|
Read in and decode the Char&Len Set Code Length Array, then
|
||||||
generate the Huffman Code mapping table for the Char&Len Set.
|
generate the Huffman Code mapping table for the Char&Len Set.
|
||||||
|
|
||||||
|
@ -189,7 +184,7 @@ ReadCLen (
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Decode a character/length value.
|
Decode a character/length value.
|
||||||
|
|
||||||
Read one value from mBitBuf, Get one code from mBitBuf. If it is at block boundary, generates
|
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
|
Huffman code mapping table for Extra Set, Code&Len Set and
|
||||||
Position Set.
|
Position Set.
|
||||||
|
@ -208,7 +203,7 @@ DecodeC (
|
||||||
Decode the source data and put the resulting data into the destination buffer.
|
Decode the source data and put the resulting data into the destination buffer.
|
||||||
|
|
||||||
Decode the source data and put the resulting data into the destination buffer.
|
Decode the source data and put the resulting data into the destination buffer.
|
||||||
|
|
||||||
@param Sd The global scratch data
|
@param Sd The global scratch data
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
|
|
||||||
#include "InternalHobLib.h""
|
#include "InternalHobLib.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the pointer to the HOB list.
|
Returns the pointer to the HOB list.
|
||||||
|
@ -51,7 +51,7 @@ GetHobList (
|
||||||
/**
|
/**
|
||||||
Returns the next instance of a HOB type from the starting HOB.
|
Returns the next instance of a HOB type from the starting HOB.
|
||||||
|
|
||||||
This function searches the first instance of a HOB type from the starting HOB pointer.
|
This function searches the first instance of a HOB type from the starting HOB pointer.
|
||||||
If there does not exist such HOB type from the starting HOB pointer, it will return NULL.
|
If there does not exist such HOB type from the starting HOB pointer, it will return NULL.
|
||||||
In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer
|
In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer
|
||||||
unconditionally: it returns HobStart back if HobStart itself meets the requirement;
|
unconditionally: it returns HobStart back if HobStart itself meets the requirement;
|
||||||
|
@ -74,7 +74,7 @@ GetNextHob (
|
||||||
EFI_PEI_HOB_POINTERS Hob;
|
EFI_PEI_HOB_POINTERS Hob;
|
||||||
|
|
||||||
ASSERT (HobStart != NULL);
|
ASSERT (HobStart != NULL);
|
||||||
|
|
||||||
Hob.Raw = (UINT8 *) HobStart;
|
Hob.Raw = (UINT8 *) HobStart;
|
||||||
//
|
//
|
||||||
// Parse the HOB list until end of list or matching type is found.
|
// Parse the HOB list until end of list or matching type is found.
|
||||||
|
@ -91,8 +91,8 @@ GetNextHob (
|
||||||
/**
|
/**
|
||||||
Returns the first instance of a HOB type among the whole HOB list.
|
Returns the first instance of a HOB type among the whole HOB list.
|
||||||
|
|
||||||
This function searches the first instance of a HOB type among the whole HOB list.
|
This function searches the first instance of a HOB type among the whole HOB list.
|
||||||
If there does not exist such HOB type in the HOB list, it will return NULL.
|
If there does not exist such HOB type in the HOB list, it will return NULL.
|
||||||
|
|
||||||
@param Type The HOB type to return.
|
@param Type The HOB type to return.
|
||||||
|
|
||||||
|
@ -112,10 +112,10 @@ GetFirstHob (
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function searches the first instance of a HOB from the starting HOB pointer.
|
This function searches the first instance of a HOB from the starting HOB pointer.
|
||||||
Such HOB should satisfy two conditions:
|
Such HOB should satisfy two conditions:
|
||||||
its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.
|
its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.
|
||||||
If there does not exist such HOB from the starting HOB pointer, it will return NULL.
|
If there does not exist such HOB from the starting HOB pointer, it will return NULL.
|
||||||
Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()
|
Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()
|
||||||
to extract the data section and its size info respectively.
|
to extract the data section and its size info respectively.
|
||||||
In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer
|
In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer
|
||||||
|
@ -150,7 +150,7 @@ GetNextGuidHob (
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function searches the first instance of a HOB among the whole HOB list.
|
This function searches the first instance of a HOB among the whole HOB list.
|
||||||
Such HOB should satisfy two conditions:
|
Such HOB should satisfy two conditions:
|
||||||
its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.
|
its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.
|
||||||
If there does not exist such HOB from the starting HOB pointer, it will return NULL.
|
If there does not exist such HOB from the starting HOB pointer, it will return NULL.
|
||||||
|
@ -178,7 +178,7 @@ GetFirstGuidHob (
|
||||||
/**
|
/**
|
||||||
Get the Boot Mode from the HOB list.
|
Get the Boot Mode from the HOB list.
|
||||||
|
|
||||||
This function returns the system boot mode information from the
|
This function returns the system boot mode information from the
|
||||||
PHIT HOB in HOB list.
|
PHIT HOB in HOB list.
|
||||||
|
|
||||||
@param VOID
|
@param VOID
|
||||||
|
@ -260,8 +260,8 @@ BuildResourceDescriptorHob (
|
||||||
/**
|
/**
|
||||||
Builds a GUID HOB with a certain data length.
|
Builds a GUID HOB with a certain data length.
|
||||||
|
|
||||||
This function builds a customized HOB tagged with a GUID for identification
|
This function builds a customized HOB tagged with a GUID for identification
|
||||||
and returns the start address of GUID HOB data so that caller can fill the customized data.
|
and returns the start address of GUID HOB data so that caller can fill the customized data.
|
||||||
The HOB Header and Name field is already stripped.
|
The HOB Header and Name field is already stripped.
|
||||||
It can only be invoked during PEI phase;
|
It can only be invoked during PEI phase;
|
||||||
for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
|
for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Internal include file of DXE Entry Point HOB Library.
|
Internal include file of DXE Entry Point HOB Library.
|
||||||
|
|
||||||
Copyright (c) 2006, 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
|
||||||
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
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
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: HobLib.h
|
Module Name: InternalHobLib.h
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue