Function headers in .h and .c files synchronized with spec

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6728 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jji4 2008-11-26 04:36:05 +00:00
parent 3e5c323866
commit 718715141a
13 changed files with 503 additions and 266 deletions

View File

@ -16,26 +16,32 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define __MODULE_ENTRY_POINT_H__ #define __MODULE_ENTRY_POINT_H__
/** /**
The entry point of PE/COFF Image for the PEI Core.
Enrty point to PEI core. This function is the entry point for the PEI Foundation, which allows the SEC phase
to pass information about the stack, temporary RAM and the Boot Firmware Volume.
In addition, it also allows the SEC phase to pass services and data forward for use
during the PEI phase in the form of one or more PPIs.
There is no limit to the number of additional PPIs that can be passed from SEC into
the PEI Foundation. As part of its initialization phase, the PEI Foundation will add
these SEC-hosted PPIs to its PPI database such that both the PEI Foundation and any
modules can leverage the associated service calls and/or code in these early PPIs.
This function is required to call ProcessModuleEntryPointList() with the Context
parameter set to NULL. ProcessModuleEntryPoint() is never expected to return.
The PEI Core is responsible for calling ProcessLibraryConstructorList() as soon as
the PEI Services Table and the file handle for the PEI Core itself have been established.
If ProcessModuleEntryPointList() returns, then ASSERT() and halt the system.
@param SecCoreData Points to a data structure containing @param SecCoreData Points to a data structure containing information about the PEI
information about the PEI core's core's operating environment, such as the size and location of
operating environment, such as the size temporary RAM, the stack location and the BFV location.
and location of temporary RAM, the stack
location and the BFV location. The type
EFI_SEC_PEI_HAND_OFF is
@param PpiList Points to a list of one or more PPI @param PpiList Points to a list of one or more PPI descriptors to be installed
descriptors to be installed initially by initially by the PEI core. An empty PPI list consists of a single
the PEI core. An empty PPI list consists descriptor with the end-tag EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.
of a single descriptor with the end-tag As part of its initialization phase, the PEI Foundation will add
EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST. these SEC-hosted PPIs to its PPI database such that both the PEI
As part of its initialization phase, the Foundation and any modules can leverage the associated service calls
PEI Foundation will add these SEC-hosted
PPIs to its PPI database such that both
the PEI Foundation and any modules can
leverage the associated service calls
and/or code in these early PPIs. and/or code in these early PPIs.
**/ **/
@ -51,26 +57,17 @@ _ModuleEntryPoint(
This function is required to call _ModuleEntryPoint() passing in SecCoreData and PpiList. This function is required to call _ModuleEntryPoint() passing in SecCoreData and PpiList.
@param SecCoreData Points to a data structure containing @param SecCoreData Points to a data structure containing information about the PEI core's
information about the PEI core's operating environment, such as the size and location of temporary RAM,
operating environment, such as the size the stack location and the BFV location.
and location of temporary RAM, the stack
location and the BFV location. The type
EFI_SEC_PEI_HAND_OFF is
@param PpiList Points to a list of one or more PPI @param PpiList Points to a list of one or more PPI descriptors to be installed
descriptors to be installed initially by initially by the PEI core. An empty PPI list consists of a single
the PEI core. An empty PPI list consists descriptor with the end-tag EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.
of a single descriptor with the end-tag As part of its initialization phase, the PEI Foundation will add these
EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST. SEC-hosted PPIs to its PPI database such that both the PEI Foundation
As part of its initialization phase, the and any modules can leverage the associated service calls and/or code
PEI Foundation will add these SEC-hosted in these early PPIs.
PPIs to its PPI database such that both
the PEI Foundation and any modules can
leverage the associated service calls
and/or code in these early PPIs.
@return Status returned by entry points of core and drivers.
**/ **/
VOID VOID
@ -84,12 +81,18 @@ EfiMain (
Autogenerated function that calls the library constructors for all of the module's Autogenerated function that calls the library constructors for all of the module's
dependent libraries. dependent libraries.
This function must be called by the PEI Core once an initial PEI Services Table has This function must be called by the PEI Core once an initial PEI Services Table has been established.
been established. This function calls the set of library constructors for the set of library instances that a
module depends on. This include library instances that a module depends on directly and library
instances that a module depends on indirectly through other libraries.
This function is autogenerated by build tools and those build tools are responsible for collecting
the set of library instances, determine which ones have constructors, and calling the library
constructors in the proper order based upon each of the library instances own dependencies.
The PEI Core must call this function with a NULL FileHandle value as soon as the initial PEI
Services Table has been established.
@param FileHandle Handle of the file being invoked. @param FileHandle Handle of the file being invoked.Type EFI_PEI_FILE_HANDLE is defined in FfsFindNextFile().
Type EFI_PEI_FILE_HANDLE is defined in FfsFindNextFile(). @param PeiServices Describes the list of possible PEI Services.
@param PeiServices Pointer to the PEI Services Table.
**/ **/
VOID VOID
@ -104,24 +107,20 @@ ProcessLibraryConstructorList (
Autogenerated function that calls a set of module entry points. Autogenerated function that calls a set of module entry points.
This function must be called by _ModuleEntryPoint(). This function must be called by _ModuleEntryPoint().
This function calls the set of module entry points.
This function is autogenerated by build tools and those build tools are responsible
for collecting the module entry points and calling them in a specified order.
@param SecCoreData Points to a data structure containing @param SecCoreData Points to a data structure containing information about the PEI
information about the PEI core's core's operating environment, such as the size and location of
operating environment, such as the size temporary RAM, the stack location and the BFV location.
and location of temporary RAM, the stack
location and the BFV location. The type
EFI_SEC_PEI_HAND_OFF is
@param PpiList Points to a list of one or more PPI @param PpiList Points to a list of one or more PPI descriptors to be installed
descriptors to be installed initially by initially by the PEI core. An empty PPI list consists of a single
the PEI core. An empty PPI list consists descriptor with the end-tag EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.
of a single descriptor with the end-tag As part of its initialization phase, the PEI Foundation will add
EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST. these SEC-hosted PPIs to its PPI database such that both the PEI
As part of its initialization phase, the Foundation and any modules can leverage the associated service calls
PEI Foundation will add these SEC-hosted
PPIs to its PPI database such that both
the PEI Foundation and any modules can
leverage the associated service calls
and/or code in these early PPIs. and/or code in these early PPIs.
@param OldCoreData Pointer to Original startup information. @param OldCoreData Pointer to Original startup information.

View File

@ -38,9 +38,7 @@ SerialPortInitialize (
Writes NumberOfBytes data bytes from Buffer to the serial device. Writes NumberOfBytes data bytes from Buffer to the serial device.
The number of bytes actually written to the serial device is returned. The number of bytes actually written to the serial device is returned.
If the return value is less than NumberOfBytes, then the write operation failed. If the return value is less than NumberOfBytes, then the write operation failed.
If Buffer is NULL, then ASSERT(). If Buffer is NULL, then ASSERT().
If NumberOfBytes is zero, then return 0. If NumberOfBytes is zero, then return 0.
@param Buffer Pointer to the data buffer to be written. @param Buffer Pointer to the data buffer to be written.
@ -65,16 +63,14 @@ SerialPortWrite (
Reads NumberOfBytes data bytes from a serial device into the buffer Reads NumberOfBytes data bytes from a serial device into the buffer
specified by Buffer. The number of bytes actually read is returned. specified by Buffer. The number of bytes actually read is returned.
If the return value is less than NumberOfBytes, then the rest operation failed. If the return value is less than NumberOfBytes, then the rest operation failed.
If Buffer is NULL, then ASSERT(). If Buffer is NULL, then ASSERT().
If NumberOfBytes is zero, then return 0. If NumberOfBytes is zero, then return 0.
@param Buffer Pointer to the data buffer to store the data read from the serial device. @param Buffer Pointer to the data buffer to store the data read from the serial device.
@param NumberOfBytes Number of bytes which will be read. @param NumberOfBytes Number of bytes which will be read.
@retval 0 Read data failed, No data is to be read. @retval 0 Read data failed, No data is to be read.
@retval !0 Aactual number of bytes read from serial device. @retval >0 Aactual number of bytes read from serial device.
**/ **/
UINTN UINTN

View File

@ -16,6 +16,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define __TIMER_LIB__ #define __TIMER_LIB__
/** /**
Stalls the CPU for at least the given number of microseconds.
Stalls the CPU for the number of microseconds specified by MicroSeconds. Stalls the CPU for the number of microseconds specified by MicroSeconds.
@param MicroSeconds The minimum number of microseconds to delay. @param MicroSeconds The minimum number of microseconds to delay.
@ -30,6 +32,8 @@ MicroSecondDelay (
); );
/** /**
Stalls the CPU for at least the given number of nanoseconds.
Stalls the CPU for the number of nanoseconds specified by NanoSeconds. Stalls the CPU for the number of nanoseconds specified by NanoSeconds.
@param NanoSeconds The minimum number of nanoseconds to delay. @param NanoSeconds The minimum number of nanoseconds to delay.
@ -45,6 +49,7 @@ NanoSecondDelay (
/** /**
Retrieves the current value of a 64-bit free running performance counter. Retrieves the current value of a 64-bit free running performance counter.
The counter can either count up by 1 or count down by 1. If the physical The counter can either count up by 1 or count down by 1. If the physical
performance counter counts by a larger increment, then the counter values performance counter counts by a larger increment, then the counter values
must be translated. The properties of the counter can be retrieved from must be translated. The properties of the counter can be retrieved from

View File

@ -24,11 +24,18 @@ extern CONST UINT32 _gUefiDriverRevision;
/** /**
Enrty point to UEFI Application. Enrty point to UEFI Application.
@param ImageHandle ImageHandle of the loaded driver. This function is the entry point for a UEFI Application. This function must call
@param SystemTable Pointer to the EFI System Table. ProcessLibraryConstructorList(), ProcessModuleEntryPointList(), and ProcessLibraryDestructorList().
The return value from ProcessModuleEntryPointList() is returned.
If _gUefiDriverRevision is not zero and SystemTable->Hdr.Revision is less than _gUefiDriverRevison,
then return EFI_INCOMPATIBLE_VERSION.
@retval EFI_SUCCESS One or more of the drivers returned a success code. @param ImageHandle The image handle of the UEFI Application.
@retval !EFI_SUCESS The return status from the last driver entry point in the list. @param SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS The UEFI Application exited normally.
@retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than SystemTable->Hdr.Revision.
@retval Other Return value from ProcessModuleEntryPointList().
**/ **/
EFI_STATUS EFI_STATUS
@ -40,13 +47,14 @@ _ModuleEntryPoint (
/** /**
Enrty point wrapper of UEFI Application. Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
@param ImageHandle ImageHandle of the loaded driver. @param ImageHandle The image handle of the UEFI Application.
@param SystemTable Pointer to the EFI System Table. @param SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS One or more of the drivers returned a success code. @retval EFI_SUCCESS The UEFI Application exited normally.
@retval !EFI_SUCESS The return status from the last driver entry point in the list. @retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than SystemTable->Hdr.Revision.
@retval Other Return value from ProcessModuleEntryPointList().
**/ **/
EFI_STATUS EFI_STATUS
@ -58,8 +66,11 @@ EfiMain (
/** /**
Invoke the destuctors of all libraries and call gBS->Exit Invokes the library destructors fror all dependent libraries and terminates
to return control to firmware core. the UEFI Application.
This function calls ProcessLibraryDestructorList() and the EFI Boot Service Exit()
with a status specified by Status.
@param Status Status returned by the application that is exiting. @param Status Status returned by the application that is exiting.
@ -72,11 +83,20 @@ Exit (
/** /**
Call constructors for all libraries. Autogen tool inserts the implementation Autogenerated function that calls the library constructors for all of the module's
of this function into Autogen.c. dependent libraries.
@param ImageHandle ImageHandle of the loaded driver. This function must be called by _ModuleEntryPoint().
@param SystemTable Pointer to the EFI System Table. This function calls the set of library constructors for the set of library instances
that a module depends on. This includes library instances that a module depends on
directly and library instances that a module depends on indirectly through other libraries.
This function is autogenerated by build tools and those build tools are responsible for
collecting the set of library instances, determine which ones have constructors, and
calling the library constructors in the proper order based upon each of the library
instances own dependencies.
@param ImageHandle The image handle of the UEFI Application.
@param SystemTable A pointer to the EFI System Table.
**/ **/
VOID VOID
@ -88,11 +108,20 @@ ProcessLibraryConstructorList (
/** /**
Call destructors for all libraries. Autogen tool inserts the implementation Autogenerated function that calls the library descructors for all of the module's
of this function into Autogen.c. dependent libraries.
@param ImageHandle ImageHandle of the loaded driver. This function may be called by _ModuleEntryPoint()or ExitDriver().
@param SystemTable Pointer to the EFI System Table. This function calls the set of library destructors for the set of library instances
that a module depends on. This includes library instances that a module depends on
directly and library instances that a module depends on indirectly through other libraries.
This function is autogenerated by build tools and those build tools are responsible
for collecting the set of library instances, determine which ones have destructors,
and calling the library destructors in the proper order based upon each of the library
instances own dependencies.
@param ImageHandle The image handle of the UEFI Application.
@param SystemTable A pointer to the EFI System Table.
**/ **/
VOID VOID
@ -110,8 +139,8 @@ ProcessLibraryDestructorList (
@param ImageHandle ImageHandle of the loaded driver. @param ImageHandle ImageHandle of the loaded driver.
@param SystemTable Pointer to the EFI System Table. @param SystemTable Pointer to the EFI System Table.
@return Status returned by entry points specified by @retval EFI_SUCCESS The UEFI Application executed normally.
the user. @retval !EFI_SUCCESS The UEFI Application failed to execute normally.
**/ **/
EFI_STATUS EFI_STATUS

View File

@ -44,7 +44,8 @@ extern CONST UINT8 _gDriverUnloadImageCount;
@param ImageHandle ImageHandle of the loaded driver. @param ImageHandle ImageHandle of the loaded driver.
@param SystemTable Pointer to the EFI System Table. @param SystemTable Pointer to the EFI System Table.
@retval EFI_SUCCESS One or more of the drivers returned a success code. @retval EFI_SUCCESS The DXE Driver, DXE Runtime Driver, DXE SMM Driver,
or UEFI Driver exited normally.
@retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than SystemTable->Hdr.Revision. @retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than SystemTable->Hdr.Revision.
@retval Other Return value from ProcessModuleEntryPointList(). @retval Other Return value from ProcessModuleEntryPointList().

View File

@ -44,9 +44,7 @@ SerialPortInitialize (
Writes NumberOfBytes data bytes from Buffer to the serial device. Writes NumberOfBytes data bytes from Buffer to the serial device.
The number of bytes actually written to the serial device is returned. The number of bytes actually written to the serial device is returned.
If the return value is less than NumberOfBytes, then the write operation failed. If the return value is less than NumberOfBytes, then the write operation failed.
If Buffer is NULL, then ASSERT(). If Buffer is NULL, then ASSERT().
If NumberOfBytes is zero, then return 0. If NumberOfBytes is zero, then return 0.
@param Buffer Pointer to the data buffer to be written. @param Buffer Pointer to the data buffer to be written.
@ -69,14 +67,19 @@ SerialPortWrite (
/** /**
Reads data from a serial device into a buffer. Read data from serial device and save the datas in buffer.
Reads NumberOfBytes data bytes from a serial device into the buffer
specified by Buffer. The number of bytes actually read is returned.
If the return value is less than NumberOfBytes, then the rest operation failed.
If Buffer is NULL, then ASSERT().
If NumberOfBytes is zero, then return 0.
@param Buffer Pointer to the data buffer to store the data read from the serial device. @param Buffer Pointer to the data buffer to store the data read from the serial device.
@param NumberOfBytes Number of bytes to read from the serial device. @param NumberOfBytes Number of bytes which will be read.
@retval 0 NumberOfBytes is 0. @retval 0 Read data failed, No data is to be read.
@retval >0 The number of bytes read from the serial device. @retval >0 Aactual number of bytes read from serial device.
If this value is less than NumberOfBytes, then the read operation failed.
**/ **/
UINTN UINTN

View File

@ -17,6 +17,8 @@
#include <Library/DebugLib.h> #include <Library/DebugLib.h>
/** /**
Stalls the CPU for at least the given number of microseconds.
Stalls the CPU for the number of microseconds specified by MicroSeconds. Stalls the CPU for the number of microseconds specified by MicroSeconds.
@param MicroSeconds The minimum number of microseconds to delay. @param MicroSeconds The minimum number of microseconds to delay.
@ -35,6 +37,8 @@ MicroSecondDelay (
} }
/** /**
Stalls the CPU for at least the given number of nanoseconds.
Stalls the CPU for the number of nanoseconds specified by NanoSeconds. Stalls the CPU for the number of nanoseconds specified by NanoSeconds.
@param NanoSeconds The minimum number of nanoseconds to delay. @param NanoSeconds The minimum number of nanoseconds to delay.
@ -53,8 +57,9 @@ NanoSecondDelay (
} }
/** /**
Retrieves the current value of a 64-bit free running performance counter. The Retrieves the current value of a 64-bit free running performance counter.
counter can either count up by 1 or count down by 1. If the physical
The counter can either count up by 1 or count down by 1. If the physical
performance counter counts by a larger increment, then the counter values performance counter counts by a larger increment, then the counter values
must be translated. The properties of the counter can be retrieved from must be translated. The properties of the counter can be retrieved from
GetPerformanceCounterProperties(). GetPerformanceCounterProperties().

View File

@ -30,6 +30,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
SMBUS Command, SMBUS Data Length, and PEC. SMBUS Command, SMBUS Data Length, and PEC.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_UNSUPPORTED The SMBus operation is not supported.
**/ **/
VOID VOID
@ -62,6 +69,13 @@ SmBusQuickRead (
SMBUS Command, SMBUS Data Length, and PEC. SMBUS Command, SMBUS Data Length, and PEC.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_UNSUPPORTED The SMBus operation is not supported.
**/ **/
VOID VOID
@ -94,6 +108,14 @@ SmBusQuickWrite (
SMBUS Command, SMBUS Data Length, and PEC. SMBUS Command, SMBUS Data Length, and PEC.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The byte received from the SMBUS. @return The byte received from the SMBUS.
@ -132,6 +154,14 @@ SmBusReceiveByte (
@param Value The 8-bit value to send. @param Value The 8-bit value to send.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The parameter of Value. @return The parameter of Value.
@ -170,6 +200,14 @@ SmBusSendByte (
SMBUS Command, SMBUS Data Length, and PEC. SMBUS Command, SMBUS Data Length, and PEC.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The byte read from the SMBUS. @return The byte read from the SMBUS.
@ -207,6 +245,14 @@ SmBusReadDataByte (
@param Value The 8-bit value to write. @param Value The 8-bit value to write.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The parameter of Value. @return The parameter of Value.
@ -244,6 +290,14 @@ SmBusWriteDataByte (
SMBUS Command, SMBUS Data Length, and PEC. SMBUS Command, SMBUS Data Length, and PEC.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The byte read from the SMBUS. @return The byte read from the SMBUS.
@ -281,6 +335,14 @@ SmBusReadDataWord (
@param Value The 16-bit value to write. @param Value The 16-bit value to write.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The parameter of Value. @return The parameter of Value.
@ -320,6 +382,14 @@ SmBusWriteDataWord (
@param Value The 16-bit value to write. @param Value The 16-bit value to write.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The 16-bit value returned by the process call command. @return The 16-bit value returned by the process call command.
@ -359,6 +429,14 @@ SmBusProcessCall (
@param Buffer Pointer to the buffer to store the bytes read from the SMBUS. @param Buffer Pointer to the buffer to store the bytes read from the SMBUS.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The number of bytes read. @return The number of bytes read.
@ -391,10 +469,17 @@ SmBusReadBlock (
If any reserved bits of SmBusAddress are set, then ASSERT(). If any reserved bits of SmBusAddress are set, then ASSERT().
@param SmBusAddress Address that encodes the SMBUS Slave Address, @param SmBusAddress Address that encodes the SMBUS Slave Address,
SMBUS Command, SMBUS Data Length, and PEC. MBUS Command, SMBUS Data Length, and PEC.
@param Buffer Pointer to the buffer to store the bytes read from the SMBUS. @param Buffer Pointer to the buffer to store the bytes read from the SMBUS.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The number of bytes written. @return The number of bytes written.
@ -438,6 +523,13 @@ SmBusWriteBlock (
@param ReadBuffer Pointer to the buffer of bytes to read from the SMBUS. @param ReadBuffer Pointer to the buffer of bytes to read from the SMBUS.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The number of bytes written. @return The number of bytes written.

View File

@ -23,26 +23,32 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/DebugLib.h> #include <Library/DebugLib.h>
/** /**
The entry point of PE/COFF Image for the PEI Core.
Enrty point to PEI core. This function is the entry point for the PEI Foundation, which allows the SEC phase
to pass information about the stack, temporary RAM and the Boot Firmware Volume.
In addition, it also allows the SEC phase to pass services and data forward for use
during the PEI phase in the form of one or more PPIs.
There is no limit to the number of additional PPIs that can be passed from SEC into
the PEI Foundation. As part of its initialization phase, the PEI Foundation will add
these SEC-hosted PPIs to its PPI database such that both the PEI Foundation and any
modules can leverage the associated service calls and/or code in these early PPIs.
This function is required to call ProcessModuleEntryPointList() with the Context
parameter set to NULL. ProcessModuleEntryPoint() is never expected to return.
The PEI Core is responsible for calling ProcessLibraryConstructorList() as soon as
the PEI Services Table and the file handle for the PEI Core itself have been established.
If ProcessModuleEntryPointList() returns, then ASSERT() and halt the system.
@param SecCoreData Points to a data structure containing @param SecCoreData Points to a data structure containing information about the PEI
information about the PEI core's core's operating environment, such as the size and location of
operating environment, such as the size temporary RAM, the stack location and the BFV location.
and location of temporary RAM, the stack
location and the BFV location. The type
EFI_SEC_PEI_HAND_OFF is
@param PpiList Points to a list of one or more PPI @param PpiList Points to a list of one or more PPI descriptors to be installed
descriptors to be installed initially by initially by the PEI core. An empty PPI list consists of a single
the PEI core. An empty PPI list consists descriptor with the end-tag EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.
of a single descriptor with the end-tag As part of its initialization phase, the PEI Foundation will add
EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST. these SEC-hosted PPIs to its PPI database such that both the PEI
As part of its initialization phase, the Foundation and any modules can leverage the associated service calls
PEI Foundation will add these SEC-hosted
PPIs to its PPI database such that both
the PEI Foundation and any modules can
leverage the associated service calls
and/or code in these early PPIs. and/or code in these early PPIs.
**/ **/
@ -64,27 +70,21 @@ _ModuleEntryPoint(
/** /**
Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
Wrapper of enrty point to PEI core. This function is required to call _ModuleEntryPoint() passing in SecCoreData and PpiList.
@param SecCoreData Points to a data structure containing @param SecCoreData Points to a data structure containing information about the PEI core's
information about the PEI core's operating environment, such as the size and location of temporary RAM,
operating environment, such as the size the stack location and the BFV location.
and location of temporary RAM, the stack
location and the BFV location. The type
EFI_SEC_PEI_HAND_OFF is
@param PpiList Points to a list of one or more PPI @param PpiList Points to a list of one or more PPI descriptors to be installed
descriptors to be installed initially by initially by the PEI core. An empty PPI list consists of a single
the PEI core. An empty PPI list consists descriptor with the end-tag EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.
of a single descriptor with the end-tag As part of its initialization phase, the PEI Foundation will add these
EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST. SEC-hosted PPIs to its PPI database such that both the PEI Foundation
As part of its initialization phase, the and any modules can leverage the associated service calls and/or code
PEI Foundation will add these SEC-hosted in these early PPIs.
PPIs to its PPI database such that both
the PEI Foundation and any modules can
leverage the associated service calls
and/or code in these early PPIs.
**/ **/
VOID VOID

View File

@ -30,6 +30,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
SMBUS Command, SMBUS Data Length, and PEC. SMBUS Command, SMBUS Data Length, and PEC.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_UNSUPPORTED The SMBus operation is not supported.
**/ **/
VOID VOID
@ -62,6 +69,13 @@ SmBusQuickRead (
SMBUS Command, SMBUS Data Length, and PEC. SMBUS Command, SMBUS Data Length, and PEC.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_UNSUPPORTED The SMBus operation is not supported.
**/ **/
VOID VOID
@ -94,6 +108,14 @@ SmBusQuickWrite (
SMBUS Command, SMBUS Data Length, and PEC. SMBUS Command, SMBUS Data Length, and PEC.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The byte received from the SMBUS. @return The byte received from the SMBUS.
@ -132,6 +154,14 @@ SmBusReceiveByte (
@param Value The 8-bit value to send. @param Value The 8-bit value to send.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The parameter of Value. @return The parameter of Value.
@ -170,6 +200,14 @@ SmBusSendByte (
SMBUS Command, SMBUS Data Length, and PEC. SMBUS Command, SMBUS Data Length, and PEC.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The byte read from the SMBUS. @return The byte read from the SMBUS.
@ -207,6 +245,14 @@ SmBusReadDataByte (
@param Value The 8-bit value to write. @param Value The 8-bit value to write.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The parameter of Value. @return The parameter of Value.
@ -244,6 +290,14 @@ SmBusWriteDataByte (
SMBUS Command, SMBUS Data Length, and PEC. SMBUS Command, SMBUS Data Length, and PEC.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The byte read from the SMBUS. @return The byte read from the SMBUS.
@ -281,6 +335,14 @@ SmBusReadDataWord (
@param Value The 16-bit value to write. @param Value The 16-bit value to write.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The parameter of Value. @return The parameter of Value.
@ -320,6 +382,14 @@ SmBusWriteDataWord (
@param Value The 16-bit value to write. @param Value The 16-bit value to write.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The 16-bit value returned by the process call command. @return The 16-bit value returned by the process call command.
@ -359,6 +429,14 @@ SmBusProcessCall (
@param Buffer Pointer to the buffer to store the bytes read from the SMBUS. @param Buffer Pointer to the buffer to store the bytes read from the SMBUS.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_SUCCESS The SMBUS command was executed.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The number of bytes read. @return The number of bytes read.
@ -391,10 +469,17 @@ SmBusReadBlock (
If any reserved bits of SmBusAddress are set, then ASSERT(). If any reserved bits of SmBusAddress are set, then ASSERT().
@param SmBusAddress Address that encodes the SMBUS Slave Address, @param SmBusAddress Address that encodes the SMBUS Slave Address,
SMBUS Command, SMBUS Data Length, and PEC. MBUS Command, SMBUS Data Length, and PEC.
@param Buffer Pointer to the buffer to store the bytes read from the SMBUS. @param Buffer Pointer to the buffer to store the bytes read from the SMBUS.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The number of bytes written. @return The number of bytes written.
@ -438,6 +523,13 @@ SmBusWriteBlock (
@param ReadBuffer Pointer to the buffer of bytes to read from the SMBUS. @param ReadBuffer Pointer to the buffer of bytes to read from the SMBUS.
@param Status Return status for the executed command. @param Status Return status for the executed command.
This is an optional parameter and may be NULL. This is an optional parameter and may be NULL.
RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.
RETURN_DEVICE_ERROR The request was not completed because a failure
reflected in the Host Status Register bit. Device errors are a result
of a transaction collision, illegal command field, unclaimed cycle
(host initiated), or bus errors (collisions).
RETURN_CRC_ERROR The checksum is not correct (PEC is incorrect)
RETURN_UNSUPPORTED The SMBus operation is not supported.
@return The number of bytes written. @return The number of bytes written.

View File

@ -97,8 +97,9 @@ NanoSecondDelay (
} }
/** /**
Retrieves the current value of a 64-bit free running performance counter. The Retrieves the current value of a 64-bit free running performance counter.
counter can either count up by 1 or count down by 1. If the physical
The counter can either count up by 1 or count down by 1. If the physical
performance counter counts by a larger increment, then the counter values performance counter counts by a larger increment, then the counter values
must be translated. The properties of the counter can be retrieved from must be translated. The properties of the counter can be retrieved from
GetPerformanceCounterProperties(). GetPerformanceCounterProperties().

View File

@ -183,8 +183,9 @@ NanoSecondDelay (
} }
/** /**
Retrieves the current value of a 64-bit free running performance counter. The Retrieves the current value of a 64-bit free running performance counter.
counter can either count up by 1 or count down by 1. If the physical
The counter can either count up by 1 or count down by 1. If the physical
performance counter counts by a larger increment, then the counter values performance counter counts by a larger increment, then the counter values
must be translated. The properties of the counter can be retrieved from must be translated. The properties of the counter can be retrieved from
GetPerformanceCounterProperties(). GetPerformanceCounterProperties().

View File

@ -18,13 +18,20 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/** /**
Enrty point to UEFI application. Enrty point to UEFI Application.
@param ImageHandle ImageHandle of the loaded driver. This function is the entry point for a UEFI Application. This function must call
@param SystemTable Pointer to the EFI System Table. ProcessLibraryConstructorList(), ProcessModuleEntryPointList(), and ProcessLibraryDestructorList().
The return value from ProcessModuleEntryPointList() is returned.
If _gUefiDriverRevision is not zero and SystemTable->Hdr.Revision is less than _gUefiDriverRevison,
then return EFI_INCOMPATIBLE_VERSION.
@retval EFI_SUCCESS One or more of the drivers returned a success code. @param ImageHandle The image handle of the UEFI Application.
@retval !EFI_SUCESS The return status from the last driver entry point in the list. @param SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS The UEFI Application exited normally.
@retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than SystemTable->Hdr.Revision.
@retval Other Return value from ProcessModuleEntryPointList().
**/ **/
EFI_STATUS EFI_STATUS
@ -66,9 +73,13 @@ _ModuleEntryPoint (
return Status; return Status;
} }
/** /**
Invoke the destuctors of all libraries and call gBS->Exit Invokes the library destructors fror all dependent libraries and terminates
to return control to firmware core. the UEFI Application.
This function calls ProcessLibraryDestructorList() and the EFI Boot Service Exit()
with a status specified by Status.
@param Status Status returned by the application that is exiting. @param Status Status returned by the application that is exiting.
@ -85,14 +96,16 @@ Exit (
gBS->Exit (gImageHandle, Status, 0, NULL); gBS->Exit (gImageHandle, Status, 0, NULL);
} }
/** /**
Enrty point wrapper of UEFI Application. Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
@param ImageHandle ImageHandle of the loaded driver. @param ImageHandle The image handle of the UEFI Application.
@param SystemTable Pointer to the EFI System Table. @param SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS One or more of the drivers returned a success code. @retval EFI_SUCCESS The UEFI Application exited normally.
@retval !EFI_SUCESS The return status from the last driver entry point in the list. @retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than SystemTable->Hdr.Revision.
@retval Other Return value from ProcessModuleEntryPointList().
**/ **/
EFI_STATUS EFI_STATUS