From: yshang1 Date: Fri, 25 Jul 2008 12:21:57 +0000 (+0000) Subject: Code Scrub for MdePkg. X-Git-Tag: edk2-stable201903~20649 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=42eedea958591087603bbacd1c2227d2494026af Code Scrub for MdePkg. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5567 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdePkg/Include/IndustryStandard/Acpi1_0.h b/MdePkg/Include/IndustryStandard/Acpi1_0.h index 553a0b2b8b..93a3f6beaa 100644 --- a/MdePkg/Include/IndustryStandard/Acpi1_0.h +++ b/MdePkg/Include/IndustryStandard/Acpi1_0.h @@ -1,5 +1,4 @@ -/** - @file +/** @file ACPI 1.0b definitions from the ACPI Specification, revision 1.0b Copyright (c) 2006 - 2007, Intel Corporation diff --git a/MdePkg/Include/IndustryStandard/Acpi2_0.h b/MdePkg/Include/IndustryStandard/Acpi2_0.h index 77c0284e09..3264b961e0 100644 --- a/MdePkg/Include/IndustryStandard/Acpi2_0.h +++ b/MdePkg/Include/IndustryStandard/Acpi2_0.h @@ -1,5 +1,4 @@ -/** - @file +/** @file ACPI 2.0 definitions from the ACPI Specification, revision 2.0 Copyright (c) 2006 - 2007, Intel Corporation diff --git a/MdePkg/Include/IndustryStandard/Acpi3_0.h b/MdePkg/Include/IndustryStandard/Acpi3_0.h index 04b79a47bf..3cdf3103be 100644 --- a/MdePkg/Include/IndustryStandard/Acpi3_0.h +++ b/MdePkg/Include/IndustryStandard/Acpi3_0.h @@ -1,5 +1,4 @@ -/** - @file +/** @file ACPI 3.0 definitions from the ACPI Specification Revision 3.0 September 2, 2004 Copyright (c) 2006 - 2008, Intel Corporation diff --git a/MdePkg/Include/IndustryStandard/AlertStandardFormatTable.h b/MdePkg/Include/IndustryStandard/AlertStandardFormatTable.h index 90cc10ca14..5a9e57660f 100644 --- a/MdePkg/Include/IndustryStandard/AlertStandardFormatTable.h +++ b/MdePkg/Include/IndustryStandard/AlertStandardFormatTable.h @@ -1,5 +1,4 @@ -/** - @file +/** @file ACPI Alert Standard Format Description Table ASF! as described in the ASF2.0 Specification Copyright (c) 2006 - 2007, Intel Corporation diff --git a/MdePkg/Include/IndustryStandard/Atapi.h b/MdePkg/Include/IndustryStandard/Atapi.h index ff6cc593bb..f73805664a 100644 --- a/MdePkg/Include/IndustryStandard/Atapi.h +++ b/MdePkg/Include/IndustryStandard/Atapi.h @@ -15,8 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -#ifndef _ATAPI_H -#define _ATAPI_H +#ifndef _ATAPI_H_ +#define _ATAPI_H_ #pragma pack(1) diff --git a/MdePkg/Include/IndustryStandard/HighPrecisionEventTimerTable.h b/MdePkg/Include/IndustryStandard/HighPrecisionEventTimerTable.h index af961c49a9..37dda9fb61 100644 --- a/MdePkg/Include/IndustryStandard/HighPrecisionEventTimerTable.h +++ b/MdePkg/Include/IndustryStandard/HighPrecisionEventTimerTable.h @@ -1,4 +1,4 @@ -/**@file +/** @file ACPI high precision event timer table definition, defined at ftp://download.intel.com/labs/platcomp/hpet/download/hpetspec098a.pdf. Specification name is IA-PC HPET (High Precision Event Timers) Specification. diff --git a/MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h b/MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h index ec31e6188c..934939fcd1 100644 --- a/MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h +++ b/MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h @@ -22,23 +22,23 @@ #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_REVISION 0x01 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_ALIGNMENT 8 -enum { +typedef enum { EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_RESERVED_STRUCTURE_ID = 0, EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_CONTROL_STRUCTURE_ID, EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_ID, EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_ID, EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_ID, EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_EXTERNSIONS_STRUCTURE_ID -}; +} EFI_ACPI_ISCSI_ID_DEFINITIONS; -enum { +typedef enum { IpPrefixOriginOther = 0, IpPrefixOriginManual, IpPrefixOriginWellKnown, IpPrefixOriginDhcp, IpPrefixOriginRouterAdvertisement, IpPrefixOriginUnchanged = 16 -}; +} IP_PREFIX_VALUE; #pragma pack(1) diff --git a/MdePkg/Include/IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h b/MdePkg/Include/IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h index d826b62b83..6539f19c25 100644 --- a/MdePkg/Include/IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h +++ b/MdePkg/Include/IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h @@ -1,4 +1,4 @@ -/**@file +/** @file ACPI memory mapped configuration space access table definition, defined at in the PCI Firmware Specification, version 3.0 draft version 0.5. Specification is available at http://www.pcisig.com. diff --git a/MdePkg/Include/IndustryStandard/Pci.h b/MdePkg/Include/IndustryStandard/Pci.h index 0551fbfb7f..65d93f6165 100644 --- a/MdePkg/Include/IndustryStandard/Pci.h +++ b/MdePkg/Include/IndustryStandard/Pci.h @@ -12,8 +12,8 @@ **/ -#ifndef _PCI_H -#define _PCI_H +#ifndef _PCI_H_ +#define _PCI_H_ #include diff --git a/MdePkg/Include/IndustryStandard/Pci22.h b/MdePkg/Include/IndustryStandard/Pci22.h index b1c66e824e..60fd98dfa6 100644 --- a/MdePkg/Include/IndustryStandard/Pci22.h +++ b/MdePkg/Include/IndustryStandard/Pci22.h @@ -12,8 +12,8 @@ **/ -#ifndef _PCI22_H -#define _PCI22_H +#ifndef _PCI22_H_ +#define _PCI22_H_ #define PCI_MAX_SEGMENT 0 diff --git a/MdePkg/Include/IndustryStandard/Pci23.h b/MdePkg/Include/IndustryStandard/Pci23.h index b0cb21b546..6ddd6970cd 100644 --- a/MdePkg/Include/IndustryStandard/Pci23.h +++ b/MdePkg/Include/IndustryStandard/Pci23.h @@ -12,8 +12,8 @@ **/ -#ifndef _PCI23_H -#define _PCI23_H +#ifndef _PCI23_H_ +#define _PCI23_H_ #define PCI_EXP_MAX_CONFIG_OFFSET 0x1000 diff --git a/MdePkg/Include/IndustryStandard/SdramSpd.h b/MdePkg/Include/IndustryStandard/SdramSpd.h index 59302ee7da..864b465d0e 100644 --- a/MdePkg/Include/IndustryStandard/SdramSpd.h +++ b/MdePkg/Include/IndustryStandard/SdramSpd.h @@ -1,4 +1,4 @@ -/**@file +/** @file This file contains definitions for the SPD fields on an SDRAM. Copyright (c) 2007, Intel Corporation @@ -11,8 +11,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -#ifndef _SDRAM_SPD_H -#define _SDRAM_SPD_H +#ifndef _SDRAM_SPD_H_ +#define _SDRAM_SPD_H_ // // SDRAM SPD field definitions diff --git a/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h b/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h index 381bb8f7a6..ab0bf9d731 100644 --- a/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h +++ b/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h @@ -1,4 +1,4 @@ -/**@file +/** @file ACPI Serial Port Console Redirection Table as defined by Microsoft in http://www.microsoft.com/whdc/system/platform/server/spcr.mspx diff --git a/MdePkg/Include/IndustryStandard/Tpm12.h b/MdePkg/Include/IndustryStandard/Tpm12.h index 613ee61902..ddf10d2266 100644 --- a/MdePkg/Include/IndustryStandard/Tpm12.h +++ b/MdePkg/Include/IndustryStandard/Tpm12.h @@ -1,5 +1,4 @@ -/** - @file +/** @file TPM Specification data structures (TCG TPM Specification Version 1.2 Revision 94) See http://trustedcomputinggroup.org for latest specification updates diff --git a/MdePkg/Include/IndustryStandard/Usb.h b/MdePkg/Include/IndustryStandard/Usb.h index f64d96c87c..01913d3b8b 100644 --- a/MdePkg/Include/IndustryStandard/Usb.h +++ b/MdePkg/Include/IndustryStandard/Usb.h @@ -129,7 +129,7 @@ typedef struct { #pragma pack() -enum { +typedef enum { // // USB request type // @@ -191,7 +191,7 @@ enum { //Use 200 ms to increase the error handling response time // EFI_USB_INTERRUPT_DELAY = 2000000 -}; +} USB_TYPES_DEFINITION; // diff --git a/MdePkg/Include/IndustryStandard/WatchdogActionTable.h b/MdePkg/Include/IndustryStandard/WatchdogActionTable.h index e429c9a69e..67dabc4379 100644 --- a/MdePkg/Include/IndustryStandard/WatchdogActionTable.h +++ b/MdePkg/Include/IndustryStandard/WatchdogActionTable.h @@ -1,5 +1,4 @@ -/** - @file +/** @file ACPI Watchdog Action Table as defined at Microsoft Hardware Watchdog Timer Specification. diff --git a/MdePkg/Include/IndustryStandard/WatchdogResourceTable.h b/MdePkg/Include/IndustryStandard/WatchdogResourceTable.h index 5afe1a4bb7..2e416dfbb2 100644 --- a/MdePkg/Include/IndustryStandard/WatchdogResourceTable.h +++ b/MdePkg/Include/IndustryStandard/WatchdogResourceTable.h @@ -1,5 +1,4 @@ -/** - @file +/** @file ACPI Watchdog Resource Table as defined at Microsoft Hardware Watchdog Timer Specification. diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h index 95e1b6d314..83bdc3a168 100644 --- a/MdePkg/Include/Library/BaseLib.h +++ b/MdePkg/Include/Library/BaseLib.h @@ -3675,6 +3675,8 @@ CpuPause ( function. @param NewStack A pointer to the new stack to use for the EntryPoint function. + @param ... Extended parameters. + **/ VOID @@ -4930,9 +4932,9 @@ AsmSwitchStackAndBackingStore ( @param PalEntryPoint The entry point address of PAL. The address in ar.kr5 would be used if this parameter were NULL on input. @param Arg1 The first argument of a PAL call. - @param Arg1 The second argument of a PAL call. - @param Arg1 The third argument of a PAL call. - @param Arg1 The fourth argument of a PAL call. + @param Arg2 The second argument of a PAL call. + @param Arg3 The third argument of a PAL call. + @param Arg4 The fourth argument of a PAL call. @return The values returned in r8, r9, r10 and r11. @@ -7061,7 +7063,7 @@ AsmDisablePaging32 ( If EntryPoint is 0, then ASSERT(). If NewStack is 0, then ASSERT(). - @param Cs The 16-bit selector to load in the CS before EntryPoint + @param CodeSelector The 16-bit selector to load in the CS before EntryPoint is called. The descriptor in the GDT that this selector references must be setup for long mode. @param EntryPoint The 64-bit virtual address of the function to call with @@ -7102,7 +7104,7 @@ AsmEnablePaging64 ( If EntryPoint is 0, then ASSERT(). If NewStack is 0, then ASSERT(). - @param Cs The 16-bit selector to load in the CS before EntryPoint + @param CodeSelector The 16-bit selector to load in the CS before EntryPoint is called. The descriptor in the GDT that this selector references must be setup for 32-bit protected mode. @param EntryPoint The 64-bit virtual address of the function to call with diff --git a/MdePkg/Include/Library/DxePiLib.h b/MdePkg/Include/Library/DxePiLib.h index 3a86d52b3c..16ede8147e 100644 --- a/MdePkg/Include/Library/DxePiLib.h +++ b/MdePkg/Include/Library/DxePiLib.h @@ -139,13 +139,11 @@ PiLibGetSectionFromCurrentFv ( The data and size is returned by Buffer and Size. The caller is responsible to free the Buffer allocated by this function. This function can only be called at TPL_NOTIFY and below. - If FvHandle is NULL and WithinImage is TRUE, then ASSERT (); - If NameGuid is NULL, then ASSERT(); If Buffer is NULL, then ASSERT(); If Size is NULL, then ASSERT(). - @param NameGuid The GUID name of a Firmware File. @param SectionType The Firmware Section type. + @param Instance Instance number of a section. @param Buffer On output, Buffer contains the the data read from the section in the Firmware File found. @param Size On output, the size of Buffer. diff --git a/MdePkg/Include/Library/GraphicsLib.h b/MdePkg/Include/Library/GraphicsLib.h index 31a391bd7e..0c2812be2f 100644 --- a/MdePkg/Include/Library/GraphicsLib.h +++ b/MdePkg/Include/Library/GraphicsLib.h @@ -79,8 +79,8 @@ GetGraphicsBitMapFromFVEx ( @param[in] BmpImage Pointer to BMP file @param[in] BmpImageSize Number of bytes in BmpImage - @param[in,out] UgaBlt Buffer containing UGA version of BmpImage. - @param[in,out] UgaBltSize Size of UgaBlt in bytes. + @param[in out] UgaBlt Buffer containing UGA version of BmpImage. + @param[in out] UgaBltSize Size of UgaBlt in bytes. @param[out] PixelHeight Height of UgaBlt/BmpImage in pixels @param[out] PixelWidth Width of UgaBlt/BmpImage in pixels diff --git a/MdePkg/Include/Library/PciSegmentLib.h b/MdePkg/Include/Library/PciSegmentLib.h index 57f4c10a34..e0b16c20c0 100644 --- a/MdePkg/Include/Library/PciSegmentLib.h +++ b/MdePkg/Include/Library/PciSegmentLib.h @@ -142,7 +142,7 @@ PciSegmentAnd8 ( If any reserved bits in Address are set, then ASSERT(). @param Address Address that encodes the PCI Segment, Bus, Device, Function, and Register. - @param Andata The value to AND with the PCI configuration register. + @param AndData The value to AND with the PCI configuration register. @param OrData The value to OR with the PCI configuration register. @return The value written to the PCI configuration register. @@ -416,7 +416,7 @@ PciSegmentAnd16 ( If any reserved bits in Address are set, then ASSERT(). @param Address Address that encodes the PCI Segment, Bus, Device, Function, and Register. - @param Andata The value to AND with the PCI configuration register. + @param AndData The value to AND with the PCI configuration register. @param OrData The value to OR with the PCI configuration register. @return The value written to the PCI configuration register. diff --git a/MdePkg/Include/Library/PeiPiLib.h b/MdePkg/Include/Library/PeiPiLib.h index 5603689d88..341ae81aae 100644 --- a/MdePkg/Include/Library/PeiPiLib.h +++ b/MdePkg/Include/Library/PeiPiLib.h @@ -36,8 +36,7 @@ from a firmware file, these should be NULL - **/ - +**/ VOID EFIAPI PiLibInstallFvInfoPpi ( diff --git a/MdePkg/Include/Library/ScsiLib.h b/MdePkg/Include/Library/ScsiLib.h index 13a4bb3634..2087d82ad3 100644 --- a/MdePkg/Include/Library/ScsiLib.h +++ b/MdePkg/Include/Library/ScsiLib.h @@ -12,8 +12,8 @@ **/ -#ifndef _SCSI_LIB_H -#define _SCSI_LIB_H +#ifndef _SCSI_LIB_H_ +#define _SCSI_LIB_H_ #include @@ -29,7 +29,7 @@ // since the value output by this macro is in 100ns unit, // not 1us unit (1us = 1000ns) // -#define EfiScsiStallSeconds(a) (a) * EFI_SCSI_STALL_1_SECOND +#define EfiScsiStallSeconds(a) ((a) * EFI_SCSI_STALL_1_SECOND) /** @@ -77,12 +77,12 @@ ScsiTestUnitReadyCommand ( @param[in] ScsiIo SCSI IO Protocol to use @param[in] Timeout The length of timeout period. - @param[out] SenseData A pointer to output sense data. - @param[in,out] SenseDataLength The length of output sense data. + @param[in] SenseData A pointer to output sense data. + @param[in out] SenseDataLength The length of output sense data. @param[out] HostAdapterStatus The status of Host Adapter. @param[out] TargetStatus The status of the target. - @param[in,out] InquirydataBuffer A pointer to inquiry data buffer. - @param[in,out] InquiryDataLength The length of inquiry data buffer. + @param[in out] InquirydataBuffer A pointer to inquiry data buffer. + @param[in out] InquiryDataLength The length of inquiry data buffer. @param[in] EnableVitalProductData Boolean to enable Vital Product Data. @retval EFI_SUCCESS The status of the unit is tested successfully. @@ -123,12 +123,12 @@ ScsiInquiryCommand ( @param[in] ScsiIo A pointer to SCSI IO protocol. @param[in] Timeout The length of timeout period. - @param[out] SenseData A pointer to output sense data. - @param[in,out] SenseDataLength The length of output sense data. + @param[in] SenseData A pointer to output sense data. + @param[in out] SenseDataLength The length of output sense data. @param[out] HostAdapterStatus The status of Host Adapter. @param[out] TargetStatus The status of the target. @param[in] DataBuffer A pointer to input data buffer. - @param[in,out] DataLength The length of input data buffer. + @param[in out] DataLength The length of input data buffer. @param[in] DBDField The DBD Field (Optional). @param[in] PageControl Page Control. @param[in] PageCode Page code. @@ -180,8 +180,8 @@ ScsiModeSense10Command ( @param[in] ScsiIo SCSI IO Protocol to use @param[in] Timeout TODO: - @param[out] SenseData TODO: - @param[in,out] SenseDataLength TODO: + @param[in] SenseData TODO: + @param[in out] SenseDataLength TODO: @param[out] HostAdapterStatus TODO: @param[out] TargetStatus TODO: @@ -221,12 +221,12 @@ ScsiRequestSenseCommand ( @param[in] ScsiIo A pointer to SCSI IO protocol. @param[in] Timeout The length of timeout period. - @param[out] SenseData A pointer to output sense data. - @param[in,out] SenseDataLength The length of output sense data. + @param[in] SenseData A pointer to output sense data. + @param[in out] SenseDataLength The length of output sense data. @param[out] HostAdapterStatus The status of Host Adapter. @param[out] TargetStatus The status of the target. @param[out] DataBuffer A pointer to a data buffer. - @param[in,out] DataLength The length of data buffer. + @param[in out] DataLength The length of data buffer. @param[in] PMI Partial medium indicator. @retval EFI_SUCCESS The status of the unit is tested successfully. @@ -267,12 +267,12 @@ ScsiReadCapacityCommand ( @param[in] ScsiIo A pointer to SCSI IO protocol. @param[in] Timeout The length of timeout period. - @param[out] SenseData A pointer to output sense data. - @param[in,out] SenseDataLength The length of output sense data. + @param[in] SenseData A pointer to output sense data. + @param[in out] SenseDataLength The length of output sense data. @param[out] HostAdapterStatus The status of Host Adapter. @param[out] TargetStatus The status of the target. @param[out] DataBuffer Read 10 command data. - @param[in,out] DataLength The length of data buffer. + @param[in out] DataLength The length of data buffer. @param[in] StartLba The start address of LBA. @param[in] SectorSize The sector size. @@ -315,12 +315,12 @@ ScsiRead10Command ( @param[in] ScsiIo SCSI IO Protocol to use @param[in] Timeout The length of timeout period. - @param[out] SenseData A pointer to output sense data. - @param[in,out] SenseDataLength The length of output sense data. + @param[in] SenseData A pointer to output sense data. + @param[in out] SenseDataLength The length of output sense data. @param[out] HostAdapterStatus The status of Host Adapter. @param[out] TargetStatus The status of the target. @param[out] DataBuffer A pointer to a data buffer. - @param[in,out] DataLength The length of data buffer. + @param[in out] DataLength The length of data buffer. @param[in] StartLba The start address of LBA. @param[in] SectorSize The sector size. diff --git a/MdePkg/Include/Library/UefiApplicationEntryPoint.h b/MdePkg/Include/Library/UefiApplicationEntryPoint.h index 8ab07d9653..b1067acf72 100644 --- a/MdePkg/Include/Library/UefiApplicationEntryPoint.h +++ b/MdePkg/Include/Library/UefiApplicationEntryPoint.h @@ -113,7 +113,6 @@ ProcessLibraryDestructorList ( the user. **/ - EFI_STATUS EFIAPI ProcessModuleEntryPointList ( diff --git a/MdePkg/Include/Library/UefiDriverEntryPoint.h b/MdePkg/Include/Library/UefiDriverEntryPoint.h index 6269876738..6908830f13 100644 --- a/MdePkg/Include/Library/UefiDriverEntryPoint.h +++ b/MdePkg/Include/Library/UefiDriverEntryPoint.h @@ -129,6 +129,15 @@ ProcessLibraryDestructorList ( **/ +/** + Call the list of driver entry points. Automatics Generated by tool. + + @param ImageHandle ImageHandle of the loaded driver. + @param SystemTable Pointer to the EFI System Table. + + @return Status returned by entry points of drivers. + +**/ EFI_STATUS EFIAPI ProcessModuleEntryPointList ( diff --git a/MdePkg/Include/Library/UefiRuntimeLib.h b/MdePkg/Include/Library/UefiRuntimeLib.h index 99b4110215..f4b63f4b90 100644 --- a/MdePkg/Include/Library/UefiRuntimeLib.h +++ b/MdePkg/Include/Library/UefiRuntimeLib.h @@ -355,7 +355,7 @@ EfiUpdateCapsule ( stored in contiguous virtual memory. @param CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in CaspuleHeaderArray. - @param MaxiumCapsuleSize On output the maximum size that UpdateCapsule() can + @param MaximumCapsuleSize On output the maximum size that UpdateCapsule() can support as an argument to UpdateCapsule() via CapsuleHeaderArray and ScatterGatherList. Undefined on input. @@ -411,7 +411,7 @@ EfiQueryCapsuleCapabilities ( EFI_STATUS EFIAPI EfiQueryVariableInfo ( - IN UINT32 Attrubutes, + IN UINT32 Attributes, OUT UINT64 *MaximumVariableStorageSize, OUT UINT64 *RemainingVariableStorageSize, OUT UINT64 *MaximumVariableSize diff --git a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicInternal.h b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicInternal.h index 4a29835ea3..1a30d26fc4 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicInternal.h +++ b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicInternal.h @@ -1,4 +1,4 @@ -/**@file +/** @file Common header file shared by all source files. This file includes package header files, dependent library classes. diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibIpf.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLibIpf.c index 8eec29551f..bcd376aa63 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/IoLibIpf.c +++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibIpf.c @@ -147,7 +147,7 @@ IoRead64 ( operations are serialized. @param Port The I/O port to write. - @param Value The value to write to the I/O port. + @param Data The value to write to the I/O port. @return The value written to the I/O port. It equals to the input Value instead of the actual value read back from @@ -172,7 +172,7 @@ IoWrite8 ( operations are serialized. @param Port The I/O port to write. - @param Value The value to write to the I/O port. + @param Data The value to write to the I/O port. @return The value written to the I/O port. It equals to the input Value instead of the actual value read back from @@ -197,7 +197,7 @@ IoWrite16 ( operations are serialized. @param Port The I/O port to write. - @param Value The value to write to the I/O port. + @param Data The value to write to the I/O port. @return The value written to the I/O port. It equals to the input Value instead of the actual value read back from diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibMmioBuffer.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLibMmioBuffer.c index 20c4693f3a..4a54837413 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/IoLibMmioBuffer.c +++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibMmioBuffer.c @@ -47,7 +47,7 @@ MmioReadBuffer8 ( ReturnBuffer = Buffer; - while (Length--) { + while (Length-- != 0) { *(Buffer++) = MmioRead8 (StartAddress++); } @@ -96,7 +96,7 @@ MmioReadBuffer16 ( ReturnBuffer = Buffer; - while (Length) { + while (Length != 0) { *(Buffer++) = MmioRead16 (StartAddress); StartAddress += sizeof (UINT16); Length -= sizeof (UINT16); @@ -147,7 +147,7 @@ MmioReadBuffer32 ( ReturnBuffer = Buffer; - while (Length) { + while (Length != 0) { *(Buffer++) = MmioRead32 (StartAddress); StartAddress += sizeof (UINT32); Length -= sizeof (UINT32); @@ -198,7 +198,7 @@ MmioReadBuffer64 ( ReturnBuffer = Buffer; - while (Length) { + while (Length != 0) { *(Buffer++) = MmioRead64 (StartAddress); StartAddress += sizeof (UINT64); Length -= sizeof (UINT64); @@ -241,7 +241,7 @@ MmioWriteBuffer8 ( ReturnBuffer = (UINT8 *) Buffer; - while (Length--) { + while (Length-- != 0) { MmioWrite8 (StartAddress++, *(Buffer++)); } @@ -292,7 +292,7 @@ MmioWriteBuffer16 ( ReturnBuffer = (UINT16 *) Buffer; - while (Length) { + while (Length != 0) { MmioWrite16 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT16); @@ -346,7 +346,7 @@ MmioWriteBuffer32 ( ReturnBuffer = (UINT32 *) Buffer; - while (Length) { + while (Length != 0) { MmioWrite32 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT32); @@ -399,7 +399,7 @@ MmioWriteBuffer64 ( ReturnBuffer = (UINT64 *) Buffer; - while (Length) { + while (Length != 0) { MmioWrite64 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT64); diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c index 1e903a7e25..43c3b79eee 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c +++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c @@ -26,8 +26,9 @@ #include "BaseIoLibIntrinsicInternal.h" // -// Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics +// Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. // + int _inp (unsigned short port); unsigned short _inpw (unsigned short port); unsigned long _inpd (unsigned short port); diff --git a/MdePkg/Library/BaseLib/BaseLibInternals.h b/MdePkg/Library/BaseLib/BaseLibInternals.h index 04f622b79a..984c0cdfc3 100644 --- a/MdePkg/Library/BaseLib/BaseLibInternals.h +++ b/MdePkg/Library/BaseLib/BaseLibInternals.h @@ -265,7 +265,7 @@ EFIAPI InternalMathDivRemU64x32 ( IN UINT64 Dividend, IN UINT32 Divisor, - OUT UINT32 *Remainder + OUT UINT32 *Remainder OPTIONAL ); /** @@ -290,7 +290,7 @@ EFIAPI InternalMathDivRemU64x64 ( IN UINT64 Dividend, IN UINT64 Divisor, - OUT UINT64 *Remainder + OUT UINT64 *Remainder OPTIONAL ); /** diff --git a/MdePkg/Library/BaseLib/ChkStkGcc.c b/MdePkg/Library/BaseLib/ChkStkGcc.c index f6ae9b03db..f86d53919a 100644 --- a/MdePkg/Library/BaseLib/ChkStkGcc.c +++ b/MdePkg/Library/BaseLib/ChkStkGcc.c @@ -18,7 +18,11 @@ #include "BaseLibInternals.h" - -VOID __chkstk() { +/** + Hack function for passing GCC build. +**/ +VOID +__chkstk() +{ } diff --git a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.c b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.c index fb5f4282bb..dab93257ee 100644 --- a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.c +++ b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.c @@ -17,6 +17,19 @@ // +/** + Shifts a 64-bit integer right between 0 and 63 bits. The high bits + are filled with original integer's bit 63. The shifted value is returned. + + This function shifts the 64-bit value Operand to the right by Count bits. The + high Count bits are set to bit 63 of Operand. The shifted value is returned. + + @param Operand The 64-bit operand to shift right. + @param Count The number of bits to shift right. + + @return Operand arithmetically shifted right by Count + +**/ UINT64 EFIAPI InternalMathARShiftU64 ( diff --git a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c index 35d0fc9c23..d4fce47c00 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c +++ b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c @@ -17,13 +17,20 @@ // -// -// Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics -// +/** + Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. +**/ void __debugbreak (); #pragma intrinsic(__debugbreak) +/** + Generates a breakpoint on the CPU. + + Generates a breakpoint on the CPU. The breakpoint must be implemented such + that code can resume normal execution after the breakpoint. + +**/ VOID EFIAPI CpuBreakpoint ( diff --git a/MdePkg/Library/BaseLib/Ia32/CpuId.c b/MdePkg/Library/BaseLib/Ia32/CpuId.c index 73f12bcaee..6fbc5375bc 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuId.c +++ b/MdePkg/Library/BaseLib/Ia32/CpuId.c @@ -17,6 +17,31 @@ // +/** + Retrieves CPUID information. + + Executes the CPUID instruction with EAX set to the value specified by Index. + This function always returns Index. + If Eax is not NULL, then the value of EAX after CPUID is returned in Eax. + If Ebx is not NULL, then the value of EBX after CPUID is returned in Ebx. + If Ecx is not NULL, then the value of ECX after CPUID is returned in Ecx. + If Edx is not NULL, then the value of EDX after CPUID is returned in Edx. + This function is only available on IA-32 and X64. + + @param Index The 32-bit value to load into EAX prior to invoking the CPUID + instruction. + @param Eax Pointer to the 32-bit EAX value returned by the CPUID + instruction. This is an optional parameter that may be NULL. + @param Ebx Pointer to the 32-bit EBX value returned by the CPUID + instruction. This is an optional parameter that may be NULL. + @param Ecx Pointer to the 32-bit ECX value returned by the CPUID + instruction. This is an optional parameter that may be NULL. + @param Edx Pointer to the 32-bit EDX value returned by the CPUID + instruction. This is an optional parameter that may be NULL. + + @return Index + +**/ UINT32 EFIAPI AsmCpuid ( diff --git a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.c b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.c index 2c1eca670e..c685e5ec4e 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.c +++ b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.c @@ -17,6 +17,38 @@ // +/** + Retrieves CPUID information using an extended leaf identifier. + + Executes the CPUID instruction with EAX set to the value specified by Index + and ECX set to the value specified by SubIndex. This function always returns + Index. This function is only available on IA-32 and x64. + + If Eax is not NULL, then the value of EAX after CPUID is returned in Eax. + If Ebx is not NULL, then the value of EBX after CPUID is returned in Ebx. + If Ecx is not NULL, then the value of ECX after CPUID is returned in Ecx. + If Edx is not NULL, then the value of EDX after CPUID is returned in Edx. + + @param Index The 32-bit value to load into EAX prior to invoking the + CPUID instruction. + @param SubIndex The 32-bit value to load into ECX prior to invoking the + CPUID instruction. + @param Eax Pointer to the 32-bit EAX value returned by the CPUID + instruction. This is an optional parameter that may be + NULL. + @param Ebx Pointer to the 32-bit EBX value returned by the CPUID + instruction. This is an optional parameter that may be + NULL. + @param Ecx Pointer to the 32-bit ECX value returned by the CPUID + instruction. This is an optional parameter that may be + NULL. + @param Edx Pointer to the 32-bit EDX value returned by the CPUID + instruction. This is an optional parameter that may be + NULL. + + @return Index + +**/ UINT32 EFIAPI AsmCpuidEx ( diff --git a/MdePkg/Library/BaseLib/Ia32/CpuPause.c b/MdePkg/Library/BaseLib/Ia32/CpuPause.c index ee7c96736b..138e3a3a09 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuPause.c +++ b/MdePkg/Library/BaseLib/Ia32/CpuPause.c @@ -17,6 +17,13 @@ // +/** + Requests CPU to pause for a short period of time. + + Requests CPU to pause for a short period of time. Typically used in MP + systems to prevent memory starvation while waiting for a spin lock. + +**/ VOID EFIAPI CpuPause ( diff --git a/MdePkg/Library/BaseLib/Ia32/CpuSleep.c b/MdePkg/Library/BaseLib/Ia32/CpuSleep.c index 690f9b3598..8861e3369d 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuSleep.c +++ b/MdePkg/Library/BaseLib/Ia32/CpuSleep.c @@ -17,6 +17,14 @@ // +/** + Places the CPU in a sleep state until an interrupt is received. + + Places the CPU in a sleep state until an interrupt is received. If interrupts + are disabled prior to calling this function, then the CPU will be placed in a + sleep state indefinitely. + +**/ VOID EFIAPI CpuSleep ( diff --git a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c index 60c1169a57..b9e31c66c3 100644 --- a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c +++ b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c @@ -17,6 +17,10 @@ // +/** + Disables CPU interrupts. + +**/ VOID EFIAPI DisableInterrupts ( diff --git a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.c b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.c index d462c01ff3..1ab21224ca 100644 --- a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.c +++ b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.c @@ -19,6 +19,36 @@ #if _MSC_EXTENSIONS +/** + Disables the 32-bit paging mode on the CPU. + + Disables the 32-bit paging mode on the CPU and returns to 32-bit protected + mode. This function assumes the current execution mode is 32-paged protected + mode. This function is only available on IA-32. After the 32-bit paging mode + is disabled, control is transferred to the function specified by EntryPoint + using the new stack specified by NewStack and passing in the parameters + specified by Context1 and Context2. Context1 and Context2 are optional and + may be NULL. The function EntryPoint must never return. + + There are a number of constraints that must be followed before calling this + function: + 1) Interrupts must be disabled. + 2) The caller must be in 32-bit paged mode. + 3) CR0, CR3, and CR4 must be compatible with 32-bit paged mode. + 4) CR3 must point to valid page tables that guarantee that the pages for + this function and the stack are identity mapped. + + @param EntryPoint A pointer to function to call with the new stack after + paging is disabled. + @param Context1 A pointer to the context to pass into the EntryPoint + function as the first parameter after paging is disabled. + @param Context2 A pointer to the context to pass into the EntryPoint + function as the second parameter after paging is + disabled. + @param NewStack A pointer to the new stack to use for the EntryPoint + function after paging is disabled. + +**/ __declspec (naked) VOID EFIAPI diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32.c b/MdePkg/Library/BaseLib/Ia32/DivU64x32.c index 0ec3c6319b..92eb9e115b 100644 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x32.c +++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32.c @@ -17,6 +17,20 @@ // +/** + Divides a 64-bit unsigned integer by a 32-bit unsigned integer and + generates a 64-bit unsigned result. + + This function divides the 64-bit unsigned value Dividend by the 32-bit + unsigned value Divisor and generates a 64-bit unsigned quotient. This + function returns the 64-bit unsigned quotient. + + @param Dividend A 64-bit unsigned value. + @param Divisor A 32-bit unsigned value. + + @return Dividend / Divisor + +**/ UINT64 EFIAPI InternalMathDivU64x32 ( diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c index 54da1e9ab0..4127004da5 100644 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c +++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c @@ -17,6 +17,23 @@ // +/** + Divides a 64-bit unsigned integer by a 32-bit unsigned integer and + generates a 64-bit unsigned result and an optional 32-bit unsigned remainder. + + This function divides the 64-bit unsigned value Dividend by the 32-bit + unsigned value Divisor and generates a 64-bit unsigned quotient. If Remainder + is not NULL, then the 32-bit unsigned remainder is returned in Remainder. + This function returns the 64-bit unsigned quotient. + + @param Dividend A 64-bit unsigned value. + @param Divisor A 32-bit unsigned value. + @param Remainder A pointer to a 32-bit unsigned value. This parameter is + optional and may be NULL. + + @return Dividend / Divisor + +**/ UINT64 EFIAPI InternalMathDivRemU64x32 ( diff --git a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c index 39118728f0..6e0d3fbdde 100644 --- a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c +++ b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c @@ -17,6 +17,11 @@ // +/** + Enables CPU interrupts for the smallest window required to capture any + pending interrupts. + +**/ VOID EFIAPI EnableDisableInterrupts ( diff --git a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c index cb4ee2e3ad..7f50bb769e 100644 --- a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c +++ b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c @@ -17,6 +17,10 @@ // +/** + Enables CPU interrupts. + +**/ VOID EFIAPI EnableInterrupts ( diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.c b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.c index 3cb290c516..87e31cac83 100644 --- a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.c +++ b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.c @@ -19,6 +19,39 @@ #if _MSC_EXTENSIONS +/** + Enables the 32-bit paging mode on the CPU. + + Enables the 32-bit paging mode on the CPU. CR0, CR3, CR4, and the page tables + must be properly initialized prior to calling this service. This function + assumes the current execution mode is 32-bit protected mode. This function is + only available on IA-32. After the 32-bit paging mode is enabled, control is + transferred to the function specified by EntryPoint using the new stack + specified by NewStack and passing in the parameters specified by Context1 and + Context2. Context1 and Context2 are optional and may be NULL. The function + EntryPoint must never return. + + There are a number of constraints that must be followed before calling this + function: + 1) Interrupts must be disabled. + 2) The caller must be in 32-bit protected mode with flat descriptors. This + means all descriptors must have a base of 0 and a limit of 4GB. + 3) CR0 and CR4 must be compatible with 32-bit protected mode with flat + descriptors. + 4) CR3 must point to valid page tables that will be used once the transition + is complete, and those page tables must guarantee that the pages for this + function and the stack are identity mapped. + + @param EntryPoint A pointer to function to call with the new stack after + paging is enabled. + @param Context1 A pointer to the context to pass into the EntryPoint + function as the first parameter after paging is enabled. + @param Context2 A pointer to the context to pass into the EntryPoint + function as the second parameter after paging is enabled. + @param NewStack A pointer to the new stack to use for the EntryPoint + function after paging is enabled. + +**/ __declspec (naked) VOID EFIAPI diff --git a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c index 1c7cc0f33f..d6fa2d39e4 100644 --- a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c +++ b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c @@ -17,6 +17,21 @@ // +/** + Flushes a cache line from all the instruction and data caches within the + coherency domain of the CPU. + + Flushed the cache line specified by LinearAddress, and returns LinearAddress. + This function is only available on IA-32 and X64. + + @param LinearAddress The address of the cache line to flush. If the CPU is + in a physical addressing mode, then LinearAddress is a + physical address. If the CPU is in a virtual + addressing mode, then LinearAddress is a virtual + address. + + @return LinearAddress +**/ VOID * EFIAPI AsmFlushCacheLine ( diff --git a/MdePkg/Library/BaseLib/Ia32/FxRestore.c b/MdePkg/Library/BaseLib/Ia32/FxRestore.c index 1314da4194..f5e1966e4a 100644 --- a/MdePkg/Library/BaseLib/Ia32/FxRestore.c +++ b/MdePkg/Library/BaseLib/Ia32/FxRestore.c @@ -18,6 +18,16 @@ #include +/** + Restores the current floating point/SSE/SSE2 context from a buffer. + + Restores the current floating point/SSE/SSE2 state from the buffer specified + by Buffer. Buffer must be aligned on a 16-byte boundary. This function is + only available on IA-32 and X64. + + @param Buffer Pointer to a buffer to save the floating point/SSE/SSE2 context. + +**/ VOID EFIAPI InternalX86FxRestore ( diff --git a/MdePkg/Library/BaseLib/Ia32/FxSave.c b/MdePkg/Library/BaseLib/Ia32/FxSave.c index 44aaee0090..a57312d42d 100644 --- a/MdePkg/Library/BaseLib/Ia32/FxSave.c +++ b/MdePkg/Library/BaseLib/Ia32/FxSave.c @@ -18,6 +18,16 @@ #include +/** + Save the current floating point/SSE/SSE2 context to a buffer. + + Saves the current floating point/SSE/SSE2 state to the buffer specified by + Buffer. Buffer must be aligned on a 16-byte boundary. This function is only + available on IA-32 and X64. + + @param Buffer Pointer to a buffer to save the floating point/SSE/SSE2 context. + +**/ VOID EFIAPI InternalX86FxSave ( diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.c b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.c index ec60f97344..cbc8a57496 100644 --- a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.c +++ b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.c @@ -17,6 +17,23 @@ // +/** + Performs an atomic compare exchange operation on a 32-bit unsigned integer. + + Performs an atomic compare exchange operation on the 32-bit unsigned integer + specified by Value. If Value is equal to CompareValue, then Value is set to + ExchangeValue and CompareValue is returned. If Value is not equal to CompareValue, + then Value is returned. The compare exchange operation must be performed using + MP safe mechanisms. + + @param Value A pointer to the 32-bit value for the compare exchange + operation. + @param CompareValue 32-bit value used in compare operation. + @param ExchangeValue 32-bit value used in exchange operation. + + @return The original *Value before exchange. + +**/ UINT32 EFIAPI InternalSyncCompareExchange32 ( diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.c b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.c index 6bdbedad1f..5bbba48702 100644 --- a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.c +++ b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.c @@ -17,6 +17,22 @@ // +/** + Performs an atomic compare exchange operation on a 64-bit unsigned integer. + + Performs an atomic compare exchange operation on the 64-bit unsigned integer specified + by Value. If Value is equal to CompareValue, then Value is set to ExchangeValue and + CompareValue is returned. If Value is not equal to CompareValue, then Value is returned. + The compare exchange operation must be performed using MP safe mechanisms. + + @param Value A pointer to the 64-bit value for the compare exchange + operation. + @param CompareValue 64-bit value used in compare operation. + @param ExchangeValue 64-bit value used in exchange operation. + + @return The original *Value before exchange. + +**/ UINT64 EFIAPI InternalSyncCompareExchange64 ( diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.c b/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.c index c7ace7ad54..df6908ef27 100644 --- a/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.c +++ b/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.c @@ -17,6 +17,19 @@ // +/** + Performs an atomic decrement of an 32-bit unsigned integer. + + Performs an atomic decrement of the 32-bit unsigned integer specified by + Value and returns the decrement value. The decrement operation must be + performed using MP safe mechanisms. The state of the return value is not + guaranteed to be MP safe. + + @param Value A pointer to the 32-bit value to decrement. + + @return The decrement value. + +**/ UINT32 EFIAPI InternalSyncDecrement ( diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.c b/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.c index f34f4748eb..8bbd188651 100644 --- a/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.c +++ b/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.c @@ -17,6 +17,19 @@ // +/** + Performs an atomic increment of an 32-bit unsigned integer. + + Performs an atomic increment of the 32-bit unsigned integer specified by + Value and returns the incremented value. The increment operation must be + performed using MP safe mechanisms. The state of the return value is not + guaranteed to be MP safe. + + @param Value A pointer to the 32-bit value to increment. + + @return The incremented value. + +**/ UINT32 EFIAPI InternalSyncIncrement ( diff --git a/MdePkg/Library/BaseLib/Ia32/Invd.c b/MdePkg/Library/BaseLib/Ia32/Invd.c index 0206e6d44b..96de45514e 100644 --- a/MdePkg/Library/BaseLib/Ia32/Invd.c +++ b/MdePkg/Library/BaseLib/Ia32/Invd.c @@ -17,6 +17,13 @@ // +/** + Executes a INVD instruction. + + Executes a INVD instruction. This function is only available on IA-32 and + X64. + +**/ VOID EFIAPI AsmInvd ( diff --git a/MdePkg/Library/BaseLib/Ia32/LRotU64.c b/MdePkg/Library/BaseLib/Ia32/LRotU64.c index 9a5deea70d..ac7305105a 100644 --- a/MdePkg/Library/BaseLib/Ia32/LRotU64.c +++ b/MdePkg/Library/BaseLib/Ia32/LRotU64.c @@ -17,6 +17,20 @@ // +/** + Rotates a 64-bit integer left between 0 and 63 bits, filling + the low bits with the high bits that were rotated. + + This function rotates the 64-bit value Operand to the left by Count bits. The + low Count bits are fill with the high Count bits of Operand. The rotated + value is returned. + + @param Operand The 64-bit operand to rotate left. + @param Count The number of bits to rotate left. + + @return Operand <<< Count + +**/ UINT64 EFIAPI InternalMathLRotU64 ( diff --git a/MdePkg/Library/BaseLib/Ia32/LShiftU64.c b/MdePkg/Library/BaseLib/Ia32/LShiftU64.c index 4324bfb53b..f684e1f29a 100644 --- a/MdePkg/Library/BaseLib/Ia32/LShiftU64.c +++ b/MdePkg/Library/BaseLib/Ia32/LShiftU64.c @@ -17,6 +17,19 @@ // +/** + Shifts a 64-bit integer left between 0 and 63 bits. The low bits + are filled with zeros. The shifted value is returned. + + This function shifts the 64-bit value Operand to the left by Count bits. The + low Count bits are set to zero. The shifted value is returned. + + @param Operand The 64-bit operand to shift left. + @param Count The number of bits to shift left. + + @return Operand << Count + +**/ UINT64 EFIAPI InternalMathLShiftU64 ( diff --git a/MdePkg/Library/BaseLib/Ia32/LongJump.c b/MdePkg/Library/BaseLib/Ia32/LongJump.c index f0408b83fa..f4dbcfdf1a 100644 --- a/MdePkg/Library/BaseLib/Ia32/LongJump.c +++ b/MdePkg/Library/BaseLib/Ia32/LongJump.c @@ -18,6 +18,17 @@ #include +/** + Restores the CPU context that was saved with SetJump(). + + Restores the CPU context from the buffer specified by JumpBuffer. + This function never returns to the caller. + Instead is resumes execution based on the state of JumpBuffer. + + @param JumpBuffer A pointer to CPU context buffer. + @param Value The value to return when the SetJump() context is restored. + +**/ __declspec (naked) VOID EFIAPI diff --git a/MdePkg/Library/BaseLib/Ia32/ModU64x32.c b/MdePkg/Library/BaseLib/Ia32/ModU64x32.c index 59ed50433a..a2727ea6d4 100644 --- a/MdePkg/Library/BaseLib/Ia32/ModU64x32.c +++ b/MdePkg/Library/BaseLib/Ia32/ModU64x32.c @@ -17,6 +17,20 @@ // +/** + Divides a 64-bit unsigned integer by a 32-bit unsigned integer and + generates a 32-bit unsigned remainder. + + This function divides the 64-bit unsigned value Dividend by the 32-bit + unsigned value Divisor and generates a 32-bit remainder. This function + returns the 32-bit unsigned remainder. + + @param Dividend A 64-bit unsigned value. + @param Divisor A 32-bit unsigned value. + + @return Dividend % Divisor + +**/ UINT32 EFIAPI InternalMathModU64x32 ( diff --git a/MdePkg/Library/BaseLib/Ia32/Monitor.c b/MdePkg/Library/BaseLib/Ia32/Monitor.c index 469aa6d7fa..68da9c68c7 100644 --- a/MdePkg/Library/BaseLib/Ia32/Monitor.c +++ b/MdePkg/Library/BaseLib/Ia32/Monitor.c @@ -17,6 +17,22 @@ // +/** + Sets up a monitor buffer that is used by AsmMwait(). + + Executes a MONITOR instruction with the register state specified by Eax, Ecx + and Edx. Returns Eax. This function is only available on IA-32 and X64. + + @param Eax The value to load into EAX or RAX before executing the MONITOR + instruction. + @param Ecx The value to load into ECX or RCX before executing the MONITOR + instruction. + @param Edx The value to load into EDX or RDX before executing the MONITOR + instruction. + + @return Eax + +**/ UINTN EFIAPI AsmMonitor ( diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x32.c b/MdePkg/Library/BaseLib/Ia32/MultU64x32.c index db911cadb2..36e9227dd4 100644 --- a/MdePkg/Library/BaseLib/Ia32/MultU64x32.c +++ b/MdePkg/Library/BaseLib/Ia32/MultU64x32.c @@ -17,6 +17,20 @@ // +/** + Multiples a 64-bit unsigned integer by a 32-bit unsigned integer + and generates a 64-bit unsigned result. + + This function multiples the 64-bit unsigned value Multiplicand by the 32-bit + unsigned value Multiplier and generates a 64-bit unsigned result. This 64- + bit unsigned result is returned. + + @param Multiplicand A 64-bit unsigned value. + @param Multiplier A 32-bit unsigned value. + + @return Multiplicand * Multiplier + +**/ UINT64 EFIAPI InternalMathMultU64x32 ( diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x64.c b/MdePkg/Library/BaseLib/Ia32/MultU64x64.c index ddafff47ae..e2b7e6852f 100644 --- a/MdePkg/Library/BaseLib/Ia32/MultU64x64.c +++ b/MdePkg/Library/BaseLib/Ia32/MultU64x64.c @@ -17,6 +17,20 @@ // +/** + Multiples a 64-bit unsigned integer by a 64-bit unsigned integer + and generates a 64-bit unsigned result. + + This function multiples the 64-bit unsigned value Multiplicand by the 64-bit + unsigned value Multiplier and generates a 64-bit unsigned result. This 64- + bit unsigned result is returned. + + @param Multiplicand A 64-bit unsigned value. + @param Multiplier A 64-bit unsigned value. + + @return Multiplicand * Multiplier + +**/ UINT64 EFIAPI InternalMathMultU64x64 ( diff --git a/MdePkg/Library/BaseLib/Ia32/Mwait.c b/MdePkg/Library/BaseLib/Ia32/Mwait.c index 0629afe295..64fccddc68 100644 --- a/MdePkg/Library/BaseLib/Ia32/Mwait.c +++ b/MdePkg/Library/BaseLib/Ia32/Mwait.c @@ -17,6 +17,20 @@ // +/** + Executes an MWAIT instruction. + + Executes an MWAIT instruction with the register state specified by Eax and + Ecx. Returns Eax. This function is only available on IA-32 and X64. + + @param Eax The value to load into EAX or RAX before executing the MONITOR + instruction. + @param Ecx The value to load into ECX or RCX before executing the MONITOR + instruction. + + @return Eax + +**/ UINTN EFIAPI AsmMwait ( diff --git a/MdePkg/Library/BaseLib/Ia32/RRotU64.c b/MdePkg/Library/BaseLib/Ia32/RRotU64.c index 31274aac2c..59d42b19ef 100644 --- a/MdePkg/Library/BaseLib/Ia32/RRotU64.c +++ b/MdePkg/Library/BaseLib/Ia32/RRotU64.c @@ -17,6 +17,20 @@ // +/** + Rotates a 64-bit integer right between 0 and 63 bits, filling + the high bits with the high low bits that were rotated. + + This function rotates the 64-bit value Operand to the right by Count bits. + The high Count bits are fill with the low Count bits of Operand. The rotated + value is returned. + + @param Operand The 64-bit operand to rotate right. + @param Count The number of bits to rotate right. + + @return Operand >>> Count + +**/ UINT64 EFIAPI InternalMathRRotU64 ( diff --git a/MdePkg/Library/BaseLib/Ia32/RShiftU64.c b/MdePkg/Library/BaseLib/Ia32/RShiftU64.c index a6b957bacc..a4d1db9547 100644 --- a/MdePkg/Library/BaseLib/Ia32/RShiftU64.c +++ b/MdePkg/Library/BaseLib/Ia32/RShiftU64.c @@ -17,6 +17,19 @@ // +/** + Shifts a 64-bit integer right between 0 and 63 bits. This high bits + are filled with zeros. The shifted value is returned. + + This function shifts the 64-bit value Operand to the right by Count bits. The + high Count bits are set to zero. The shifted value is returned. + + @param Operand The 64-bit operand to shift right. + @param Count The number of bits to shift right. + + @return Operand >> Count + +**/ UINT64 EFIAPI InternalMathRShiftU64 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr0.c b/MdePkg/Library/BaseLib/Ia32/ReadCr0.c index 8c6ab3527f..5444aafb6a 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr0.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr0.c @@ -17,6 +17,16 @@ // +/** + Reads the current value of the Control Register 0 (CR0). + + Reads and returns the current value of CR4. This function is only available + on IA-32 and X64. This returns a 32-bit value on IA-32 and a 64-bit value on + X64. + + @return The value of the Control Register 0 (CR0). + +**/ UINTN EFIAPI AsmReadCr0 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr2.c b/MdePkg/Library/BaseLib/Ia32/ReadCr2.c index 1c682b3899..4e97814ee3 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr2.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr2.c @@ -17,6 +17,16 @@ // +/** + Reads the current value of the Control Register 2 (CR2). + + Reads and returns the current value of CR2. This function is only available + on IA-32 and X64. This returns a 32-bit value on IA-32 and a 64-bit value on + X64. + + @return The value of the Control Register 2 (CR2). + +**/ UINTN EFIAPI AsmReadCr2 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr3.c b/MdePkg/Library/BaseLib/Ia32/ReadCr3.c index 39ad5e4f2f..1f6afb39c0 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr3.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr3.c @@ -17,6 +17,16 @@ // +/** + Reads the current value of the Control Register 3 (CR3). + + Reads and returns the current value of CR3. This function is only available + on IA-32 and X64. This returns a 32-bit value on IA-32 and a 64-bit value on + X64. + + @return The value of the Control Register 3 (CR3). + +**/ UINTN EFIAPI AsmReadCr3 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr4.c b/MdePkg/Library/BaseLib/Ia32/ReadCr4.c index 71ffa9b72d..5d24f57038 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr4.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr4.c @@ -17,6 +17,16 @@ // +/** + Reads the current value of the Control Register 4 (CR4). + + Reads and returns the current value of CR4. This function is only available + on IA-32 and X64. This returns a 32-bit value on IA-32 and a 64-bit value on + X64. + + @return The value of the Control Register 4 (CR4). + +**/ UINTN EFIAPI AsmReadCr4 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCs.c b/MdePkg/Library/BaseLib/Ia32/ReadCs.c index cd9bad54e7..86c7257158 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadCs.c @@ -17,6 +17,15 @@ // +/** + Reads the current value of Code Segment Register (CS). + + Reads and returns the current value of CS. This function is only available on + IA-32 and X64. + + @return The current value of CS. + +**/ UINT16 EFIAPI AsmReadCs ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr0.c b/MdePkg/Library/BaseLib/Ia32/ReadDr0.c index 7c6f0c629a..23880a416e 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr0.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr0.c @@ -17,6 +17,16 @@ // +/** + Reads the current value of Debug Register 0 (DR0). + + Reads and returns the current value of DR0. This function is only available + on IA-32 and X64. This returns a 32-bit value on IA-32 and a 64-bit value on + X64. + + @return The value of Debug Register 0 (DR0). + +**/ UINTN EFIAPI AsmReadDr0 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr1.c b/MdePkg/Library/BaseLib/Ia32/ReadDr1.c index 573f658864..77a9adac66 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr1.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr1.c @@ -17,6 +17,16 @@ // +/** + Reads the current value of Debug Register 1 (DR1). + + Reads and returns the current value of DR1. This function is only available + on IA-32 and X64. This returns a 32-bit value on IA-32 and a 64-bit value on + X64. + + @return The value of Debug Register 1 (DR1). + +**/ UINTN EFIAPI AsmReadDr1 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr2.c b/MdePkg/Library/BaseLib/Ia32/ReadDr2.c index 6685d775f7..02ba6a8545 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr2.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr2.c @@ -17,6 +17,16 @@ // +/** + Reads the current value of Debug Register 2 (DR2). + + Reads and returns the current value of DR2. This function is only available + on IA-32 and X64. This returns a 32-bit value on IA-32 and a 64-bit value on + X64. + + @return The value of Debug Register 2 (DR2). + +**/ UINTN EFIAPI AsmReadDr2 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr3.c b/MdePkg/Library/BaseLib/Ia32/ReadDr3.c index e8a4bcc6bb..10d219943d 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr3.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr3.c @@ -17,6 +17,16 @@ // +/** + Reads the current value of Debug Register 3 (DR3). + + Reads and returns the current value of DR3. This function is only available + on IA-32 and X64. This returns a 32-bit value on IA-32 and a 64-bit value on + X64. + + @return The value of Debug Register 3 (DR3). + +**/ UINTN EFIAPI AsmReadDr3 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr4.c b/MdePkg/Library/BaseLib/Ia32/ReadDr4.c index 9ec23218d4..ff37daa58a 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr4.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr4.c @@ -17,6 +17,16 @@ // +/** + Reads the current value of Debug Register 4 (DR4). + + Reads and returns the current value of DR4. This function is only available + on IA-32 and X64. This returns a 32-bit value on IA-32 and a 64-bit value on + X64. + + @return The value of Debug Register 4 (DR4). + +**/ UINTN EFIAPI AsmReadDr4 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr5.c b/MdePkg/Library/BaseLib/Ia32/ReadDr5.c index 3470524b22..ca422e47a5 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr5.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr5.c @@ -17,6 +17,16 @@ // +/** + Reads the current value of Debug Register 5 (DR5). + + Reads and returns the current value of DR5. This function is only available + on IA-32 and X64. This returns a 32-bit value on IA-32 and a 64-bit value on + X64. + + @return The value of Debug Register 5 (DR5). + +**/ UINTN EFIAPI AsmReadDr5 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr6.c b/MdePkg/Library/BaseLib/Ia32/ReadDr6.c index debeecb24f..921ccc8a0b 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr6.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr6.c @@ -17,6 +17,16 @@ // +/** + Reads the current value of Debug Register 6 (DR6). + + Reads and returns the current value of DR6. This function is only available + on IA-32 and X64. This returns a 32-bit value on IA-32 and a 64-bit value on + X64. + + @return The value of Debug Register 6 (DR6). + +**/ UINTN EFIAPI AsmReadDr6 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr7.c b/MdePkg/Library/BaseLib/Ia32/ReadDr7.c index da7a120d70..cb15e1a706 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr7.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr7.c @@ -17,6 +17,16 @@ // +/** + Reads the current value of Debug Register 7 (DR7). + + Reads and returns the current value of DR7. This function is only available + on IA-32 and X64. This returns a 32-bit value on IA-32 and a 64-bit value on + X64. + + @return The value of Debug Register 7 (DR7). + +**/ UINTN EFIAPI AsmReadDr7 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDs.c b/MdePkg/Library/BaseLib/Ia32/ReadDs.c index 91294896e0..e80b394826 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDs.c @@ -17,6 +17,15 @@ // +/** + Reads the current value of Data Segment Register (DS). + + Reads and returns the current value of DS. This function is only available on + IA-32 and X64. + + @return The current value of DS. + +**/ UINT16 EFIAPI AsmReadDs ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEflags.c b/MdePkg/Library/BaseLib/Ia32/ReadEflags.c index ca5d19c5ac..eab499532c 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadEflags.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadEflags.c @@ -17,6 +17,16 @@ // +/** + Reads the current value of the EFLAGS register. + + Reads and returns the current value of the EFLAGS register. This function is + only available on IA-32 and X64. This returns a 32-bit value on IA-32 and a + 64-bit value on X64. + + @return EFLAGS on IA-32 or RFLAGS on X64. + +**/ UINTN EFIAPI AsmReadEflags ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEs.c b/MdePkg/Library/BaseLib/Ia32/ReadEs.c index 8f73b99e6b..bcf6d9081c 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadEs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadEs.c @@ -17,6 +17,15 @@ // +/** + Reads the current value of ES Data Segment Register (ES). + + Reads and returns the current value of ES. This function is only available on + IA-32 and X64. + + @return The current value of ES. + +**/ UINT16 EFIAPI AsmReadEs ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadFs.c b/MdePkg/Library/BaseLib/Ia32/ReadFs.c index 848d15581b..25fee08e4c 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadFs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadFs.c @@ -17,6 +17,15 @@ // +/** + Reads the current value of FS Data Segment Register (FS). + + Reads and returns the current value of FS. This function is only available on + IA-32 and X64. + + @return The current value of FS. + +**/ UINT16 EFIAPI AsmReadFs ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.c b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.c index 1bff03c7d6..1d70b7da12 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.c @@ -18,6 +18,15 @@ #include +/** + Reads the current Global Descriptor Table Register(GDTR) descriptor. + + Reads and returns the current GDTR descriptor and returns it in Gdtr. This + function is only available on IA-32 and X64. + + @param Gdtr Pointer to a GDTR descriptor. + +**/ VOID EFIAPI InternalX86ReadGdtr ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGs.c b/MdePkg/Library/BaseLib/Ia32/ReadGs.c index df495a0ff9..61ba83ef1c 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadGs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadGs.c @@ -17,6 +17,15 @@ // +/** + Reads the current value of GS Data Segment Register (GS). + + Reads and returns the current value of GS. This function is only available on + IA-32 and X64. + + @return The current value of GS. + +**/ UINT16 EFIAPI AsmReadGs ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.c b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.c index 0cfbd63ff4..db43e9a0d7 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.c @@ -18,6 +18,15 @@ #include +/** + Reads the current Interrupt Descriptor Table Register(GDTR) descriptor. + + Reads and returns the current IDTR descriptor and returns it in Idtr. This + function is only available on IA-32 and X64. + + @param Idtr Pointer to a IDTR descriptor. + +**/ VOID EFIAPI InternalX86ReadIdtr ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c index 813c08442e..c9e372486e 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c @@ -17,6 +17,15 @@ // +/** + Reads the current Local Descriptor Table Register(LDTR) selector. + + Reads and returns the current 16-bit LDTR descriptor value. This function is + only available on IA-32 and X64. + + @return The current selector of LDT. + +**/ UINT16 EFIAPI AsmReadLdtr ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm0.c b/MdePkg/Library/BaseLib/Ia32/ReadMm0.c index 279e657edf..75b26827cd 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm0.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm0.c @@ -17,6 +17,15 @@ // +/** + Reads the current value of 64-bit MMX Register #0 (MM0). + + Reads and returns the current value of MM0. This function is only available + on IA-32 and X64. + + @return The current value of MM0. + +**/ UINT64 EFIAPI AsmReadMm0 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm1.c b/MdePkg/Library/BaseLib/Ia32/ReadMm1.c index b46a44c8de..1dde8e1bfd 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm1.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm1.c @@ -17,6 +17,15 @@ // +/** + Reads the current value of 64-bit MMX Register #1 (MM1). + + Reads and returns the current value of MM1. This function is only available + on IA-32 and X64. + + @return The current value of MM1. + +**/ UINT64 EFIAPI AsmReadMm1 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm2.c b/MdePkg/Library/BaseLib/Ia32/ReadMm2.c index 1e4905f20e..bbe80726d1 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm2.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm2.c @@ -17,6 +17,15 @@ // +/** + Reads the current value of 64-bit MMX Register #2 (MM2). + + Reads and returns the current value of MM2. This function is only available + on IA-32 and X64. + + @return The current value of MM2. + +**/ UINT64 EFIAPI AsmReadMm2 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm3.c b/MdePkg/Library/BaseLib/Ia32/ReadMm3.c index f742a9f6aa..868ef7a2c4 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm3.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm3.c @@ -17,6 +17,15 @@ // +/** + Reads the current value of 64-bit MMX Register #3 (MM3). + + Reads and returns the current value of MM3. This function is only available + on IA-32 and X64. + + @return The current value of MM3. + +**/ UINT64 EFIAPI AsmReadMm3 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm4.c b/MdePkg/Library/BaseLib/Ia32/ReadMm4.c index 5b9920bf5b..3297c1851c 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm4.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm4.c @@ -17,6 +17,15 @@ // +/** + Reads the current value of 64-bit MMX Register #4 (MM4). + + Reads and returns the current value of MM4. This function is only available + on IA-32 and X64. + + @return The current value of MM4. + +**/ UINT64 EFIAPI AsmReadMm4 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm5.c b/MdePkg/Library/BaseLib/Ia32/ReadMm5.c index 6b5d5df5b7..04db90bcc7 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm5.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm5.c @@ -17,6 +17,15 @@ // +/** + Reads the current value of 64-bit MMX Register #5 (MM5). + + Reads and returns the current value of MM5. This function is only available + on IA-32 and X64. + + @return The current value of MM5. + +**/ UINT64 EFIAPI AsmReadMm5 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm6.c b/MdePkg/Library/BaseLib/Ia32/ReadMm6.c index c0b1b51195..ed913945b7 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm6.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm6.c @@ -17,6 +17,15 @@ // +/** + Reads the current value of 64-bit MMX Register #6 (MM6). + + Reads and returns the current value of MM6. This function is only available + on IA-32 and X64. + + @return The current value of MM6. + +**/ UINT64 EFIAPI AsmReadMm6 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm7.c b/MdePkg/Library/BaseLib/Ia32/ReadMm7.c index af98994636..fd24ff8cbd 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm7.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm7.c @@ -17,6 +17,15 @@ // +/** + Reads the current value of 64-bit MMX Register #7 (MM7). + + Reads and returns the current value of MM7. This function is only available + on IA-32 and X64. + + @return The current value of MM7. + +**/ UINT64 EFIAPI AsmReadMm7 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c index d93b9cd6e4..eed41d41df 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c @@ -17,6 +17,20 @@ // +/** + Returns a 64-bit Machine Specific Register(MSR). + + Reads and returns the 64-bit MSR specified by Index. No parameter checking is + performed on Index, and some Index values may cause CPU exceptions. The + caller must either guarantee that Index is valid, or the caller must set up + exception handlers to catch the exceptions. This function is only available + on IA-32 and X64. + + @param Index The 32-bit MSR index to read. + + @return The value of the MSR identified by Index. + +**/ UINT64 EFIAPI AsmReadMsr64 ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadPmc.c b/MdePkg/Library/BaseLib/Ia32/ReadPmc.c index 761fa6bf4e..432c0139f9 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadPmc.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadPmc.c @@ -17,6 +17,17 @@ // +/** + Reads the current value of a Performance Counter (PMC). + + Reads and returns the current value of performance counter specified by + Index. This function is only available on IA-32 and X64. + + @param Index The 32-bit Performance Counter index to read. + + @return The value of the PMC specified by Index. + +**/ UINT64 EFIAPI AsmReadPmc ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadSs.c b/MdePkg/Library/BaseLib/Ia32/ReadSs.c index 002b20cbba..47750b93cc 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadSs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadSs.c @@ -17,6 +17,15 @@ // +/** + Reads the current value of Stack Segment Register (SS). + + Reads and returns the current value of SS. This function is only available on + IA-32 and X64. + + @return The current value of SS. + +**/ UINT16 EFIAPI AsmReadSs ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTr.c b/MdePkg/Library/BaseLib/Ia32/ReadTr.c index 0069811f46..dd94b0b4d2 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadTr.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadTr.c @@ -17,6 +17,15 @@ // +/** + Reads the current value of Task Register (TR). + + Reads and returns the current value of TR. This function is only available on + IA-32 and X64. + + @return The current value of TR. + +**/ UINT16 EFIAPI AsmReadTr ( diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTsc.c b/MdePkg/Library/BaseLib/Ia32/ReadTsc.c index 3946ffc792..5689da7146 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadTsc.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadTsc.c @@ -17,6 +17,15 @@ // +/** + Reads the current value of Time Stamp Counter (TSC). + + Reads and returns the current value of TSC. This function is only available + on IA-32 and X64. + + @return The current value of TSC + +**/ UINT64 EFIAPI AsmReadTsc ( diff --git a/MdePkg/Library/BaseLib/Ia32/SetJump.c b/MdePkg/Library/BaseLib/Ia32/SetJump.c index 5d8692a619..67d0571ecf 100644 --- a/MdePkg/Library/BaseLib/Ia32/SetJump.c +++ b/MdePkg/Library/BaseLib/Ia32/SetJump.c @@ -17,13 +17,39 @@ // #include +/** + Worker function that checks ASSERT condition for JumpBuffer + Checks ASSERT condition for JumpBuffer. + + If JumpBuffer is NULL, then ASSERT(). + For IPF CPUs, if JumpBuffer is not aligned on a 16-byte boundary, then ASSERT(). + + @param JumpBuffer A pointer to CPU context buffer. + +**/ VOID EFIAPI InternalAssertJumpBuffer ( IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer ); +/** + Saves the current CPU context that can be restored with a call to LongJump() + and returns 0. + + Saves the current CPU context in the buffer specified by JumpBuffer and + returns 0. The initial call to SetJump() must always return 0. Subsequent + calls to LongJump() cause a non-zero value to be returned by SetJump(). + + If JumpBuffer is NULL, then ASSERT(). + For IPF CPUs, if JumpBuffer is not aligned on a 16-byte boundary, then ASSERT(). + + @param JumpBuffer A pointer to CPU context buffer. + + @retval 0 Indicates a return from SetJump(). + +**/ _declspec (naked) UINTN EFIAPI diff --git a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.c b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.c index 714fd8acdc..018790041f 100644 --- a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.c +++ b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.c @@ -17,6 +17,18 @@ // +/** + Switches the endianess of a 64-bit integer. + + This function swaps the bytes in a 64-bit unsigned value to switch the value + from little endian to big endian or vice versa. The byte swapped value is + returned. + + @param Operand A 64-bit unsigned value. + + @return The byte swaped Operand. + +**/ UINT64 EFIAPI InternalMathSwapBytes64 ( diff --git a/MdePkg/Library/BaseLib/Ia32/Wbinvd.c b/MdePkg/Library/BaseLib/Ia32/Wbinvd.c index fa9c8b13a0..194d787f9c 100644 --- a/MdePkg/Library/BaseLib/Ia32/Wbinvd.c +++ b/MdePkg/Library/BaseLib/Ia32/Wbinvd.c @@ -17,6 +17,13 @@ // +/** + Executes a WBINVD instruction. + + Executes a WBINVD instruction. This function is only available on IA-32 and + X64. + +**/ VOID EFIAPI AsmWbinvd ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr0.c b/MdePkg/Library/BaseLib/Ia32/WriteCr0.c index 4f2406c67e..da9ba8d8b6 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr0.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr0.c @@ -17,6 +17,17 @@ // +/** + Writes a value to Control Register 0 (CR0). + + Writes and returns a new value to CR0. This function is only available on + IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. + + @param Cr0 The value to write to CR0. + + @return The value written to CR0. + +**/ UINTN EFIAPI AsmWriteCr0 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr2.c b/MdePkg/Library/BaseLib/Ia32/WriteCr2.c index 8c5d617d53..98e44388b5 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr2.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr2.c @@ -17,6 +17,17 @@ // +/** + Writes a value to Control Register 2 (CR2). + + Writes and returns a new value to CR2. This function is only available on + IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. + + @param Cr2 The value to write to CR2. + + @return The value written to CR2. + +**/ UINTN EFIAPI AsmWriteCr2 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr3.c b/MdePkg/Library/BaseLib/Ia32/WriteCr3.c index 7bcf537a7d..ca8784510f 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr3.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr3.c @@ -17,6 +17,17 @@ // +/** + Writes a value to Control Register 3 (CR3). + + Writes and returns a new value to CR3. This function is only available on + IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. + + @param Cr3 The value to write to CR3. + + @return The value written to CR3. + +**/ UINTN EFIAPI AsmWriteCr3 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr4.c b/MdePkg/Library/BaseLib/Ia32/WriteCr4.c index 04e7b00491..548d30ee31 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr4.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr4.c @@ -17,6 +17,17 @@ // +/** + Writes a value to Control Register 4 (CR4). + + Writes and returns a new value to CR4. This function is only available on + IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. + + @param Cr4 The value to write to CR4. + + @return The value written to CR4. + +**/ UINTN EFIAPI AsmWriteCr4 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr0.c b/MdePkg/Library/BaseLib/Ia32/WriteDr0.c index 0e9da73bf8..4ff4269a31 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr0.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr0.c @@ -17,6 +17,17 @@ // +/** + Writes a value to Debug Register 0 (DR0). + + Writes and returns a new value to DR0. This function is only available on + IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. + + @param Dr0 The value to write to Dr0. + + @return The value written to Debug Register 0 (DR0). + +**/ UINTN EFIAPI AsmWriteDr0 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr1.c b/MdePkg/Library/BaseLib/Ia32/WriteDr1.c index f9d1c2b5fb..480ff5bb32 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr1.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr1.c @@ -17,6 +17,17 @@ // +/** + Writes a value to Debug Register 1 (DR1). + + Writes and returns a new value to DR1. This function is only available on + IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. + + @param Dr1 The value to write to Dr1. + + @return The value written to Debug Register 1 (DR1). + +**/ UINTN EFIAPI AsmWriteDr1 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr2.c b/MdePkg/Library/BaseLib/Ia32/WriteDr2.c index 61f0979bf1..2116a1047e 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr2.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr2.c @@ -17,6 +17,17 @@ // +/** + Writes a value to Debug Register 2 (DR2). + + Writes and returns a new value to DR2. This function is only available on + IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. + + @param Dr2 The value to write to Dr2. + + @return The value written to Debug Register 2 (DR2). + +**/ UINTN EFIAPI AsmWriteDr2 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr3.c b/MdePkg/Library/BaseLib/Ia32/WriteDr3.c index b39c7a4f9d..3294e9ecbe 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr3.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr3.c @@ -17,6 +17,17 @@ // +/** + Writes a value to Debug Register 3 (DR3). + + Writes and returns a new value to DR3. This function is only available on + IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. + + @param Dr3 The value to write to Dr3. + + @return The value written to Debug Register 3 (DR3). + +**/ UINTN EFIAPI AsmWriteDr3 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr4.c b/MdePkg/Library/BaseLib/Ia32/WriteDr4.c index c2503c26a8..418b6404e5 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr4.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr4.c @@ -17,6 +17,17 @@ // +/** + Writes a value to Debug Register 4 (DR4). + + Writes and returns a new value to DR4. This function is only available on + IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. + + @param Dr4 The value to write to Dr4. + + @return The value written to Debug Register 4 (DR4). + +**/ UINTN EFIAPI AsmWriteDr4 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr5.c b/MdePkg/Library/BaseLib/Ia32/WriteDr5.c index dbc6dc90d6..05267ae7e6 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr5.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr5.c @@ -17,6 +17,17 @@ // +/** + Writes a value to Debug Register 5 (DR5). + + Writes and returns a new value to DR5. This function is only available on + IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. + + @param Dr5 The value to write to Dr5. + + @return The value written to Debug Register 5 (DR5). + +**/ UINTN EFIAPI AsmWriteDr5 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr6.c b/MdePkg/Library/BaseLib/Ia32/WriteDr6.c index 1da2a0fec4..2c3085e31d 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr6.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr6.c @@ -17,6 +17,17 @@ // +/** + Writes a value to Debug Register 6 (DR6). + + Writes and returns a new value to DR6. This function is only available on + IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. + + @param Dr6 The value to write to Dr6. + + @return The value written to Debug Register 6 (DR6). + +**/ UINTN EFIAPI AsmWriteDr6 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr7.c b/MdePkg/Library/BaseLib/Ia32/WriteDr7.c index 22d28636fa..aeb08ada5d 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr7.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr7.c @@ -17,6 +17,17 @@ // +/** + Writes a value to Debug Register 7 (DR7). + + Writes and returns a new value to DR7. This function is only available on + IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. + + @param Dr7 The value to write to Dr7. + + @return The value written to Debug Register 7 (DR7). + +**/ UINTN EFIAPI AsmWriteDr7 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.c b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.c index bc599e0945..4ed0180e6f 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.c @@ -18,6 +18,15 @@ #include +/** + Writes the current Global Descriptor Table Register (GDTR) descriptor. + + Writes and the current GDTR descriptor specified by Gdtr. This function is + only available on IA-32 and X64. + + @param Gdtr Pointer to a GDTR descriptor. + +**/ VOID EFIAPI InternalX86WriteGdtr ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.c b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.c index b92dfbdfb9..88c74b60e8 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.c @@ -17,6 +17,15 @@ // #include +/** + Writes the current Interrupt Descriptor Table Register(GDTR) descriptor. + + Writes the current IDTR descriptor and returns it in Idtr. This function is + only available on IA-32 and X64. + + @param Idtr Pointer to a IDTR descriptor. + +**/ VOID EFIAPI InternalX86WriteIdtr ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.c b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.c index 600f015b35..82ba9d0ff9 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.c @@ -17,6 +17,15 @@ // +/** + Writes the current Local Descriptor Table Register (GDTR) selector. + + Writes and the current LDTR descriptor specified by Ldtr. This function is + only available on IA-32 and X64. + + @param Ldtr 16-bit LDTR selector value. + +**/ VOID EFIAPI AsmWriteLdtr ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm0.c b/MdePkg/Library/BaseLib/Ia32/WriteMm0.c index c9789315b1..703ef29a33 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm0.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm0.c @@ -17,6 +17,15 @@ // +/** + Writes the current value of 64-bit MMX Register #0 (MM0). + + Writes the current value of MM0. This function is only available on IA32 and + X64. + + @param Value The 64-bit value to write to MM0. + +**/ VOID EFIAPI AsmWriteMm0 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm1.c b/MdePkg/Library/BaseLib/Ia32/WriteMm1.c index 8a9900bede..ee08ab7ac9 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm1.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm1.c @@ -17,6 +17,15 @@ // +/** + Writes the current value of 64-bit MMX Register #1 (MM1). + + Writes the current value of MM1. This function is only available on IA32 and + X64. + + @param Value The 64-bit value to write to MM1. + +**/ VOID EFIAPI AsmWriteMm1 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm2.c b/MdePkg/Library/BaseLib/Ia32/WriteMm2.c index fb2196963c..08bbb6645e 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm2.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm2.c @@ -17,6 +17,15 @@ // +/** + Writes the current value of 64-bit MMX Register #2 (MM2). + + Writes the current value of MM2. This function is only available on IA32 and + X64. + + @param Value The 64-bit value to write to MM2. + +**/ VOID EFIAPI AsmWriteMm2 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm3.c b/MdePkg/Library/BaseLib/Ia32/WriteMm3.c index d788f3be8c..bef0f6502d 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm3.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm3.c @@ -17,6 +17,15 @@ // +/** + Writes the current value of 64-bit MMX Register #3 (MM3). + + Writes the current value of MM3. This function is only available on IA32 and + X64. + + @param Value The 64-bit value to write to MM3. + +**/ VOID EFIAPI AsmWriteMm3 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm4.c b/MdePkg/Library/BaseLib/Ia32/WriteMm4.c index 7b0160d2a9..eed122d42c 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm4.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm4.c @@ -17,6 +17,15 @@ // +/** + Writes the current value of 64-bit MMX Register #4 (MM4). + + Writes the current value of MM4. This function is only available on IA32 and + X64. + + @param Value The 64-bit value to write to MM4. + +**/ VOID EFIAPI AsmWriteMm4 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm5.c b/MdePkg/Library/BaseLib/Ia32/WriteMm5.c index 0dd02b706f..2f94baddfa 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm5.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm5.c @@ -17,6 +17,15 @@ // +/** + Writes the current value of 64-bit MMX Register #5 (MM5). + + Writes the current value of MM5. This function is only available on IA32 and + X64. + + @param Value The 64-bit value to write to MM5. + +**/ VOID EFIAPI AsmWriteMm5 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm6.c b/MdePkg/Library/BaseLib/Ia32/WriteMm6.c index de081405e1..32563770f7 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm6.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm6.c @@ -17,6 +17,15 @@ // +/** + Writes the current value of 64-bit MMX Register #6 (MM6). + + Writes the current value of MM6. This function is only available on IA32 and + X64. + + @param Value The 64-bit value to write to MM6. + +**/ VOID EFIAPI AsmWriteMm6 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm7.c b/MdePkg/Library/BaseLib/Ia32/WriteMm7.c index 0bb8d205a9..c5a859eb57 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm7.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm7.c @@ -17,6 +17,15 @@ // +/** + Writes the current value of 64-bit MMX Register #7 (MM7). + + Writes the current value of MM7. This function is only available on IA32 and + X64. + + @param Value The 64-bit value to write to MM7. + +**/ VOID EFIAPI AsmWriteMm7 ( diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c index 06cf910c48..77a068950a 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c @@ -17,6 +17,23 @@ // +/** + Writes a 64-bit value to a Machine Specific Register(MSR), and returns the + value. + + Writes the 64-bit value specified by Value to the MSR specified by Index. The + 64-bit value written to the MSR is returned. No parameter checking is + performed on Index or Value, and some of these may cause CPU exceptions. The + caller must either guarantee that Index and Value are valid, or the caller + must establish proper exception handlers. This function is only available on + IA-32 and X64. + + @param Index The 32-bit MSR index to write. + @param Value The 64-bit value to write to the MSR. + + @return Value + +**/ UINT64 EFIAPI AsmWriteMsr64 ( diff --git a/MdePkg/Library/BaseLib/Ipf/asm.h b/MdePkg/Library/BaseLib/Ipf/asm.h index f152f80303..3067d4bee6 100644 --- a/MdePkg/Library/BaseLib/Ipf/asm.h +++ b/MdePkg/Library/BaseLib/Ipf/asm.h @@ -1,18 +1,17 @@ -/// @file -/// This module contains generic macros for an assembly writer. -/// -/// Copyright (c) 2006, Intel Corporation
-/// All rights reserved. This program and the accompanying materials -/// are licensed and made available under the terms and conditions of the BSD License -/// which accompanies this distribution. The full text of the license may be found at -/// http://opensource.org/licenses/bsd-license.php -/// -/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -/// -/// -#ifndef _ASM_H -#define _ASM_H +/** @file This module contains generic macros for an assembly writer. + + Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +**/ + +#ifndef _ASM_H_ +#define _ASM_H_ #define TRUE 1 #define FALSE 0 diff --git a/MdePkg/Library/BaseLib/Ipf/ia_64gen.h b/MdePkg/Library/BaseLib/Ipf/ia_64gen.h index 220a19ef22..616716bc4c 100644 --- a/MdePkg/Library/BaseLib/Ipf/ia_64gen.h +++ b/MdePkg/Library/BaseLib/Ipf/ia_64gen.h @@ -1,18 +1,18 @@ -/// @file -/// -/// -/// Copyright (c) 2006, Intel Corporation
-/// All rights reserved. This program and the accompanying materials -/// are licensed and made available under the terms and conditions of the BSD License -/// which accompanies this distribution. The full text of the license may be found at -/// http://opensource.org/licenses/bsd-license.php -/// -/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -/// -/// -#ifndef _IA64GEN_H -#define _IA64GEN_H +/** @file Register Definition for IPF. + + + Copyright (c) 2006, Intel Corporation
+ All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ +#ifndef _IA64GEN_H_ +#define _IA64GEN_H_ #define TT_UNAT 0 #define C_PSR 0 diff --git a/MdePkg/Library/BaseLib/String.c b/MdePkg/Library/BaseLib/String.c index bdfa7a3c6d..6b68bb2eec 100644 --- a/MdePkg/Library/BaseLib/String.c +++ b/MdePkg/Library/BaseLib/String.c @@ -64,7 +64,7 @@ StrCpy ( ASSERT ((UINTN)(Source - Destination) > StrLen (Source)); ReturnValue = Destination; - while (*Source) { + while (*Source != 0) { *(Destination++) = *(Source++); } *Destination = 0; @@ -500,8 +500,8 @@ StrStr ( @retval FALSE Otherwise. **/ -STATIC BOOLEAN +EFIAPI InternalIsDecimalDigitCharacter ( IN CHAR16 Char ) @@ -525,8 +525,8 @@ InternalIsDecimalDigitCharacter ( @retval Unchanged Otherwise. **/ -STATIC CHAR16 +EFIAPI InternalCharToUpper ( IN CHAR16 Char ) @@ -551,8 +551,8 @@ InternalCharToUpper ( @retval UINTN The numerical value converted. **/ -STATIC UINTN +EFIAPI InternalHexCharToUintn ( IN CHAR16 Char ) @@ -578,8 +578,8 @@ InternalHexCharToUintn ( @retval FALSE Otherwise. **/ -STATIC BOOLEAN +EFIAPI InternalIsHexaDecimalDigitCharacter ( IN CHAR16 Char ) @@ -954,8 +954,8 @@ StrHexToUint64 ( @retval FALSE Otherwise. **/ -STATIC BOOLEAN +EFIAPI InternalAsciiIsDecimalDigitCharacter ( IN CHAR8 Char ) @@ -977,8 +977,8 @@ InternalAsciiIsDecimalDigitCharacter ( @retval FALSE Otherwise. **/ -STATIC BOOLEAN +EFIAPI InternalAsciiIsHexaDecimalDigitCharacter ( IN CHAR8 Char ) @@ -1110,7 +1110,7 @@ AsciiStrCpy ( ASSERT ((UINTN)(Source - Destination) > AsciiStrLen (Source)); ReturnValue = Destination; - while (*Source) { + while (*Source != 0) { *(Destination++) = *(Source++); } *Destination = 0; @@ -1170,7 +1170,7 @@ AsciiStrnCpy ( ReturnValue = Destination; - while (*Source && Length > 0) { + while (*Source != 0 && Length > 0) { *(Destination++) = *(Source++); Length--; } @@ -1298,13 +1298,13 @@ AsciiStrCmp ( If Value >= 0xA0, then ASSERT(). If (Value & 0x0F) >= 0x0A, then ASSERT(). - @param chr one Ascii character + @param Chr one Ascii character @return The uppercase value of Ascii character **/ -STATIC CHAR8 +EFIAPI AsciiToUpper ( IN CHAR8 Chr ) @@ -1325,8 +1325,8 @@ AsciiToUpper ( @retval UINTN The numerical value converted. **/ -STATIC UINTN +EFIAPI InternalAsciiHexCharToUintn ( IN CHAR8 Char ) diff --git a/MdePkg/Library/BaseLib/SwitchStack.c b/MdePkg/Library/BaseLib/SwitchStack.c index acc0e715ca..d2f00fded5 100644 --- a/MdePkg/Library/BaseLib/SwitchStack.c +++ b/MdePkg/Library/BaseLib/SwitchStack.c @@ -41,6 +41,7 @@ function. @param NewStack A pointer to the new stack to use for the EntryPoint function. + @param ... Extended parameters. **/ VOID diff --git a/MdePkg/Library/BaseLib/SynchronizationMsc.c b/MdePkg/Library/BaseLib/SynchronizationMsc.c index a4fc399387..5876235970 100644 --- a/MdePkg/Library/BaseLib/SynchronizationMsc.c +++ b/MdePkg/Library/BaseLib/SynchronizationMsc.c @@ -19,9 +19,9 @@ #include "BaseLibInternals.h" -// -// Microsoft Visual Studio 7.1 Function Prototypes for read write barrier Intrinsics -// +/** + Microsoft Visual Studio 7.1 Function Prototypes for read write barrier Intrinsics. +**/ void _ReadWriteBarrier (void); #pragma intrinsic(_ReadWriteBarrier) diff --git a/MdePkg/Library/BaseLib/X64/CpuBreakpoint.c b/MdePkg/Library/BaseLib/X64/CpuBreakpoint.c index 01939e9128..049e34eaae 100644 --- a/MdePkg/Library/BaseLib/X64/CpuBreakpoint.c +++ b/MdePkg/Library/BaseLib/X64/CpuBreakpoint.c @@ -13,13 +13,20 @@ **/ -// -// Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics -// +/** + Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. +**/ void __debugbreak (); #pragma intrinsic(__debugbreak) +/** + Generates a breakpoint on the CPU. + + Generates a breakpoint on the CPU. The breakpoint must be implemented such + that code can resume normal execution after the breakpoint. + +**/ VOID EFIAPI CpuBreakpoint ( diff --git a/MdePkg/Library/BaseLib/X64/InterlockedCompareExchange32.c b/MdePkg/Library/BaseLib/X64/InterlockedCompareExchange32.c index 4a9fe6aca6..de1aac7e6a 100644 --- a/MdePkg/Library/BaseLib/X64/InterlockedCompareExchange32.c +++ b/MdePkg/Library/BaseLib/X64/InterlockedCompareExchange32.c @@ -12,9 +12,9 @@ **/ -// -// Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics -// +/** + Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. +**/ long _InterlockedCompareExchange( long volatile * Destination, long Exchange, @@ -23,6 +23,23 @@ long _InterlockedCompareExchange( #pragma intrinsic(_InterlockedCompareExchange) +/** + Performs an atomic compare exchange operation on a 32-bit unsigned integer. + + Performs an atomic compare exchange operation on the 32-bit unsigned integer + specified by Value. If Value is equal to CompareValue, then Value is set to + ExchangeValue and CompareValue is returned. If Value is not equal to CompareValue, + then Value is returned. The compare exchange operation must be performed using + MP safe mechanisms. + + @param Value A pointer to the 32-bit value for the compare exchange + operation. + @param CompareValue 32-bit value used in compare operation. + @param ExchangeValue 32-bit value used in exchange operation. + + @return The original *Value before exchange. + +**/ UINT32 EFIAPI InternalSyncCompareExchange32 ( diff --git a/MdePkg/Library/BaseLib/X64/InterlockedCompareExchange64.c b/MdePkg/Library/BaseLib/X64/InterlockedCompareExchange64.c index bed1dc8972..1206a1732c 100644 --- a/MdePkg/Library/BaseLib/X64/InterlockedCompareExchange64.c +++ b/MdePkg/Library/BaseLib/X64/InterlockedCompareExchange64.c @@ -12,9 +12,9 @@ **/ -// -// Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics -// +/** + Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. +**/ __int64 _InterlockedCompareExchange64( __int64 volatile * Destination, __int64 Exchange, @@ -23,6 +23,22 @@ __int64 _InterlockedCompareExchange64( #pragma intrinsic(_InterlockedCompareExchange64) +/** + Performs an atomic compare exchange operation on a 64-bit unsigned integer. + + Performs an atomic compare exchange operation on the 64-bit unsigned integer specified + by Value. If Value is equal to CompareValue, then Value is set to ExchangeValue and + CompareValue is returned. If Value is not equal to CompareValue, then Value is returned. + The compare exchange operation must be performed using MP safe mechanisms. + + @param Value A pointer to the 64-bit value for the compare exchange + operation. + @param CompareValue 64-bit value used in compare operation. + @param ExchangeValue 64-bit value used in exchange operation. + + @return The original *Value before exchange. + +**/ UINT64 EFIAPI InternalSyncCompareExchange64 ( diff --git a/MdePkg/Library/BaseLib/X64/InterlockedDecrement.c b/MdePkg/Library/BaseLib/X64/InterlockedDecrement.c index 19e6a5dc49..0f321f8f18 100644 --- a/MdePkg/Library/BaseLib/X64/InterlockedDecrement.c +++ b/MdePkg/Library/BaseLib/X64/InterlockedDecrement.c @@ -12,15 +12,28 @@ **/ -// -// Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics -// +/** + Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. +**/ long _InterlockedDecrement( long * lpAddend ); #pragma intrinsic(_InterlockedDecrement) +/** + Performs an atomic decrement of an 32-bit unsigned integer. + + Performs an atomic decrement of the 32-bit unsigned integer specified by + Value and returns the decrement value. The decrement operation must be + performed using MP safe mechanisms. The state of the return value is not + guaranteed to be MP safe. + + @param Value A pointer to the 32-bit value to decrement. + + @return The decrement value. + +**/ UINT32 EFIAPI InternalSyncDecrement ( diff --git a/MdePkg/Library/BaseLib/X64/InterlockedIncrement.c b/MdePkg/Library/BaseLib/X64/InterlockedIncrement.c index eda9f79a5b..80921c82df 100644 --- a/MdePkg/Library/BaseLib/X64/InterlockedIncrement.c +++ b/MdePkg/Library/BaseLib/X64/InterlockedIncrement.c @@ -12,15 +12,28 @@ **/ -// -// Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics -// +/** + Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. +**/ long _InterlockedIncrement( long * lpAddend ); #pragma intrinsic(_InterlockedIncrement) +/** + Performs an atomic increment of an 32-bit unsigned integer. + + Performs an atomic increment of the 32-bit unsigned integer specified by + Value and returns the incremented value. The increment operation must be + performed using MP safe mechanisms. The state of the return value is not + guaranteed to be MP safe. + + @param Value A pointer to the 32-bit value to increment. + + @return The incremented value. + +**/ UINT32 EFIAPI InternalSyncIncrement ( diff --git a/MdePkg/Library/BaseLib/X64/ReadMsr64.c b/MdePkg/Library/BaseLib/X64/ReadMsr64.c index 15a573fc09..19f7939654 100644 --- a/MdePkg/Library/BaseLib/X64/ReadMsr64.c +++ b/MdePkg/Library/BaseLib/X64/ReadMsr64.c @@ -12,13 +12,21 @@ **/ -// -// Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics -// +/** + Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. +**/ unsigned __int64 __readmsr (int register); #pragma intrinsic(__readmsr) +/** + Read data to MSR. + + @param Index Register index of MSR. + + @return Value read from MSR. + +**/ UINT64 EFIAPI diff --git a/MdePkg/Library/BaseLib/X64/WriteMsr64.c b/MdePkg/Library/BaseLib/X64/WriteMsr64.c index 1d1e0bc332..77d8c59724 100644 --- a/MdePkg/Library/BaseLib/X64/WriteMsr64.c +++ b/MdePkg/Library/BaseLib/X64/WriteMsr64.c @@ -12,13 +12,22 @@ **/ -// -// Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics -// +/** + Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. +**/ void __writemsr (unsigned long Register, unsigned __int64 Value); #pragma intrinsic(__writemsr) +/** + Write data to MSR. + + @param Index Register index of MSR. + @param Value Data wants to be written. + + @return Value written to MSR. + +**/ UINT64 EFIAPI AsmWriteMsr64 ( diff --git a/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c b/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c index eb73f3637c..c6d109a0bb 100644 --- a/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c +++ b/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c @@ -101,7 +101,7 @@ InternalMemSetMem64 ( Set Buffer to 0 for Size bytes. @param Buffer Memory to set. - @param Size Number of bytes to set + @param Length Number of bytes to set @return Buffer diff --git a/MdePkg/Library/BaseMemoryLib/MemLibInternals.h b/MdePkg/Library/BaseMemoryLib/MemLibInternals.h index ceddbbe7a0..fa5619db7c 100644 --- a/MdePkg/Library/BaseMemoryLib/MemLibInternals.h +++ b/MdePkg/Library/BaseMemoryLib/MemLibInternals.h @@ -32,8 +32,8 @@ /** Copy Length bytes from Source to Destination. - @param Destination Target of copy - @param Source Place to copy from + @param DestinationBuffer Target of copy + @param SourceBuffer Place to copy from @param Length Number of bytes to copy @return Destination @@ -51,7 +51,7 @@ InternalMemCopyMem ( Set Buffer to Value for Size bytes. @param Buffer Memory to set. - @param Size Number of bytes to set + @param Length Number of bytes to set @param Value Value of the set operation. @return Buffer @@ -123,7 +123,7 @@ InternalMemSetMem64 ( Set Buffer to 0 for Size bytes. @param Buffer Memory to set. - @param Size Number of bytes to set + @param Length Number of bytes to set @return Buffer diff --git a/MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h index e8d72dd04c..202aa19e5a 100644 --- a/MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h +++ b/MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h @@ -34,8 +34,8 @@ /** Copy Length bytes from Source to Destination. - @param Destination Target of copy - @param Source Place to copy from + @param DestinationBuffer Target of copy + @param SourceBuffer Place to copy from @param Length Number of bytes to copy @return Destination diff --git a/MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h index ce55f447c0..fa5619db7c 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h +++ b/MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h @@ -32,8 +32,8 @@ /** Copy Length bytes from Source to Destination. - @param Destination Target of copy - @param Source Place to copy from + @param DestinationBuffer Target of copy + @param SourceBuffer Place to copy from @param Length Number of bytes to copy @return Destination diff --git a/MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h index ce55f447c0..fa5619db7c 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h +++ b/MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h @@ -32,8 +32,8 @@ /** Copy Length bytes from Source to Destination. - @param Destination Target of copy - @param Source Place to copy from + @param DestinationBuffer Target of copy + @param SourceBuffer Place to copy from @param Length Number of bytes to copy @return Destination diff --git a/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h index ce55f447c0..fa5619db7c 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h +++ b/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h @@ -32,8 +32,8 @@ /** Copy Length bytes from Source to Destination. - @param Destination Target of copy - @param Source Place to copy from + @param DestinationBuffer Target of copy + @param SourceBuffer Place to copy from @param Length Number of bytes to copy @return Destination diff --git a/MdePkg/Library/BasePciLibCf8/PciLib.c b/MdePkg/Library/BasePciLibCf8/PciLib.c index af71b88e59..d82bfe259b 100644 --- a/MdePkg/Library/BasePciLibCf8/PciLib.c +++ b/MdePkg/Library/BasePciLibCf8/PciLib.c @@ -54,7 +54,7 @@ PciRead8 ( @param Address Address that encodes the PCI Bus, Device, Function and Register. - @param Value The value to write. + @param Data The value to write. @return The value written to the PCI configuration register. @@ -382,7 +382,7 @@ PciRead16 ( @param Address Address that encodes the PCI Bus, Device, Function and Register. - @param Value The value to write. + @param Data The value to write. @return The value written to the PCI configuration register. @@ -710,7 +710,7 @@ PciRead32 ( @param Address Address that encodes the PCI Bus, Device, Function and Register. - @param Value The value to write. + @param Data The value to write. @return The value written to the PCI configuration register. diff --git a/MdePkg/Library/BasePciLibPciExpress/PciLib.c b/MdePkg/Library/BasePciLibPciExpress/PciLib.c index c993848043..33526a7d93 100644 --- a/MdePkg/Library/BasePciLibPciExpress/PciLib.c +++ b/MdePkg/Library/BasePciLibPciExpress/PciLib.c @@ -54,7 +54,7 @@ PciRead8 ( @param Address Address that encodes the PCI Bus, Device, Function and Register. - @param Value The value to write. + @param Data The value to write. @return The value written to the PCI configuration register. @@ -382,7 +382,7 @@ PciRead16 ( @param Address Address that encodes the PCI Bus, Device, Function and Register. - @param Value The value to write. + @param Data The value to write. @return The value written to the PCI configuration register. @@ -710,7 +710,7 @@ PciRead32 ( @param Address Address that encodes the PCI Bus, Device, Function and Register. - @param Value The value to write. + @param Data The value to write. @return The value written to the PCI configuration register. diff --git a/MdePkg/Library/CpuLib/Ia32/CpuFlushTlb.c b/MdePkg/Library/CpuLib/Ia32/CpuFlushTlb.c index e785095d7a..b0f154bce5 100644 --- a/MdePkg/Library/CpuLib/Ia32/CpuFlushTlb.c +++ b/MdePkg/Library/CpuLib/Ia32/CpuFlushTlb.c @@ -16,7 +16,10 @@ // Include common header file for this module. // +/** + Flush TLB of current processor. +**/ VOID EFIAPI CpuFlushTlb ( diff --git a/MdePkg/Library/DxeHobLib/HobLibInternal.h b/MdePkg/Library/DxeHobLib/HobLibInternal.h index 639886bd1b..2a2fb8c47d 100644 --- a/MdePkg/Library/DxeHobLib/HobLibInternal.h +++ b/MdePkg/Library/DxeHobLib/HobLibInternal.h @@ -15,6 +15,16 @@ #ifndef _DXE_HOB_LIB_INTERNAL_H__ #define _DXE_HOB_LIB_INTERNAL_H__ +/** + + Initialize Hob list. + + @param ImageHandle ImageHandle of the loaded driver. + @param SystemTable Pointer to the EFI System Table. + + @retval EFI_SUCCESS One or more of the drivers returned a success code. + @retval !EFI_SUCESS The return status from the last driver entry point in the list. +**/ EFI_STATUS EFIAPI HobLibConstructor ( diff --git a/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c index 773797a291..42d05d7826 100644 --- a/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c +++ b/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c @@ -1078,7 +1078,14 @@ FreeAlignedPool ( ASSERT_EFI_ERROR (Status); } +/** + Frees buffer that were previously allocated with one of the + memory allocation functions in the Memory Allocation Library. + + @param Buffer Pointer to the buffer of pages + to free. +**/ VOID EFIAPI SafeFreePool ( diff --git a/MdePkg/Library/DxeMemoryLib/MemLib.c b/MdePkg/Library/DxeMemoryLib/MemLib.c index 6bbd9be77e..faa32f5390 100644 --- a/MdePkg/Library/DxeMemoryLib/MemLib.c +++ b/MdePkg/Library/DxeMemoryLib/MemLib.c @@ -44,7 +44,7 @@ InternalMemCopyMem ( This function wraps the gBS->SetMem(). @param Buffer Memory to set. - @param Length Number of bytes to set. + @param Size Number of bytes to set. @param Value Value of the set operation. @return Buffer. diff --git a/MdePkg/Library/DxeMemoryLib/MemLibGeneric.c b/MdePkg/Library/DxeMemoryLib/MemLibGeneric.c index 8fb417604d..2be052d4b9 100644 --- a/MdePkg/Library/DxeMemoryLib/MemLibGeneric.c +++ b/MdePkg/Library/DxeMemoryLib/MemLibGeneric.c @@ -96,7 +96,7 @@ InternalMemSetMem64 ( Set Buffer to 0 for Size bytes. @param Buffer Memory to set. - @param Size Number of bytes to set + @param Length Number of bytes to set @return Buffer diff --git a/MdePkg/Library/DxeMemoryLib/MemLibInternals.h b/MdePkg/Library/DxeMemoryLib/MemLibInternals.h index 51877359c0..223cb25cf7 100644 --- a/MdePkg/Library/DxeMemoryLib/MemLibInternals.h +++ b/MdePkg/Library/DxeMemoryLib/MemLibInternals.h @@ -36,8 +36,8 @@ /** Copy Length bytes from Source to Destination. - @param Destination Target of copy - @param Source Place to copy from + @param DestinationBuffer Target of copy + @param SourceBuffer Place to copy from @param Length Number of bytes to copy @return Destination @@ -55,7 +55,7 @@ InternalMemCopyMem ( Set Buffer to Value for Size bytes. @param Buffer Memory to set. - @param Size Number of bytes to set + @param Length Number of bytes to set @param Value Value of the set operation. @return Buffer @@ -127,7 +127,7 @@ InternalMemSetMem64 ( Set Buffer to 0 for Size bytes. @param Buffer Memory to set. - @param Size Number of bytes to set + @param Length Number of bytes to set @return Buffer diff --git a/MdePkg/Library/DxePcdLib/DxePcdLib.c b/MdePkg/Library/DxePcdLib/DxePcdLib.c index ccf7b7d213..3062df4fcd 100644 --- a/MdePkg/Library/DxePcdLib/DxePcdLib.c +++ b/MdePkg/Library/DxePcdLib/DxePcdLib.c @@ -524,7 +524,6 @@ LibPcdSet64 ( @retval VOID* Return the pointer for the buffer been set. **/ - VOID * EFIAPI LibPcdSetPtr ( diff --git a/MdePkg/Library/DxePiLib/DxePiLib.c b/MdePkg/Library/DxePiLib/DxePiLib.c index 4138498790..9953095e7d 100644 --- a/MdePkg/Library/DxePiLib/DxePiLib.c +++ b/MdePkg/Library/DxePiLib/DxePiLib.c @@ -324,7 +324,6 @@ Done: @retval EFI_ACCESS_DENIED The firmware volume containing the searched Firmware File is configured to disallow reads. **/ - EFI_STATUS EFIAPI PiLibGetSectionFromCurrentFv ( @@ -385,7 +384,6 @@ PiLibGetSectionFromCurrentFv ( @retval EFI_ACCESS_DENIED The firmware volume containing the searched Firmware File is configured to disallow reads. **/ - EFI_STATUS EFIAPI PiLibGetSectionFromCurrentFfs ( diff --git a/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLibInternal.h b/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLibInternal.h index 0a5d4a254b..b9cea72439 100644 --- a/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLibInternal.h +++ b/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLibInternal.h @@ -12,8 +12,8 @@ **/ -#ifndef _DXE_SERVICE_TABLE_LIB_INTERNAL_H -#define _DXE_SERVICE_TABLE_LIB_INTERNAL_H +#ifndef _DXE_SERVICE_TABLE_LIB_INTERNAL_H_ +#define _DXE_SERVICE_TABLE_LIB_INTERNAL_H_ /** diff --git a/MdePkg/Library/DxeSmbusLib/InternalSmbusLib.h b/MdePkg/Library/DxeSmbusLib/InternalSmbusLib.h index 7273559127..95d9048eee 100644 --- a/MdePkg/Library/DxeSmbusLib/InternalSmbusLib.h +++ b/MdePkg/Library/DxeSmbusLib/InternalSmbusLib.h @@ -13,8 +13,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -#ifndef __INTERNAL_SMBUS_LIB_H -#define __INTERNAL_SMBUS_LIB_H +#ifndef __INTERNAL_SMBUS_LIB_H_ +#define __INTERNAL_SMBUS_LIB_H_ #include diff --git a/MdePkg/Library/PeiHobLib/HobLib.c b/MdePkg/Library/PeiHobLib/HobLib.c index a70162c831..aa54e4fbe3 100644 --- a/MdePkg/Library/PeiHobLib/HobLib.c +++ b/MdePkg/Library/PeiHobLib/HobLib.c @@ -210,8 +210,8 @@ GetBootModeHob ( @return The address of new HOB. **/ -STATIC VOID * +EFIAPI InternalPeiCreateHob ( IN UINT16 Type, IN UINT16 Length diff --git a/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c b/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c index 133f5c2a2a..bc81ca2243 100644 --- a/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c +++ b/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c @@ -53,7 +53,7 @@ MmioReadBuffer8 ( ReturnBuffer = Buffer; - while (Length--) { + while (Length-- != 0) { *(Buffer++) = MmioRead8 (StartAddress++); } @@ -102,7 +102,7 @@ MmioReadBuffer16 ( ReturnBuffer = Buffer; - while (Length) { + while (Length != 0) { *(Buffer++) = MmioRead16 (StartAddress); StartAddress += sizeof (UINT16); Length -= sizeof (UINT16); @@ -153,7 +153,7 @@ MmioReadBuffer32 ( ReturnBuffer = Buffer; - while (Length) { + while (Length != 0) { *(Buffer++) = MmioRead32 (StartAddress); StartAddress += sizeof (UINT32); Length -= sizeof (UINT32); @@ -204,7 +204,7 @@ MmioReadBuffer64 ( ReturnBuffer = Buffer; - while (Length) { + while (Length != 0) { *(Buffer++) = MmioRead64 (StartAddress); StartAddress += sizeof (UINT64); Length -= sizeof (UINT64); @@ -247,7 +247,7 @@ MmioWriteBuffer8 ( ReturnBuffer = (UINT8 *) Buffer; - while (Length--) { + while (Length-- != 0) { MmioWrite8 (StartAddress++, *(Buffer++)); } @@ -298,7 +298,7 @@ MmioWriteBuffer16 ( ReturnBuffer = (UINT16 *) Buffer; - while (Length) { + while (Length != 0) { MmioWrite16 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT16); @@ -352,7 +352,7 @@ MmioWriteBuffer32 ( ReturnBuffer = (UINT32 *) Buffer; - while (Length) { + while (Length != 0) { MmioWrite32 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT32); @@ -405,7 +405,7 @@ MmioWriteBuffer64 ( ReturnBuffer = (UINT64 *) Buffer; - while (Length) { + while (Length != 0) { MmioWrite64 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT64); diff --git a/MdePkg/Library/PeiMemoryLib/MemLib.c b/MdePkg/Library/PeiMemoryLib/MemLib.c index 207f580d45..82e50825c0 100644 --- a/MdePkg/Library/PeiMemoryLib/MemLib.c +++ b/MdePkg/Library/PeiMemoryLib/MemLib.c @@ -48,7 +48,7 @@ InternalMemCopyMem ( This function wraps the gPS->SetMem (). @param Buffer Memory to set. - @param Length Number of bytes to set. + @param Size Number of bytes to set. @param Value Value of the set operation. @return Buffer. diff --git a/MdePkg/Library/PeiMemoryLib/MemLibGeneric.c b/MdePkg/Library/PeiMemoryLib/MemLibGeneric.c index 8fb417604d..2be052d4b9 100644 --- a/MdePkg/Library/PeiMemoryLib/MemLibGeneric.c +++ b/MdePkg/Library/PeiMemoryLib/MemLibGeneric.c @@ -96,7 +96,7 @@ InternalMemSetMem64 ( Set Buffer to 0 for Size bytes. @param Buffer Memory to set. - @param Size Number of bytes to set + @param Length Number of bytes to set @return Buffer diff --git a/MdePkg/Library/PeiMemoryLib/MemLibInternals.h b/MdePkg/Library/PeiMemoryLib/MemLibInternals.h index 3a0ab3481d..f7eba17988 100644 --- a/MdePkg/Library/PeiMemoryLib/MemLibInternals.h +++ b/MdePkg/Library/PeiMemoryLib/MemLibInternals.h @@ -35,9 +35,9 @@ /** Copy Length bytes from Source to Destination. - @param Destination Target of copy - @param Source Place to copy from - @param Length Number of bytes to copy + @param DestinationBuffer Target of copy + @param SourceBuffer Place to copy from + @param Length Number of bytes to copy @return Destination @@ -54,7 +54,7 @@ InternalMemCopyMem ( Set Buffer to Value for Size bytes. @param Buffer Memory to set. - @param Size Number of bytes to set + @param Length Number of bytes to set @param Value Value of the set operation. @return Buffer @@ -126,7 +126,7 @@ InternalMemSetMem64 ( Set Buffer to 0 for Size bytes. @param Buffer Memory to set. - @param Size Number of bytes to set + @param Length Number of bytes to set @return Buffer diff --git a/MdePkg/Library/PeiPiLib/PeiPiLib.c b/MdePkg/Library/PeiPiLib/PeiPiLib.c index a76a29bf3a..cbdc92b6ab 100644 --- a/MdePkg/Library/PeiPiLib/PeiPiLib.c +++ b/MdePkg/Library/PeiPiLib/PeiPiLib.c @@ -46,9 +46,12 @@ CONST EFI_PEI_FIRMWARE_VOLUME_INFO_PPI mFvInfoPpiTemplate = { firmware volume. @param FvInfoSize Size of the data provided by FvInfo. For memory-mapped firmware volumes, this is typically the size of the firmware volume. - @param ParentFvName, ParentFileName If the firmware volume originally came from a firmware file, then these point to the - parent firmware volume name and firmware volume file. If it did not originally come - from a firmware file, these should be NULL + @param ParentFvName If the firmware volume originally came from a firmware file, then these point to the + parent firmware volume name. If it did not originally come + from a firmware file, these should be NULL. + @param ParentFileName If the firmware volume originally came from a firmware file, then these point to the + firmware volume file. If it did not originally come + from a firmware file, these should be NULL. **/ VOID diff --git a/MdePkg/Library/PeiServicesLib/PeiServicesLib.c b/MdePkg/Library/PeiServicesLib/PeiServicesLib.c index 9e3adbe66d..0d495601f1 100644 --- a/MdePkg/Library/PeiServicesLib/PeiServicesLib.c +++ b/MdePkg/Library/PeiServicesLib/PeiServicesLib.c @@ -217,7 +217,7 @@ PeiServicesCreateHob ( @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 VolumeHandle Handle of 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. @@ -241,9 +241,9 @@ PeiServicesFfsFindNextVolume ( 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. + @param VolumeHandle 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 FileHandle Handle of the current file from which to begin searching. @retval EFI_SUCCESS The file was found. @retval EFI_NOT_FOUND The file was not found. @@ -267,7 +267,7 @@ PeiServicesFfsFindNextFile ( /** 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 SectionType 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. @@ -461,6 +461,8 @@ PeiServicesFfsGetFileInfo ( Upon exit, points to the found file's handle or NULL if it could not be found. + @param FileHandle The filehandle found in volume. + @retval EFI_SUCCESS File was found. @retval EFI_NOT_FOUND File was not found. diff --git a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c index 7e482b6df2..43293fb83c 100644 --- a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c +++ b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c @@ -18,7 +18,7 @@ #include "PeiServicesTablePointerInternal.h" -static EFI_PEI_SERVICES **gPeiServices; +STATIC EFI_PEI_SERVICES **gPeiServices; /** The function set the pointer of PEI services immediately preceding the IDT table @@ -60,7 +60,7 @@ GetPeiServicesTablePointer ( The constructor function caches the pointer to PEI services. It will always return EFI_SUCCESS. - @param FfsHeader Pointer to FFS header the loaded driver. + @param FileHandle Handle of FFS header the loaded driver. @param PeiServices Pointer to the PEI services. @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. diff --git a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerInternal.h b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerInternal.h index 32714b0892..f6d9efd10f 100644 --- a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerInternal.h +++ b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerInternal.h @@ -14,13 +14,14 @@ #ifndef _PEI_SERVICE_TABLE_POINTER_INTERNAL_H_ #define _PEI_SERVICE_TABLE_POINTER_INTERNAL_H_ + /** The constructor function caches the pointer to PEI services. The constructor function caches the pointer to PEI services. It will always return EFI_SUCCESS. - @param FfsHeader Pointer to FFS header the loaded driver. + @param FileHandle Handle of FFS header the loaded driver. @param PeiServices Pointer to the PEI services. @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. diff --git a/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c index 7c1f7abfa2..db85833037 100644 --- a/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c +++ b/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c @@ -66,7 +66,7 @@ PeiServicesTablePointerLibConstructor ( The function set the pointer of PEI services immediately preceding the IDT table according to PI specification. - @param PeiServices The address of PeiServices pointer. + @param PeiServicesTablePointer The address of PeiServices pointer. **/ VOID EFIAPI diff --git a/MdePkg/Library/PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h b/MdePkg/Library/PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h index acd7ab7a25..cd472c1b83 100644 --- a/MdePkg/Library/PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h +++ b/MdePkg/Library/PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h @@ -13,8 +13,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -#ifndef __INTERNAL_SMBUS_LIB_H -#define __INTERNAL_SMBUS_LIB_H +#ifndef __INTERNAL_SMBUS_LIB_H_ +#define __INTERNAL_SMBUS_LIB_H_ #include diff --git a/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c b/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c index e3f47d2673..1849f01bc7 100644 --- a/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c +++ b/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c @@ -1,4 +1,3 @@ - /** @file Entry point to a PEIM. diff --git a/MdePkg/Library/SecPeiDxeTimerLibCpu/IpfTimerLib.c b/MdePkg/Library/SecPeiDxeTimerLibCpu/IpfTimerLib.c index 9e47772303..1fe1ff6915 100644 --- a/MdePkg/Library/SecPeiDxeTimerLibCpu/IpfTimerLib.c +++ b/MdePkg/Library/SecPeiDxeTimerLibCpu/IpfTimerLib.c @@ -31,6 +31,7 @@ **/ VOID +EFIAPI InternalIpfDelay ( IN INT64 Delay ) diff --git a/MdePkg/Library/SecPeiDxeTimerLibCpu/X86TimerLib.c b/MdePkg/Library/SecPeiDxeTimerLibCpu/X86TimerLib.c index 99b75d5251..98e86403bd 100644 --- a/MdePkg/Library/SecPeiDxeTimerLibCpu/X86TimerLib.c +++ b/MdePkg/Library/SecPeiDxeTimerLibCpu/X86TimerLib.c @@ -41,6 +41,7 @@ CONST UINT8 mTimerLibLocalApicDivisor[] = { **/ UINTN +EFIAPI InternalX86GetApicBase ( VOID ) @@ -59,6 +60,7 @@ InternalX86GetApicBase ( **/ UINT32 +EFIAPI InternalX86GetTimerFrequency ( IN UINTN ApicBase ) @@ -79,6 +81,7 @@ InternalX86GetTimerFrequency ( **/ INT32 +EFIAPI InternalX86GetTimerTick ( IN UINTN ApicBase ) @@ -97,6 +100,7 @@ InternalX86GetTimerTick ( **/ VOID +EFIAPI InternalX86Delay ( IN UINTN ApicBase, IN UINT32 Delay diff --git a/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLibInternal.h b/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLibInternal.h index 63a138a558..db8468eb83 100644 --- a/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLibInternal.h +++ b/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLibInternal.h @@ -12,9 +12,18 @@ **/ -#ifndef _UefiBootServicesTable_Lib_H -#define _UefiBootServicesTable_Lib_H +#ifndef _UEFIBOOTSERVICESTABLE_LIB_H_ +#define _UEFIBOOTSERVICESTABLE_LIB_H_ +/** + + Initialize gBS. + + @param ImageHandle ImageHandle of the loaded driver. + @param SystemTable Pointer to the EFI System Table. + @retval EFI_SUCCESS One or more of the drivers returned a success code. + @retval !EFI_SUCESS The return status from the last driver entry point in the list. +**/ EFI_STATUS EFIAPI UefiBootServicesTableLibConstructor ( diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/UefiLib.c index d7d7043a23..877c320ff7 100644 --- a/MdePkg/Library/UefiLib/UefiLib.c +++ b/MdePkg/Library/UefiLib/UefiLib.c @@ -27,7 +27,6 @@ @retval FALSE Language 1 and language 2 are not the same. **/ -STATIC BOOLEAN CompareIso639LanguageCode ( IN CONST CHAR8 *Language1, @@ -257,7 +256,7 @@ EfiNamedEventSignal ( @param VOID - @retvale EFI_TPL The current TPL. + @retval EFI_TPL The current TPL. **/ EFI_TPL @@ -308,7 +307,7 @@ EfiInitializeLock ( priority level of the mutual exclusion lock. Then, it places the lock in the acquired state. - @param Priority The task priority level of the lock. + @param Lock The task lock with priority level. **/ VOID @@ -457,7 +456,7 @@ EfiTestManagedDevice ( @param ControllerHandle A handle for a (parent) controller to test. @param ChildHandle A child handle to test. - @param ConsumsedGuid Supplies the protocol that the child controller + @param ProtocolGuid Supplies the protocol that the child controller opens on its parent controller. @retval EFI_SUCCESS ChildHandle is a child of the ControllerHandle. @@ -1076,7 +1075,7 @@ AddUnicodeString2 ( while (OldUnicodeStringTable->Language != NULL) { LanguageString = OldUnicodeStringTable->Language; - while (*LanguageString) { + while (*LanguageString != 0) { for (Index = 0; LanguageString[Index] != 0 && LanguageString[Index] != ';'; Index++); if (AsciiStrnCmp (Language, LanguageString, Index) == 0) { diff --git a/MdePkg/Library/UefiLib/UefiLibInternal.h b/MdePkg/Library/UefiLib/UefiLibInternal.h index b21e5d1559..970df2bc79 100644 --- a/MdePkg/Library/UefiLib/UefiLibInternal.h +++ b/MdePkg/Library/UefiLib/UefiLibInternal.h @@ -1,4 +1,4 @@ -/**@file +/** @file Internal include file for UefiLib. Copyright (c) 2007, Intel Corporation.
diff --git a/MdePkg/Library/UefiLib/UefiLibPrint.c b/MdePkg/Library/UefiLib/UefiLibPrint.c index df9e4d341d..c277974ab4 100644 --- a/MdePkg/Library/UefiLib/UefiLibPrint.c +++ b/MdePkg/Library/UefiLib/UefiLibPrint.c @@ -36,9 +36,8 @@ @return The number of Unicode characters in the produced output buffer not including the Null-terminator. **/ - -STATIC UINTN +EFIAPI InternalPrint ( IN CONST CHAR16 *Format, IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Console, @@ -170,8 +169,8 @@ ErrorPrint ( output buffer not including the Null-terminator. **/ -STATIC UINTN +EFIAPI AsciiInternalPrint ( IN CONST CHAR8 *Format, IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Console, diff --git a/MdePkg/Library/UefiLib/UefiNotTiano.c b/MdePkg/Library/UefiLib/UefiNotTiano.c index b621963fbc..522367993c 100644 --- a/MdePkg/Library/UefiLib/UefiNotTiano.c +++ b/MdePkg/Library/UefiLib/UefiNotTiano.c @@ -28,9 +28,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. This empty function ensures that EFI_EVENT_NOTIFY_SIGNAL_ALL is error checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0. + + @param Event Event whose notification function is being invoked. + @param Context Pointer to the notification function's context, + which is implementation-dependent. **/ -STATIC VOID EFIAPI InternalEmptyFuntion ( @@ -135,7 +138,7 @@ EfiCreateEventLegacyBootEx ( the EDK/EFI 1.10 form and EDK II/UEFI 2.0 form and allows common code to work both ways. - @param LegacyBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex). + @param ReadyToBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex). @retval EFI_SUCCESS Event was created. @retval Other Event was not created. @@ -168,7 +171,7 @@ EfiCreateEventReadyToBoot ( @param NotifyTpl The task priority level of the event. @param NotifyFunction The notification function to call when the event is signaled. @param NotifyContext The content to pass to NotifyFunction when the event is signaled. - @param LegacyBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex). + @param ReadyToBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex). @retval EFI_SUCCESS Event was created. @retval Other Event was not created. @@ -269,7 +272,7 @@ EfiSignalEventLegacyBoot ( function points to a location in FvDevicePathNode and it does not allocate new memory for the GUID pointer that is returned. - @param FvDevicePathNode Pointer to FV device path to check. + @param FvFileDevicePathNode Pointer to FV device path to check. @retval NULL FvDevicePathNode is not valid. @retval Other FvDevicePathNode is valid and pointer to NameGuid was returned. @@ -302,7 +305,7 @@ EfiGetNameGuidFromFwVolDevicePathNode ( is compiled to conform with the UEFI 2.0 specification use the new device path else use the old form for backwards compatability. - @param FvDevicePathNode Pointer to a FV device path node to initialize + @param FvFileDevicePathNode Pointer to a FV device path node to initialize @param NameGuid FV file name to use in FvDevicePathNode **/ diff --git a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c index ec7eacc769..4565955690 100644 --- a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c +++ b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c @@ -1,4 +1,4 @@ -/**@file +/** @file Library utility functions for Runtime driver. Copyright (c) 2006 Intel Corporation.
@@ -25,7 +25,7 @@ STATIC BOOLEAN mEfiAtRuntime = FALSE; EFI_RUNTIME_SERVICES *mRT; /** - Set AtRuntime flag as TRUE after ExitBootServices + Set AtRuntime flag as TRUE after ExitBootServices. @param[in] Event The Event that is being processed @param[in] Context Event Context @@ -120,6 +120,9 @@ RuntimeDriverLibConstruct ( EfiInitializeRuntimeDriverLib(). If a runtime driver exits with an error, it must call this routine to free the allocated resource before the exiting. + @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] SystemTable A pointer to the EFI System Table. + @retval EFI_SUCCESS Shutdown the Runtime Driver Lib successfully @retval EFI_UNSUPPORTED Runtime Driver lib was not initialized at all **/ @@ -146,7 +149,7 @@ RuntimeDriverLibDeconstruct ( } /** - Return TRUE if ExitBootServices () has been called + Return TRUE if ExitBootServices () has been called. @retval TRUE If ExitBootServices () has been called **/ @@ -160,7 +163,7 @@ EfiAtRuntime ( } /** - Return TRUE if SetVirtualAddressMap () has been called + Return TRUE if SetVirtualAddressMap () has been called. @retval TRUE If SetVirtualAddressMap () has been called **/ diff --git a/MdePkg/Library/UefiRuntimeLib/RuntimeService.c b/MdePkg/Library/UefiRuntimeLib/RuntimeService.c index a14b99e7b2..941426e0a4 100644 --- a/MdePkg/Library/UefiRuntimeLib/RuntimeService.c +++ b/MdePkg/Library/UefiRuntimeLib/RuntimeService.c @@ -411,7 +411,7 @@ EfiUpdateCapsule ( stored in contiguous virtual memory. @param CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in CaspuleHeaderArray. - @param MaxiumCapsuleSize On output the maximum size that UpdateCapsule() can + @param MaximumCapsuleSize On output the maximum size that UpdateCapsule() can support as an argument to UpdateCapsule() via CapsuleHeaderArray and ScatterGatherList. Undefined on input. diff --git a/MdePkg/Library/UefiScsiLib/UefiScsiLib.c b/MdePkg/Library/UefiScsiLib/UefiScsiLib.c index ac032cd4d5..bbf63179e7 100644 --- a/MdePkg/Library/UefiScsiLib/UefiScsiLib.c +++ b/MdePkg/Library/UefiScsiLib/UefiScsiLib.c @@ -113,13 +113,13 @@ ScsiTestUnitReadyCommand ( @param[in] ScsiIo SCSI IO Protocol to use @param[in] Timeout The length of timeout period. - @param[out] SenseData A pointer to output sense data. + @param[in] SenseData A pointer to output sense data. @param[in out] SenseDataLength On input, the length in bytes of the SenseData buffer. On output, the number of bytes written to the SenseData buffer. @param[out] HostAdapterStatus The status of Host Adapter. @param[out] TargetStatus The status of the target. - @param[in] InquirydataBuffer A pointer to inquiry data buffer. - @param[in,out] InquiryDataLength The length of inquiry data buffer. + @param[in] InquirydDtaBuffer A pointer to inquiry data buffer. + @param[in out] InquiryDataLength The length of inquiry data buffer. @param[in] EnableVitalProductData Boolean to enable Vital Product Data. @retval EFI_SUCCESS The status of the unit is tested successfully. @@ -213,13 +213,13 @@ ScsiInquiryCommand ( @param[in] ScsiIo A pointer to SCSI IO protocol. @param[in] Timeout The length of timeout period. - @param[out] SenseData A pointer to output sense data. + @param[in] SenseData A pointer to output sense data. @param[in out] SenseDataLength On input, the length in bytes of the SenseData buffer. On output, the number of bytes written to the SenseData buffer. @param[out] HostAdapterStatus The status of Host Adapter. @param[out] TargetStatus The status of the target. @param[in] DataBuffer A pointer to input data buffer. - @param[in,out] DataLength The length of input data buffer. + @param[in out] DataLength The length of input data buffer. @param[in] DBDField The DBD Field (Optional). @param[in] PageControl Page Control. @param[in] PageCode Page code. @@ -402,13 +402,13 @@ ScsiRequestSenseCommand ( @param[in] ScsiIo A pointer to SCSI IO protocol. @param[in] Timeout The length of timeout period. - @param[out] SenseData A pointer to output sense data. + @param[in] SenseData A pointer to output sense data. @param[in out] SenseDataLength On input, the length in bytes of the SenseData buffer. On output, the number of bytes written to the SenseData buffer. @param[out] HostAdapterStatus The status of Host Adapter. @param[out] TargetStatus The status of the target. @param[out] DataBuffer A pointer to a data buffer. - @param[in,out] DataLength The length of data buffer. + @param[in out] DataLength The length of data buffer. @param[in] PMI Partial medium indicator. @retval EFI_SUCCESS The status of the unit is tested successfully. @@ -504,13 +504,13 @@ ScsiReadCapacityCommand ( @param[in] ScsiIo A pointer to SCSI IO protocol. @param[in] Timeout The length of timeout period. - @param[out] SenseData A pointer to output sense data. + @param[in] SenseData A pointer to output sense data. @param[in out] SenseDataLength On input, the length in bytes of the SenseData buffer. On output, the number of bytes written to the SenseData buffer. @param[out] HostAdapterStatus The status of Host Adapter. @param[out] TargetStatus The status of the target. @param[out] DataBuffer Read 10 command data. - @param[in,out] DataLength The length of data buffer. + @param[in out] DataLength The length of data buffer. @param[in] StartLba The start address of LBA. @param[in] SectorSize The sector size. @@ -606,13 +606,13 @@ ScsiRead10Command ( @param[in] ScsiIo SCSI IO Protocol to use @param[in] Timeout The length of timeout period. - @param[out] SenseData A pointer to output sense data. - @param[in out] SenseDataLength On input, the length in bytes of the SenseData buffer. On + @param[in] SenseData A pointer to output sense data. + @param[in out] SenseDataLength On input, the length in bytes of the SenseData buffer. On output, the number of bytes written to the SenseData buffer. @param[out] HostAdapterStatus The status of Host Adapter. @param[out] TargetStatus The status of the target. @param[out] DataBuffer A pointer to a data buffer. - @param[in,out] DataLength The length of data buffer. + @param[in out] DataLength The length of data buffer. @param[in] StartLba The start address of LBA. @param[in] SectorSize The sector size.