summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseMemoryLibSse2
Commit message (Collapse)AuthorAgeFilesLines
* BaseMemoryLibSse2: Take advantage of write combining buffersCompostella, Jeremy2020-10-1610-38/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current SSE2 implementation of the ZeroMem(), SetMem(), SetMem16(), SetMem32 and SetMem64 functions is writing 16 bytes per 16 bytes. It hurts the performances so bad that this is even slower than a simple 'rep stos' (4% slower) in regular DRAM. To take full advantages of the 'movntdq' instruction it is better to "queue" a total of 64 bytes in the write combining buffers. This patch implement such a change. Below is a table where I measured (with 'rdtsc') the time to write an entire 100MB RAM buffer. These functions operate almost two times faster. | Function | Arch | Untouched | 64 bytes | Result | |----------+------+-----------+----------+--------| | ZeroMem | Ia32 | 17765947 | 9136062 | 1.945x | | ZeroMem | X64 | 17525170 | 9233391 | 1.898x | | SetMem | Ia32 | 17522291 | 9137272 | 1.918x | | SetMem | X64 | 17949261 | 9176978 | 1.956x | | SetMem16 | Ia32 | 18219673 | 9372062 | 1.944x | | SetMem16 | X64 | 17523331 | 9275184 | 1.889x | | SetMem32 | Ia32 | 18495036 | 9273053 | 1.994x | | SetMem32 | X64 | 17368864 | 9285885 | 1.870x | | SetMem64 | Ia32 | 18564473 | 9241362 | 2.009x | | SetMem64 | X64 | 17506951 | 9280148 | 1.886x | Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdePkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-0940-278/+40
| | | | | | | | | | | | | | | | | | | | 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/BaseMemoryLibSse2: Remove .S files for IA32 and X64 archShenglei Zhang2019-04-0323-1417/+0
| | | | | | | | | | | | .nasm file has been added for X86 arch. .S assembly code is not required any more. https://bugzilla.tianocore.org/show_bug.cgi?id=1594 Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Clean up source filesLiming Gao2018-06-2811-31/+31
| | | | | | | | | 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: Remove X86 ASM and S filesLiming Gao2018-06-0723-1408/+1
| | | | | | | | | | | | NASM has replaced ASM and S files. 1. Remove ASM from all modules. 2. Remove S files from the drivers only. 3. https://bugzilla.tianocore.org/show_bug.cgi?id=881 After NASM is updated, S files can be removed from Library. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@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 BaseMemoryLibSse2: Add SSE2 implementation of API IsZeroBuffer()Hao Wu2016-08-225-2/+226
| | | | | | | | | | | | | | Add the implementation of API IsZeroBuffer() via assembly in BaseMemoryLibSse2. The assembly codes use SSE2 XMM registers and related instructions. 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 BaseMemoryLibSse2: Convert X64/CopyMem.asm to NASMJordan Justen2016-06-282-0/+85
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/CopyMem.asm to X64/CopyMem.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert X64/SetMem.asm to NASMJordan Justen2016-06-282-0/+73
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/SetMem.asm to X64/SetMem.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert X64/SetMem16.asm to NASMJordan Justen2016-06-282-0/+71
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/SetMem16.asm to X64/SetMem16.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert X64/SetMem32.asm to NASMJordan Justen2016-06-282-0/+70
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/SetMem32.asm to X64/SetMem32.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert X64/SetMem64.asm to NASMJordan Justen2016-06-282-0/+61
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/SetMem64.asm to X64/SetMem64.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert X64/ZeroMem.asm to NASMJordan Justen2016-06-282-0/+67
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/ZeroMem.asm to X64/ZeroMem.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert X64/CompareMem.asm to NASMJordan Justen2016-06-282-0/+60
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/CompareMem.asm to X64/CompareMem.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert X64/ScanMem8.asm to NASMJordan Justen2016-06-282-0/+57
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/ScanMem8.asm to X64/ScanMem8.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert X64/ScanMem16.asm to NASMJordan Justen2016-06-282-0/+57
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/ScanMem16.asm to X64/ScanMem16.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert X64/ScanMem32.asm to NASMJordan Justen2016-06-282-0/+57
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/ScanMem32.asm to X64/ScanMem32.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert X64/ScanMem64.asm to NASMJordan Justen2016-06-282-0/+57
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/ScanMem64.asm to X64/ScanMem64.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert Ia32/CopyMem.asm to NASMJordan Justen2016-06-282-0/+86
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/CopyMem.asm to Ia32/CopyMem.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert Ia32/SetMem.asm to NASMJordan Justen2016-06-282-0/+75
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/SetMem.asm to Ia32/SetMem.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert Ia32/SetMem16.asm to NASMJordan Justen2016-06-282-0/+71
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/SetMem16.asm to Ia32/SetMem16.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert Ia32/SetMem32.asm to NASMJordan Justen2016-06-282-0/+70
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/SetMem32.asm to Ia32/SetMem32.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert Ia32/SetMem64.asm to NASMJordan Justen2016-06-282-0/+62
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/SetMem64.asm to Ia32/SetMem64.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert Ia32/ZeroMem.asm to NASMJordan Justen2016-06-282-0/+67
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/ZeroMem.asm to Ia32/ZeroMem.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert Ia32/CompareMem.asm to NASMJordan Justen2016-06-282-0/+59
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/CompareMem.asm to Ia32/CompareMem.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert Ia32/ScanMem8.asm to NASMJordan Justen2016-06-282-0/+56
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/ScanMem8.asm to Ia32/ScanMem8.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert Ia32/ScanMem16.asm to NASMJordan Justen2016-06-282-0/+56
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/ScanMem16.asm to Ia32/ScanMem16.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert Ia32/ScanMem32.asm to NASMJordan Justen2016-06-282-0/+56
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/ScanMem32.asm to Ia32/ScanMem32.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseMemoryLibSse2: Convert Ia32/ScanMem64.asm to NASMJordan Justen2016-06-282-0/+65
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/ScanMem64.asm to Ia32/ScanMem64.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@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-4/+4
| | | | | | | | | | | | | 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
* MdePkg: Fix Clang build failureGao, Liming2014-08-111-1/+1
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gao, Liming <liming.gao@intel.com> Reviewed-by: Andrew Fish <afish@apple.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15784 6f19259b-4bc3-4df7-8a09-765794883524
* Minor grammatical work--mostly adding periods. Items with ONLY period added ↵myronporter2010-06-2558-149/+149
| | | | | | 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-2358-116/+116
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10411 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
* Use "movd" instruction to manipulate MMX register to support more GNU ↵qhuang82009-08-121-1/+1
| | | | | | assemblers. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9055 6f19259b-4bc3-4df7-8a09-765794883524
* clean up all of eight BaseMemoryLib instances in MdePkg with the following ↵qhuang82009-08-1124-240/+217
| | | | | | | | | | | | | 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
* Replace .globl with ASM_GLOBALxli242009-05-2022-22/+22
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8346 6f19259b-4bc3-4df7-8a09-765794883524
* cleanup the .S file to wrap all public symbols with ASM_PFX() macro,which is ↵eric_tian2009-05-1511-22/+22
| | | | | | used to generate underscore prior to public symbol or not within various GCC distribution versions. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8316 6f19259b-4bc3-4df7-8a09-765794883524
* INF file verified, and Coding Style reviewed.gikidy2009-01-091-3/+3
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7232 6f19259b-4bc3-4df7-8a09-765794883524
* Update copyright for files modified in this yearqhuang82008-12-2937-37/+37
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7148 6f19259b-4bc3-4df7-8a09-765794883524
* Synchronize MdePkg h files to Library/Base* c files.gikidy2008-12-111-2/+2
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6984 6f19259b-4bc3-4df7-8a09-765794883524
* Synchronize function comment in ↵gikidy2008-11-259-53/+45
| | | | | | 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
* Update to use DOS formatqhuang82008-11-0321-1348/+1348
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6360 6f19259b-4bc3-4df7-8a09-765794883524