diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-06-27 06:15:36 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-06-27 06:15:36 +0000 |
commit | d8a43975d902b901ecccc32cda1160c47c804bd8 (patch) | |
tree | 5c1a74fc56f435cdb0705cb7fc10c9fc679a36b0 /MdeModulePkg/Include | |
parent | dcd8c7d649f12524ec1cadbb6d85a9e39dadce3a (diff) | |
download | edk2-d8a43975d902b901ecccc32cda1160c47c804bd8.zip edk2-d8a43975d902b901ecccc32cda1160c47c804bd8.tar.gz edk2-d8a43975d902b901ecccc32cda1160c47c804bd8.tar.bz2 |
added PPI and Protocol definitions needed by porting modules
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2778 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Include')
-rw-r--r-- | MdeModulePkg/Include/Ppi/FindFv.h | 71 | ||||
-rw-r--r-- | MdeModulePkg/Include/Protocol/CustomizedDecompress.h | 137 | ||||
-rw-r--r-- | MdeModulePkg/Include/Protocol/EdkDecompress.h | 137 | ||||
-rw-r--r-- | MdeModulePkg/Include/Protocol/LoadPe32Image.h | 68 |
4 files changed, 413 insertions, 0 deletions
diff --git a/MdeModulePkg/Include/Ppi/FindFv.h b/MdeModulePkg/Include/Ppi/FindFv.h new file mode 100644 index 0000000..9a3e173 --- /dev/null +++ b/MdeModulePkg/Include/Ppi/FindFv.h @@ -0,0 +1,71 @@ +/** @file
+ This file declares FindFv PPI used to locate FVs that contain PEIMs in PEI
+
+ 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: FindFv.h
+
+ @par Revision Reference:
+ This PPI is defined in PEI CIS
+ Version 0.91
+
+**/
+
+#ifndef __FIND_FV_H__
+#define __FIND_FV_H__
+
+#define EFI_PEI_FIND_FV_PPI_GUID \
+ { \
+ 0x36164812, 0xa023, 0x44e5, {0xbd, 0x85, 0x5, 0xbf, 0x3c, 0x77, 0x0, 0xaa } \
+ }
+
+typedef struct _EFI_PEI_FIND_FV_PPI EFI_PEI_FIND_FV_PPI;
+
+/**
+ This interface returns the base address of the firmware volume whose index
+ was passed in FvNumber.Once this function reports a firmware volume
+ index/base address pair, that index/address pairing must continue throughout PEI.
+
+ @param PeiServices Pointer to the PEI Services Table.
+ @param This Interface pointer that implements the Find FV service.
+ @param FvNumber The index of the firmware volume to locate.
+ @param FvAddress The address of the volume to discover.
+
+ @retval EFI_SUCCESS An additional firmware volume was found.
+ @retval EFI_OUT_OF_RESOURCES There are no firmware volumes for the given FvNumber.
+ @retval EFI_INVALID_PARAMETER *FvAddress is NULL.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PEI_FIND_FV_FINDFV) (
+ IN EFI_PEI_FIND_FV_PPI *This,
+ IN EFI_PEI_SERVICES **PeiServices,
+ UINT8 *FvNumber,
+ EFI_FIRMWARE_VOLUME_HEADER **FVAddress
+ );
+
+/**
+ @par Ppi Description:
+ Hardware mechanisms for locating FVs in a platform vary widely.
+ EFI_PEI_FIND_FV_PPI serves to abstract this variation so that the
+ PEI Foundation can remain standard across a wide variety of platforms.
+
+ @param FindFv
+ Service that abstracts the location of additional firmware volumes.
+
+**/
+struct _EFI_PEI_FIND_FV_PPI {
+ EFI_PEI_FIND_FV_FINDFV FindFv;
+};
+
+extern EFI_GUID gEfiFindFvPpiGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Protocol/CustomizedDecompress.h b/MdeModulePkg/Include/Protocol/CustomizedDecompress.h new file mode 100644 index 0000000..bff8d46 --- /dev/null +++ b/MdeModulePkg/Include/Protocol/CustomizedDecompress.h @@ -0,0 +1,137 @@ +/*++
+
+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:
+ CustomizedDecompress.h
+
+Abstract:
+ The user Customized Decompress Protocol Interface
+
+--*/
+
+#ifndef __CUSTOMIZED_DECOMPRESS_H__
+#define __CUSTOMIZED_DECOMPRESS_H__
+
+#define EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL_GUID \
+ { 0x9a44198e, 0xa4a2, 0x44e6, {0x8a, 0x1f, 0x39, 0xbe, 0xfd, 0xac, 0x89, 0x6f } }
+
+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
+ specified by Source and SourceSize. If the size of the uncompressed
+ buffer or the size of the scratch buffer cannot be determined from
+ the compressed data specified by Source and SourceData, then
+ EFI_INVALID_PARAMETER is returned. Otherwise, the size of the uncompressed
+ buffer is returned in DestinationSize, the size of the scratch buffer is
+ returned in ScratchSize, and EFI_SUCCESS is returned.
+
+ The GetInfo() function does not have scratch buffer available to perform
+ a thorough checking of the validity of the source data. It just retrieves
+ the 'Original Size' field from the beginning bytes of the source data and
+ output it as DestinationSize. And ScratchSize is specific to the decompression
+ implementation.
+
+Arguments:
+
+ 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.
+
+--*/
+
+
+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
+ );
+/*++
+
+Routine Description:
+
+ The Decompress() function extracts decompressed data to its original form.
+
+ This protocol is designed so that the decompression algorithm can be
+ implemented without using any memory services. As a result, the
+ Decompress() function is not allowed to call AllocatePool() or
+ AllocatePages() in its implementation. It is the caller's responsibility
+ to allocate and free the Destination and Scratch buffers.
+
+ If the compressed source data specified by Source and SourceSize is
+ sucessfully decompressed into Destination, then EFI_SUCCESS is returned.
+ 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:
+
+ 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).
+
+--*/
+
+struct _EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL {
+ EFI_CUSTOMIZED_DECOMPRESS_GET_INFO GetInfo;
+ EFI_CUSTOMIZED_DECOMPRESS_DECOMPRESS Decompress;
+};
+
+extern EFI_GUID gEfiCustomizedDecompressProtocolGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Protocol/EdkDecompress.h b/MdeModulePkg/Include/Protocol/EdkDecompress.h new file mode 100644 index 0000000..ab9b840 --- /dev/null +++ b/MdeModulePkg/Include/Protocol/EdkDecompress.h @@ -0,0 +1,137 @@ +/*++
+
+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:
+ EdkDecompress.h
+
+Abstract:
+ The Tiano Decompress Protocol Interface
+
+--*/
+
+#ifndef __EDK_DECOMPRESS_H__
+#define __EDK_DECOMPRESS_H__
+
+#define EFI_TIANO_DECOMPRESS_PROTOCOL_GUID \
+ { 0xe84cf29c, 0x191f, 0x4eae, {0x96, 0xe1, 0xf4, 0x6a, 0xec, 0xea, 0xea, 0x0b } }
+
+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
+ specified by Source and SourceSize. If the size of the uncompressed
+ buffer or the size of the scratch buffer cannot be determined from
+ the compressed data specified by Source and SourceData, then
+ EFI_INVALID_PARAMETER is returned. Otherwise, the size of the uncompressed
+ buffer is returned in DestinationSize, the size of the scratch buffer is
+ returned in ScratchSize, and EFI_SUCCESS is returned.
+
+ The GetInfo() function does not have scratch buffer available to perform
+ a thorough checking of the validity of the source data. It just retrieves
+ the 'Original Size' field from the beginning bytes of the source data and
+ output it as DestinationSize. And ScratchSize is specific to the decompression
+ implementation.
+
+Arguments:
+
+ 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.
+
+--*/
+
+
+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
+ );
+/*++
+
+Routine Description:
+
+ The Decompress() function extracts decompressed data to its original form.
+
+ This protocol is designed so that the decompression algorithm can be
+ implemented without using any memory services. As a result, the
+ Decompress() function is not allowed to call AllocatePool() or
+ AllocatePages() in its implementation. It is the caller's responsibility
+ to allocate and free the Destination and Scratch buffers.
+
+ If the compressed source data specified by Source and SourceSize is
+ sucessfully decompressed into Destination, then EFI_SUCCESS is returned.
+ 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:
+
+ 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).
+
+--*/
+
+struct _EFI_TIANO_DECOMPRESS_PROTOCOL {
+ EFI_TIANO_DECOMPRESS_GET_INFO GetInfo;
+ EFI_TIANO_DECOMPRESS_DECOMPRESS Decompress;
+};
+
+extern EFI_GUID gEfiTianoDecompressProtocolGuid;
+
+#endif
diff --git a/MdeModulePkg/Include/Protocol/LoadPe32Image.h b/MdeModulePkg/Include/Protocol/LoadPe32Image.h new file mode 100644 index 0000000..1ea2989 --- /dev/null +++ b/MdeModulePkg/Include/Protocol/LoadPe32Image.h @@ -0,0 +1,68 @@ +/*++
+
+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 as defined in the EFI 1.0 specification.
+
+ Load file protocol exists to supports the addition of new boot devices,
+ and to support booting from devices that do not map well to file system.
+ Network boot is done via a LoadFile protocol.
+
+ EFI 1.0 can boot from any device that produces a LoadFile protocol.
+
+--*/
+
+#ifndef __LOAD_PE32_IMAGE_H__
+#define __LOAD_PE32_IMAGE_H__
+
+#define PE32_IMAGE_PROTOCOL_GUID \
+ {0x5cb5c776,0x60d5,0x45ee,{0x88,0x3c,0x45,0x27,0x8,0xcd,0x74,0x3f }}
+
+#define EFI_LOAD_PE_IMAGE_ATTRIBUTE_NONE 0x00
+#define EFI_LOAD_PE_IMAGE_ATTRIBUTE_RUNTIME_REGISTRATION 0x01
+#define EFI_LOAD_PE_IMAGE_ATTRIBUTE_DEBUG_IMAGE_INFO_TABLE_REGISTRATION 0x02
+
+typedef struct _EFI_PE32_IMAGE_PROTOCOL EFI_PE32_IMAGE_PROTOCOL;
+
+typedef
+EFI_STATUS
+(EFIAPI *LOAD_PE_IMAGE) (
+ IN EFI_PE32_IMAGE_PROTOCOL *This,
+ IN EFI_HANDLE ParentImageHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
+ IN VOID *SourceBuffer OPTIONAL,
+ IN UINTN SourceSize,
+ IN EFI_PHYSICAL_ADDRESS DstBuffer OPTIONAL,
+ OUT UINTN *NumberOfPages OPTIONAL,
+ OUT EFI_HANDLE *ImageHandle,
+ OUT EFI_PHYSICAL_ADDRESS *EntryPoint OPTIONAL,
+ IN UINT32 Attribute
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *UNLOAD_PE_IMAGE) (
+ IN EFI_PE32_IMAGE_PROTOCOL *This,
+ IN EFI_HANDLE ImageHandle
+ );
+
+struct _EFI_PE32_IMAGE_PROTOCOL {
+ LOAD_PE_IMAGE LoadPeImage;
+ UNLOAD_PE_IMAGE UnLoadPeImage;
+};
+
+extern EFI_GUID gEfiLoadPeImageProtocolGuid;
+
+#endif
+
|