Initial import.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
42
EdkModulePkg/Include/Library/CustomDecompressLib.h
Normal file
42
EdkModulePkg/Include/Library/CustomDecompressLib.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
CustomDecompressLib.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Custom Decompress Functions
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __CUSTOM_DECPOMPRESS_LIB_H__
|
||||
#define __CUSTOM_DECPOMPRESS_LIB_H__
|
||||
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
CustomDecompressGetInfo (
|
||||
IN CONST VOID *Source,
|
||||
IN UINT32 SourceSize,
|
||||
OUT UINT32 *DestinationSize,
|
||||
OUT UINT32 *ScratchSize
|
||||
);
|
||||
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
CustomDecompress (
|
||||
IN CONST VOID *Source,
|
||||
IN OUT VOID *Destination,
|
||||
IN OUT VOID *Scratch
|
||||
);
|
||||
|
||||
#endif
|
47
EdkModulePkg/Include/Library/EdkBsDataHubStatusCodeLib.h
Normal file
47
EdkModulePkg/Include/Library/EdkBsDataHubStatusCodeLib.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
BsDataHubStatusCodeLib.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Lib to provide data hub status code reporting.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EFI_BS_DATA_HUB_STATUS_CODE_LIB_H_
|
||||
#define _EFI_BS_DATA_HUB_STATUS_CODE_LIB_H_
|
||||
|
||||
//
|
||||
// Initialization function
|
||||
//
|
||||
VOID
|
||||
BsDataHubStatusCodeInitialize (
|
||||
VOID
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// Status code reporting function
|
||||
//
|
||||
EFI_STATUS
|
||||
BsDataHubReportStatusCode (
|
||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||
IN EFI_STATUS_CODE_VALUE Value,
|
||||
IN UINT32 Instance,
|
||||
IN EFI_GUID * CallerId,
|
||||
IN EFI_STATUS_CODE_DATA * Data OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
#endif
|
141
EdkModulePkg/Include/Library/EdkDxeSalLib.h
Normal file
141
EdkModulePkg/Include/Library/EdkDxeSalLib.h
Normal file
@@ -0,0 +1,141 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
EdkDxeSalLib.h
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _ESAL_SERVICE_LIB_H__
|
||||
#define _ESAL_SERVICE_LIB_H__
|
||||
|
||||
//#include <Ipf/SalApi.h>
|
||||
|
||||
EFI_STATUS
|
||||
RegisterEsalFunction (
|
||||
IN UINT64 FunctionId,
|
||||
IN EFI_GUID *ClassGuid,
|
||||
IN SAL_INTERNAL_EXTENDED_SAL_PROC Function,
|
||||
IN VOID *ModuleGlobal
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Register ESAL Class Function and it's asociated global.
|
||||
This function is boot service only!
|
||||
|
||||
Arguments:
|
||||
FunctionId - ID of function to register
|
||||
ClassGuid - GUID of function class
|
||||
Function - Function to register under ClassGuid/FunctionId pair
|
||||
ModuleGlobal - Module global for Function.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - If ClassGuid/FunctionId Function was registered.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
RegisterEsalClass (
|
||||
IN EFI_GUID *ClassGuid,
|
||||
IN VOID *ModuleGlobal,
|
||||
...
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Register ESAL Class and it's asociated global.
|
||||
This function is boot service only!
|
||||
|
||||
Arguments:
|
||||
ClassGuid - GUID of function class
|
||||
ModuleGlobal - Module global for Function.
|
||||
.. - SAL_INTERNAL_EXTENDED_SAL_PROC and FunctionId pairs. NULL
|
||||
indicates the end of the list.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - All members of ClassGuid registered
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
SAL_RETURN_REGS
|
||||
EfiCallEsalService (
|
||||
IN EFI_GUID *ClassGuid,
|
||||
IN UINT64 FunctionId,
|
||||
IN UINT64 Arg2,
|
||||
IN UINT64 Arg3,
|
||||
IN UINT64 Arg4,
|
||||
IN UINT64 Arg5,
|
||||
IN UINT64 Arg6,
|
||||
IN UINT64 Arg7,
|
||||
IN UINT64 Arg8
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Call module that is not linked direclty to this module. This code is IP
|
||||
relative and hides the binding issues of virtual or physical calling. The
|
||||
function that gets dispatched has extra arguments that include the registered
|
||||
module global and a boolean flag to indicate if the system is in virutal mode.
|
||||
|
||||
Arguments:
|
||||
ClassGuid - GUID of function
|
||||
FunctionId - Function in ClassGuid to call
|
||||
Arg2 - Argument 2 ClassGuid/FunctionId defined
|
||||
Arg3 - Argument 3 ClassGuid/FunctionId defined
|
||||
Arg4 - Argument 4 ClassGuid/FunctionId defined
|
||||
Arg5 - Argument 5 ClassGuid/FunctionId defined
|
||||
Arg6 - Argument 6 ClassGuid/FunctionId defined
|
||||
Arg7 - Argument 7 ClassGuid/FunctionId defined
|
||||
Arg8 - Argument 8 ClassGuid/FunctionId defined
|
||||
|
||||
Returns:
|
||||
Status of ClassGuid/FuncitonId
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
SAL_RETURN_REGS
|
||||
SetEsalVirtualEntryPoint (
|
||||
IN UINT64 EntryPoint,
|
||||
IN UINT64 Gp
|
||||
)
|
||||
;
|
||||
|
||||
SAL_RETURN_REGS
|
||||
SetEsalPhysicalEntryPoint (
|
||||
IN UINT64 EntryPoint,
|
||||
IN UINT64 Gp
|
||||
)
|
||||
;
|
||||
|
||||
SAL_RETURN_REGS
|
||||
GetEsalEntryPoint (
|
||||
VOID
|
||||
)
|
||||
;
|
||||
|
||||
VOID
|
||||
SalFlushCache (
|
||||
IN EFI_PHYSICAL_ADDRESS Start,
|
||||
IN UINT64 Length
|
||||
)
|
||||
;
|
||||
|
||||
#endif
|
250
EdkModulePkg/Include/Library/EdkFvbServiceLib.h
Normal file
250
EdkModulePkg/Include/Library/EdkFvbServiceLib.h
Normal file
@@ -0,0 +1,250 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
EdkFvbServiceLib.h
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
#ifndef __EDK_FVB_SERVICE_LIB_H__
|
||||
#define __EDK_FVB_SERVICE_LIB_H__
|
||||
|
||||
EFI_STATUS
|
||||
EfiFvbReadBlock (
|
||||
IN UINTN Instance,
|
||||
IN EFI_LBA Lba,
|
||||
IN UINTN Offset,
|
||||
IN OUT UINTN *NumBytes,
|
||||
IN UINT8 *Buffer
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Reads specified number of bytes into a buffer from the specified block
|
||||
|
||||
Arguments:
|
||||
Instance - The FV instance to be read from
|
||||
Lba - The logical block address to be read from
|
||||
Offset - Offset into the block at which to begin reading
|
||||
NumBytes - Pointer that on input contains the total size of
|
||||
the buffer. On output, it contains the total number
|
||||
of bytes read
|
||||
Buffer - Pointer to a caller allocated buffer that will be
|
||||
used to hold the data read
|
||||
|
||||
Returns:
|
||||
|
||||
Status code
|
||||
|
||||
EFI_INVALID_PARAMETER - invalid parameter
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EfiFvbWriteBlock (
|
||||
IN UINTN Instance,
|
||||
IN EFI_LBA Lba,
|
||||
IN UINTN Offset,
|
||||
IN OUT UINTN *NumBytes,
|
||||
IN UINT8 *Buffer
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Writes specified number of bytes from the input buffer to the block
|
||||
|
||||
Arguments:
|
||||
Instance - The FV instance to be written to
|
||||
Lba - The starting logical block index to write to
|
||||
Offset - Offset into the block at which to begin writing
|
||||
NumBytes - Pointer that on input contains the total size of
|
||||
the buffer. On output, it contains the total number
|
||||
of bytes actually written
|
||||
Buffer - Pointer to a caller allocated buffer that contains
|
||||
the source for the write
|
||||
|
||||
Returns:
|
||||
|
||||
Status code
|
||||
|
||||
EFI_INVALID_PARAMETER - invalid parameter
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EfiFvbEraseBlock (
|
||||
IN UINTN Instance,
|
||||
IN EFI_LBA Lba
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Erases and initializes a firmware volume block
|
||||
|
||||
Arguments:
|
||||
Instance - The FV instance to be erased
|
||||
Lba - The logical block index to be erased
|
||||
|
||||
Returns:
|
||||
|
||||
Status code
|
||||
|
||||
EFI_INVALID_PARAMETER - invalid parameter
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EfiFvbGetVolumeAttributes (
|
||||
IN UINTN Instance,
|
||||
OUT EFI_FVB_ATTRIBUTES *Attributes
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Retrieves attributes, insures positive polarity of attribute bits, returns
|
||||
resulting attributes in output parameter
|
||||
|
||||
Arguments:
|
||||
Instance - The FV instance whose attributes is going to be
|
||||
returned
|
||||
Attributes - Output buffer which contains attributes
|
||||
|
||||
Returns:
|
||||
Status code
|
||||
|
||||
EFI_INVALID_PARAMETER - invalid parameter
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EfiFvbSetVolumeAttributes (
|
||||
IN UINTN Instance,
|
||||
IN EFI_FVB_ATTRIBUTES Attributes
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Modifies the current settings of the firmware volume according to the
|
||||
input parameter, and returns the new setting of the volume
|
||||
|
||||
Arguments:
|
||||
Instance - The FV instance whose attributes is going to be
|
||||
modified
|
||||
Attributes - On input, it is a pointer to EFI_FVB_ATTRIBUTES
|
||||
containing the desired firmware volume settings.
|
||||
On successful return, it contains the new settings
|
||||
of the firmware volume
|
||||
|
||||
Returns:
|
||||
Status code
|
||||
|
||||
EFI_INVALID_PARAMETER - invalid parameter
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EfiFvbGetPhysicalAddress (
|
||||
IN UINTN Instance,
|
||||
OUT EFI_PHYSICAL_ADDRESS *BaseAddress
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Retrieves the physical address of a memory mapped FV
|
||||
|
||||
Arguments:
|
||||
Instance - The FV instance whose base address is going to be
|
||||
returned
|
||||
BaseAddress - Pointer to a caller allocated EFI_PHYSICAL_ADDRESS
|
||||
that on successful return, contains the base address
|
||||
of the firmware volume.
|
||||
|
||||
Returns:
|
||||
|
||||
Status code
|
||||
|
||||
EFI_INVALID_PARAMETER - invalid parameter
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EfiFvbGetBlockSize (
|
||||
IN UINTN Instance,
|
||||
IN EFI_LBA Lba,
|
||||
OUT UINTN *BlockSize,
|
||||
OUT UINTN *NumOfBlocks
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Retrieve the size of a logical block
|
||||
|
||||
Arguments:
|
||||
Instance - The FV instance whose block size is going to be
|
||||
returned
|
||||
Lba - Indicates which block to return the size for.
|
||||
BlockSize - A pointer to a caller allocated UINTN in which
|
||||
the size of the block is returned
|
||||
NumOfBlocks - a pointer to a caller allocated UINTN in which the
|
||||
number of consecutive blocks starting with Lba is
|
||||
returned. All blocks in this range have a size of
|
||||
BlockSize
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The firmware volume was read successfully and
|
||||
contents are in Buffer
|
||||
|
||||
EFI_INVALID_PARAMETER - invalid parameter
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EfiFvbEraseCustomBlockRange (
|
||||
IN UINTN Instance,
|
||||
IN EFI_LBA StartLba,
|
||||
IN UINTN OffsetStartLba,
|
||||
IN EFI_LBA LastLba,
|
||||
IN UINTN OffsetLastLba
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Erases and initializes a specified range of a firmware volume
|
||||
|
||||
Arguments:
|
||||
Instance - The FV instance to be erased
|
||||
StartLba - The starting logical block index to be erased
|
||||
OffsetStartLba - Offset into the starting block at which to
|
||||
begin erasing
|
||||
LastLba - The last logical block index to be erased
|
||||
OffsetLastLba - Offset into the last block at which to end erasing
|
||||
|
||||
Returns:
|
||||
|
||||
Status code
|
||||
|
||||
EFI_INVALID_PARAMETER - invalid parameter
|
||||
|
||||
EFI_UNSUPPORTED - not support
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
#endif
|
185
EdkModulePkg/Include/Library/EdkGraphicsLib.h
Normal file
185
EdkModulePkg/Include/Library/EdkGraphicsLib.h
Normal file
@@ -0,0 +1,185 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
GraphicsLib.h
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EFI_GRAPHICS_LIB_H_
|
||||
#define _EFI_GRAPHICS_LIB_H_
|
||||
|
||||
EFI_STATUS
|
||||
GetGraphicsBitMapFromFV (
|
||||
IN EFI_GUID *FileNameGuid,
|
||||
OUT VOID **Image,
|
||||
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
|
||||
ConvertBmpToUgaBlt (
|
||||
IN VOID *BmpImage,
|
||||
IN UINTN BmpImageSize,
|
||||
IN OUT VOID **UgaBlt,
|
||||
IN OUT UINTN *UgaBltSize,
|
||||
OUT UINTN *PixelHeight,
|
||||
OUT UINTN *PixelWidth
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Convert a *.BMP graphics image to a UGA blt buffer. If a NULL UgaBlt buffer
|
||||
is passed in a UgaBlt buffer will be allocated by this routine. If a UgaBlt
|
||||
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
|
||||
|
||||
UgaBlt - Buffer containing UGA version of BmpImage.
|
||||
|
||||
UgaBltSize - Size of UgaBlt in bytes.
|
||||
|
||||
PixelHeight - Height of UgaBlt/BmpImage in pixels
|
||||
|
||||
PixelWidth - Width of UgaBlt/BmpImage in pixels
|
||||
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS - UgaBlt and UgaBltSize are returned.
|
||||
EFI_UNSUPPORTED - BmpImage is not a valid *.BMP image
|
||||
EFI_BUFFER_TOO_SMALL - The passed in UgaBlt buffer is not big enough.
|
||||
UgaBltSize will contain the required size.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
EnableQuietBoot (
|
||||
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
|
||||
DisableQuietBoot (
|
||||
VOID
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Use Console Control to turn on UGA based Simple Text Out consoles. The UGA
|
||||
Simple Text Out screens will now be synced up with all non UGA output devices
|
||||
|
||||
Arguments:
|
||||
|
||||
NONE
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS - UGA devices are back in text mode and synced up.
|
||||
EFI_UNSUPPORTED - Logo not found
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
LockKeyboards (
|
||||
IN CHAR16 *Password
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
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
|
||||
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.
|
||||
|
||||
Arguments:
|
||||
Password - Password used to lock ConIn device
|
||||
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
|
||||
displayed.
|
||||
EFI_UNSUPPORTED - Logo not found
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
UINTN
|
||||
EFIAPI
|
||||
PrintXY (
|
||||
IN UINTN X,
|
||||
IN UINTN Y,
|
||||
IN EFI_UGA_PIXEL *Foreground, OPTIONAL
|
||||
IN EFI_UGA_PIXEL *Background, OPTIONAL
|
||||
IN CHAR16 *Fmt,
|
||||
...
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
#endif
|
1270
EdkModulePkg/Include/Library/EdkIfrSupportLib.h
Normal file
1270
EdkModulePkg/Include/Library/EdkIfrSupportLib.h
Normal file
File diff suppressed because it is too large
Load Diff
48
EdkModulePkg/Include/Library/EdkMemoryStatusCodeLib.h
Normal file
48
EdkModulePkg/Include/Library/EdkMemoryStatusCodeLib.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
MemoryStatusCodeLib.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Lib to provide memory status code reporting.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _PEI_MEMORY_STATUS_CODE_LIB_H_
|
||||
#define _PEI_MEMORY_STATUS_CODE_LIB_H_
|
||||
|
||||
//
|
||||
// Initialization function
|
||||
//
|
||||
EFI_STATUS
|
||||
MemoryStatusCodeInitialize (
|
||||
IN EFI_FFS_FILE_HEADER *FfsHeader,
|
||||
IN EFI_PEI_SERVICES **PeiServices
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// Status code reporting function
|
||||
//
|
||||
EFI_STATUS
|
||||
MemoryReportStatusCode (
|
||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||
IN EFI_STATUS_CODE_VALUE Value,
|
||||
IN UINT32 Instance,
|
||||
IN EFI_GUID * CallerId,
|
||||
IN EFI_STATUS_CODE_DATA * Data OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
#endif
|
32
EdkModulePkg/Include/Library/EdkPeCoffLoaderLib.h
Normal file
32
EdkModulePkg/Include/Library/EdkPeCoffLoaderLib.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
EdkPeCoffLoaderLib.h
|
||||
|
||||
Abstract:
|
||||
Wrap the Base PE/COFF loader with the PE COFF Protocol
|
||||
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __EDK_PE_COFF_LOADER_LIB__
|
||||
#define __EDK_PE_COFF_LOADER_LIB__
|
||||
|
||||
EFI_PEI_PE_COFF_LOADER_PROTOCOL *
|
||||
EFIAPI
|
||||
GetPeCoffLoaderProtocol (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif
|
33
EdkModulePkg/Include/Library/EdkPeCoffLoaderX64Lib.h
Normal file
33
EdkModulePkg/Include/Library/EdkPeCoffLoaderX64Lib.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
EdkPeCoffLoaderX64Lib.h
|
||||
|
||||
Abstract:
|
||||
Wrap the Base PE/COFF loader with the PE COFF Protocol
|
||||
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __EDK_PE_COFF_LOADER_X64_LIB__
|
||||
#define __EDK_PE_COFF_LOADER_X64_LIB__
|
||||
|
||||
EFI_PEI_PE_COFF_LOADER_PROTOCOL *
|
||||
EFIAPI
|
||||
GetPeCoffLoaderX64Protocol (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif
|
||||
|
66
EdkModulePkg/Include/Library/EdkRtMemoryStatusCodeLib.h
Normal file
66
EdkModulePkg/Include/Library/EdkRtMemoryStatusCodeLib.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
RtMemoryStatusCodeLib.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Lib to provide memory status code reporting.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EFI_RT_MEMORY_STATUS_CODE_LIB_H_
|
||||
#define _EFI_RT_MEMORY_STATUS_CODE_LIB_H_
|
||||
|
||||
//
|
||||
// Initialization function
|
||||
//
|
||||
VOID
|
||||
RtMemoryStatusCodeInitialize (
|
||||
VOID
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// Status code reporting function
|
||||
//
|
||||
EFI_STATUS
|
||||
RtMemoryReportStatusCode (
|
||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||
IN EFI_STATUS_CODE_VALUE Value,
|
||||
IN UINT32 Instance,
|
||||
IN EFI_GUID * CallerId,
|
||||
IN EFI_STATUS_CODE_DATA * Data OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// Playback all prior status codes to a listener
|
||||
//
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(*PLATFORM_REPORT_STATUS_CODE) (
|
||||
IN EFI_STATUS_CODE_TYPE Type,
|
||||
IN EFI_STATUS_CODE_VALUE Value,
|
||||
IN UINT32 Instance,
|
||||
IN EFI_GUID * CallerId OPTIONAL,
|
||||
IN EFI_STATUS_CODE_DATA * Data OPTIONAL
|
||||
);
|
||||
|
||||
VOID
|
||||
PlaybackStatusCodes (
|
||||
IN PLATFORM_REPORT_STATUS_CODE ReportStatusCode
|
||||
)
|
||||
;
|
||||
|
||||
#endif
|
49
EdkModulePkg/Include/Library/EdkRtPlatformStatusCodeLib.h
Normal file
49
EdkModulePkg/Include/Library/EdkRtPlatformStatusCodeLib.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
RtPlatformStatusCodeLib.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Lib to provide platform implementations necessary for the Monolithic status
|
||||
code to work.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EFI_PLATFORM_STATUS_CODE_LIB_H_
|
||||
#define _EFI_PLATFORM_STATUS_CODE_LIB_H_
|
||||
|
||||
|
||||
//
|
||||
// Initialization function
|
||||
//
|
||||
VOID
|
||||
RtPlatformStatusCodeInitialize (
|
||||
VOID
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// Status code reporting function
|
||||
//
|
||||
EFI_STATUS
|
||||
RtPlatformReportStatusCode (
|
||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||
IN EFI_STATUS_CODE_VALUE Value,
|
||||
IN UINT32 Instance,
|
||||
IN EFI_GUID * CallerId,
|
||||
IN EFI_STATUS_CODE_DATA * Data OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
#endif
|
299
EdkModulePkg/Include/Library/EdkScsiLib.h
Normal file
299
EdkModulePkg/Include/Library/EdkScsiLib.h
Normal file
@@ -0,0 +1,299 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
ScsiLib.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Common Libarary for SCSI
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _SCSI_LIB_H
|
||||
#define _SCSI_LIB_H
|
||||
|
||||
//
|
||||
// the time unit is 100ns, since the SCSI I/O defines timeout in 100ns unit.
|
||||
//
|
||||
#define EFI_SCSI_STALL_1_MICROSECOND 10
|
||||
#define EFI_SCSI_STALL_1_MILLISECOND 10000
|
||||
#define EFI_SCSI_STALL_1_SECOND 10000000
|
||||
|
||||
//
|
||||
// this macro cannot be directly used by the gBS->Stall(),
|
||||
// since the value output by this macro is in 100ns unit,
|
||||
// not 1us unit (1us = 1000ns)
|
||||
//
|
||||
#define EfiScsiStallSeconds(a) (a) * EFI_SCSI_STALL_1_SECOND
|
||||
|
||||
EFI_STATUS
|
||||
SubmitTestUnitReadyCommand (
|
||||
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
||||
IN UINT64 Timeout,
|
||||
OUT VOID *SenseData,
|
||||
OUT UINT8 *SenseDataLength,
|
||||
OUT UINT8 *HostAdapterStatus,
|
||||
OUT UINT8 *TargetStatus
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
TODO: Add function description
|
||||
|
||||
Arguments:
|
||||
|
||||
ScsiIo - TODO: add argument description
|
||||
Timeout - TODO: add argument description
|
||||
SenseData - TODO: add argument description
|
||||
SenseDataLength - TODO: add argument description
|
||||
HostAdapterStatus - TODO: add argument description
|
||||
TargetStatus - TODO: add argument description
|
||||
|
||||
Returns:
|
||||
|
||||
TODO: add return values
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
SubmitInquiryCommand (
|
||||
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
||||
IN UINT64 Timeout,
|
||||
IN VOID *SenseData,
|
||||
IN OUT UINT8 *SenseDataLength,
|
||||
OUT UINT8 *HostAdapterStatus,
|
||||
OUT UINT8 *TargetStatus,
|
||||
IN OUT VOID *InquiryDataBuffer,
|
||||
IN OUT UINT32 *InquiryDataLength,
|
||||
IN BOOLEAN EnableVitalProductData
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
TODO: Add function description
|
||||
|
||||
Arguments:
|
||||
|
||||
ScsiIo - TODO: add argument description
|
||||
Timeout - TODO: add argument description
|
||||
SenseData - TODO: add argument description
|
||||
SenseDataLength - TODO: add argument description
|
||||
HostAdapterStatus - TODO: add argument description
|
||||
TargetStatus - TODO: add argument description
|
||||
InquiryDataBuffer - TODO: add argument description
|
||||
InquiryDataLength - TODO: add argument description
|
||||
EnableVitalProductData - TODO: add argument description
|
||||
|
||||
Returns:
|
||||
|
||||
TODO: add return values
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
SubmitModeSense10Command (
|
||||
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
||||
IN UINT64 Timeout,
|
||||
IN VOID *SenseData,
|
||||
IN OUT UINT8 *SenseDataLength,
|
||||
OUT UINT8 *HostAdapterStatus,
|
||||
OUT UINT8 *TargetStatus,
|
||||
IN VOID *DataBuffer,
|
||||
IN OUT UINT32 *DataLength,
|
||||
IN UINT8 DBDField, OPTIONAL
|
||||
IN UINT8 PageControl,
|
||||
IN UINT8 PageCode
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
TODO: Add function description
|
||||
|
||||
Arguments:
|
||||
|
||||
ScsiIo - TODO: add argument description
|
||||
Timeout - TODO: add argument description
|
||||
SenseData - TODO: add argument description
|
||||
SenseDataLength - TODO: add argument description
|
||||
HostAdapterStatus - TODO: add argument description
|
||||
TargetStatus - TODO: add argument description
|
||||
DataBuffer - TODO: add argument description
|
||||
DataLength - TODO: add argument description
|
||||
DBDField - TODO: add argument description
|
||||
PageControl - TODO: add argument description
|
||||
PageCode - TODO: add argument description
|
||||
|
||||
Returns:
|
||||
|
||||
TODO: add return values
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
SubmitRequestSenseCommand (
|
||||
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
||||
IN UINT64 Timeout,
|
||||
IN VOID *SenseData,
|
||||
IN OUT UINT8 *SenseDataLength,
|
||||
OUT UINT8 *HostAdapterStatus,
|
||||
OUT UINT8 *TargetStatus
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
TODO: Add function description
|
||||
|
||||
Arguments:
|
||||
|
||||
ScsiIo - TODO: add argument description
|
||||
Timeout - TODO: add argument description
|
||||
SenseData - TODO: add argument description
|
||||
SenseDataLength - TODO: add argument description
|
||||
HostAdapterStatus - TODO: add argument description
|
||||
TargetStatus - TODO: add argument description
|
||||
|
||||
Returns:
|
||||
|
||||
TODO: add return values
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
//
|
||||
// Commands for direct access command
|
||||
//
|
||||
EFI_STATUS
|
||||
SubmitReadCapacityCommand (
|
||||
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
||||
IN UINT64 Timeout,
|
||||
IN VOID *SenseData,
|
||||
IN OUT UINT8 *SenseDataLength,
|
||||
OUT UINT8 *HostAdapterStatus,
|
||||
OUT UINT8 *TargetStatus,
|
||||
OUT VOID *DataBuffer,
|
||||
IN OUT UINT32 *DataLength,
|
||||
IN BOOLEAN PMI
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
TODO: Add function description
|
||||
|
||||
Arguments:
|
||||
|
||||
ScsiIo - TODO: add argument description
|
||||
Timeout - TODO: add argument description
|
||||
SenseData - TODO: add argument description
|
||||
SenseDataLength - TODO: add argument description
|
||||
HostAdapterStatus - TODO: add argument description
|
||||
TargetStatus - TODO: add argument description
|
||||
DataBuffer - TODO: add argument description
|
||||
DataLength - TODO: add argument description
|
||||
PMI - TODO: add argument description
|
||||
|
||||
Returns:
|
||||
|
||||
TODO: add return values
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
SubmitRead10Command (
|
||||
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
||||
IN UINT64 Timeout,
|
||||
IN VOID *SenseData,
|
||||
IN OUT UINT8 *SenseDataLength,
|
||||
OUT UINT8 *HostAdapterStatus,
|
||||
OUT UINT8 *TargetStatus,
|
||||
OUT VOID *DataBuffer,
|
||||
IN OUT UINT32 *DataLength,
|
||||
IN UINT32 StartLba,
|
||||
IN UINT32 SectorSize
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
TODO: Add function description
|
||||
|
||||
Arguments:
|
||||
|
||||
ScsiIo - TODO: add argument description
|
||||
Timeout - TODO: add argument description
|
||||
SenseData - TODO: add argument description
|
||||
SenseDataLength - TODO: add argument description
|
||||
HostAdapterStatus - TODO: add argument description
|
||||
TargetStatus - TODO: add argument description
|
||||
DataBuffer - TODO: add argument description
|
||||
DataLength - TODO: add argument description
|
||||
StartLba - TODO: add argument description
|
||||
SectorSize - TODO: add argument description
|
||||
|
||||
Returns:
|
||||
|
||||
TODO: add return values
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
EFI_STATUS
|
||||
SubmitWrite10Command (
|
||||
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
||||
IN UINT64 Timeout,
|
||||
IN VOID *SenseData,
|
||||
IN OUT UINT8 *SenseDataLength,
|
||||
OUT UINT8 *HostAdapterStatus,
|
||||
OUT UINT8 *TargetStatus,
|
||||
OUT VOID *DataBuffer,
|
||||
IN OUT UINT32 *DataLength,
|
||||
IN UINT32 StartLba,
|
||||
IN UINT32 SectorSize
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
TODO: Add function description
|
||||
|
||||
Arguments:
|
||||
|
||||
ScsiIo - TODO: add argument description
|
||||
Timeout - TODO: add argument description
|
||||
SenseData - TODO: add argument description
|
||||
SenseDataLength - TODO: add argument description
|
||||
HostAdapterStatus - TODO: add argument description
|
||||
TargetStatus - TODO: add argument description
|
||||
DataBuffer - TODO: add argument description
|
||||
DataLength - TODO: add argument description
|
||||
StartLba - TODO: add argument description
|
||||
SectorSize - TODO: add argument description
|
||||
|
||||
Returns:
|
||||
|
||||
TODO: add return values
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
#endif
|
373
EdkModulePkg/Include/Library/EdkUsbLib.h
Normal file
373
EdkModulePkg/Include/Library/EdkUsbLib.h
Normal file
@@ -0,0 +1,373 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
UsbDxeLib.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Common Dxe Libarary for USB
|
||||
Add Constants & structure definitions for Usb HID
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _USB_DXE_LIB_H
|
||||
#define _USB_DXE_LIB_H
|
||||
|
||||
//
|
||||
// define the timeout time as 3ms
|
||||
//
|
||||
#define TIMEOUT_VALUE 3 * 1000
|
||||
|
||||
//
|
||||
// HID constants definition, see HID rev1.0
|
||||
//
|
||||
//
|
||||
// HID report item format
|
||||
//
|
||||
#define HID_ITEM_FORMAT_SHORT 0
|
||||
#define HID_ITEM_FORMAT_LONG 1
|
||||
|
||||
//
|
||||
// Special tag indicating long items
|
||||
//
|
||||
#define HID_ITEM_TAG_LONG 15
|
||||
|
||||
//
|
||||
// HID report descriptor item type (prefix bit 2,3)
|
||||
//
|
||||
#define HID_ITEM_TYPE_MAIN 0
|
||||
#define HID_ITEM_TYPE_GLOBAL 1
|
||||
#define HID_ITEM_TYPE_LOCAL 2
|
||||
#define HID_ITEM_TYPE_RESERVED 3
|
||||
|
||||
//
|
||||
// HID report descriptor main item tags
|
||||
//
|
||||
#define HID_MAIN_ITEM_TAG_INPUT 8
|
||||
#define HID_MAIN_ITEM_TAG_OUTPUT 9
|
||||
#define HID_MAIN_ITEM_TAG_FEATURE 11
|
||||
#define HID_MAIN_ITEM_TAG_BEGIN_COLLECTION 10
|
||||
#define HID_MAIN_ITEM_TAG_END_COLLECTION 12
|
||||
|
||||
//
|
||||
// HID report descriptor main item contents
|
||||
//
|
||||
#define HID_MAIN_ITEM_CONSTANT 0x001
|
||||
#define HID_MAIN_ITEM_VARIABLE 0x002
|
||||
#define HID_MAIN_ITEM_RELATIVE 0x004
|
||||
#define HID_MAIN_ITEM_WRAP 0x008
|
||||
#define HID_MAIN_ITEM_NONLINEAR 0x010
|
||||
#define HID_MAIN_ITEM_NO_PREFERRED 0x020
|
||||
#define HID_MAIN_ITEM_NULL_STATE 0x040
|
||||
#define HID_MAIN_ITEM_VOLATILE 0x080
|
||||
#define HID_MAIN_ITEM_BUFFERED_BYTE 0x100
|
||||
|
||||
//
|
||||
// HID report descriptor collection item types
|
||||
//
|
||||
#define HID_COLLECTION_PHYSICAL 0
|
||||
#define HID_COLLECTION_APPLICATION 1
|
||||
#define HID_COLLECTION_LOGICAL 2
|
||||
|
||||
//
|
||||
// HID report descriptor global item tags
|
||||
//
|
||||
#define HID_GLOBAL_ITEM_TAG_USAGE_PAGE 0
|
||||
#define HID_GLOBAL_ITEM_TAG_LOGICAL_MINIMUM 1
|
||||
#define HID_GLOBAL_ITEM_TAG_LOGICAL_MAXIMUM 2
|
||||
#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MINIMUM 3
|
||||
#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MAXIMUM 4
|
||||
#define HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT 5
|
||||
#define HID_GLOBAL_ITEM_TAG_UNIT 6
|
||||
#define HID_GLOBAL_ITEM_TAG_REPORT_SIZE 7
|
||||
#define HID_GLOBAL_ITEM_TAG_REPORT_ID 8
|
||||
#define HID_GLOBAL_ITEM_TAG_REPORT_COUNT 9
|
||||
#define HID_GLOBAL_ITEM_TAG_PUSH 10
|
||||
#define HID_GLOBAL_ITEM_TAG_POP 11
|
||||
|
||||
//
|
||||
// HID report descriptor local item tags
|
||||
//
|
||||
#define HID_LOCAL_ITEM_TAG_USAGE 0
|
||||
#define HID_LOCAL_ITEM_TAG_USAGE_MINIMUM 1
|
||||
#define HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM 2
|
||||
#define HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX 3
|
||||
#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM 4
|
||||
#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM 5
|
||||
#define HID_LOCAL_ITEM_TAG_STRING_INDEX 7
|
||||
#define HID_LOCAL_ITEM_TAG_STRING_MINIMUM 8
|
||||
#define HID_LOCAL_ITEM_TAG_STRING_MAXIMUM 9
|
||||
#define HID_LOCAL_ITEM_TAG_DELIMITER 10
|
||||
|
||||
//
|
||||
// HID usage tables
|
||||
//
|
||||
#define HID_USAGE_PAGE 0xffff0000
|
||||
|
||||
#define HID_UP_GENDESK 0x00010000
|
||||
#define HID_UP_KEYBOARD 0x00070000
|
||||
#define HID_UP_LED 0x00080000
|
||||
#define HID_UP_BUTTON 0x00090000
|
||||
#define HID_UP_CONSUMER 0x000c0000
|
||||
#define HID_UP_DIGITIZER 0x000d0000
|
||||
#define HID_UP_PID 0x000f0000
|
||||
|
||||
#define HID_USAGE 0x0000ffff
|
||||
|
||||
#define HID_GD_POINTER 0x00010001
|
||||
#define HID_GD_MOUSE 0x00010002
|
||||
#define HID_GD_JOYSTICK 0x00010004
|
||||
#define HID_GD_GAMEPAD 0x00010005
|
||||
#define HID_GD_HATSWITCH 0x00010039
|
||||
|
||||
//
|
||||
// HID report types
|
||||
//
|
||||
#define HID_INPUT_REPORT 1
|
||||
#define HID_OUTPUT_REPORT 2
|
||||
#define HID_FEATURE_REPORT 3
|
||||
|
||||
//
|
||||
// HID device quirks.
|
||||
//
|
||||
#define HID_QUIRK_INVERT 0x01
|
||||
#define HID_QUIRK_NOTOUCH 0x02
|
||||
|
||||
//
|
||||
// HID class protocol request
|
||||
//
|
||||
#define EFI_USB_GET_REPORT_REQUEST 0x01
|
||||
#define EFI_USB_GET_IDLE_REQUEST 0x02
|
||||
#define EFI_USB_GET_PROTOCOL_REQUEST 0x03
|
||||
#define EFI_USB_SET_REPORT_REQUEST 0x09
|
||||
#define EFI_USB_SET_IDLE_REQUEST 0x0a
|
||||
#define EFI_USB_SET_PROTOCOL_REQUEST 0x0b
|
||||
|
||||
#pragma pack(1)
|
||||
//
|
||||
// Descriptor header for Report/Physical Descriptors
|
||||
//
|
||||
typedef struct hid_class_descriptor {
|
||||
UINT8 DescriptorType;
|
||||
UINT16 DescriptorLength;
|
||||
} EFI_USB_HID_CLASS_DESCRIPTOR;
|
||||
|
||||
typedef struct hid_descriptor {
|
||||
UINT8 Length;
|
||||
UINT8 DescriptorType;
|
||||
UINT16 BcdHID;
|
||||
UINT8 CountryCode;
|
||||
UINT8 NumDescriptors;
|
||||
EFI_USB_HID_CLASS_DESCRIPTOR HidClassDesc[1];
|
||||
} EFI_USB_HID_DESCRIPTOR;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
EFI_STATUS
|
||||
UsbGetHidDescriptor (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN UINT8 InterfaceNum,
|
||||
OUT EFI_USB_HID_DESCRIPTOR *HidDescriptor
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
UsbGetReportDescriptor (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN UINT8 InterfaceNum,
|
||||
IN UINT16 DescriptorSize,
|
||||
OUT UINT8 *DescriptorBuffer
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
UsbGetProtocolRequest (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN UINT8 Interface,
|
||||
IN UINT8 *Protocol
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
UsbSetProtocolRequest (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN UINT8 Interface,
|
||||
IN UINT8 Protocol
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
UsbSetIdleRequest (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN UINT8 Interface,
|
||||
IN UINT8 ReportId,
|
||||
IN UINT8 Duration
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
UsbGetIdleRequest (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN UINT8 Interface,
|
||||
IN UINT8 ReportId,
|
||||
OUT UINT8 *Duration
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
UsbSetReportRequest (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN UINT8 Interface,
|
||||
IN UINT8 ReportId,
|
||||
IN UINT8 ReportType,
|
||||
IN UINT16 ReportLen,
|
||||
IN UINT8 *Report
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
UsbGetReportRequest (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN UINT8 Interface,
|
||||
IN UINT8 ReportId,
|
||||
IN UINT8 ReportType,
|
||||
IN UINT16 ReportLen,
|
||||
IN UINT8 *Report
|
||||
);
|
||||
|
||||
//
|
||||
// Get Device Descriptor
|
||||
//
|
||||
EFI_STATUS
|
||||
UsbGetDescriptor (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN UINT16 Value,
|
||||
IN UINT16 Index,
|
||||
IN UINT16 DescriptorLength,
|
||||
OUT VOID *Descriptor,
|
||||
OUT UINT32 *Status
|
||||
);
|
||||
|
||||
//
|
||||
// Set Device Descriptor
|
||||
//
|
||||
EFI_STATUS
|
||||
UsbSetDescriptor (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN UINT16 Value,
|
||||
IN UINT16 Index,
|
||||
IN UINT16 DescriptorLength,
|
||||
IN VOID *Descriptor,
|
||||
OUT UINT32 *Status
|
||||
);
|
||||
|
||||
//
|
||||
// Get device Interface
|
||||
//
|
||||
EFI_STATUS
|
||||
UsbGetDeviceInterface (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN UINT16 Index,
|
||||
OUT UINT8 *AltSetting,
|
||||
OUT UINT32 *Status
|
||||
);
|
||||
|
||||
//
|
||||
// Set device interface
|
||||
//
|
||||
EFI_STATUS
|
||||
UsbSetDeviceInterface (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN UINT16 InterfaceNo,
|
||||
IN UINT16 AltSetting,
|
||||
OUT UINT32 *Status
|
||||
);
|
||||
|
||||
//
|
||||
// Get device configuration
|
||||
//
|
||||
EFI_STATUS
|
||||
UsbGetDeviceConfiguration (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
OUT UINT8 *ConfigValue,
|
||||
OUT UINT32 *Status
|
||||
);
|
||||
|
||||
//
|
||||
// Set device configuration
|
||||
//
|
||||
EFI_STATUS
|
||||
UsbSetDeviceConfiguration (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN UINT16 Value,
|
||||
OUT UINT32 *Status
|
||||
);
|
||||
|
||||
//
|
||||
// Set Device Feature
|
||||
//
|
||||
EFI_STATUS
|
||||
UsbSetDeviceFeature (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN EFI_USB_RECIPIENT Recipient,
|
||||
IN UINT16 Value,
|
||||
IN UINT16 Target,
|
||||
OUT UINT32 *Status
|
||||
);
|
||||
|
||||
//
|
||||
// Clear Device Feature
|
||||
//
|
||||
EFI_STATUS
|
||||
UsbClearDeviceFeature (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN EFI_USB_RECIPIENT Recipient,
|
||||
IN UINT16 Value,
|
||||
IN UINT16 Target,
|
||||
OUT UINT32 *Status
|
||||
);
|
||||
|
||||
//
|
||||
// Get Device Status
|
||||
//
|
||||
EFI_STATUS
|
||||
UsbGetDeviceStatus (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN EFI_USB_RECIPIENT Recipient,
|
||||
IN UINT16 Target,
|
||||
OUT UINT16 *DevStatus,
|
||||
OUT UINT32 *Status
|
||||
);
|
||||
|
||||
//
|
||||
// The following APIs are not basic library, but they are common used.
|
||||
//
|
||||
//
|
||||
// Usb Get String
|
||||
//
|
||||
EFI_STATUS
|
||||
UsbGetString (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN UINT16 LangID,
|
||||
IN UINT8 Index,
|
||||
IN VOID *Buf,
|
||||
IN UINTN BufSize,
|
||||
OUT UINT32 *Status
|
||||
);
|
||||
|
||||
//
|
||||
// Clear endpoint stall
|
||||
//
|
||||
EFI_STATUS
|
||||
UsbClearEndpointHalt (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo,
|
||||
IN UINT8 EndpointNo,
|
||||
OUT UINT32 *Status
|
||||
);
|
||||
|
||||
#endif
|
42
EdkModulePkg/Include/Library/TianoDecompressLib.h
Normal file
42
EdkModulePkg/Include/Library/TianoDecompressLib.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/*++
|
||||
|
||||
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:
|
||||
|
||||
TianoDecompressLib.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Tiano Decompress functions
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __TIANO_DECPOMPRESS_LIB_H__
|
||||
#define __TIANO_DECPOMPRESS_LIB_H__
|
||||
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
TianoDecompressGetInfo (
|
||||
IN CONST VOID *Source,
|
||||
IN UINT32 SourceSize,
|
||||
OUT UINT32 *DestinationSize,
|
||||
OUT UINT32 *ScratchSize
|
||||
);
|
||||
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
TianoDecompress (
|
||||
IN CONST VOID *Source,
|
||||
IN OUT VOID *Destination,
|
||||
IN OUT VOID *Scratch
|
||||
);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user