summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/UefiMemoryLib
Commit message (Collapse)AuthorAgeFilesLines
* MdePkg: Apply uncrustify changesMichael Kubacki2021-12-0710-107/+122
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-0918-124/+18
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Removing ipf which is no longer supported from edk2.Chen A Chen2018-09-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing rules for Ipf sources file: * Remove the source file which path with "ipf" and also listed in [Sources.IPF] section of INF file. * Remove the source file which listed in [Components.IPF] section of DSC file and not listed in any other [Components] section. * Remove the embedded Ipf code for MDE_CPU_IPF. Removing rules for Inf file: * Remove IPF from VALID_ARCHITECTURES comments. * Remove DXE_SAL_DRIVER from LIBRARY_CLASS in [Defines] section. * Remove the INF which only listed in [Components.IPF] section in DSC. * Remove statements from [BuildOptions] that provide IPF specific flags. * Remove any IPF sepcific sections. Removing rules for Dec file: * Remove [Includes.IPF] section from Dec. Removing rules for Dsc file: * Remove IPF from SUPPORTED_ARCHITECTURES in [Defines] section of DSC. * Remove any IPF specific sections. * Remove statements from [BuildOptions] that provide IPF specific flags. Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Clean up source filesLiming Gao2018-06-2810-29/+29
| | | | | | | | | 1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
* MdePkg/MemoryLib: Refine InternalMemSetMem16|32|64 functions logicHao Wu2016-12-221-9/+9
| | | | | | | | | | | | | | | This commit refines the logic for InternalMemSetMem16|32|64 functions. It avoids using the decrement operator '--' for array index to prevent possible mis-reports by static code checkers. Please note that those modified functions are only consumed within MemoryLib by APIs SetMem16|32|64, and those APIs will handle the case when the input number of bytes to set is 0. Hence, the behavior of APIs SetMem16|32|64 is not changed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
* MdePkg/BaseMemoryLib*: check for zero length in ZeroMem ()Ard Biesheuvel2016-11-041-1/+5
| | | | | | | | | | | | | | | | Unlike other string functions in this library, ZeroMem () does not return early when the length of the input buffer is 0. So add the same to ZeroMem () as well, for all implementations of BaseMemoryLib living under MdePkg/ This fixes an issue with the ARM implementation of BaseMemoryLibOPtDxe, whose InternalMemZeroMem code does not expect a length of 0, and always writes at least a single byte. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg BaseMemoryLib: Add C implementation of API IsZeroBuffer()Hao Wu2016-08-224-3/+104
| | | | | | | | | | | | | | | Add the implementation of API IsZeroBuffer() via C language for the following library instances: BaseMemoryLib PeiMemoryLib UefiMemoryLib Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg BaseMemoryLib: Add implementation of API IsZeroGuid()Hao Wu2016-08-221-1/+30
| | | | | | | | | Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Convert all .uni files to utf-8Jordan Justen2015-12-151-0/+0
| | | | | | | | | | | | To convert these files I ran: $ python3 BaseTools/Scripts/ConvertUni.py MdePkg Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19256 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg: Convert non DOS format files to DOS formatGao, Liming2014-09-031-0/+0
| | | | | | | | | Module UNI and Package UNI files are not DOS format. Convert them to DOS format. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16042 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg: INF/DEC file updates to EDK II packagesGao, Liming2014-08-271-0/+0
| | | | | | | | | | | | | 2. Add MODULE_UNI_FILE file that contains the localized Abstract and Description of a module. a. Addresses an information gap between INF files and the UEFI Distribution Packaging Specification XML schema b. There will be an associated update to UPT in BaseTools to consume MODULE_UNI_FILE and associated UNI file during UDP creation that performs the INF -> XML conversion. c. There will be an associated update to UPT in BaseTools to produce MODULE_UNI_FILE and associated UNI file during UDP installation that performs the XML -> INF conversion. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gao, Liming <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15918 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg: INF/DEC file updates to EDK II packagesGao, Liming2014-08-271-1/+2
| | | | | | | | | | | | | 1. Usage information in INF file comment blocks are either incomplete or incorrect. This includes usage information for Protocols/PPIs/GUIDs/PCDs/HOBs/Events/BootModes. The syntax for usage information in comment blocks is defined in the EDK II Module Information (INF) Specification Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gao, Liming <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15917 6f19259b-4bc3-4df7-8a09-765794883524
* Sync bug fix in Edk r10821 to PeiMemoryLib and UefiMemoryLib instances.qhuang82010-08-261-4/+4
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10822 6f19259b-4bc3-4df7-8a09-765794883524
* Minor grammatical work--mostly adding periods. Items with ONLY period added ↵myronporter2010-06-302-8/+8
| | | | | | did not have the heading date changed, but Items with content changes had heading copyright dates updated. Sending separately a list of files missing Doxygen @param and @return information. (PENDING) git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10615 6f19259b-4bc3-4df7-8a09-765794883524
* Minor grammatical work--mostly adding periods. Items with ONLY period added ↵myronporter2010-06-2516-117/+117
| | | | | | did not have the heading date changed, but Items with content changes had heading copyright dates updated. Sending separately a list of files missing Doxygen @param and @return information. (PENDING) git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10604 6f19259b-4bc3-4df7-8a09-765794883524
* Update the copyright notice formathhtian2010-04-2316-32/+32
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10415 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Correct File header to ## @filelgao42010-02-241-4/+4
| | | | | | 2. Remove unnecessary .common] postfix on section. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10052 6f19259b-4bc3-4df7-8a09-765794883524
* 1. fix the wrong description, change "target the buffer" to "the target buffer"eric_tian2009-12-076-8/+10
| | | | | | 2. fix ICC/GYGGCC build failure on ScanMemN() in X64 arch, it can not reach the last sentence when UINTN is equal to UINT64. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9530 6f19259b-4bc3-4df7-8a09-765794883524
* Add SetMemN() and ScanMemN() to the BaseMemoryLib class and all ↵mdkinney2009-12-052-2/+71
| | | | | | BaseMemoryLib implementations git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9517 6f19259b-4bc3-4df7-8a09-765794883524
* clean up all of eight BaseMemoryLib instances in MdePkg with the following ↵qhuang82009-08-1114-91/+72
| | | | | | | | | | | | | updates: 1. Remove .intel_syntax directives in GCC assembly files. All these assembly files have been updated to use the preferred syntax for GAS 2. Correct the incorrect comments for internal worker functions for SetMemXX() and ScanMemXX(). The Length parameter is actually the counter of 16-bit, 32-bit or 64-bit value. 3. Simplify the logic in ZeroMemoryWrapper.c for BaseMemoryLibOptPei instance to remove the conditional statement for zero length. This logic is already covered by worker function InternalMemZeroMem(). 4. Cleanup all the Wrapper C files in BaseMemoryLib instances. They are supposed to be shared by all these 8 BaseMemoryLib instances, but are out-of-sync after some maintenance. This patch re-syncs them and makes them exactly the same. 5. Cleanup MemLibInternal.h so that it is shared by 6 BaseMemoryLib instance except for PeiMemoryLib and UefiMemoryLib. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9041 6f19259b-4bc3-4df7-8a09-765794883524
* Update copyright for files modified in this yearqhuang82008-12-297-7/+7
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7148 6f19259b-4bc3-4df7-8a09-765794883524
* Synchronize interface function comment from declaration in library class ↵klu22008-12-102-15/+19
| | | | | | header file to implementation in library instance. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6957 6f19259b-4bc3-4df7-8a09-765794883524
* Synchronize function comment in ↵gikidy2008-11-259-101/+106
| | | | | | MdePkg\Library\BaseMemoryLib.h,CacheMaintenanceLib.h with the c file instance of this functions. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6721 6f19259b-4bc3-4df7-8a09-765794883524
* Clean up the unused EDK_RELEASE_VERSION, PI_SPECIFICATION_VERSION and ↵lgao42008-11-251-1/+0
| | | | | | EFI_SPECIFICATION_VERSION from all the MdePkg INF files. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6716 6f19259b-4bc3-4df7-8a09-765794883524
* Remove unnessary UEFI_SPECIFICATION_VERSION and PI_SPECIFICATION_VERSION in ↵eric_tian2008-10-291-1/+0
| | | | | | INF file git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6281 6f19259b-4bc3-4df7-8a09-765794883524
* Refine file header for INF files of MDE library instances.xli242008-10-281-2/+3
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6273 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Rename following library instances according to MDE Library Spec:xli242008-10-2516-0/+1458
| | | | | | | | | | | | | | | | | | 1) SerialPortLibNull => BaseSerialPortLibNull 2) DxeMemoryLib => UefiMemoryLib 3) DxeMemoryAllocationLib => UefiMemoryAllocationLib 4) CpuLib => BaseCpuLib 5) HiiLib => UefiHiiLib 6) IfrSupportLib => UefiIfrSupportLib 7) PeiPalCallLib => PeiPalLib 2. Add library instances to MDE package 1) DxePalLib 2) FvbServiceLib 3) GraphicsLib git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6221 6f19259b-4bc3-4df7-8a09-765794883524
* DebugLib:qhuang82006-07-0518-1495/+0
| | | | | | | | | | | | | | | | | | | | | Fix a bug in PeiDxeDebugLibReportStatusCode: it should use gReportStatusCodeDebugType so that report status code infrastructure can correctly extract debug info. Fix functional and coding style issues in the three instances in EdkModulePkg, namely: EdkDxeDebugLibReportStatusCode, EdkUefiDebugLibStderr, EdkUefiDebugLibConout. DevicePathLib: Sync with MWG 0.57 and add new interface of CreateDevicePathNode(). All the function headers have been updated. PeiServicesLib: Adjust coding style and fix a minor comment error. PciLib: Adjust assert() condition to sync with MWG 0.57 BaseMemoryLib: Adjust assert() for ScanMemXX (), ScanGuid() Rename UefiMemoryLib to DxeMemoryLib PrintLib: Change the return value of all print services to exclude the NULL-terminator. Misc: Slightly adjust the coding style in hob.c in PeiCore module. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@758 6f19259b-4bc3-4df7-8a09-765794883524
* removed unnecessary name space declarations in some top level elementsjwang362006-06-301-3/+3
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@700 6f19259b-4bc3-4df7-8a09-765794883524
* converted all surface area description files to new schemajwang362006-06-301-38/+41
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@688 6f19259b-4bc3-4df7-8a09-765794883524
* • BaseMemoryLib:qhuang82006-06-2613-111/+107
| | | | | | | | | | | | | | | Modify some Aassert()s conditions to sync with MWG 0.56d Modify some defects in function header. • PostCodeLib: Implement PeiDxePostCodeLibReportStatusCode. • Misc Rename BaseDebugLibReportStatusCode to PeiDxeDebugLibReportStatusCode Remove tabs in all .c and .h files in MdePkg. Rename PeiServicesReinstallPpi() to PeiServicesReInstallPpi() Adjust some minor coding style in PeCoffLoaderGetEntryPointerLib() git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@626 6f19259b-4bc3-4df7-8a09-765794883524
* 1. UINTN & INTN issue for EBC architecture:qhuang82006-06-2210-133/+127
| | | | | | | | | | | | | | | | | | | | | | | | The MAX_BIT of EBC will no longer be fixed to bit 63. It is defined as (1ULL << (sizeof (INTN) * 8 - 1)). Make EdkModulePkg & MdePkg EBC compiler clean: treat all EFI_STATUS error code as variable. 2. PrintLib Complete all missing ASSERT()s. Fix “\n” & “%\n” issue thanks to the clarification of MWG 0.56d. Adjust StatusString array to support EBC build. 3. BaseMemoryLib Adjust ASSERT () & function header of ComparaMem, SetMemXX, ScanMemXX to synchronize with MWG 0.56d. 4.SmbusLib Change Pec bit to bit 22 SmBusAddress to synchronize MWG 0.56d. Add ASSERT()s to check if length is illegal for SmBusBlockWrite() & SmBusProcessBlock() since it is 6 bit now. 5. PerformanceLib Rename “EdkDxePerformanceLib” & “EdkPeiPerformanceLib” to “DxePerformanceLib” & “PeiPerformanceLib” respectively. Synchronize the function header of GetPerformanceMeasurement() with MWG 0.56d. 6. BasePeCoffLoaderLib. Make PeCoffLoaderLoadImage () Assert() if ImageContext is NULL> Make PeCoffLoaderLoadImage () return RETURN_INVALID_PARAMETER if the ImageAddress in ImageContext is 0. Adjust some coding style. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@593 6f19259b-4bc3-4df7-8a09-765794883524
* git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@520 ↵yshang12006-06-151-1/+4
| | | | 6f19259b-4bc3-4df7-8a09-765794883524
* BaseMemoryLib:qhuang82006-06-073-9/+9
| | | | | | | | | | | | | Correct wrong ASSERT()s on SetMem16(), SetMem32(), SetMem64() HobLib: Add Missing ASSERT()s for BuildGuidHobData() since CopyMem() now allow zero source buffer with length > 0. BasePrintLib Add ASSERT()s to check NULL buffer and NULL format. PostCodeLib Add 3 instances of PostCodeLib and introduce new Pcd for post code property mask. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@438 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Fixed incorrect ASSERT conditions in wrapper functions.bxing2006-05-303-6/+6
| | | | | | 2. Removed unnecessary SUB instructions in CompareMem.asm git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@318 6f19259b-4bc3-4df7-8a09-765794883524
* BaseMemoryLib: Add missing ASSERT()s for some interfaces.qhuang82006-05-292-3/+12
| | | | | | | | BaseTimerLibLocalApic: Add missing EBC architecture support. Note that this instance is a dummy one since EBC does not support local APIC timer. IoLibDxeCpuIo: Add alignment checking & unsupported width checking by using ASSERT()s. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@311 6f19259b-4bc3-4df7-8a09-765794883524
* Updated MSA by putting Specification element at the end of the header sectionlhauch2006-05-251-1/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@283 6f19259b-4bc3-4df7-8a09-765794883524
* Split wrapper functions into separate source files to reduce image code sizebxing2006-05-1615-638/+932
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@168 6f19259b-4bc3-4df7-8a09-765794883524
* Convert backslashes to forward slashes in many build files. This is ↵bbahnsen2006-04-261-11/+11
| | | | | | necessary for Linux support. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@55 6f19259b-4bc3-4df7-8a09-765794883524
* Initial import.bbahnsen2006-04-217-0/+1196
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3 6f19259b-4bc3-4df7-8a09-765794883524