summaryrefslogtreecommitdiff
path: root/MdePkg/Include
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-07-05 04:17:04 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-07-05 04:17:04 +0000
commitadd13dc21720eff1a37fdea34c0fef190e2ad37d (patch)
tree0d58a4edded2175903f98276e3fe67f802ab44ce /MdePkg/Include
parentc16ade35ca4b293255fea78aaf33783501f90f9f (diff)
downloadedk2-platforms-add13dc21720eff1a37fdea34c0fef190e2ad37d.tar.xz
DebugLib:
Fix a bug in PeiDxeDebugLibReportStatusCode: it should use gReportStatusCodeDebugType so that report status code infrastructure can correctly extract debug info. Fix functional and coding style issues in the three instances in EdkModulePkg, namely: EdkDxeDebugLibReportStatusCode, EdkUefiDebugLibStderr, EdkUefiDebugLibConout. DevicePathLib: Sync with MWG 0.57 and add new interface of CreateDevicePathNode(). All the function headers have been updated. PeiServicesLib: Adjust coding style and fix a minor comment error. PciLib: Adjust assert() condition to sync with MWG 0.57 BaseMemoryLib: Adjust assert() for ScanMemXX (), ScanGuid() Rename UefiMemoryLib to DxeMemoryLib PrintLib: Change the return value of all print services to exclude the NULL-terminator. Misc: Slightly adjust the coding style in hob.c in PeiCore module. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@757 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include')
-rw-r--r--MdePkg/Include/Library/BaseMemoryLib.h9
-rw-r--r--MdePkg/Include/Library/DevicePathLib.h241
-rw-r--r--MdePkg/Include/Library/PciCf8Lib.h6
-rw-r--r--MdePkg/Include/Library/PciExpressLib.h6
-rw-r--r--MdePkg/Include/Library/PciLib.h6
-rw-r--r--MdePkg/Include/Library/PeiServicesLib.h270
-rw-r--r--MdePkg/Include/Library/PrintLib.h188
7 files changed, 401 insertions, 325 deletions
diff --git a/MdePkg/Include/Library/BaseMemoryLib.h b/MdePkg/Include/Library/BaseMemoryLib.h
index 38f6c489d5..af3e1ecfaf 100644
--- a/MdePkg/Include/Library/BaseMemoryLib.h
+++ b/MdePkg/Include/Library/BaseMemoryLib.h
@@ -48,7 +48,7 @@ CopyMem (
If Length is greater than (MAX_ADDRESS – Buffer + 1), then ASSERT().
@param Buffer Memory to set.
- @param Length Number of bytes to set
+ @param Length Number of bytes to set.
@param Value Value of the set operation.
@return Buffer.
@@ -175,7 +175,6 @@ ZeroMem (
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
-
@param DestinationBuffer Pointer to the destination buffer to compare.
@param SourceBuffer Pointer to the source buffer to compare.
@param Length Number of bytes to compare.
@@ -229,6 +228,7 @@ ScanMem8 (
then NULL is returned. If Length is 0, then NULL is returned.
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
+ If Length is not aligned on a 16-bit boundary, then ASSERT().
If Length is greater than (MAX_ADDRESS – Buffer + 1), then ASSERT().
@param Buffer Pointer to the target buffer to scan.
@@ -256,6 +256,7 @@ ScanMem16 (
then NULL is returned. If Length is 0, then NULL is returned.
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
+ If Length is not aligned on a 32-bit boundary, then ASSERT().
If Length is greater than (MAX_ADDRESS – Buffer + 1), then ASSERT().
@param Buffer Pointer to the target buffer to scan.
@@ -283,6 +284,7 @@ ScanMem32 (
then NULL is returned. If Length is 0, then NULL is returned.
If Length > 0 and Buffer is NULL, then ASSERT().
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
+ If Length is not aligned on a 64-bit boundary, then ASSERT().
If Length is greater than (MAX_ADDRESS – Buffer + 1), then ASSERT().
@param Buffer Pointer to the target buffer to scan.
@@ -353,7 +355,8 @@ CompareGuid (
GUID in the target buffer is returned. If no match is found, then NULL is returned.
If Length is 0, then NULL is returned.
If Length > 0 and Buffer is NULL, then ASSERT().
- If Buffer is not aligned on a 64-bit boundary, then ASSERT().
+ If Buffer is not aligned on a 32-bit boundary, then ASSERT().
+ If Length is not aligned on a 128-bit boundary, then ASSERT().
If Length is greater than (MAX_ADDRESS – Buffer + 1), then ASSERT().
@param Buffer Pointer to the target buffer to scan.
diff --git a/MdePkg/Include/Library/DevicePathLib.h b/MdePkg/Include/Library/DevicePathLib.h
index 299d607118..aee5426ca2 100644
--- a/MdePkg/Include/Library/DevicePathLib.h
+++ b/MdePkg/Include/Library/DevicePathLib.h
@@ -18,11 +18,12 @@
#define __DEVICE_PATH_LIB_H__
/**
- This function returns the size, in bytes,
- of the device path data structure specified by DevicePath.
- If DevicePath is NULL, then 0 is returned.
+ Returns the size of a device path in bytes.
- @param DevicePath A pointer to a device path data structure.
+ This function returns the size, in bytes, of the device path data structure specified by
+ DevicePath including the end of device path node. If DevicePath is NULL, then 0 is returned.
+
+ @param DevicePath A pointer to a device path data structure.
@return The size of a device path in bytes.
@@ -31,166 +32,220 @@ UINTN
EFIAPI
GetDevicePathSize (
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
- )
-;
+ );
/**
- This function allocates space for a new copy of the device path
- specified by DevicePath.
+ Creates a new device path by appending a second device path to a first device path.
- @param DevicePath A pointer to a device path data structure.
+ This function allocates space for a new copy of the device path specified by DevicePath. If
+ DevicePath is NULL, then NULL is returned. If the memory is successfully allocated, then the
+ contents of DevicePath are copied to the newly allocated buffer, and a pointer to that buffer
+ is returned. Otherwise, NULL is returned.
+
+ @param DevicePath A pointer to a device path data structure.
- @return The duplicated device path.
+ @return A pointer to the duplicated device path.
**/
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
DuplicateDevicePath (
- IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
- )
-;
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
+ );
/**
- This function appends the device path SecondDevicePath
- to every device path instance in FirstDevicePath.
+ Creates a new device path by appending a second device path to a first device path.
- @param FirstDevicePath A pointer to a device path data structure.
-
- @param SecondDevicePath A pointer to a device path data structure.
+ This function creates a new device path by appending a copy of SecondDevicePath to a copy of
+ FirstDevicePath in a newly allocated buffer. Only the end-of-device-path device node from
+ SecondDevicePath is retained. The newly created device path is returned.
+ If FirstDevicePath is NULL, then it is ignored, and a duplicate of SecondDevicePath is returned.
+ If SecondDevicePath is NULL, then it is ignored, and a duplicate of FirstDevicePath is returned.
+ If both FirstDevicePath and SecondDevicePath are NULL, then NULL is returned.
+ If there is not enough memory for the newly allocated buffer, then NULL is returned.
+ The memory for the new device path is allocated from EFI boot services memory. It is the
+ responsibility of the caller to free the memory allocated.
+
+ @param FirstDevicePath A pointer to a device path data structure.
+ @param SecondDevicePath A pointer to a device path data structure.
- @return
- A pointer to the new device path is returned.
- NULL is returned if space for the new device path could not be allocated from pool.
- It is up to the caller to free the memory used by FirstDevicePath and SecondDevicePath
- if they are no longer needed.
+ @return A pointer to the new device path.
**/
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
AppendDevicePath (
- IN CONST EFI_DEVICE_PATH_PROTOCOL *FirstDevicePath,
- IN CONST EFI_DEVICE_PATH_PROTOCOL *SecondDevicePath
- )
-;
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *FirstDevicePath, OPTIONAL
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *SecondDevicePath OPTIONAL
+ );
/**
- This function appends the device path node SecondDevicePath
- to every device path instance in FirstDevicePath.
+ Creates a new path by appending the device node to the device path.
- @param DevicePath A pointer to a device path data structure.
-
- @param DevicePathNode A pointer to a single device path node.
+ This function creates a new device path by appending a copy of the device node specified by
+ DevicePathNode to a copy of the device path specified by DevicePath in an allocated buffer.
+ The end-of-device-path device node is moved after the end of the appended device node.
+ If DevicePath is NULL, then NULL is returned.
+ If DevicePathNode is NULL, then NULL is returned.
+ If there is not enough memory to allocate space for the new device path, then NULL is returned.
+ The memory is allocated from EFI boot services memory. It is the responsibility of the caller to
+ free the memory allocated.
+
+ @param DevicePath A pointer to a device path data structure.
+ @param DevicePathNode A pointer to a single device path node.
@return A pointer to the new device path.
- If there is not enough temporary pool memory available to complete this function,
- then NULL is returned.
**/
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
AppendDevicePathNode (
- IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
- IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode
- )
-;
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, OPTIONAL
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL
+ );
/**
- This function appends the device path instance Instance to the device path Source.
- If Source is NULL, then a new device path with one instance is created.
-
- @param Source A pointer to a device path data structure.
- @param Instance A pointer to a device path instance.
+ Creates a new device path by appending the specified device path instance to the specified device
+ path.
+
+ This function creates a new device path by appending a copy of the device path instance specified
+ by DevicePathInstance to a copy of the device path secified by DevicePath in a allocated buffer.
+ The end-of-device-path device node is moved after the end of the appended device path instance
+ and a new end-of-device-path-instance node is inserted between.
+ If DevicePath is NULL, then a copy if DevicePathInstance is returned.
+ If DevicePathInstance is NULL, then NULL is returned.
+ If there is not enough memory to allocate space for the new device path, then NULL is returned.
+ The memory is allocated from EFI boot services memory. It is the responsibility of the caller to
+ free the memory allocated.
+
+ @param DevicePath A pointer to a device path data structure.
+ @param DevicePathInstance A pointer to a device path instance.
- @return
- A pointer to the new device path.
- If there is not enough temporary pool memory available to complete this function,
- then NULL is returned.
+ @return A pointer to the new device path.
**/
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
AppendDevicePathInstance (
- IN CONST EFI_DEVICE_PATH_PROTOCOL *Source,
- IN CONST EFI_DEVICE_PATH_PROTOCOL *Instance
- )
-;
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, OPTIONAL
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance OPTIONAL
+ );
/**
- Function retrieves the next device path instance from a device path data structure.
+ Creates a copy of the current device path instance and returns a pointer to the next device path
+ instance.
+
+ This function creates a copy of the current device path instance. It also updates DevicePath to
+ point to the next device path instance in the device path (or NULL if no more) and updates Size
+ to hold the size of the device path instance copy.
+ If DevicePath is NULL, then NULL is returned.
+ If there is not enough memory to allocate space for the new device path, then NULL is returned.
+ The memory is allocated from EFI boot services memory. It is the responsibility of the caller to
+ free the memory allocated.
+ If Size is NULL, then ASSERT().
+
+ @param DevicePath On input, this holds the pointer to the current device path
+ instance. On output, this holds the pointer to the next device
+ path instance or NULL if there are no more device path
+ instances in the device path pointer to a device path data
+ structure.
+ @param Size On output, this holds the size of the device path instance, in
+ bytes or zero, if DevicePath is NULL.
+
+ @return A pointer to the current device path instance.
- @param DevicePath A pointer to a device path data structure.
-
- @param Size A pointer to the size of a device path instance in bytes.
+**/
+EFI_DEVICE_PATH_PROTOCOL *
+EFIAPI
+GetNextDevicePathInstance (
+ IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
+ OUT UINTN *Size
+ );
+
+/**
+ Creates a copy of the current device path instance and returns a pointer to the next device path
+ instance.
- @return
- This function returns a pointer to the current device path instance.
- In addition, it returns the size in bytes of the current device path instance in Size,
- and a pointer to the next device path instance in DevicePath.
- If there are no more device path instances in DevicePath, then DevicePath will be set to NULL.
+ This function creates a new device node in a newly allocated buffer of size NodeLength and
+ initializes the device path node header with NodeType and NodeSubType. The new device path node
+ is returned.
+ If NodeLength is smaller than a device path header, then NULL is returned.
+ If there is not enough memory to allocate space for the new device path, then NULL is returned.
+ The memory is allocated from EFI boot services memory. It is the responsibility of the caller to
+ free the memory allocated.
+
+ @param NodeType The device node type for the new device node.
+ @param NodeSubType The device node sub-type for the new device node.
+ @param NodeLength The length of the new device node.
+
+ @return The new device path.
**/
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
-GetNextDevicePathInstance (
- IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
- OUT UINTN *Size
- )
-;
+CreateDeviceNode (
+ IN UINT8 NodeType,
+ IN UINT8 NodeSubType,
+ IN UINT16 NodeLength
+ );
/**
- Return TRUE is this is a multi instance device path.
+ Determines if a device path is single or multi-instance.
- @param DevicePath A pointer to a device path data structure.
+ This function returns TRUE if the device path specified by DevicePath is multi-instance.
+ Otherwise, FALSE is returned. If DevicePath is NULL, then FALSE is returned.
- @retval TRUE If DevicePath is multi-instance.
- @retval FALSE If DevicePath is not multi-instance or DevicePath is NULL.
+ @param DevicePath A pointer to a device path data structure.
+
+ @retval TRUE DevicePath is multi-instance.
+ @retval FALSE DevicePath is not multi-instance or DevicePath is NULL.
**/
BOOLEAN
EFIAPI
IsDevicePathMultiInstance (
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
- )
-;
+ );
/**
- This function retrieves the device path protocol from a handle.
+ Retrieves the device path protocol from a handle.
- @param Handle The handle from which to retrieve the device path protocol.
+ This function returns the device path protocol from the handle specified by Handle. If Handle is
+ NULL or Handle does not contain a device path protocol, then NULL is returned.
+
+ @param Handle The handle from which to retrieve the device path protocol.
- @return
- This function returns the device path protocol from the handle specified by Handle.
- If Handle is NULL or Handle does not contain a device path protocol, then NULL is returned.
+ @return The device path protocol from the handle specified by Handle.
**/
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
DevicePathFromHandle (
- IN EFI_HANDLE Handle
- )
-;
+ IN EFI_HANDLE Handle
+ );
/**
- This function allocates a device path for a file and appends it to an existing device path.
+ Allocates a device path for a file and appends it to an existing device path.
+
+ If Device is a valid device handle that contains a device path protocol, then a device path for
+ the file specified by FileName is allocated and appended to the device path associated with the
+ handle Device. The allocated device path is returned. If Device is NULL or Device is a handle
+ that does not support the device path protocol, then a device path containing a single device
+ path node for the file specified by FileName is allocated and returned.
+ If FileName is NULL, then ASSERT().
- @param Device A pointer to a device handle. This parameter is optional and may be NULL.
- @param FileName A pointer to a Null-terminated Unicode string.
+ @param Device A pointer to a device handle. This parameter is optional and
+ may be NULL.
+ @param FileName A pointer to a Null-terminated Unicode string.
- @return
- If Device is a valid device handle that contains a device path protocol,
- then a device path for the file specified by FileName is allocated
- and appended to the device path associated with the handle Device. The allocated device path is returned.
- If Device is NULL or Device is a handle that does not support the device path protocol,
- then a device path containing a single device path node for the file specified by FileName
- is allocated and returned.
+ @return The allocated device path.
**/
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
FileDevicePath (
- IN EFI_HANDLE Device, OPTIONAL
- IN CONST CHAR16 *FileName
- )
-;
+ IN EFI_HANDLE Device, OPTIONAL
+ IN CONST CHAR16 *FileName
+ );
#endif
diff --git a/MdePkg/Include/Library/PciCf8Lib.h b/MdePkg/Include/Library/PciCf8Lib.h
index e2ac1b2a01..e2808418fa 100644
--- a/MdePkg/Include/Library/PciCf8Lib.h
+++ b/MdePkg/Include/Library/PciCf8Lib.h
@@ -996,8 +996,7 @@ PciCf8BitFieldAndThenOr32 (
If StartAddress > 0x0FFFFFFF, then ASSERT().
If the register specified by StartAddress >= 0x100, then ASSERT().
If ((StartAddress & 0xFFF) + Size) > 0x100, then ASSERT().
- If (StartAddress + Size - 1) > 0x0FFFFFFF, then ASSERT().
- If Buffer is NULL, then ASSERT().
+ If Size > 0 and Buffer is NULL, then ASSERT().
@param StartAddress Starting address that encodes the PCI Bus, Device,
Function and Register.
@@ -1030,8 +1029,7 @@ PciCf8ReadBuffer (
If StartAddress > 0x0FFFFFFF, then ASSERT().
If the register specified by StartAddress >= 0x100, then ASSERT().
If ((StartAddress & 0xFFF) + Size) > 0x100, then ASSERT().
- If (StartAddress + Size - 1) > 0x0FFFFFFF, then ASSERT().
- If Buffer is NULL, then ASSERT().
+ If Size > 0 and Buffer is NULL, then ASSERT().
@param StartAddress Starting address that encodes the PCI Bus, Device,
Function and Register.
diff --git a/MdePkg/Include/Library/PciExpressLib.h b/MdePkg/Include/Library/PciExpressLib.h
index c21a2795c1..9bd1166a87 100644
--- a/MdePkg/Include/Library/PciExpressLib.h
+++ b/MdePkg/Include/Library/PciExpressLib.h
@@ -965,8 +965,7 @@ PciExpressBitFieldAndThenOr32 (
If StartAddress > 0x0FFFFFFF, then ASSERT().
If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().
- If (StartAddress + Size - 1) > 0x0FFFFFFF, then ASSERT().
- If Buffer is NULL, then ASSERT().
+ If Size > 0 and Buffer is NULL, then ASSERT().
@param StartAddress Starting address that encodes the PCI Bus, Device,
Function and Register.
@@ -998,8 +997,7 @@ PciExpressReadBuffer (
If StartAddress > 0x0FFFFFFF, then ASSERT().
If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().
- If (StartAddress + Size - 1) > 0x0FFFFFFF, then ASSERT().
- If Buffer is NULL, then ASSERT().
+ If Size > 0 and Buffer is NULL, then ASSERT().
@param StartAddress Starting address that encodes the PCI Bus, Device,
Function and Register.
diff --git a/MdePkg/Include/Library/PciLib.h b/MdePkg/Include/Library/PciLib.h
index 4d21cb7708..6acf13c7be 100644
--- a/MdePkg/Include/Library/PciLib.h
+++ b/MdePkg/Include/Library/PciLib.h
@@ -960,8 +960,7 @@ PciBitFieldAndThenOr32 (
If StartAddress > 0x0FFFFFFF, then ASSERT().
If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().
- If (StartAddress + Size - 1) > 0x0FFFFFFF, then ASSERT().
- If Buffer is NULL, then ASSERT().
+ If Size > 0 and Buffer is NULL, then ASSERT().
@param StartAddress Starting address that encodes the PCI Bus, Device,
Function and Register.
@@ -993,8 +992,7 @@ PciReadBuffer (
If StartAddress > 0x0FFFFFFF, then ASSERT().
If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().
- If (StartAddress + Size - 1) > 0x0FFFFFFF, then ASSERT().
- If Buffer is NULL, then ASSERT().
+ If Size > 0 and Buffer is NULL, then ASSERT().
@param StartAddress Starting address that encodes the PCI Bus, Device,
Function and Register.
diff --git a/MdePkg/Include/Library/PeiServicesLib.h b/MdePkg/Include/Library/PeiServicesLib.h
index 10eebb5bf0..53d1cdba42 100644
--- a/MdePkg/Include/Library/PeiServicesLib.h
+++ b/MdePkg/Include/Library/PeiServicesLib.h
@@ -1,5 +1,5 @@
/** @file
- PEI Core Library implementation
+ Header file for PEI Services Library.
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
@@ -20,287 +20,279 @@
/**
This service enables a given PEIM to register an interface into the PEI Foundation.
- @param PpiList A pointer to the list of interfaces that the caller shall install.
+ @param PpiList A pointer to the list of interfaces that the caller shall install.
- @retval EFI_SUCCESS The interface was successfully installed.
- @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL.
- @retval EFI_INVALID_PARAMETER Any of the PEI PPI descriptors in the list do not have
- the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.
- @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
+ @retval EFI_SUCCESS The interface was successfully installed.
+ @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL.
+ @retval EFI_INVALID_PARAMETER Any of the PEI PPI descriptors in the list do not have the
+ EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.
+ @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
**/
EFI_STATUS
EFIAPI
PeiServicesInstallPpi (
- IN EFI_PEI_PPI_DESCRIPTOR *PpiList
- )
-;
+ IN EFI_PEI_PPI_DESCRIPTOR *PpiList
+ );
/**
This service enables PEIMs to replace an entry in the PPI database with an alternate entry.
- @param OldPpi Pointer to the old PEI PPI Descriptors.
- @param NewPpi Pointer to the new PEI PPI Descriptors.
+ @param OldPpi Pointer to the old PEI PPI Descriptors.
+ @param NewPpi Pointer to the new PEI PPI Descriptors.
- @retval EFI_SUCCESS The interface was successfully installed.
- @retval EFI_INVALID_PARAMETER The OldPpi or NewPpi is NULL.
- @retval EFI_INVALID_PARAMETER Any of the PEI PPI descriptors in the list do not have
- the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.
- @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
- @retval EFI_NOT_FOUND The PPI for which the reinstallation was requested has not been installed.
+ @retval EFI_SUCCESS The interface was successfully installed.
+ @retval EFI_INVALID_PARAMETER The OldPpi or NewPpi is NULL.
+ @retval EFI_INVALID_PARAMETER Any of the PEI PPI descriptors in the list do not have the
+ EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.
+ @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
+ @retval EFI_NOT_FOUND The PPI for which the reinstallation was requested has not been
+ installed.
**/
EFI_STATUS
EFIAPI
PeiServicesReInstallPpi (
- IN EFI_PEI_PPI_DESCRIPTOR *OldPpi,
- IN EFI_PEI_PPI_DESCRIPTOR *NewPpi
- )
-;
+ IN EFI_PEI_PPI_DESCRIPTOR *OldPpi,
+ IN EFI_PEI_PPI_DESCRIPTOR *NewPpi
+ );
/**
This service enables PEIMs to discover a given instance of an interface.
- @param Guid A pointer to the GUID whose corresponding interface needs to be found.
- @param Instance The N-th instance of the interface that is required.
- @param PpiDescriptor A pointer to instance of the EFI_PEI_PPI_DESCRIPTOR.
- @param Ppi A pointer to the instance of the interface.
+ @param Guid A pointer to the GUID whose corresponding interface needs to be
+ found.
+ @param Instance The N-th instance of the interface that is required.
+ @param PpiDescriptor A pointer to instance of the EFI_PEI_PPI_DESCRIPTOR.
+ @param Ppi A pointer to the instance of the interface.
- @retval EFI_SUCCESS The interface was successfully returned.
- @retval EFI_NOT_FOUND The PPI descriptor is not found in the database.
+ @retval EFI_SUCCESS The interface was successfully returned.
+ @retval EFI_NOT_FOUND The PPI descriptor is not found in the database.
**/
EFI_STATUS
EFIAPI
PeiServicesLocatePpi (
- IN EFI_GUID *Guid,
- IN UINTN Instance,
- IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,
- IN OUT VOID **Ppi
- )
-;
+ IN EFI_GUID *Guid,
+ IN UINTN Instance,
+ IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,
+ IN OUT VOID **Ppi
+ );
/**
- This service enables PEIMs to register a given service to be invoked
- when another service is installed or reinstalled.
+ This service enables PEIMs to register a given service to be invoked when another service is
+ installed or reinstalled.
- @param NotifyList A pointer to the list of notification interfaces that the caller shall install.
+ @param NotifyList A pointer to the list of notification interfaces that the caller
+ shall install.
- @retval EFI_SUCCESS The interface was successfully installed.
- @retval EFI_INVALID_PARAMETER The NotifyList pointer is NULL.
- @retval EFI_INVALID_PARAMETER Any of the PEI notify descriptors in the list do not have
- the EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES bit set in the Flags field.
- @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
+ @retval EFI_SUCCESS The interface was successfully installed.
+ @retval EFI_INVALID_PARAMETER The NotifyList pointer is NULL.
+ @retval EFI_INVALID_PARAMETER Any of the PEI notify descriptors in the list do not have the
+ EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES bit set in the Flags field.
+ @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
**/
EFI_STATUS
EFIAPI
PeiServicesNotifyPpi (
- IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList
- )
-;
+ IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList
+ );
/**
This service enables PEIMs to ascertain the present value of the boot mode.
- @param BootMode A pointer to contain the value of the boot mode.
+ @param BootMode A pointer to contain the value of the boot mode.
- @retval EFI_SUCCESS The boot mode was returned successfully.
- @retval EFI_INVALID_PARAMETER BootMode is NULL.
+ @retval EFI_SUCCESS The boot mode was returned successfully.
+ @retval EFI_INVALID_PARAMETER BootMode is NULL.
**/
EFI_STATUS
EFIAPI
PeiServicesGetBootMode (
- IN OUT EFI_BOOT_MODE *BootMode
- )
-;
+ IN OUT EFI_BOOT_MODE *BootMode
+ );
/**
This service enables PEIMs to update the boot mode variable.
- @param BootMode The value of the boot mode to set.
+ @param BootMode The value of the boot mode to set.
- @retval EFI_SUCCESS The value was successfully updated
+ @retval EFI_SUCCESS The value was successfully updated
**/
EFI_STATUS
EFIAPI
PeiServicesSetBootMode (
- IN EFI_BOOT_MODE BootMode
- )
-;
+ IN EFI_BOOT_MODE BootMode
+ );
/**
This service enables a PEIM to ascertain the address of the list of HOBs in memory.
- @param HobList A pointer to the list of HOBs that the PEI Foundation will initialize.
+ @param HobList A pointer to the list of HOBs that the PEI Foundation will initialize.
- @retval EFI_SUCCESS The list was successfully returned.
- @retval EFI_NOT_AVAILABLE_YET The HOB list is not yet published.
+ @retval EFI_SUCCESS The list was successfully returned.
+ @retval EFI_NOT_AVAILABLE_YET The HOB list is not yet published.
**/
EFI_STATUS
EFIAPI
PeiServicesGetHobList (
- IN OUT VOID **HobList
- )
-;
+ IN OUT VOID **HobList
+ );
/**
This service enables PEIMs to create various types of HOBs.
- @param Type The type of HOB to be installed.
- @param Length The length of the HOB to be added.
- @param Hob The address of a pointer that will contain the HOB header.
+ @param Type The type of HOB to be installed.
+ @param Length The length of the HOB to be added.
+ @param Hob The address of a pointer that will contain the HOB header.
- @retval EFI_SUCCESS The HOB was successfully created.
- @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.
+ @retval EFI_SUCCESS The HOB was successfully created.
+ @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.
**/
EFI_STATUS
EFIAPI
PeiServicesCreateHob (
- IN UINT16 Type,
- IN UINT16 Length,
- IN OUT VOID **Hob
- )
-;
+ IN UINT16 Type,
+ IN UINT16 Length,
+ IN OUT VOID **Hob
+ );
/**
This service enables PEIMs to discover additional firmware volumes.
- @param Instance This instance of the firmware volume to find.
- The value 0 is the Boot Firmware Volume (BFV).
- @param FwVolHeader Pointer to the firmware volume header of the volume to return.
+ @param Instance This instance of the firmware volume to find. The value 0 is the
+ Boot Firmware Volume (BFV).
+ @param FwVolHeader Pointer to the firmware volume header of the volume to return.
- @retval EFI_SUCCESS The volume was found.
- @retval EFI_NOT_FOUND The volume was not found.
- @retval EFI_INVALID_PARAMETER FwVolHeader is NULL.
+ @retval EFI_SUCCESS The volume was found.
+ @retval EFI_NOT_FOUND The volume was not found.
+ @retval EFI_INVALID_PARAMETER FwVolHeader is NULL.
**/
EFI_STATUS
EFIAPI
PeiServicesFfsFindNextVolume (
- IN UINTN Instance,
- IN OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader
- )
-;
+ IN UINTN Instance,
+ IN OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader
+ );
/**
This service enables PEIMs to discover additional firmware files.
- @param SearchType A filter to find files only of this type.
- @param FwVolHeader Pointer to the firmware volume header of the volume to search.
- This parameter must point to a valid FFS volume.
- @param FileHeader Pointer to the current file from which to begin searching.
+ @param SearchType A filter to find files only of this type.
+ @param FwVolHeader Pointer to the firmware volume header of the volume to search.
+ This parameter must point to a valid FFS volume.
+ @param FileHeader Pointer to the current file from which to begin searching.
- @retval EFI_SUCCESS The file was found.
- @retval EFI_NOT_FOUND The file was not found.
- @retval EFI_NOT_FOUND The header checksum was not zero.
+ @retval EFI_SUCCESS The file was found.
+ @retval EFI_NOT_FOUND The file was not found.
+ @retval EFI_NOT_FOUND The header checksum was not zero.
**/
EFI_STATUS
EFIAPI
PeiServicesFfsFindNextFile (
- IN EFI_FV_FILETYPE SearchType,
- IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader,
- IN OUT EFI_FFS_FILE_HEADER **FileHeader
- )
-;
+ IN EFI_FV_FILETYPE SearchType,
+ IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader,
+ IN OUT EFI_FFS_FILE_HEADER **FileHeader
+ );
/**
This service enables PEIMs to discover sections of a given type within a valid FFS file.
- @param SearchType The value of the section type to find.
- @param FfsFileHeader A pointer to the file header that contains the set of sections to be searched.
- @param SectionData A pointer to the discovered section, if successful.
+ @param SearchType The value of the section type to find.
+ @param FfsFileHeader A pointer to the file header that contains the set of sections to
+ be searched.
+ @param SectionData A pointer to the discovered section, if successful.
- @retval EFI_SUCCESS The section was found.
- @retval EFI_NOT_FOUND The section was not found.
+ @retval EFI_SUCCESS The section was found.
+ @retval EFI_NOT_FOUND The section was not found.
**/
EFI_STATUS
EFIAPI
PeiServicesFfsFindSectionData (
- IN EFI_SECTION_TYPE SectionType,
- IN EFI_FFS_FILE_HEADER *FfsFileHeader,
- IN OUT VOID **SectionData
- )
-;
+ IN EFI_SECTION_TYPE SectionType,
+ IN EFI_FFS_FILE_HEADER *FfsFileHeader,
+ IN OUT VOID **SectionData
+ );
/**
This service enables PEIMs to register the permanent memory configuration
that has been initialized with the PEI Foundation.
- @param MemoryBegin The value of a region of installed memory.
- @param MemoryLength The corresponding length of a region of installed memory.
+ @param MemoryBegin The value of a region of installed memory.
+ @param MemoryLength The corresponding length of a region of installed memory.
- @retval EFI_SUCCESS The region was successfully installed in a HOB.
- @retval EFI_INVALID_PARAMETER MemoryBegin and MemoryLength are illegal for this system.
- @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.
+ @retval EFI_SUCCESS The region was successfully installed in a HOB.
+ @retval EFI_INVALID_PARAMETER MemoryBegin and MemoryLength are illegal for this system.
+ @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.
**/
EFI_STATUS
EFIAPI
PeiServicesInstallPeiMemory (
- IN EFI_PHYSICAL_ADDRESS MemoryBegin,
- IN UINT64 MemoryLength
- )
-;
+ IN EFI_PHYSICAL_ADDRESS MemoryBegin,
+ IN UINT64 MemoryLength
+ );
/**
- This service enables PEIMs to allocate memory after the permanent memory has been installed by a PEIM.
+ This service enables PEIMs to allocate memory after the permanent memory has been installed by a
+ PEIM.
- @param MemoryType Type of memory to allocate.
- @param Pages Number of pages to allocate.
- @param Memory Pointer of memory allocated.
+ @param MemoryType Type of memory to allocate.
+ @param Pages Number of pages to allocate.
+ @param Memory Pointer of memory allocated.
- @retval EFI_SUCCESS The memory range was successfully allocated.
- @retval EFI_INVALID_PARAMETER Type is not equal to AllocateAnyPages.
- @retval EFI_NOT_AVAILABLE_YET Called with permanent memory not available.
- @retval EFI_OUT_OF_RESOURCES The pages could not be allocated.
+ @retval EFI_SUCCESS The memory range was successfully allocated.
+ @retval EFI_INVALID_PARAMETER Type is not equal to AllocateAnyPages.
+ @retval EFI_NOT_AVAILABLE_YET Called with permanent memory not available.
+ @retval EFI_OUT_OF_RESOURCES The pages could not be allocated.
**/
EFI_STATUS
EFIAPI
PeiServicesAllocatePages (
- IN EFI_MEMORY_TYPE MemoryType,
- IN UINTN Pages,
- IN OUT EFI_PHYSICAL_ADDRESS *Memory
- )
-;
+ IN EFI_MEMORY_TYPE MemoryType,
+ IN UINTN Pages,
+ IN OUT EFI_PHYSICAL_ADDRESS *Memory
+ );
/**
This service allocates memory from the Hand-Off Block (HOB) heap.
- @param Size The number of bytes to allocate from the pool.
- @param Buffer If the call succeeds, a pointer to a pointer to the allocated buffer;
- undefined otherwise.
+ @param Size The number of bytes to allocate from the pool.
+ @param Buffer If the call succeeds, a pointer to a pointer to the allocate
+ buffer; undefined otherwise.
- @retval EFI_SUCCESS The allocation was successful
- @retval EFI_OUT_OF_RESOURCES There is not enough heap to allocate the requested size.
+ @retval EFI_SUCCESS The allocation was successful
+ @retval EFI_OUT_OF_RESOURCES There is not enough heap to allocate the requested size.
**/
EFI_STATUS
EFIAPI
PeiServicesAllocatePool (
- IN UINTN Size,
- OUT VOID **Buffer
- )
-;
+ IN UINTN Size,
+ OUT VOID **Buffer
+ );
/**
- This service resets the entire platform, including all processors and devices, and reboots the system.
+ This service resets the entire platform, including all processors and devices, and reboots the
+ system.
- @retval EFI_NOT_AVAILABLE_YET The service has not been installed yet.
+ @retval EFI_NOT_AVAILABLE_YET The service has not been installed yet.
**/
EFI_STATUS
EFIAPI
PeiServicesResetSystem (
VOID
- )
-;
+ );
+
#endif
diff --git a/MdePkg/Include/Library/PrintLib.h b/MdePkg/Include/Library/PrintLib.h
index bdab062638..e1b3cb37bb 100644
--- a/MdePkg/Include/Library/PrintLib.h
+++ b/MdePkg/Include/Library/PrintLib.h
@@ -50,23 +50,27 @@
The Unicode string is produced by parsing the format string specified by FormatString.
Arguments are pulled from the variable argument list specified by Marker based on the
contents of the format string.
- The length of the produced output buffer is returned.
- If BufferSize is 0, then no output buffer is produced and 0 is returned.
+ The number of Unicode characters in the produced output buffer is returned not including
+ the Null-terminator.
+ If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
- If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().
- If BufferSize is not 0 and FormatString is NULL, then ASSERT().
+ If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().
+ If BufferSize > 1 and FormatString is NULL, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
- PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().
+ PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
+ ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
- contains more than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().
+ contains more than PcdMaximumUnicodeStringLength Unicode characters not including the
+ Null-terminator, then ASSERT().
- @param StartOfBuffer APointer to the output buffer for the produced Null-terminated
+ @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
Unicode string.
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
@param FormatString Null-terminated Unicode format string.
@param Marker VA_LIST marker for the variable argument list.
- @return return Length of the produced output buffer.
+ @return The number of Unicode characters in the produced output buffer not including the
+ Null-terminator.
**/
UINTN
@@ -86,22 +90,26 @@ UnicodeVSPrint (
and BufferSize.
The Unicode string is produced by parsing the format string specified by FormatString.
Arguments are pulled from the variable argument list based on the contents of the format string.
- The length of the produced output buffer is returned.
- If BufferSize is 0, then no output buffer is produced and 0 is returned.
+ The number of Unicode characters in the produced output buffer is returned not including
+ the Null-terminator.
+ If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
- If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().
- If BufferSize is not 0 and FormatString is NULL, then ASSERT().
+ If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().
+ If BufferSize > 1 and FormatString is NULL, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
- PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().
+ PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
+ ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
- contains more than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().
+ contains more than PcdMaximumUnicodeStringLength Unicode characters not including the
+ Null-terminator, then ASSERT().
- @param StartOfBuffer APointer to the output buffer for the produced Null-terminated
+ @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
Unicode string.
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
@param FormatString Null-terminated Unicode format string.
- @return Length of the produced output buffer.
+ @return The number of Unicode characters in the produced output buffer not including the
+ Null-terminator.
**/
UINTN
@@ -122,23 +130,27 @@ UnicodeSPrint (
The Unicode string is produced by parsing the format string specified by FormatString.
Arguments are pulled from the variable argument list specified by Marker based on the
contents of the format string.
- The length of the produced output buffer is returned.
- If BufferSize is 0, then no output buffer is produced and 0 is returned.
-
- If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().
- If BufferSize is not 0 and FormatString is NULL, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
- PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().
+ The number of Unicode characters in the produced output buffer is returned not including
+ the Null-terminator.
+ If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
+
+ If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().
+ If BufferSize > 1 and FormatString is NULL, then ASSERT().
+ If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than
+ PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then
+ ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
- contains more than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().
+ contains more than PcdMaximumUnicodeStringLength Unicode characters not including the
+ Null-terminator, then ASSERT().
- @param StartOfBuffer APointer to the output buffer for the produced Null-terminated
+ @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
Unicode string.
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
@param FormatString Null-terminated Unicode format string.
@param Marker VA_LIST marker for the variable argument list.
- @return Length of the produced output buffer.
+ @return The number of Unicode characters in the produced output buffer not including the
+ Null-terminator.
**/
UINTN
@@ -159,22 +171,26 @@ UnicodeVSPrintAsciiFormat (
The Unicode string is produced by parsing the format string specified by FormatString.
Arguments are pulled from the variable argument list based on the contents of the
format string.
- The length of the produced output buffer is returned.
- If BufferSize is 0, then no output buffer is produced and 0 is returned.
-
- If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().
- If BufferSize is not 0 and FormatString is NULL, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
- PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().
+ The number of Unicode characters in the produced output buffer is returned not including
+ the Null-terminator.
+ If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
+
+ If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().
+ If BufferSize > 1 and FormatString is NULL, then ASSERT().
+ If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than
+ PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then
+ ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
- contains more than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().
+ contains more than PcdMaximumUnicodeStringLength Unicode characters not including the
+ Null-terminator, then ASSERT().
- @param StartOfBuffer APointer to the output buffer for the produced Null-terminated
+ @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
Unicode string.
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
@param FormatString Null-terminated Unicode format string.
- @return Length of the produced output buffer.
+ @return The number of Unicode characters in the produced output buffer not including the
+ Null-terminator.
**/
UINTN
@@ -195,23 +211,27 @@ UnicodeSPrintAsciiFormat (
The ASCII string is produced by parsing the format string specified by FormatString.
Arguments are pulled from the variable argument list specified by Marker based on
the contents of the format string.
- The length of the produced output buffer is returned.
+ The number of ASCII characters in the produced output buffer is returned not including
+ the Null-terminator.
If BufferSize is 0, then no output buffer is produced and 0 is returned.
- If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().
- If BufferSize is not 0 and FormatString is NULL, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
- PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
- contains more than PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().
+ If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().
+ If BufferSize > 0 and FormatString is NULL, then ASSERT().
+ If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than
+ PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then
+ ASSERT().
+ If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string
+ contains more than PcdMaximumAsciiStringLength ASCII characters not including the
+ Null-terminator, then ASSERT().
- @param StartOfBuffer APointer to the output buffer for the produced Null-terminated
+ @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
ASCII string.
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
@param FormatString Null-terminated Unicode format string.
@param Marker VA_LIST marker for the variable argument list.
- @return Length of the produced output buffer.
+ @return The number of ASCII characters in the produced output buffer not including the
+ Null-terminator.
**/
UINTN
@@ -232,22 +252,26 @@ AsciiVSPrint (
The ASCII string is produced by parsing the format string specified by FormatString.
Arguments are pulled from the variable argument list based on the contents of the
format string.
- The length of the produced output buffer is returned.
+ The number of ASCII characters in the produced output buffer is returned not including
+ the Null-terminator.
If BufferSize is 0, then no output buffer is produced and 0 is returned.
- If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().
- If BufferSize is not 0 and FormatString is NULL, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
- PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
- contains more than PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().
+ If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().
+ If BufferSize > 0 and FormatString is NULL, then ASSERT().
+ If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than
+ PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then
+ ASSERT().
+ If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string
+ contains more than PcdMaximumAsciiStringLength ASCII characters not including the
+ Null-terminator, then ASSERT().
- @param StartOfBuffer APointer to the output buffer for the produced Null-terminated
+ @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
ASCII string.
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
@param FormatString Null-terminated Unicode format string.
- @return Length of the produced output buffer.
+ @return The number of ASCII characters in the produced output buffer not including the
+ Null-terminator.
**/
UINTN
@@ -268,23 +292,27 @@ AsciiSPrint (
The ASCII string is produced by parsing the format string specified by FormatString.
Arguments are pulled from the variable argument list specified by Marker based on
the contents of the format string.
- The length of the produced output buffer is returned.
+ The number of ASCII characters in the produced output buffer is returned not including
+ the Null-terminator.
If BufferSize is 0, then no output buffer is produced and 0 is returned.
- If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().
- If BufferSize is not 0 and FormatString is NULL, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
- PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
- contains more than PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().
+ If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().
+ If BufferSize > 0 and FormatString is NULL, then ASSERT().
+ If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
+ PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
+ ASSERT().
+ If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string
+ contains more than PcdMaximumAsciiStringLength ASCII characters not including the
+ Null-terminator, then ASSERT().
- @param StartOfBuffer APointer to the output buffer for the produced Null-terminated
+ @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
ASCII string.
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
@param FormatString Null-terminated Unicode format string.
@param Marker VA_LIST marker for the variable argument list.
- @return Length of the produced output buffer.
+ @return The number of ASCII characters in the produced output buffer not including the
+ Null-terminator.
**/
UINTN
@@ -305,22 +333,26 @@ AsciiVSPrintUnicodeFormat (
The ASCII string is produced by parsing the format string specified by FormatString.
Arguments are pulled from the variable argument list based on the contents of the
format string.
- The length of the produced output buffer is returned.
+ The number of ASCII characters in the produced output buffer is returned not including
+ the Null-terminator.
If BufferSize is 0, then no output buffer is produced and 0 is returned.
- If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().
- If BufferSize is not 0 and FormatString is NULL, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
- PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
- contains more than PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().
+ If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().
+ If BufferSize > 0 and FormatString is NULL, then ASSERT().
+ If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
+ PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
+ ASSERT().
+ If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string
+ contains more than PcdMaximumAsciiStringLength ASCII characters not including the
+ Null-terminator, then ASSERT().
- @param StartOfBuffer APointer to the output buffer for the produced Null-terminated
+ @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
ASCII string.
@param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
@param FormatString Null-terminated Unicode format string.
- @return Length of the produced output buffer.
+ @return The number of ASCII characters in the produced output buffer not including the
+ Null-terminator.
**/
UINTN
@@ -338,7 +370,7 @@ AsciiSPrintUnicodeFormat (
Converts the decimal number specified by Value to a Null-terminated Unicode
string specified by Buffer containing at most Width characters.
If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
- The total number of characters placed in Buffer is returned.
+ The number of Unicode characters in Buffer is returned not including the Null-terminator.
If the conversion contains more than Width characters, then only the first
Width characters are returned, and the total number of characters
required to perform the conversion is returned.
@@ -362,9 +394,9 @@ AsciiSPrintUnicodeFormat (
Unicode string.
@param Flags The bitmask of flags that specify left justification, zero pad, and commas.
@param Value The 64-bit signed value to convert to a string.
- @param Width The maximum number of Unicode characters to place in Buffer.
+ @param Width The maximum number of Unicode characters to place in Buffer.
- @return Total number of characters required to perform the conversion.
+ @return The number of Unicode characters in Buffer not including the Null-terminator.
**/
UINTN
@@ -382,7 +414,7 @@ UnicodeValueToString (
Converts the decimal number specified by Value to a Null-terminated ASCII string
specified by Buffer containing at most Width characters.
If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
- The total number of characters placed in Buffer is returned.
+ The number of ASCII characters in Buffer is returned not including the Null-terminator.
If the conversion contains more than Width characters, then only the first Width
characters are returned, and the total number of characters required to perform
the conversion is returned.
@@ -406,9 +438,9 @@ UnicodeValueToString (
ASCII string.
@param Flags The bitmask of flags that specify left justification, zero pad, and commas.
@param Value The 64-bit signed value to convert to a string.
- @param Width The maximum number of ASCII characters to place in Buffer.
+ @param Width The maximum number of ASCII characters to place in Buffer.
- @return Total number of characters required to perform the conversion.
+ @return The number of ASCII characters in Buffer not including the Null-terminator.
**/
UINTN