Add function headers & file header for public header files

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5023 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8
2008-04-09 05:44:04 +00:00
parent e2270e40a4
commit 1e354c0372
17 changed files with 263 additions and 380 deletions

View File

@@ -1,6 +1,9 @@
/*++
/** @file
Disk Info protocol is used to export Inquiry Data for a drive.
Its needed to support low level formating of drives in a mannor
thats DOS compatible.
Copyright (c) 2006, Intel Corporation
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
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,17 +12,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:
DiskInfo.h
Abstract:
Disk Info protocol is used to export Inquiry Data for a drive.
Its needed to support low level formating of drives in a mannor
thats DOS compatible.
--*/
**/
#ifndef __DISK_INFO_H__
#define __DISK_INFO_H__
@@ -34,6 +27,20 @@ Abstract:
//
typedef struct _EFI_DISK_INFO_PROTOCOL EFI_DISK_INFO_PROTOCOL;
/**
Return the results of the Inquiry command to a drive in InquiryData.
Data format of Inquiry data is defined by the Interface GUID.
@param This Protocol instance pointer.
@param InquiryData Results of Inquiry command to device
@param InquiryDataSize Size of InquiryData in bytes.
@retval EFI_SUCCESS InquiryData valid
@retval EFI_NOT_FOUND Device does not support this data class
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
@retval EFI_BUFFER_TOO_SMALL IntquiryDataSize not big enough
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DISK_INFO_INQUIRY) (
@@ -41,26 +48,23 @@ EFI_STATUS
IN OUT VOID *InquiryData,
IN OUT UINT32 *IntquiryDataSize
)
/*++
Routine Description:
Return the results of the Inquiry command to a drive in InquiryData.
Data format of Inquiry data is defined by the Interface GUID.
Arguments:
This - Protocol instance pointer.
InquiryData - Results of Inquiry command to device
InquiryDataSize - Size of InquiryData in bytes.
Returns:
EFI_SUCCESS - InquiryData valid
EFI_NOT_FOUND - Device does not support this data class
EFI_DEVICE_ERROR - Error reading InquiryData from device
EFI_BUFFER_TOO_SMALL - IntquiryDataSize not big enough
--*/
;
/**
Return the results of the Identify command to a drive in IdentifyData.
Data format of Identify data is defined by the Interface GUID.
@param This Protocol instance pointer.
@param IdentifyData Results of Identify command to device
@param IdentifyDataSize Size of IdentifyData in bytes.
@retval EFI_SUCCESS IdentifyData valid
@retval EFI_NOT_FOUND Device does not support this data class
@retval EFI_DEVICE_ERROR Error reading IdentifyData from device
@retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DISK_INFO_IDENTIFY) (
@@ -68,26 +72,24 @@ EFI_STATUS
IN OUT VOID *IdentifyData,
IN OUT UINT32 *IdentifyDataSize
)
/*++
Routine Description:
Return the results of the Identify command to a drive in IdentifyData.
Data format of Identify data is defined by the Interface GUID.
Arguments:
This - Protocol instance pointer.
IdentifyData - Results of Identify command to device
IdentifyDataSize - Size of IdentifyData in bytes.
Returns:
EFI_SUCCESS - IdentifyData valid
EFI_NOT_FOUND - Device does not support this data class
EFI_DEVICE_ERROR - Error reading IdentifyData from device
EFI_BUFFER_TOO_SMALL - IdentifyDataSize not big enough
--*/
;
/**
Return the results of the Request Sense command to a drive in SenseData.
Data format of Sense data is defined by the Interface GUID.
@param This Protocol instance pointer.
@param SenseData Results of Request Sense command to device
@param SenseDataSize Size of SenseData in bytes.
@param SenseDataNumber Type of SenseData
@retval EFI_SUCCESS InquiryData valid
@retval EFI_NOT_FOUND Device does not support this data class
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
@retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DISK_INFO_SENSE_DATA) (
@@ -96,27 +98,20 @@ EFI_STATUS
IN OUT UINT32 *SenseDataSize,
OUT UINT8 *SenseDataNumber
)
/*++
Routine Description:
Return the results of the Request Sense command to a drive in SenseData.
Data format of Sense data is defined by the Interface GUID.
Arguments:
This - Protocol instance pointer.
SenseData - Results of Request Sense command to device
SenseDataSize - Size of SenseData in bytes.
SenseDataNumber - Type of SenseData
Returns:
EFI_SUCCESS - InquiryData valid
EFI_NOT_FOUND - Device does not support this data class
EFI_DEVICE_ERROR - Error reading InquiryData from device
EFI_BUFFER_TOO_SMALL - SenseDataSize not big enough
--*/
;
/**
Return the results of the Request Sense command to a drive in SenseData.
Data format of Sense data is defined by the Interface GUID.
@param This Protocol instance pointer.
@param IdeChannel Primary or Secondary
@param IdeDevice Master or Slave
@retval EFI_SUCCESS IdeChannel and IdeDevice are valid
@retval EFI_UNSUPPORTED This is not an IDE device
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DISK_INFO_WHICH_IDE) (
@@ -124,22 +119,6 @@ EFI_STATUS
OUT UINT32 *IdeChannel,
OUT UINT32 *IdeDevice
)
/*++
Routine Description:
Return the results of the Request Sense command to a drive in SenseData.
Data format of Sense data is defined by the Interface GUID.
Arguments:
This - Protocol instance pointer.
IdeChannel - Primary or Secondary
IdeDevice - Master or Slave
Returns:
EFI_SUCCESS - IdeChannel and IdeDevice are valid
EFI_UNSUPPORTED - This is not an IDE device
--*/
;
//

View File

@@ -1,6 +1,8 @@
/*++
/** @file
This is a simple fault tolerant write driver, based on PlatformFd library.
And it only supports write BufferSize <= SpareAreaLength.
Copyright (c) 2006 - 2007, Intel Corporation
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
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,16 +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:
FaultTolerantWriteLite.h
Abstract:
This is a simple fault tolerant write driver, based on PlatformFd library.
And it only supports write BufferSize <= SpareAreaLength.
--*/
**/
#ifndef __FW_FAULT_TOLERANT_WRITE_LITE_PROTOCOL_H__
#define __FW_FAULT_TOLERANT_WRITE_LITE_PROTOCOL_H__
@@ -34,7 +27,31 @@ typedef struct _EFI_FTW_LITE_PROTOCOL EFI_FTW_LITE_PROTOCOL;
//
// Protocol API definitions
//
/**
Starts a target block update. This records information about the write
in fault tolerant storage and will complete the write in a recoverable
manner, ensuring at all times that either the original contents or
the modified contents are available.
@param This Calling context
@param FvBlockHandle The handle of FVB protocol that provides services
for reading, writing, and erasing the target
block.
@param Lba The logical block address of the target block.
@param Offset The offset within the target block to place the
data.
@param Length The number of bytes to write to the target block.
@param Buffer The data to write.
@retval EFI_SUCCESS The function completed successfully
@retval EFI_ABORTED The function could not complete successfully.
@retval EFI_BAD_BUFFER_SIZE The write would span a block boundary, which is
not a valid action.
@retval EFI_ACCESS_DENIED No writes have been allocated.
@retval EFI_NOT_READY The last write has not been completed. Restart ()
must be called to complete it.
**/
typedef
EFI_STATUS
(EFIAPI * EFI_FTW_LITE_WRITE) (
@@ -44,37 +61,8 @@ EFI_STATUS
IN UINTN Offset,
IN UINTN *NumBytes,
IN VOID *Buffer
);
/*++
Routine Description:
Starts a target block update. This records information about the write
in fault tolerant storage and will complete the write in a recoverable
manner, ensuring at all times that either the original contents or
the modified contents are available.
Arguments:
This - Calling context
FvBlockHandle - The handle of FVB protocol that provides services for
reading, writing, and erasing the target block.
Lba - The logical block address of the target block.
Offset - The offset within the target block to place the data.
Length - The number of bytes to write to the target block.
Buffer - The data to write.
Returns:
EFI_SUCCESS - The function completed successfully
EFI_ABORTED - The function could not complete successfully.
EFI_BAD_BUFFER_SIZE - The write would span a block boundary,
which is not a valid action.
EFI_ACCESS_DENIED - No writes have been allocated.
EFI_NOT_READY - The last write has not been completed.
Restart () must be called to complete it.
--*/
)
;
//
// Protocol declaration

View File

@@ -1,24 +1,17 @@
/*++
/** @file
The EFI generic memory test protocol interface.
For more information please look at EfiMemoryTest.doc
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.
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
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
Module Name:
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
GenericMemoryTest.h
Abstract:
The EFI generic memory test protocol
For more information please look at EfiMemoryTest.doc
--*/
**/
#ifndef __GENERIC_MEMORY_TEST_H__
#define __GENERIC_MEMORY_TEST_H__
@@ -36,6 +29,21 @@ typedef enum {
MAXLEVEL
} EXTENDMEM_COVERAGE_LEVEL;
/**
Initialize the generic memory test.
@param This Protocol instance pointer.
@param Level The coverage level of the memory test.
@param RequireSoftECCInit Indicate if the memory need software ECC init.
@retval EFI_SUCCESS The generic memory test initialized correctly.
@retval EFI_NO_MEDIA There is not any non-tested memory found, in this
function if not any non-tesed memory found means
that the memory test driver have not detect any
non-tested extended memory of current system.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MEMORY_TEST_INIT) (
@@ -43,26 +51,28 @@ EFI_STATUS
IN EXTENDMEM_COVERAGE_LEVEL Level,
OUT BOOLEAN *RequireSoftECCInit
)
/*++
Routine Description:
Initialize the generic memory test.
Arguments:
This - Protocol instance pointer.
Level - The coverage level of the memory test.
RequireSoftECCInit - Indicate if the memory need software ECC init.
Returns:
EFI_SUCCESS - The generic memory test initialized correctly.
EFI_NO_MEDIA - There is not any non-tested memory found, in this
function if not any non-tesed memory found means
that the memory test driver have not detect any
non-tested extended memory of current system.
--*/
;
/**
Perform the memory test.
@param This Protocol instance pointer.
@param TestedMemorySize Return the tested extended memory size.
@param TotalMemorySize Return the whole system physical memory size, this
value may be changed if in some case some error
DIMMs be disabled.
@param ErrorOut Any time the memory error occurs, this will be
TRUE.
@param IfTestAbort Indicate if the user press "ESC" to skip the memory
test.
@retval EFI_SUCCESS One block of memory test ok, the block size is hide
internally.
@retval EFI_NOT_FOUND Indicate all the non-tested memory blocks have
already go through.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PERFORM_MEMORY_TEST) (
@@ -72,51 +82,39 @@ EFI_STATUS
OUT BOOLEAN *ErrorOut,
IN BOOLEAN IfTestAbort
)
/*++
Routine Description:
Perform the memory test.
Arguments:
This - Protocol instance pointer.
TestedMemorySize - Return the tested extended memory size.
TotalMemorySize - Return the whole system physical memory size, this
value may be changed if in some case some error
DIMMs be disabled.
ErrorOut - Any time the memory error occurs, this will be TRUE.
IfTestAbort - Indicate if the user press "ESC" to skip the memory
test.
Returns:
EFI_SUCCESS - One block of memory test ok, the block size is hide
internally.
EFI_NOT_FOUND - Indicate all the non-tested memory blocks have
already go through.
--*/
;
/**
The memory test finished.
@param This Protocol instance pointer.
@retval EFI_SUCCESS Successful free all the generic memory test driver
allocated resource and notify to platform memory
test driver that memory test finished.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MEMORY_TEST_FINISHED) (
IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This
)
/*++
Routine Description:
The memory test finished.
Arguments:
This - Protocol instance pointer.
Returns:
EFI_SUCCESS - Successful free all the generic memory test driver
allocated resource and notify to platform memory
test driver that memory test finished.
--*/
;
/**
Provide capability to test compatible range which used by some sepcial
driver required using memory range before BDS perform memory test.
@param This Protocol instance pointer.
@param StartAddress The start address of the memory range.
@param Length The memory range's length.
@retval EFI_SUCCESS The compatible memory range pass the memory test.
@retval EFI_DEVICE_ERROR The compatible memory range test find memory error
and also return return the error address.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_MEMORY_TEST_COMPATIBLE_RANGE) (
@@ -124,23 +122,6 @@ EFI_STATUS
IN EFI_PHYSICAL_ADDRESS StartAddress,
IN UINT64 Length
)
/*++
Routine Description:
Provide capability to test compatible range which used by some sepcial
driver required using memory range before BDS perform memory test.
Arguments:
This - Protocol instance pointer.
StartAddress - The start address of the memory range.
Length - The memory range's length.
Return:
EFI_SUCCESS - The compatible memory range pass the memory test.
EFI_DEVICE_ERROR - The compatible memory range test find memory error
and also return return the error address.
--*/
;
struct _EFI_GENERIC_MEMORY_TEST_PROTOCOL {

View File

@@ -1,6 +1,7 @@
/*++
/** @file
EFI OEM Badging Protocol definition header file
Copyright (c) 2006 - 2007, Intel Corporation
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
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,17 +10,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:
EfiOEMBadging.h
Abstract:
EFI OEM Badging Protocol definition header file
Revision History
--*/
**/
#ifndef __EFI_OEM_BADGING_H__
#define __EFI_OEM_BADGING_H__

View File

@@ -1,6 +1,7 @@
/*++
/** @file
Performance protocol interfaces to support cross module performance logging.
Copyright (c) 2006 - 2007, Intel Corporation
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
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 +10,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:
Performance.h
Abstract:
--*/
**/
#ifndef __PERFORMANCE_H__
#define __PERFORMANCE_H__