summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseSynchronizationLib
Commit message (Collapse)AuthorAgeFilesLines
* MdePkg/BaseSynchronizationLib: Fix function names in function headersMichael Kinney2016-11-1710-10/+10
| | | | | | | | | | | | | | | Some of the function names in function header comment blocks in assembly files do not match the symbol name in the assembly sources. Update function header comment blocks to match symbol name. Cc: Liming Gao <liming.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Andrew Fish <afish@apple.com> Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/BaseSynchronizationLib: Add volatile Interlocked*() APIsMichael Kinney2016-11-1733-86/+86
| | | | | | | | | | | | | | | | | | The SpinLock functions in the SynchronicationLib use volatile parameters to keep compiler from optimizing these functions too much. The volatile keyword is missing from the Interlocked*() functions in this same library instance. Update the library instance to consistently use volatile on all functions in the SynchronizationLib class. Cc: Liming Gao <liming.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Andrew Fish <afish@apple.com> Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg BaseSynchronizationLib InterlockedCompareExchange64: Fix ICC buildLiming Gao2016-10-181-1/+1
| | | | | | | | | | Remove extra qword in nasm code to make it pass build. This file is only built in INTEL ICC compiler. So, there is missing build check for it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* MdePkg/BaseSynchronizationLib: spin lock alignment is 32 at leastJeff Fan2016-07-141-0/+4
| | | | | | | | | | | | Some processor may return small cache line size, we should return 32 bytes at least for spin lock alignment. Cc: Liming Gao <liming.gao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdePkg BaseSynchronizationLib: Convert X64/InterlockedIncrement.asm to NASMJordan Justen2016-06-282-0/+40
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/InterlockedIncrement.asm to X64/InterlockedIncrement.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseSynchronizationLib: Convert X64/InterlockedDecrement.asm to NASMJordan Justen2016-06-282-0/+40
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/InterlockedDecrement.asm to X64/InterlockedDecrement.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseSynchronizationLib: Convert X64/InterlockedCompareExchange16.asm ↵Jordan Justen2016-06-282-0/+43
| | | | | | | | | | to NASM The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/InterlockedCompareExchange16.asm to X64/InterlockedCompareExchange16.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseSynchronizationLib: Convert X64/InterlockedCompareExchange32.asm ↵Jordan Justen2016-06-282-0/+42
| | | | | | | | | | to NASM The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/InterlockedCompareExchange32.asm to X64/InterlockedCompareExchange32.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseSynchronizationLib: Convert X64/InterlockedCompareExchange64.asm ↵Jordan Justen2016-06-282-0/+42
| | | | | | | | | | to NASM The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/InterlockedCompareExchange64.asm to X64/InterlockedCompareExchange64.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseSynchronizationLib: Convert Ia32/InterlockedIncrement.asm to NASMJordan Justen2016-06-282-0/+40
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/InterlockedIncrement.asm to Ia32/InterlockedIncrement.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseSynchronizationLib: Convert Ia32/InterlockedDecrement.asm to NASMJordan Justen2016-06-282-0/+40
| | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/InterlockedDecrement.asm to Ia32/InterlockedDecrement.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseSynchronizationLib: Convert Ia32/InterlockedCompareExchange16.asm ↵Jordan Justen2016-06-282-0/+44
| | | | | | | | | | to NASM The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/InterlockedCompareExchange16.asm to Ia32/InterlockedCompareExchange16.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseSynchronizationLib: Convert Ia32/InterlockedCompareExchange32.asm ↵Jordan Justen2016-06-282-0/+43
| | | | | | | | | | to NASM The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/InterlockedCompareExchange32.asm to Ia32/InterlockedCompareExchange32.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg BaseSynchronizationLib: Convert Ia32/InterlockedCompareExchange64.asm ↵Jordan Justen2016-06-282-0/+49
| | | | | | | | | | to NASM The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/InterlockedCompareExchange64.asm to Ia32/InterlockedCompareExchange64.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* MdePkg/BaseSynchronizationLib: Add spin lock alignment for IA32/x64Jeff Fan2016-04-056-4/+112
| | | | | | | | | | | | | | | From Intel(R) 64 and IA-32 Architectures Software Developer's Manual, one lock or semaphore is suggested to be present within a cache line. If the processors are based on Intel NetBurst microarchitecture, two cache lines are suggested. This could minimize the bus traffic required to service locks. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdePkg/BaseSynchronizationLib: Do not check timeout if lock releasedJeff Fan2016-04-053-18/+18
| | | | | | | | | | | | | | Current AcquireSpinLock() will check if timeout happens when PcdSpinLockTimeout is not zero, even though the spin lock is already released. It may do unnecessary operation to read timer's counter. This update is trying to acquire spin lock firstly. If it could be acquired successfully, needn't to check timeout at all. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@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/BaseSynchronizationLib: fix AArch64 return valuesHaojian Zhuang2015-10-271-0/+2
| | | | | | | | | | | | | | Fix the wrong return value of both InternalSyncIncrement() and InternalSyncDecrement(). The return value shouldn't be the address of input parameter. It should be the updated value of input parameter instead. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18685 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg: BaseSynchronizationLib: fix Increment/Decrement retvals for ARMTyler Smith2015-03-202-0/+4
| | | | | | | | | | | | | | The procedure call standard dictates that we move the result to r0 before returning. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tyler Smith <tylers@hp.com> Reviewed-by: Eugene Cohen <eugene@hp.com> Reviewed-by: Leif Lindholm <leif.lindholm@arm.com> Reviewed-by: Ronald Cron <Ronald.Cron@arm.com> [lersek@redhat.com: cleaned up commit message] git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17068 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg: Convert non DOS format files to DOS formatHot Tian2015-03-054-169/+169
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hot Tian <hot.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17010 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg/BaseSynchronizationLib: Add InterlockedCompareExchange16Ard Biesheuvel2015-02-2816-0/+596
| | | | | | | | | | | | | | | This implements the function InterlockedCompareExchange16 () for all architectures, using architecture and toolchain specific intrinsics or primitive assembler instructions. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Olivier Martin <olivier.martin@arm.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16966 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg/BaseSynchronizationLib: Added proper support for ARM architectureOlivier Martin2015-02-286-232/+497
| | | | | | | | | | | | | | | | | | | | | This implements the following synchronization primitives for AArch64 (GCC) and ARM (GCC & RVCT): InternalSyncCompareExchange32 InternalSyncCompareExchange64 InternalSyncIncrement InternalSyncDecrement Note: these functions are implemented using the exclusive monitor, which implies that they can only be used after the caches (and hence the MMU) have been enabled. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16965 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-2/+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/BaseSynchronizationLib: Added ARM Aarch64 architecture supportHarry Liebel2013-07-292-1/+120
| | | | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Harry Liebel <Harry.Liebel@arm.com> Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14517 6f19259b-4bc3-4df7-8a09-765794883524
* Clarify alignment of GetSpinLockProperties() is byte alignment.lgao42012-03-073-9/+9
| | | | | | | Signed-off-by: lgao4 Reviewed-by: mdkinney git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13086 6f19259b-4bc3-4df7-8a09-765794883524
* Refine code.sfu52010-08-131-2/+2
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10793 6f19259b-4bc3-4df7-8a09-765794883524
* Minor grammatical work--mostly adding periods. Items with ONLY period added ↵myronporter2010-06-2528-66/+66
| | | | | | 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
* Temporarily remove build-in __sync_val_compare_and_swap() in the ↵qhuang82010-05-192-40/+4
| | | | | | implementation of sync functions. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10519 6f19259b-4bc3-4df7-8a09-765794883524
* Update copyright formathhtian2010-05-182-6/+6
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10506 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Restore the inline C implementation of GCC assembly files that was ↵qhuang82010-05-1811-320/+387
| | | | | | | | temporarily removed in Svn r10045. 2. Remove 139 GCC assembly files whose functionality have been covered in the inline C implementation. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10503 6f19259b-4bc3-4df7-8a09-765794883524
* Update the copyright notice formathhtian2010-04-2334-71/+71
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10413 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
* Temporarily remove the C implementation of some GCC assembly files in ↵qhuang82010-02-233-388/+1
| | | | | | MdePkg. They are kept in repository and will be re-evaluate later. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10045 6f19259b-4bc3-4df7-8a09-765794883524
* Clean up MdePkg source to correct some coding style issues, etc.qhuang82010-01-271-1/+18
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9832 6f19259b-4bc3-4df7-8a09-765794883524
* Fix file headermdkinney2009-08-241-2/+2
| | | | | | Fix a typo in InternalSyncCompareExchange32() git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9190 6f19259b-4bc3-4df7-8a09-765794883524
* Fix file headersmdkinney2009-08-244-4/+7
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9189 6f19259b-4bc3-4df7-8a09-765794883524
* Add "/" after "lock" and another instruction to improve compatibility.qhuang82009-08-214-9/+9
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9167 6f19259b-4bc3-4df7-8a09-765794883524
* Update to make end-of-line consistent for all source files in MdePkg. There ↵qhuang82009-08-194-485/+485
| | | | | | are no other updates besides that change. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9141 6f19259b-4bc3-4df7-8a09-765794883524
* Make EOL consistentmdkinney2009-08-181-5/+5
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9115 6f19259b-4bc3-4df7-8a09-765794883524
* Add ARM supportmdkinney2009-08-185-4/+493
| | | | | | Add C inline versions of the IA32 and X64 assembly functions. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9112 6f19259b-4bc3-4df7-8a09-765794883524
* Remove all unnecessary .align directives in MdePkgqhuang82009-08-111-2/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9042 6f19259b-4bc3-4df7-8a09-765794883524
* Replace .globl with ASM_GLOBALxli242009-05-204-4/+4
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8346 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Remove .extern from GCC assembly.xli242009-05-204-4/+4
| | | | | | | 2. Define macro for .global/.globl in GCC assembly. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8344 6f19259b-4bc3-4df7-8a09-765794883524
* Update to fix several ECC warningqhuang82009-02-231-3/+8
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7600 6f19259b-4bc3-4df7-8a09-765794883524
* Fix typosmdkinney2009-01-301-3/+3
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7379 6f19259b-4bc3-4df7-8a09-765794883524
* Split out Synchronization Library from Base Librarymdkinney2009-01-3033-0/+2679
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7377 6f19259b-4bc3-4df7-8a09-765794883524