diff options
author | Mitchell Horne <mhorne@FreeBSD.org> | 2020-06-03 18:44:51 +0000 |
---|---|---|
committer | Mitchell Horne <mhorne@FreeBSD.org> | 2020-06-03 18:44:51 +0000 |
commit | 4a14dfcc1110b35118d5be8054fecf59ffb83032 (patch) | |
tree | 8bf1574ccba91c926acbe0a05d32482ba8825e26 /MdePkg/Library/BaseLib/Ia32 | |
parent | 0499b37cea9ca98acfe36368e521ad36b7783f2d (diff) | |
download | src-vendor/edk2/ca407c7246bf405da6d9b1b9d93e5e7f17b4b1f9.tar.gz src-vendor/edk2/ca407c7246bf405da6d9b1b9d93e5e7f17b4b1f9.zip |
Import edk2-stable202005vendor/edk2/ca407c7246bf405da6d9b1b9d93e5e7f17b4b1f9vendor/edk2
As with the previous import, only the MdePkg subdirectory has been
brought in. The line-endings were also converted using:
% find . -type f | xargs -n 1 sed -I.BAK -e `printf "s/\r//g"`
% find . -name \*.BAK | xargs rm
Diffstat (limited to 'MdePkg/Library/BaseLib/Ia32')
309 files changed, 375 insertions, 7397 deletions
diff --git a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.S b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.S deleted file mode 100644 index 32f84199c967..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.S +++ /dev/null @@ -1,43 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# ARShiftU64.S -# -# Abstract: -# -# 64-bit arithmetic right shift function for IA-32 -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(InternalMathARShiftU64) - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# InternalMathARShiftU64 ( -# IN UINT64 Operand, -# IN UINTN Count -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalMathARShiftU64): - movb 12(%esp), %cl - movl 8(%esp), %eax - cltd - testb $32, %cl - jnz L0 - movl %eax, %edx - movl 4(%esp), %eax -L0: - shrdl %cl, %edx, %eax - sar %cl, %edx - ret diff --git a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.asm b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.asm deleted file mode 100644 index 478c184a6ef9..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.asm +++ /dev/null @@ -1,48 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ARShiftU64.asm -; -; Abstract: -; -; 64-bit arithmetic right shift function for IA-32 -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathARShiftU64 ( -; IN UINT64 Operand, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMathARShiftU64 PROC - mov cl, [esp + 12] - mov eax, [esp + 8] - cdq - test cl, 32 - jnz @F - mov edx, eax - mov eax, [esp + 4] -@@: - shrd eax, edx, cl - sar edx, cl - ret -InternalMathARShiftU64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.c b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.c index c2ebaeb33b4b..33287bc17bf1 100644 --- a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.c +++ b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.c @@ -2,13 +2,7 @@ 64-bit arithmetic right shift function for IA-32. Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.nasm b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.nasm index 448e3ab8d230..603be4284c00 100644 --- a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.asm b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.asm deleted file mode 100644 index f4ce3f90b106..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; CpuBreakpoint.Asm -; -; Abstract: -; -; CpuBreakpoint function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuBreakpoint ( -; VOID -; ); -;------------------------------------------------------------------------------ -CpuBreakpoint PROC - int 3 - ret -CpuBreakpoint ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c index 23a773a04384..973c9acd1c27 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c +++ b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c @@ -2,13 +2,7 @@ CpuBreakpoint function. Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -19,7 +13,7 @@ Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. **/ -void __debugbreak (); +void __debugbreak (VOID); #pragma intrinsic(__debugbreak) diff --git a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.nasm b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.nasm index 4f91895e7b05..c0b809a7b35e 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.nasm +++ b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.nasm @@ -1,12 +1,6 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/CpuId.S b/MdePkg/Library/BaseLib/Ia32/CpuId.S deleted file mode 100644 index 6f9e10c8f3ca..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/CpuId.S +++ /dev/null @@ -1,63 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# CpuId.S -# -# Abstract: -# -# AsmCpuid function -# -# Notes: -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(AsmCpuid) - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmCpuid ( -# IN UINT32 RegisterInEax, -# OUT UINT32 *RegisterOutEax OPTIONAL, -# OUT UINT32 *RegisterOutEbx OPTIONAL, -# OUT UINT32 *RegisterOutEcx OPTIONAL, -# OUT UINT32 *RegisterOutEdx OPTIONAL -# ) -#------------------------------------------------------------------------------ -ASM_PFX(AsmCpuid): - push %ebx - push %ebp - movl %esp, %ebp - movl 12(%ebp), %eax - cpuid - push %ecx - movl 16(%ebp), %ecx - jecxz L1 - movl %eax, (%ecx) -L1: - movl 20(%ebp), %ecx - jecxz L2 - movl %ebx, (%ecx) -L2: - movl 24(%ebp), %ecx - jecxz L3 - popl (%ecx) -L3: - movl 28(%ebp), %ecx - jecxz L4 - movl %edx, (%ecx) -L4: - movl 12(%ebp), %eax - leave - pop %ebx - ret diff --git a/MdePkg/Library/BaseLib/Ia32/CpuId.asm b/MdePkg/Library/BaseLib/Ia32/CpuId.asm deleted file mode 100644 index e2f9d0b1466f..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/CpuId.asm +++ /dev/null @@ -1,66 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; CpuId.Asm -; -; Abstract: -; -; AsmCpuid function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmCpuid ( -; IN UINT32 RegisterInEax, -; OUT UINT32 *RegisterOutEax OPTIONAL, -; OUT UINT32 *RegisterOutEbx OPTIONAL, -; OUT UINT32 *RegisterOutEcx OPTIONAL, -; OUT UINT32 *RegisterOutEdx OPTIONAL -; ); -;------------------------------------------------------------------------------ -AsmCpuid PROC USES ebx - push ebp - mov ebp, esp - mov eax, [ebp + 12] - cpuid - push ecx - mov ecx, [ebp + 16] - jecxz @F - mov [ecx], eax -@@: - mov ecx, [ebp + 20] - jecxz @F - mov [ecx], ebx -@@: - mov ecx, [ebp + 24] - jecxz @F - pop DWORD [ecx] -@@: - mov ecx, [ebp + 28] - jecxz @F - mov [ecx], edx -@@: - mov eax, [ebp + 12] - leave - ret -AsmCpuid ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/CpuId.c b/MdePkg/Library/BaseLib/Ia32/CpuId.c index d9c72662e62c..b47c7380f19e 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuId.c +++ b/MdePkg/Library/BaseLib/Ia32/CpuId.c @@ -2,13 +2,7 @@ AsmCpuid function. Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/CpuId.nasm b/MdePkg/Library/BaseLib/Ia32/CpuId.nasm index 5996b9263289..ee80f3a7d2df 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuId.nasm +++ b/MdePkg/Library/BaseLib/Ia32/CpuId.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.S b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.S deleted file mode 100644 index edcaa89b5141..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.S +++ /dev/null @@ -1,67 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# CpuIdEx.S -# -# Abstract: -# -# AsmCpuidEx function -# -# Notes: -# -#------------------------------------------------------------------------------ - - - .code: - -#------------------------------------------------------------------------------ -# UINT32 -# EFIAPI -# AsmCpuidEx ( -# IN UINT32 RegisterInEax, -# IN UINT32 RegisterInEcx, -# OUT UINT32 *RegisterOutEax OPTIONAL, -# OUT UINT32 *RegisterOutEbx OPTIONAL, -# OUT UINT32 *RegisterOutEcx OPTIONAL, -# OUT UINT32 *RegisterOutEdx OPTIONAL -# ) -#------------------------------------------------------------------------------ -ASM_GLOBAL ASM_PFX(AsmCpuidEx) -ASM_PFX(AsmCpuidEx): - push %ebx - push %ebp - movl %esp, %ebp - movl 12(%ebp), %eax - movl 16(%ebp), %ecx - cpuid - push %ecx - movl 20(%ebp), %ecx - jecxz L1 - movl %eax, (%ecx) -L1: - movl 24(%ebp), %ecx - jecxz L2 - movl %ebx, (%ecx) -L2: - movl 32(%ebp), %ecx - jecxz L3 - movl %edx, (%ecx) -L3: - movl 28(%ebp), %ecx - jecxz L4 - popl (%ecx) -L4: - movl 12(%ebp), %eax - leave - pop %ebx - ret diff --git a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.asm b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.asm deleted file mode 100644 index 1b2ccb58b047..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.asm +++ /dev/null @@ -1,68 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; CpuIdEx.Asm -; -; Abstract: -; -; AsmCpuidEx function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; AsmCpuidEx ( -; IN UINT32 RegisterInEax, -; IN UINT32 RegisterInEcx, -; OUT UINT32 *RegisterOutEax OPTIONAL, -; OUT UINT32 *RegisterOutEbx OPTIONAL, -; OUT UINT32 *RegisterOutEcx OPTIONAL, -; OUT UINT32 *RegisterOutEdx OPTIONAL -; ) -;------------------------------------------------------------------------------ -AsmCpuidEx PROC USES ebx - push ebp - mov ebp, esp - mov eax, [ebp + 12] - mov ecx, [ebp + 16] - cpuid - push ecx - mov ecx, [ebp + 20] - jecxz @F - mov [ecx], eax -@@: - mov ecx, [ebp + 24] - jecxz @F - mov [ecx], ebx -@@: - mov ecx, [ebp + 32] - jecxz @F - mov [ecx], edx -@@: - mov ecx, [ebp + 28] - jecxz @F - pop DWORD [ecx] -@@: - mov eax, [ebp + 12] - leave - ret -AsmCpuidEx ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.c b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.c index 1b3d91dcaa4f..2011645ab4cf 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.c +++ b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.c @@ -2,13 +2,7 @@ AsmCpuidEx function. Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.nasm b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.nasm index e3d16ec109f2..476ca11653c6 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.nasm +++ b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/CpuPause.asm b/MdePkg/Library/BaseLib/Ia32/CpuPause.asm deleted file mode 100644 index 14ff32286b2a..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/CpuPause.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; CpuPause.Asm -; -; Abstract: -; -; CpuPause function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuPause ( -; VOID -; ); -;------------------------------------------------------------------------------ -CpuPause PROC - pause - ret -CpuPause ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/CpuPause.c b/MdePkg/Library/BaseLib/Ia32/CpuPause.c index e3094e228d88..ba87f6df2c08 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuPause.c +++ b/MdePkg/Library/BaseLib/Ia32/CpuPause.c @@ -2,13 +2,7 @@ CpuPause function. Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/CpuPause.nasm b/MdePkg/Library/BaseLib/Ia32/CpuPause.nasm index fb92687669fa..b9a98cd72939 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuPause.nasm +++ b/MdePkg/Library/BaseLib/Ia32/CpuPause.nasm @@ -1,12 +1,6 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/DisableCache.S b/MdePkg/Library/BaseLib/Ia32/DisableCache.S deleted file mode 100644 index cadfa7a496c3..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/DisableCache.S +++ /dev/null @@ -1,39 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# DisableCache.S -# -# Abstract: -# -# Set the CD bit of CR0 to 1, clear the NW bit of CR0 to 0, and flush all caches with a -# WBINVD instruction. -# -# Notes: -# -#------------------------------------------------------------------------------ - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmDisableCache ( -# VOID -# ); -#------------------------------------------------------------------------------ -ASM_GLOBAL ASM_PFX(AsmDisableCache) -ASM_PFX(AsmDisableCache): - movl %cr0, %eax - btsl $30, %eax - btrl $29, %eax - movl %eax, %cr0 - wbinvd - ret diff --git a/MdePkg/Library/BaseLib/Ia32/DisableCache.asm b/MdePkg/Library/BaseLib/Ia32/DisableCache.asm deleted file mode 100644 index 35ed81c8617d..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/DisableCache.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; DisableCache.Asm -; -; Abstract: -; -; Set the CD bit of CR0 to 1, clear the NW bit of CR0 to 0, and flush all caches with a -; WBINVD instruction. -; -; Notes: -; -;------------------------------------------------------------------------------ - - .486p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmDisableCache ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmDisableCache PROC - mov eax, cr0 - bts eax, 30 - btr eax, 29 - mov cr0, eax - wbinvd - ret -AsmDisableCache ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/DisableCache.c b/MdePkg/Library/BaseLib/Ia32/DisableCache.c index 598063949804..9227a9764676 100644 --- a/MdePkg/Library/BaseLib/Ia32/DisableCache.c +++ b/MdePkg/Library/BaseLib/Ia32/DisableCache.c @@ -2,13 +2,7 @@ AsmDisableCache function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/DisableCache.nasm b/MdePkg/Library/BaseLib/Ia32/DisableCache.nasm index c956b7230b66..ce83bf419b1a 100644 --- a/MdePkg/Library/BaseLib/Ia32/DisableCache.nasm +++ b/MdePkg/Library/BaseLib/Ia32/DisableCache.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.asm b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.asm deleted file mode 100644 index f6e47b5531bf..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; DisableInterrupts.Asm -; -; Abstract: -; -; DisableInterrupts function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; DisableInterrupts ( -; VOID -; ); -;------------------------------------------------------------------------------ -DisableInterrupts PROC - cli - ret -DisableInterrupts ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c index a20b3d3064d1..bb307768187d 100644 --- a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c +++ b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c @@ -2,13 +2,7 @@ DisableInterrupts function. Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.nasm b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.nasm index ccf69b08a798..c6aff97545a9 100644 --- a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.nasm +++ b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.S b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.S deleted file mode 100644 index 08b3cc6b6859..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.S +++ /dev/null @@ -1,52 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# DisablePaging32.S -# -# Abstract: -# -# InternalX86DisablePaging32 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(InternalX86DisablePaging32) - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# InternalX86DisablePaging32 ( -# IN SWITCH_STACK_ENTRY_POINT EntryPoint, -# IN VOID *Context1, OPTIONAL -# IN VOID *Context2, OPTIONAL -# IN VOID *NewStack -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalX86DisablePaging32): - movl 4(%esp), %ebx - movl 8(%esp), %ecx - movl 12(%esp), %edx - pushfl - pop %edi # save EFLAGS to edi - cli - movl %cr0, %eax - btrl $31, %eax - movl 16(%esp), %esp - movl %eax, %cr0 - push %edi - popfl # restore EFLAGS from edi - push %edx - push %ecx - call *%ebx - jmp . # EntryPoint() should not return diff --git a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.asm b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.asm deleted file mode 100644 index ce6f23f97b92..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.asm +++ /dev/null @@ -1,57 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; DisablePaging32.Asm -; -; Abstract: -; -; AsmDisablePaging32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86DisablePaging32 ( -; IN SWITCH_STACK_ENTRY_POINT EntryPoint, -; IN VOID *Context1, OPTIONAL -; IN VOID *Context2, OPTIONAL -; IN VOID *NewStack -; ); -;------------------------------------------------------------------------------ -InternalX86DisablePaging32 PROC - mov ebx, [esp + 4] - mov ecx, [esp + 8] - mov edx, [esp + 12] - pushfd - pop edi ; save EFLAGS to edi - cli - mov eax, cr0 - btr eax, 31 - mov esp, [esp + 16] - mov cr0, eax - push edi - popfd ; restore EFLAGS from edi - push edx - push ecx - call ebx - jmp $ ; EntryPoint() should not return -InternalX86DisablePaging32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.c b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.c index eb7556652d45..989c954c105c 100644 --- a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.c +++ b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.c @@ -2,13 +2,7 @@ AsmDisablePaging32 function. Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.nasm b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.nasm index 62813c968c00..d7549e2f729f 100644 --- a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.nasm +++ b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c b/MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c index 90c1042a05eb..88a7ae916fb9 100644 --- a/MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c +++ b/MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c @@ -2,13 +2,7 @@ Integer division worker functions for Ia32. Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32.S b/MdePkg/Library/BaseLib/Ia32/DivU64x32.S deleted file mode 100644 index 55a6854860c9..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x32.S +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# DivU64x32.S -# -# Abstract: -# -# Calculate the quotient of a 64-bit integer by a 32-bit integer -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(InternalMathDivU64x32) - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# InternalMathDivU64x32 ( -# IN UINT64 Dividend, -# IN UINT32 Divisor -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalMathDivU64x32): - movl 8(%esp), %eax - movl 12(%esp), %ecx - xorl %edx, %edx - divl %ecx - push %eax # save quotient on stack - movl 8(%esp), %eax - divl %ecx - pop %edx # restore high-order dword of the quotient - ret diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32.asm b/MdePkg/Library/BaseLib/Ia32/DivU64x32.asm deleted file mode 100644 index 838241fe12ae..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x32.asm +++ /dev/null @@ -1,46 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; DivU64x32.asm -; -; Abstract: -; -; Calculate the quotient of a 64-bit integer by a 32-bit integer -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathDivU64x32 ( -; IN UINT64 Dividend, -; IN UINT32 Divisor -; ); -;------------------------------------------------------------------------------ -InternalMathDivU64x32 PROC - mov eax, [esp + 8] - mov ecx, [esp + 12] - xor edx, edx - div ecx - push eax ; save quotient on stack - mov eax, [esp + 8] - div ecx - pop edx ; restore high-order dword of the quotient - ret -InternalMathDivU64x32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32.c b/MdePkg/Library/BaseLib/Ia32/DivU64x32.c index e680bf2dd2c8..4bb453114d92 100644 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x32.c +++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32.c @@ -2,13 +2,7 @@ Calculate the quotient of a 64-bit integer by a 32-bit integer Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32.nasm b/MdePkg/Library/BaseLib/Ia32/DivU64x32.nasm index 6b96f8299ea2..72d7c699a74b 100644 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x32.nasm +++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.S b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.S deleted file mode 100644 index 743abf272ba4..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.S +++ /dev/null @@ -1,46 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# DivError.S -# -# Abstract: -# -# Set error flag for all division functions -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(InternalMathDivRemU64x32) - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# InternalMathDivRemU64x32 ( -# IN UINT64 Dividend, -# IN UINT32 Divisor, -# OUT UINT32 *Remainder -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalMathDivRemU64x32): - movl 12(%esp), %ecx # ecx <- divisor - movl 8(%esp), %eax # eax <- dividend[32..63] - xorl %edx, %edx - divl %ecx # eax <- quotient[32..63], edx <- remainder - push %eax - movl 8(%esp), %eax # eax <- dividend[0..31] - divl %ecx # eax <- quotient[0..31] - movl 20(%esp), %ecx # ecx <- Remainder - jecxz L1 # abandon remainder if Remainder == NULL - movl %edx, (%ecx) -L1: - pop %edx # edx <- quotient[32..63] - ret diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm deleted file mode 100644 index f5e0c11c6c5f..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm +++ /dev/null @@ -1,51 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; DivError.asm -; -; Abstract: -; -; Set error flag for all division functions -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathDivRemU64x32 ( -; IN UINT64 Dividend, -; IN UINT32 Divisor, -; OUT UINT32 *Remainder -; ); -;------------------------------------------------------------------------------ -InternalMathDivRemU64x32 PROC - mov ecx, [esp + 12] ; ecx <- divisor - mov eax, [esp + 8] ; eax <- dividend[32..63] - xor edx, edx - div ecx ; eax <- quotient[32..63], edx <- remainder - push eax - mov eax, [esp + 8] ; eax <- dividend[0..31] - div ecx ; eax <- quotient[0..31] - mov ecx, [esp + 20] ; ecx <- Remainder - jecxz @F ; abandon remainder if Remainder == NULL - mov [ecx], edx -@@: - pop edx ; edx <- quotient[32..63] - ret -InternalMathDivRemU64x32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c index 87f9352cf436..bd80a7b01959 100644 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c +++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c @@ -2,13 +2,7 @@ Set error flag for all division functions Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.nasm b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.nasm index 1ccc4de4aff2..f2220ddd6c18 100644 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.nasm +++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.S b/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.S deleted file mode 100644 index bd2aeba2e69b..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.S +++ /dev/null @@ -1,89 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# DivU64x64Remainder.S -# -# Abstract: -# -# Calculate the quotient of a 64-bit integer by a 64-bit integer and returns -# both the quotient and the remainder -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(InternalMathDivRemU64x32), ASM_PFX(InternalMathDivRemU64x64) - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# InternalMathDivRemU64x64 ( -# IN UINT64 Dividend, -# IN UINT64 Divisor, -# OUT UINT64 *Remainder OPTIONAL -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalMathDivRemU64x64): - movl 16(%esp), %ecx # ecx <- divisor[32..63] - testl %ecx, %ecx - jnz Hard # call _@DivRemU64x64 if Divisor > 2^32 - movl 20(%esp), %ecx - jecxz L1 - andl $0, 4(%ecx) # zero high dword of remainder - movl %ecx, 16(%esp) # set up stack frame to match DivRemU64x32 -L1: - jmp ASM_PFX(InternalMathDivRemU64x32) -Hard: - push %ebx - push %esi - push %edi - mov 20(%esp), %edx - mov 16(%esp), %eax # edx:eax <- dividend - movl %edx, %edi - movl %eax, %esi # edi:esi <- dividend - mov 24(%esp), %ebx # ecx:ebx <- divisor -L2: - shrl %edx - rcrl $1, %eax - shrdl $1, %ecx, %ebx - shrl %ecx - jnz L2 - divl %ebx - movl %eax, %ebx # ebx <- quotient - movl 28(%esp), %ecx # ecx <- high dword of divisor - mull 24(%esp) # edx:eax <- quotient * divisor[0..31] - imull %ebx, %ecx # ecx <- quotient * divisor[32..63] - addl %ecx, %edx # edx <- (quotient * divisor)[32..63] - mov 32(%esp), %ecx # ecx <- addr for Remainder - jc TooLarge # product > 2^64 - cmpl %edx, %edi # compare high 32 bits - ja Correct - jb TooLarge # product > dividend - cmpl %eax, %esi - jae Correct # product <= dividend -TooLarge: - decl %ebx # adjust quotient by -1 - jecxz Return # return if Remainder == NULL - sub 24(%esp), %eax - sbb 28(%esp), %edx # edx:eax <- (quotient - 1) * divisor -Correct: - jecxz Return - subl %eax, %esi - sbbl %edx, %edi # edi:esi <- remainder - movl %esi, (%ecx) - movl %edi, 4(%ecx) -Return: - movl %ebx, %eax # eax <- quotient - xorl %edx, %edx # quotient is 32 bits long - pop %edi - pop %esi - pop %ebx - ret diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.asm b/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.asm deleted file mode 100644 index ce352f13b429..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.asm +++ /dev/null @@ -1,92 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; DivU64x64Remainder.asm -; -; Abstract: -; -; Calculate the quotient of a 64-bit integer by a 64-bit integer and returns -; both the quotient and the remainder -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -EXTERN InternalMathDivRemU64x32:PROC - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathDivRemU64x64 ( -; IN UINT64 Dividend, -; IN UINT64 Divisor, -; OUT UINT64 *Remainder OPTIONAL -; ); -;------------------------------------------------------------------------------ -InternalMathDivRemU64x64 PROC - mov ecx, [esp + 16] ; ecx <- divisor[32..63] - test ecx, ecx - jnz _@DivRemU64x64 ; call _@DivRemU64x64 if Divisor > 2^32 - mov ecx, [esp + 20] - jecxz @F - and dword ptr [ecx + 4], 0 ; zero high dword of remainder - mov [esp + 16], ecx ; set up stack frame to match DivRemU64x32 -@@: - jmp InternalMathDivRemU64x32 -InternalMathDivRemU64x64 ENDP - -_@DivRemU64x64 PROC PRIVATE USES ebx esi edi - mov edx, dword ptr [esp + 20] - mov eax, dword ptr [esp + 16] ; edx:eax <- dividend - mov edi, edx - mov esi, eax ; edi:esi <- dividend - mov ebx, dword ptr [esp + 24] ; ecx:ebx <- divisor -@@: - shr edx, 1 - rcr eax, 1 - shrd ebx, ecx, 1 - shr ecx, 1 - jnz @B - div ebx - mov ebx, eax ; ebx <- quotient - mov ecx, [esp + 28] ; ecx <- high dword of divisor - mul dword ptr [esp + 24] ; edx:eax <- quotient * divisor[0..31] - imul ecx, ebx ; ecx <- quotient * divisor[32..63] - add edx, ecx ; edx <- (quotient * divisor)[32..63] - mov ecx, dword ptr [esp + 32] ; ecx <- addr for Remainder - jc @TooLarge ; product > 2^64 - cmp edi, edx ; compare high 32 bits - ja @Correct - jb @TooLarge ; product > dividend - cmp esi, eax - jae @Correct ; product <= dividend -@TooLarge: - dec ebx ; adjust quotient by -1 - jecxz @Return ; return if Remainder == NULL - sub eax, dword ptr [esp + 24] - sbb edx, dword ptr [esp + 28] ; edx:eax <- (quotient - 1) * divisor -@Correct: - jecxz @Return - sub esi, eax - sbb edi, edx ; edi:esi <- remainder - mov [ecx], esi - mov [ecx + 4], edi -@Return: - mov eax, ebx ; eax <- quotient - xor edx, edx ; quotient is 32 bits long - ret -_@DivRemU64x64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.nasm b/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.nasm index c70e1291a9eb..5475a159592a 100644 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.nasm +++ b/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/EnableCache.S b/MdePkg/Library/BaseLib/Ia32/EnableCache.S deleted file mode 100644 index fd7f7e0a6f7e..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/EnableCache.S +++ /dev/null @@ -1,39 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# EnableCache.S -# -# Abstract: -# -# Flush all caches with a WBINVD instruction, clear the CD bit of CR0 to 0, and clear -# the NW bit of CR0 to 0 -# -# Notes: -# -#------------------------------------------------------------------------------ - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# AsmEnableCache ( -# VOID -# ); -#------------------------------------------------------------------------------ -ASM_GLOBAL ASM_PFX(AsmEnableCache) -ASM_PFX(AsmEnableCache): - wbinvd - movl %cr0, %eax - btrl $30, %eax - btrl $29, %eax - movl %eax, %cr0 - ret diff --git a/MdePkg/Library/BaseLib/Ia32/EnableCache.asm b/MdePkg/Library/BaseLib/Ia32/EnableCache.asm deleted file mode 100644 index 124e10960d26..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/EnableCache.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; EnableCache.Asm -; -; Abstract: -; -; Flush all caches with a WBINVD instruction, clear the CD bit of CR0 to 0, and clear -; the NW bit of CR0 to 0 -; -; Notes: -; -;------------------------------------------------------------------------------ - - .486p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmEnableCache ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmEnableCache PROC - wbinvd - mov eax, cr0 - btr eax, 29 - btr eax, 30 - mov cr0, eax - ret -AsmEnableCache ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/EnableCache.c b/MdePkg/Library/BaseLib/Ia32/EnableCache.c index 912defb617ce..d5bf82f73613 100644 --- a/MdePkg/Library/BaseLib/Ia32/EnableCache.c +++ b/MdePkg/Library/BaseLib/Ia32/EnableCache.c @@ -2,13 +2,7 @@ AsmEnableCache function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/EnableCache.nasm b/MdePkg/Library/BaseLib/Ia32/EnableCache.nasm index 63c605df91b0..77645aa06837 100644 --- a/MdePkg/Library/BaseLib/Ia32/EnableCache.nasm +++ b/MdePkg/Library/BaseLib/Ia32/EnableCache.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.S b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.S deleted file mode 100644 index 446c36b57598..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.S +++ /dev/null @@ -1,36 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# EnableDisableInterrupts.S -# -# Abstract: -# -# EnableDisableInterrupts function -# -# Notes: -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(EnableDisableInterrupts) - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# EnableDisableInterrupts ( -# VOID -# ); -#------------------------------------------------------------------------------ -ASM_PFX(EnableDisableInterrupts): - sti - cli - ret diff --git a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.asm b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.asm deleted file mode 100644 index 8e707bfd0326..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; EnableDisableInterrupts.Asm -; -; Abstract: -; -; EnableDisableInterrupts function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; EnableDisableInterrupts ( -; VOID -; ); -;------------------------------------------------------------------------------ -EnableDisableInterrupts PROC - sti - cli - ret -EnableDisableInterrupts ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c index d351afb932f2..c8b2f76b4e54 100644 --- a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c +++ b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c @@ -2,13 +2,7 @@ EnableDisableInterrupts function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.nasm b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.nasm index d5cb3e6df3cf..d56709f780ac 100644 --- a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.nasm +++ b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.asm b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.asm deleted file mode 100644 index 891661992d9f..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; EnableInterrupts.Asm -; -; Abstract: -; -; EnableInterrupts function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; EnableInterrupts ( -; VOID -; ); -;------------------------------------------------------------------------------ -EnableInterrupts PROC - sti - ret -EnableInterrupts ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c index 7fe14cb49fd8..015bbd9df55b 100644 --- a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c +++ b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c @@ -2,13 +2,7 @@ EnableInterrupts function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.nasm b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.nasm index f4a41117c93b..91b58e49a724 100644 --- a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.nasm +++ b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.S b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.S deleted file mode 100644 index 2449556c45df..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.S +++ /dev/null @@ -1,52 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# EnablePaging32.S -# -# Abstract: -# -# InternalX86EnablePaging32 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(InternalX86EnablePaging32) - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# InternalX86EnablePaging32 ( -# IN SWITCH_STACK_ENTRY_POINT EntryPoint, -# IN VOID *Context1, OPTIONAL -# IN VOID *Context2, OPTIONAL -# IN VOID *NewStack -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalX86EnablePaging32): - movl 4(%esp), %ebx - movl 8(%esp), %ecx - movl 12(%esp), %edx - pushfl - pop %edi # save flags in edi - cli - movl %cr0, %eax - btsl $31, %eax - movl 16(%esp), %esp - movl %eax, %cr0 - push %edi - popfl # restore flags - push %edx - push %ecx - call *%ebx - jmp . diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.asm b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.asm deleted file mode 100644 index 88191330f09c..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.asm +++ /dev/null @@ -1,57 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; EnablePaging32.Asm -; -; Abstract: -; -; AsmEnablePaging32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86EnablePaging32 ( -; IN SWITCH_STACK_ENTRY_POINT EntryPoint, -; IN VOID *Context1, OPTIONAL -; IN VOID *Context2, OPTIONAL -; IN VOID *NewStack -; ); -;------------------------------------------------------------------------------ -InternalX86EnablePaging32 PROC - mov ebx, [esp + 4] - mov ecx, [esp + 8] - mov edx, [esp + 12] - pushfd - pop edi ; save flags in edi - cli - mov eax, cr0 - bts eax, 31 - mov esp, [esp + 16] - mov cr0, eax - push edi - popfd ; restore flags - push edx - push ecx - call ebx - jmp $ -InternalX86EnablePaging32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.c b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.c index 18e9d1129d59..ee4ae6b45ce0 100644 --- a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.c +++ b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.c @@ -2,13 +2,7 @@ AsmEnablePaging32 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.nasm b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.nasm index f0949be1679a..5a07d92f804a 100644 --- a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.nasm +++ b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging64.S b/MdePkg/Library/BaseLib/Ia32/EnablePaging64.S deleted file mode 100644 index e1c7f6047492..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/EnablePaging64.S +++ /dev/null @@ -1,63 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# EnablePaging64.S -# -# Abstract: -# -# InternalX86EnablePaging64 function -# -# Notes: -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(InternalX86EnablePaging64) - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# InternalX86EnablePaging64 ( -# IN UINT16 CodeSelector, -# IN UINT64 EntryPoint, -# IN UINT64 Context1, OPTIONAL -# IN UINT64 Context2, OPTIONAL -# IN UINT64 NewStack -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalX86EnablePaging64): - cli - movl $LongStart, (%esp) # offset for far retf, seg is the 1st arg - movl %cr4, %eax - orb $0x20, %al - movl %eax, %cr4 # enable PAE - movl $0xc0000080, %ecx - rdmsr - orb $1, %ah # set LME - wrmsr - movl %cr0, %eax - btsl $31, %eax # set PG - movl %eax, %cr0 # enable paging - lret # topmost 2 dwords hold the address -LongStart: # long mode starts here - .byte 0x67, 0x48 # 32-bit address size, 64-bit operand size - movl (%esp), %ebx # mov rbx, [esp] - .byte 0x67, 0x48 - movl 8(%esp), %ecx # mov rcx, [esp + 8] - .byte 0x67, 0x48 - movl 0x10(%esp), %edx # mov rdx, [esp + 10h] - .byte 0x67, 0x48 - movl 0x18(%esp), %esp # mov rsp, [esp + 18h] - .byte 0x48 - addl $-0x20, %esp # add rsp, -20h - call *%ebx # call rbx - jmp . # no one should get here diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging64.asm b/MdePkg/Library/BaseLib/Ia32/EnablePaging64.asm deleted file mode 100644 index 128310d1d122..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/EnablePaging64.asm +++ /dev/null @@ -1,68 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; EnablePaging64.Asm -; -; Abstract: -; -; AsmEnablePaging64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86EnablePaging64 ( -; IN UINT16 Cs, -; IN UINT64 EntryPoint, -; IN UINT64 Context1, OPTIONAL -; IN UINT64 Context2, OPTIONAL -; IN UINT64 NewStack -; ); -;------------------------------------------------------------------------------ -InternalX86EnablePaging64 PROC - cli - mov DWORD PTR [esp], @F ; offset for far retf, seg is the 1st arg - mov eax, cr4 - or al, (1 SHL 5) - mov cr4, eax ; enable PAE - mov ecx, 0c0000080h - rdmsr - or ah, 1 ; set LME - wrmsr - mov eax, cr0 - bts eax, 31 ; set PG - mov cr0, eax ; enable paging - retf ; topmost 2 dwords hold the address -@@: ; long mode starts here - DB 67h, 48h ; 32-bit address size, 64-bit operand size - mov ebx, [esp] ; mov rbx, [esp] - DB 67h, 48h - mov ecx, [esp + 8] ; mov rcx, [esp + 8] - DB 67h, 48h - mov edx, [esp + 10h] ; mov rdx, [esp + 10h] - DB 67h, 48h - mov esp, [esp + 18h] ; mov rsp, [esp + 18h] - DB 48h - add esp, -20h ; add rsp, -20h - call ebx ; call rbx - hlt ; no one should get here -InternalX86EnablePaging64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging64.nasm b/MdePkg/Library/BaseLib/Ia32/EnablePaging64.nasm index 91c89ee4ae50..404991bc5fdb 100644 --- a/MdePkg/Library/BaseLib/Ia32/EnablePaging64.nasm +++ b/MdePkg/Library/BaseLib/Ia32/EnablePaging64.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.asm b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.asm deleted file mode 100644 index c6e704b38403..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.asm +++ /dev/null @@ -1,55 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; FlushCacheLine.Asm -; -; Abstract: -; -; AsmFlushCacheLine function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; AsmFlushCacheLine ( -; IN VOID *LinearAddress -; ); -;------------------------------------------------------------------------------ -AsmFlushCacheLine PROC - ; - ; If the CPU does not support CLFLUSH instruction, - ; then promote flush range to flush entire cache. - ; - mov eax, 1 - push ebx - cpuid - pop ebx - mov eax, [esp + 4] - test edx, BIT19 - jz @F - clflush [eax] - ret -@@: - wbinvd - ret -AsmFlushCacheLine ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c index 9a73ddfb4898..f04123229af5 100644 --- a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c +++ b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c @@ -1,14 +1,8 @@ /** @file AsmFlushCacheLine function - Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> - 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -37,7 +31,7 @@ AsmFlushCacheLine ( ) { // - // If the CPU does not support CLFLUSH instruction, + // If the CPU does not support CLFLUSH instruction, // then promote flush range to flush entire cache. // _asm { @@ -52,7 +46,7 @@ NoClflush: wbinvd Done: } - + return LinearAddress; } diff --git a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.nasm b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.nasm index 088b7aa80c7b..f8800870dd38 100644 --- a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.nasm +++ b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/FxRestore.asm b/MdePkg/Library/BaseLib/Ia32/FxRestore.asm deleted file mode 100644 index a637b31b689b..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/FxRestore.asm +++ /dev/null @@ -1,42 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; FxRestore.Asm -; -; Abstract: -; -; AsmFxRestore function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86FxRestore ( -; IN CONST IA32_FX_BUFFER *Buffer -; ); -;------------------------------------------------------------------------------ -InternalX86FxRestore PROC - mov eax, [esp + 4] ; Buffer must be 16-byte aligned - fxrstor [eax] - ret -InternalX86FxRestore ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/FxRestore.c b/MdePkg/Library/BaseLib/Ia32/FxRestore.c index b64284aa8dc2..b084ec82610f 100644 --- a/MdePkg/Library/BaseLib/Ia32/FxRestore.c +++ b/MdePkg/Library/BaseLib/Ia32/FxRestore.c @@ -2,13 +2,7 @@ AsmFxRestore function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/FxRestore.nasm b/MdePkg/Library/BaseLib/Ia32/FxRestore.nasm index 5c3374726597..fa5f0bb40787 100644 --- a/MdePkg/Library/BaseLib/Ia32/FxRestore.nasm +++ b/MdePkg/Library/BaseLib/Ia32/FxRestore.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/FxSave.asm b/MdePkg/Library/BaseLib/Ia32/FxSave.asm deleted file mode 100644 index 20531de6b999..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/FxSave.asm +++ /dev/null @@ -1,42 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; FxSave.Asm -; -; Abstract: -; -; AsmFxSave function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86FxSave ( -; OUT IA32_FX_BUFFER *Buffer -; ); -;------------------------------------------------------------------------------ -InternalX86FxSave PROC - mov eax, [esp + 4] ; Buffer must be 16-byte aligned - fxsave [eax] - ret -InternalX86FxSave ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/FxSave.c b/MdePkg/Library/BaseLib/Ia32/FxSave.c index 0de252f43d45..15165f8d83c7 100644 --- a/MdePkg/Library/BaseLib/Ia32/FxSave.c +++ b/MdePkg/Library/BaseLib/Ia32/FxSave.c @@ -2,13 +2,7 @@ AsmFxSave function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/FxSave.nasm b/MdePkg/Library/BaseLib/Ia32/FxSave.nasm index f22e19e77bc3..8d46a09cf30e 100644 --- a/MdePkg/Library/BaseLib/Ia32/FxSave.nasm +++ b/MdePkg/Library/BaseLib/Ia32/FxSave.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/GccInline.c b/MdePkg/Library/BaseLib/Ia32/GccInline.c index 68d56754d2b8..6227c64ca8f7 100644 --- a/MdePkg/Library/BaseLib/Ia32/GccInline.c +++ b/MdePkg/Library/BaseLib/Ia32/GccInline.c @@ -1,15 +1,9 @@ /** @file GCC inline implementation of BaseLib processor specific functions. - - Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> - Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> - 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. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> + Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -32,7 +26,7 @@ MemoryFence ( ) { // This is a little bit of overkill and it is more about the compiler that it is - // actually processor synchronization. This is like the _ReadWriteBarrier + // actually processor synchronization. This is like the _ReadWriteBarrier // Microsoft specific intrinsic __asm__ __volatile__ ("":::"memory"); } @@ -65,7 +59,7 @@ EFIAPI DisableInterrupts ( VOID ) -{ +{ __asm__ __volatile__ ("cli"::: "memory"); } @@ -128,13 +122,13 @@ AsmReadMsr64 ( ) { UINT64 Data; - + __asm__ __volatile__ ( "rdmsr" : "=A" (Data) // %0 : "c" (Index) // %1 ); - + return Data; } @@ -168,7 +162,7 @@ AsmWriteMsr64 ( : "c" (Index), "A" (Value) ); - + return Value; } @@ -191,13 +185,13 @@ AsmReadEflags ( ) { UINTN Eflags; - + __asm__ __volatile__ ( "pushfl \n\t" "popl %0 " : "=r" (Eflags) ); - + return Eflags; } @@ -220,12 +214,12 @@ AsmReadCr0 ( ) { UINTN Data; - + __asm__ __volatile__ ( - "movl %%cr0,%0" + "movl %%cr0,%0" : "=a" (Data) ); - + return Data; } @@ -247,12 +241,12 @@ AsmReadCr2 ( ) { UINTN Data; - + __asm__ __volatile__ ( - "movl %%cr2, %0" + "movl %%cr2, %0" : "=r" (Data) ); - + return Data; } @@ -273,12 +267,12 @@ AsmReadCr3 ( ) { UINTN Data; - + __asm__ __volatile__ ( "movl %%cr3, %0" : "=r" (Data) ); - + return Data; } @@ -300,12 +294,12 @@ AsmReadCr4 ( ) { UINTN Data; - + __asm__ __volatile__ ( "movl %%cr4, %0" : "=a" (Data) ); - + return Data; } @@ -431,12 +425,12 @@ AsmReadDr0 ( ) { UINTN Data; - + __asm__ __volatile__ ( "movl %%dr0, %0" : "=r" (Data) ); - + return Data; } @@ -458,12 +452,12 @@ AsmReadDr1 ( ) { UINTN Data; - + __asm__ __volatile__ ( "movl %%dr1, %0" : "=r" (Data) ); - + return Data; } @@ -485,12 +479,12 @@ AsmReadDr2 ( ) { UINTN Data; - + __asm__ __volatile__ ( "movl %%dr2, %0" : "=r" (Data) ); - + return Data; } @@ -512,12 +506,12 @@ AsmReadDr3 ( ) { UINTN Data; - + __asm__ __volatile__ ( "movl %%dr3, %0" : "=r" (Data) ); - + return Data; } @@ -539,12 +533,12 @@ AsmReadDr4 ( ) { UINTN Data; - + __asm__ __volatile__ ( "movl %%dr4, %0" : "=r" (Data) ); - + return Data; } @@ -566,12 +560,12 @@ AsmReadDr5 ( ) { UINTN Data; - + __asm__ __volatile__ ( "movl %%dr5, %0" : "=r" (Data) ); - + return Data; } @@ -593,12 +587,12 @@ AsmReadDr6 ( ) { UINTN Data; - + __asm__ __volatile__ ( "movl %%dr6, %0" : "=r" (Data) ); - + return Data; } @@ -620,12 +614,12 @@ AsmReadDr7 ( ) { UINTN Data; - + __asm__ __volatile__ ( "movl %%dr7, %0" : "=r" (Data) ); - + return Data; } @@ -854,12 +848,12 @@ AsmReadCs ( ) { UINT16 Data; - + __asm__ __volatile__ ( "mov %%cs, %0" :"=a" (Data) ); - + return Data; } @@ -880,12 +874,12 @@ AsmReadDs ( ) { UINT16 Data; - + __asm__ __volatile__ ( "mov %%ds, %0" :"=a" (Data) ); - + return Data; } @@ -906,12 +900,12 @@ AsmReadEs ( ) { UINT16 Data; - + __asm__ __volatile__ ( "mov %%es, %0" :"=a" (Data) ); - + return Data; } @@ -932,12 +926,12 @@ AsmReadFs ( ) { UINT16 Data; - + __asm__ __volatile__ ( "mov %%fs, %0" :"=a" (Data) ); - + return Data; } @@ -958,12 +952,12 @@ AsmReadGs ( ) { UINT16 Data; - + __asm__ __volatile__ ( "mov %%gs, %0" :"=a" (Data) ); - + return Data; } @@ -984,12 +978,12 @@ AsmReadSs ( ) { UINT16 Data; - + __asm__ __volatile__ ( "mov %%ds, %0" :"=a" (Data) ); - + return Data; } @@ -1010,12 +1004,12 @@ AsmReadTr ( ) { UINT16 Data; - + __asm__ __volatile__ ( "str %0" : "=a" (Data) ); - + return Data; } @@ -1062,7 +1056,7 @@ InternalX86WriteGdtr ( : : "m" (*Gdtr) ); - + } @@ -1127,12 +1121,12 @@ AsmReadLdtr ( ) { UINT16 Data; - + __asm__ __volatile__ ( "sldt %0" : "=g" (Data) // %0 ); - + return Data; } @@ -1180,7 +1174,7 @@ InternalX86FxSave ( "fxsave %0" : : "m" (*Buffer) // %0 - ); + ); } @@ -1233,7 +1227,7 @@ AsmReadMm0 ( "pop %%edx \n\t" : "=A" (Data) // %0 ); - + return Data; } @@ -1263,7 +1257,7 @@ AsmReadMm1 ( "pop %%edx \n\t" : "=A" (Data) // %0 ); - + return Data; } @@ -1293,7 +1287,7 @@ AsmReadMm2 ( "pop %%edx \n\t" : "=A" (Data) // %0 ); - + return Data; } @@ -1323,7 +1317,7 @@ AsmReadMm3 ( "pop %%edx \n\t" : "=A" (Data) // %0 ); - + return Data; } @@ -1353,7 +1347,7 @@ AsmReadMm4 ( "pop %%edx \n\t" : "=A" (Data) // %0 ); - + return Data; } @@ -1383,7 +1377,7 @@ AsmReadMm5 ( "pop %%edx \n\t" : "=A" (Data) // %0 ); - + return Data; } @@ -1413,7 +1407,7 @@ AsmReadMm6 ( "pop %%edx \n\t" : "=A" (Data) // %0 ); - + return Data; } @@ -1443,7 +1437,7 @@ AsmReadMm7 ( "pop %%edx \n\t" : "=A" (Data) // %0 ); - + return Data; } @@ -1465,7 +1459,7 @@ AsmWriteMm0 ( { __asm__ __volatile__ ( "movq %0, %%mm0" // %0 - : + : : "m" (Value) ); } @@ -1488,7 +1482,7 @@ AsmWriteMm1 ( { __asm__ __volatile__ ( "movq %0, %%mm1" // %0 - : + : : "m" (Value) ); } @@ -1511,7 +1505,7 @@ AsmWriteMm2 ( { __asm__ __volatile__ ( "movq %0, %%mm2" // %0 - : + : : "m" (Value) ); } @@ -1534,7 +1528,7 @@ AsmWriteMm3 ( { __asm__ __volatile__ ( "movq %0, %%mm3" // %0 - : + : : "m" (Value) ); } @@ -1557,7 +1551,7 @@ AsmWriteMm4 ( { __asm__ __volatile__ ( "movq %0, %%mm4" // %0 - : + : : "m" (Value) ); } @@ -1580,7 +1574,7 @@ AsmWriteMm5 ( { __asm__ __volatile__ ( "movq %0, %%mm5" // %0 - : + : : "m" (Value) ); } @@ -1603,7 +1597,7 @@ AsmWriteMm6 ( { __asm__ __volatile__ ( "movq %0, %%mm6" // %0 - : + : : "m" (Value) ); } @@ -1626,7 +1620,7 @@ AsmWriteMm7 ( { __asm__ __volatile__ ( "movq %0, %%mm7" // %0 - : + : : "m" (Value) ); } @@ -1648,13 +1642,13 @@ AsmReadTsc ( ) { UINT64 Data; - + __asm__ __volatile__ ( "rdtsc" : "=A" (Data) ); - - return Data; + + return Data; } @@ -1676,14 +1670,14 @@ AsmReadPmc ( ) { UINT64 Data; - + __asm__ __volatile__ ( "rdpmc" : "=A" (Data) : "c" (Index) ); - - return Data; + + return Data; } @@ -1720,7 +1714,7 @@ AsmInvd ( ) { __asm__ __volatile__ ("invd":::"memory"); - + } @@ -1748,7 +1742,7 @@ AsmFlushCacheLine ( UINT32 RegEdx; // - // If the CPU does not support CLFLUSH instruction, + // If the CPU does not support CLFLUSH instruction, // then promote flush range to flush entire cache. // AsmCpuid (0x01, NULL, NULL, NULL, &RegEdx); @@ -1760,11 +1754,11 @@ AsmFlushCacheLine ( __asm__ __volatile__ ( "clflush (%0)" - : "+a" (LinearAddress) - : + : "+a" (LinearAddress) + : : "memory" ); - + return LinearAddress; } diff --git a/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.S b/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.S deleted file mode 100644 index 97e3ff3e7d7a..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.S +++ /dev/null @@ -1,48 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# Portions copyright (c) 2011, Apple Inc. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# InternalSwitchStack.S -# -# Abstract: -# -# Implementation of a stack switch on IA-32. -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(InternalSwitchStack) - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# InternalSwitchStack ( -# IN SWITCH_STACK_ENTRY_POINT EntryPoint, -# IN VOID *Context1, OPTIONAL -# IN VOID *Context2, OPTIONAL -# IN VOID *NewStack -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalSwitchStack): - pushl %ebp - movl %esp, %ebp - - movl 20(%ebp), %esp # switch stack - subl $8, %esp - - movl 16(%ebp), %eax - movl %eax, 4(%esp) - movl 12(%ebp), %eax - movl %eax, (%esp) - pushl $0 # keeps gdb from unwinding stack - jmp *8(%ebp) # call and never return - diff --git a/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.c b/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.c index 182b0b046e7a..8e69e77313cc 100644 --- a/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.c +++ b/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.c @@ -2,13 +2,7 @@ SwitchStack() function for IA-32. Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.nasm b/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.nasm index b3c4f7bf7816..e81d4b4fe2e3 100644 --- a/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.nasm +++ b/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.nasm @@ -2,13 +2,7 @@ ; ; Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> ; Portions copyright (c) 2011, Apple Inc. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/Invd.asm b/MdePkg/Library/BaseLib/Ia32/Invd.asm deleted file mode 100644 index 4cffebf06f33..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/Invd.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; Invd.Asm -; -; Abstract: -; -; AsmInvd function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .486p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmInvd ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmInvd PROC - invd - ret -AsmInvd ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/Invd.c b/MdePkg/Library/BaseLib/Ia32/Invd.c index e5c29b6f5131..25cd96e8a237 100644 --- a/MdePkg/Library/BaseLib/Ia32/Invd.c +++ b/MdePkg/Library/BaseLib/Ia32/Invd.c @@ -2,13 +2,7 @@ AsmInvd function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/Invd.nasm b/MdePkg/Library/BaseLib/Ia32/Invd.nasm index 13b8795e00c6..d9cad82f91bc 100644 --- a/MdePkg/Library/BaseLib/Ia32/Invd.nasm +++ b/MdePkg/Library/BaseLib/Ia32/Invd.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/LRotU64.S b/MdePkg/Library/BaseLib/Ia32/LRotU64.S deleted file mode 100644 index 87a6b5b9a20d..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/LRotU64.S +++ /dev/null @@ -1,48 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# LRotU64.S -# -# Abstract: -# -# 64-bit left rotation for Ia32 -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(InternalMathLRotU64) - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# InternalMathLRotU64 ( -# IN UINT64 Operand, -# IN UINTN Count -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalMathLRotU64): - push %ebx - movb 16(%esp), %cl - movl 12(%esp), %edx - movl 8(%esp), %eax - shldl %cl, %edx, %ebx - shldl %cl, %eax, %edx - rorl %cl, %ebx - shldl %cl, %ebx, %eax - testb $32, %cl # Count >= 32? - jz L0 - movl %eax, %ecx - movl %edx, %eax - movl %ecx, %edx -L0: - pop %ebx - ret diff --git a/MdePkg/Library/BaseLib/Ia32/LRotU64.asm b/MdePkg/Library/BaseLib/Ia32/LRotU64.asm deleted file mode 100644 index c8c1eabab000..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/LRotU64.asm +++ /dev/null @@ -1,51 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; LRotU64.asm -; -; Abstract: -; -; 64-bit left rotation for Ia32 -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathLRotU64 ( -; IN UINT64 Operand, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMathLRotU64 PROC USES ebx - mov cl, [esp + 16] - mov edx, [esp + 12] - mov eax, [esp + 8] - shld ebx, edx, cl - shld edx, eax, cl - ror ebx, cl - shld eax, ebx, cl - test cl, 32 ; Count >= 32? - jz @F - mov ecx, eax - mov eax, edx - mov edx, ecx -@@: - ret -InternalMathLRotU64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/LRotU64.c b/MdePkg/Library/BaseLib/Ia32/LRotU64.c index 1dfef3b6e0f3..eb232fdbc8ab 100644 --- a/MdePkg/Library/BaseLib/Ia32/LRotU64.c +++ b/MdePkg/Library/BaseLib/Ia32/LRotU64.c @@ -2,13 +2,7 @@ 64-bit left rotation for Ia32 Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/LRotU64.nasm b/MdePkg/Library/BaseLib/Ia32/LRotU64.nasm index e3dc015225fc..c0fe56bf19b0 100644 --- a/MdePkg/Library/BaseLib/Ia32/LRotU64.nasm +++ b/MdePkg/Library/BaseLib/Ia32/LRotU64.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/LShiftU64.S b/MdePkg/Library/BaseLib/Ia32/LShiftU64.S deleted file mode 100644 index 574583a0308e..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/LShiftU64.S +++ /dev/null @@ -1,43 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# LShiftU64.S -# -# Abstract: -# -# 64-bit left shift function for IA-32 -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(InternalMathLShiftU64) - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# InternalMathLShiftU64 ( -# IN UINT64 Operand, -# IN UINTN Count -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalMathLShiftU64): - movb 12(%esp), %cl - xorl %eax, %eax - movl 4(%esp), %edx - testb $32, %cl # Count >= 32? - jnz L0 - movl %edx, %eax - movl 0x8(%esp), %edx -L0: - shld %cl, %eax, %edx - shl %cl, %eax - ret diff --git a/MdePkg/Library/BaseLib/Ia32/LShiftU64.asm b/MdePkg/Library/BaseLib/Ia32/LShiftU64.asm deleted file mode 100644 index 59cba4a81c00..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/LShiftU64.asm +++ /dev/null @@ -1,48 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; LShiftU64.asm -; -; Abstract: -; -; 64-bit left shift function for IA-32 -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathLShiftU64 ( -; IN UINT64 Operand, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMathLShiftU64 PROC - mov cl, [esp + 12] - xor eax, eax - mov edx, [esp + 4] - test cl, 32 ; Count >= 32? - jnz @F - mov eax, edx - mov edx, [esp + 8] -@@: - shld edx, eax, cl - shl eax, cl - ret -InternalMathLShiftU64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/LShiftU64.c b/MdePkg/Library/BaseLib/Ia32/LShiftU64.c index 08266f786f63..a3d5299ecc89 100644 --- a/MdePkg/Library/BaseLib/Ia32/LShiftU64.c +++ b/MdePkg/Library/BaseLib/Ia32/LShiftU64.c @@ -2,13 +2,7 @@ 64-bit left shift function for IA-32. Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/LShiftU64.nasm b/MdePkg/Library/BaseLib/Ia32/LShiftU64.nasm index 93de11dfef5e..b16eef917a72 100644 --- a/MdePkg/Library/BaseLib/Ia32/LShiftU64.nasm +++ b/MdePkg/Library/BaseLib/Ia32/LShiftU64.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/Lfence.nasm b/MdePkg/Library/BaseLib/Ia32/Lfence.nasm new file mode 100644 index 000000000000..2146b9231ed3 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/Lfence.nasm @@ -0,0 +1,30 @@ +;------------------------------------------------------------------------------ ; +; Copyright (c) 2018, Intel Corporation. All rights reserved.<BR> +; SPDX-License-Identifier: BSD-2-Clause-Patent +; +; Module Name: +; +; Lfence.nasm +; +; Abstract: +; +; Performs a serializing operation on all load-from-memory instructions that +; were issued prior to the call of this function. +; +; Notes: +; +;------------------------------------------------------------------------------ + + SECTION .text + +;------------------------------------------------------------------------------ +; VOID +; EFIAPI +; AsmLfence ( +; VOID +; ); +;------------------------------------------------------------------------------ +global ASM_PFX(AsmLfence) +ASM_PFX(AsmLfence): + lfence + ret diff --git a/MdePkg/Library/BaseLib/Ia32/LongJump.S b/MdePkg/Library/BaseLib/Ia32/LongJump.S deleted file mode 100644 index dfd52f23e9f0..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/LongJump.S +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# LongJump.S -# -# Abstract: -# -# Implementation of _LongJump() on IA-32. -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(InternalLongJump) - -#------------------------------------------------------------------------------ -# VOID -# EFIAPI -# InternalLongJump ( -# IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer, -# IN UINTN Value -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalLongJump): - pop %eax # skip return address - pop %edx # edx <- JumpBuffer - pop %eax # eax <- Value - movl (%edx), %ebx - movl 4(%edx), %esi - movl 8(%edx), %edi - movl 12(%edx), %ebp - movl 16(%edx), %esp - jmp *20(%edx) # restore "eip" diff --git a/MdePkg/Library/BaseLib/Ia32/LongJump.asm b/MdePkg/Library/BaseLib/Ia32/LongJump.asm deleted file mode 100644 index 17d1006fe672..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/LongJump.asm +++ /dev/null @@ -1,46 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; LongJump.Asm -; -; Abstract: -; -; Implementation of _LongJump() on IA-32. -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalLongJump ( -; IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer, -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -InternalLongJump PROC - pop eax ; skip return address - pop edx ; edx <- JumpBuffer - pop eax ; eax <- Value - mov ebx, [edx] - mov esi, [edx + 4] - mov edi, [edx + 8] - mov ebp, [edx + 12] - mov esp, [edx + 16] - jmp dword ptr [edx + 20] ; restore "eip" -InternalLongJump ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/LongJump.c b/MdePkg/Library/BaseLib/Ia32/LongJump.c deleted file mode 100644 index 8eb013f97334..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/LongJump.c +++ /dev/null @@ -1,50 +0,0 @@ -/** @file - Implementation of _LongJump() on IA-32. - - Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. - -**/ - - -#include "BaseLibInternals.h" - - -/** - 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 -InternalLongJump ( - IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer, - IN UINTN Value - ) -{ - _asm { - pop eax ; skip return address - pop edx ; edx <- JumpBuffer - pop eax ; eax <- Value - mov ebx, [edx] - mov esi, [edx + 4] - mov edi, [edx + 8] - mov ebp, [edx + 12] - mov esp, [edx + 16] - jmp dword ptr [edx + 20] - } -} - diff --git a/MdePkg/Library/BaseLib/Ia32/LongJump.nasm b/MdePkg/Library/BaseLib/Ia32/LongJump.nasm index 5e643c0dcf99..8b14afdd3324 100644 --- a/MdePkg/Library/BaseLib/Ia32/LongJump.nasm +++ b/MdePkg/Library/BaseLib/Ia32/LongJump.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR> +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; @@ -19,8 +13,12 @@ ; ;------------------------------------------------------------------------------ +%include "Nasm.inc" + SECTION .text +extern ASM_PFX(PcdGet32 (PcdControlFlowEnforcementPropertyMask)) + ;------------------------------------------------------------------------------ ; VOID ; EFIAPI @@ -31,6 +29,25 @@ ;------------------------------------------------------------------------------ global ASM_PFX(InternalLongJump) ASM_PFX(InternalLongJump): + + mov eax, [ASM_PFX(PcdGet32 (PcdControlFlowEnforcementPropertyMask))] + test eax, eax + jz CetDone + mov eax, cr4 + bt eax, 23 ; check if CET is enabled + jnc CetDone + + mov edx, [esp + 4] ; edx = JumpBuffer + mov edx, [edx + 24] ; edx = target SSP + READSSP_EAX + sub edx, eax ; edx = delta + mov eax, edx ; eax = delta + + shr eax, 2 ; eax = delta/sizeof(UINT32) + INCSSP_EAX + +CetDone: + pop eax ; skip return address pop edx ; edx <- JumpBuffer pop eax ; eax <- Value diff --git a/MdePkg/Library/BaseLib/Ia32/ModU64x32.S b/MdePkg/Library/BaseLib/Ia32/ModU64x32.S deleted file mode 100644 index 91ea4630a00e..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ModU64x32.S +++ /dev/null @@ -1,40 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# DivU64x32.S -# -# Abstract: -# -# Calculate the remainder of a 64-bit integer by a 32-bit integer -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(InternalMathModU64x32) - -#------------------------------------------------------------------------------ -# UINT32 -# EFIAPI -# InternalMathModU64x32 ( -# IN UINT64 Dividend, -# IN UINT32 Divisor -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalMathModU64x32): - movl 8(%esp), %eax - movl 12(%esp), %ecx - xorl %edx, %edx - divl %ecx - movl 4(%esp), %eax - divl %ecx - movl %edx, %eax - ret diff --git a/MdePkg/Library/BaseLib/Ia32/ModU64x32.asm b/MdePkg/Library/BaseLib/Ia32/ModU64x32.asm deleted file mode 100644 index babaa4fc4c67..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ModU64x32.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; DivU64x32.asm -; -; Abstract: -; -; Calculate the remainder of a 64-bit integer by a 32-bit integer -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; InternalMathModU64x32 ( -; IN UINT64 Dividend, -; IN UINT32 Divisor -; ); -;------------------------------------------------------------------------------ -InternalMathModU64x32 PROC - mov eax, [esp + 8] - mov ecx, [esp + 12] - xor edx, edx - div ecx - mov eax, [esp + 4] - div ecx - mov eax, edx - ret -InternalMathModU64x32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ModU64x32.c b/MdePkg/Library/BaseLib/Ia32/ModU64x32.c index 3186ccb2a265..8a5e2830ac36 100644 --- a/MdePkg/Library/BaseLib/Ia32/ModU64x32.c +++ b/MdePkg/Library/BaseLib/Ia32/ModU64x32.c @@ -2,13 +2,7 @@ Calculate the remainder of a 64-bit integer by a 32-bit integer Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ModU64x32.nasm b/MdePkg/Library/BaseLib/Ia32/ModU64x32.nasm index cb3681cd2334..018dc1ea9d1a 100644 --- a/MdePkg/Library/BaseLib/Ia32/ModU64x32.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ModU64x32.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/Monitor.S b/MdePkg/Library/BaseLib/Ia32/Monitor.S deleted file mode 100644 index b6bfbeedf1f4..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/Monitor.S +++ /dev/null @@ -1,40 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# Monitor.S -# -# Abstract: -# -# AsmMonitor function -# -# Notes: -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(AsmMonitor) - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmMonitor ( -# IN UINTN Eax, -# IN UINTN Ecx, -# IN UINTN Edx -# ); -#------------------------------------------------------------------------------ -ASM_PFX(AsmMonitor): - movl 4(%esp), %eax - movl 8(%esp), %ecx - movl 12(%esp), %edx - monitor %eax, %ecx, %edx # monitor - ret diff --git a/MdePkg/Library/BaseLib/Ia32/Monitor.asm b/MdePkg/Library/BaseLib/Ia32/Monitor.asm deleted file mode 100644 index cd298bd37c6b..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/Monitor.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; Monitor.Asm -; -; Abstract: -; -; AsmMonitor function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmMonitor ( -; IN UINTN Eax, -; IN UINTN Ecx, -; IN UINTN Edx -; ); -;------------------------------------------------------------------------------ -AsmMonitor PROC - mov eax, [esp + 4] - mov ecx, [esp + 8] - mov edx, [esp + 12] - DB 0fh, 1, 0c8h ; monitor - ret -AsmMonitor ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/Monitor.c b/MdePkg/Library/BaseLib/Ia32/Monitor.c index d9c93255c96b..0469986ee541 100644 --- a/MdePkg/Library/BaseLib/Ia32/Monitor.c +++ b/MdePkg/Library/BaseLib/Ia32/Monitor.c @@ -2,13 +2,7 @@ AsmMonitor function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/Monitor.nasm b/MdePkg/Library/BaseLib/Ia32/Monitor.nasm index 6cf8ffd4d38a..bde62d2e3665 100644 --- a/MdePkg/Library/BaseLib/Ia32/Monitor.nasm +++ b/MdePkg/Library/BaseLib/Ia32/Monitor.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x32.S b/MdePkg/Library/BaseLib/Ia32/MultU64x32.S deleted file mode 100644 index 245687a24366..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/MultU64x32.S +++ /dev/null @@ -1,41 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# MultU64x32.S -# -# Abstract: -# -# Calculate the product of a 64-bit integer and a 32-bit integer -# -#------------------------------------------------------------------------------ - - - .code: - -ASM_GLOBAL ASM_PFX(InternalMathMultU64x32) - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# InternalMathMultU64x32 ( -# IN UINT64 Multiplicand, -# IN UINT32 Multiplier -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalMathMultU64x32): - movl 12(%esp), %ecx - movl %ecx, %eax - imull 8(%esp), %ecx # overflow not detectable - mull 0x4(%esp) - addl %ecx, %edx - ret diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x32.asm b/MdePkg/Library/BaseLib/Ia32/MultU64x32.asm deleted file mode 100644 index 5ea1ce705f59..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/MultU64x32.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; MultU64x32.asm -; -; Abstract: -; -; Calculate the product of a 64-bit integer and a 32-bit integer -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathMultU64x32 ( -; IN UINT64 Multiplicand, -; IN UINT32 Multiplier -; ); -;------------------------------------------------------------------------------ -InternalMathMultU64x32 PROC - mov ecx, [esp + 12] - mov eax, ecx - imul ecx, [esp + 8] ; overflow not detectable - mul dword ptr [esp + 4] - add edx, ecx - ret -InternalMathMultU64x32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x32.c b/MdePkg/Library/BaseLib/Ia32/MultU64x32.c index 8b534aab2bd2..9e2944e03116 100644 --- a/MdePkg/Library/BaseLib/Ia32/MultU64x32.c +++ b/MdePkg/Library/BaseLib/Ia32/MultU64x32.c @@ -2,13 +2,7 @@ Calculate the product of a 64-bit integer and a 32-bit integer Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x32.nasm b/MdePkg/Library/BaseLib/Ia32/MultU64x32.nasm index d4c9e512e06b..2d8739669089 100644 --- a/MdePkg/Library/BaseLib/Ia32/MultU64x32.nasm +++ b/MdePkg/Library/BaseLib/Ia32/MultU64x32.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x64.S b/MdePkg/Library/BaseLib/Ia32/MultU64x64.S deleted file mode 100644 index 3aae054813c2..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/MultU64x64.S +++ /dev/null @@ -1,44 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# MultU64x64.S -# -# Abstract: -# -# Calculate the product of a 64-bit integer and another 64-bit integer -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(InternalMathMultU64x64) - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# InternalMathMultU64x64 ( -# IN UINT64 Multiplicand, -# IN UINT64 Multiplier -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalMathMultU64x64): - push %ebx - movl 8(%esp), %ebx # ebx <- M1[0..31] - movl 16(%esp), %edx # edx <- M2[0..31] - movl %ebx, %ecx - movl %edx, %eax - imull 20(%esp), %ebx # ebx <- M1[0..31] * M2[32..63] - imull 12(%esp), %edx # edx <- M1[32..63] * M2[0..31] - addl %edx, %ebx # carries are abandoned - mull %ecx # edx:eax <- M1[0..31] * M2[0..31] - addl %ebx, %edx # carries are abandoned - pop %ebx - ret diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x64.asm b/MdePkg/Library/BaseLib/Ia32/MultU64x64.asm deleted file mode 100644 index 8dfdf2a80fb8..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/MultU64x64.asm +++ /dev/null @@ -1,47 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; MultU64x64.asm -; -; Abstract: -; -; Calculate the product of a 64-bit integer and another 64-bit integer -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathMultU64x64 ( -; IN UINT64 Multiplicand, -; IN UINT64 Multiplier -; ); -;------------------------------------------------------------------------------ -InternalMathMultU64x64 PROC USES ebx - mov ebx, [esp + 8] ; ebx <- M1[0..31] - mov edx, [esp + 16] ; edx <- M2[0..31] - mov ecx, ebx - mov eax, edx - imul ebx, [esp + 20] ; ebx <- M1[0..31] * M2[32..63] - imul edx, [esp + 12] ; edx <- M1[32..63] * M2[0..31] - add ebx, edx ; carries are abandoned - mul ecx ; edx:eax <- M1[0..31] * M2[0..31] - add edx, ebx ; carries are abandoned - ret -InternalMathMultU64x64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x64.c b/MdePkg/Library/BaseLib/Ia32/MultU64x64.c index 5f1048627565..1ee9bbc36eb0 100644 --- a/MdePkg/Library/BaseLib/Ia32/MultU64x64.c +++ b/MdePkg/Library/BaseLib/Ia32/MultU64x64.c @@ -2,13 +2,7 @@ Calculate the product of a 64-bit integer and another 64-bit integer Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x64.nasm b/MdePkg/Library/BaseLib/Ia32/MultU64x64.nasm index 4fdbf86be207..b477d6072481 100644 --- a/MdePkg/Library/BaseLib/Ia32/MultU64x64.nasm +++ b/MdePkg/Library/BaseLib/Ia32/MultU64x64.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/Mwait.S b/MdePkg/Library/BaseLib/Ia32/Mwait.S deleted file mode 100644 index 1b8ef9bad5e4..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/Mwait.S +++ /dev/null @@ -1,38 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# Mwait.S -# -# Abstract: -# -# AsmMwait function -# -# Notes: -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(AsmMwait) - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# AsmMwait ( -# IN UINTN Eax, -# IN UINTN Ecx -# ); -#------------------------------------------------------------------------------ -ASM_PFX(AsmMwait): - movl 4(%esp), %eax - movl 8(%esp), %ecx - mwait - ret diff --git a/MdePkg/Library/BaseLib/Ia32/Mwait.asm b/MdePkg/Library/BaseLib/Ia32/Mwait.asm deleted file mode 100644 index 51af87705bb3..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/Mwait.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; Mwait.Asm -; -; Abstract: -; -; AsmMwait function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmMwait ( -; IN UINTN Eax, -; IN UINTN Ecx -; ); -;------------------------------------------------------------------------------ -AsmMwait PROC - mov eax, [esp + 4] - mov ecx, [esp + 8] - DB 0fh, 1, 0c9h ; mwait - ret -AsmMwait ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/Mwait.c b/MdePkg/Library/BaseLib/Ia32/Mwait.c index 0cac0ac3169d..f1e89652051d 100644 --- a/MdePkg/Library/BaseLib/Ia32/Mwait.c +++ b/MdePkg/Library/BaseLib/Ia32/Mwait.c @@ -2,13 +2,7 @@ AsmMwait function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/Mwait.nasm b/MdePkg/Library/BaseLib/Ia32/Mwait.nasm index 1a369d37b4ba..ca0d96a638d0 100644 --- a/MdePkg/Library/BaseLib/Ia32/Mwait.nasm +++ b/MdePkg/Library/BaseLib/Ia32/Mwait.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/Non-existing.c b/MdePkg/Library/BaseLib/Ia32/Non-existing.c index 20146c07e373..2669ce55da51 100644 --- a/MdePkg/Library/BaseLib/Ia32/Non-existing.c +++ b/MdePkg/Library/BaseLib/Ia32/Non-existing.c @@ -2,13 +2,7 @@ Non-existing BaseLib functions on Ia32 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/RRotU64.S b/MdePkg/Library/BaseLib/Ia32/RRotU64.S deleted file mode 100644 index a504f820185c..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/RRotU64.S +++ /dev/null @@ -1,48 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# RRotU64.S -# -# Abstract: -# -# 64-bit right rotation for Ia32 -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(InternalMathRRotU64) - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# InternalMathRRotU64 ( -# IN UINT64 Operand, -# IN UINTN Count -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalMathRRotU64): - push %ebx - movb 16(%esp), %cl - movl 8(%esp), %eax - movl 12(%esp), %edx - shrdl %cl, %eax, %ebx - shrdl %cl, %edx, %eax - roll %cl, %ebx - shrdl %cl, %ebx, %edx - testb $32, %cl # Count >= 32? - jz L0 - movl %eax, %ecx # switch eax & edx if Count >= 32 - movl %edx, %eax - movl %ecx, %edx -L0: - pop %ebx - ret diff --git a/MdePkg/Library/BaseLib/Ia32/RRotU64.asm b/MdePkg/Library/BaseLib/Ia32/RRotU64.asm deleted file mode 100644 index 261db376015d..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/RRotU64.asm +++ /dev/null @@ -1,51 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; RRotU64.asm -; -; Abstract: -; -; 64-bit right rotation for Ia32 -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathRRotU64 ( -; IN UINT64 Operand, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMathRRotU64 PROC USES ebx - mov cl, [esp + 16] - mov eax, [esp + 8] - mov edx, [esp + 12] - shrd ebx, eax, cl - shrd eax, edx, cl - rol ebx, cl - shrd edx, ebx, cl - test cl, 32 ; Count >= 32? - jz @F - mov ecx, eax ; switch eax & edx if Count >= 32 - mov eax, edx - mov edx, ecx -@@: - ret -InternalMathRRotU64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/RRotU64.c b/MdePkg/Library/BaseLib/Ia32/RRotU64.c index bbf0146fc6eb..9d928dc2abd7 100644 --- a/MdePkg/Library/BaseLib/Ia32/RRotU64.c +++ b/MdePkg/Library/BaseLib/Ia32/RRotU64.c @@ -2,13 +2,7 @@ 64-bit right rotation for Ia32 Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/RRotU64.nasm b/MdePkg/Library/BaseLib/Ia32/RRotU64.nasm index 5946b3dc2ca7..63b82eb180c1 100644 --- a/MdePkg/Library/BaseLib/Ia32/RRotU64.nasm +++ b/MdePkg/Library/BaseLib/Ia32/RRotU64.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/RShiftU64.S b/MdePkg/Library/BaseLib/Ia32/RShiftU64.S deleted file mode 100644 index 8e1cec882857..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/RShiftU64.S +++ /dev/null @@ -1,46 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# RShiftU64.S -# -# Abstract: -# -# 64-bit logical right shift function for IA-32 -# -#------------------------------------------------------------------------------ - - - .code: - -ASM_GLOBAL ASM_PFX(InternalMathRShiftU64) - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# InternalMathRShiftU64 ( -# IN UINT64 Operand, -# IN UINTN Count -# ); -#------------------------------------------------------------------------------ -ASM_PFX(InternalMathRShiftU64): - movb 12(%esp), %cl # cl <- Count - xorl %edx, %edx - movl 8(%esp), %eax - testb $32, %cl # Count >= 32? - jnz L0 - movl %eax, %edx - movl 0x4(%esp), %eax -L0: - shrdl %cl, %edx, %eax - shr %cl, %edx - ret diff --git a/MdePkg/Library/BaseLib/Ia32/RShiftU64.asm b/MdePkg/Library/BaseLib/Ia32/RShiftU64.asm deleted file mode 100644 index ad49536209a4..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/RShiftU64.asm +++ /dev/null @@ -1,48 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; RShiftU64.asm -; -; Abstract: -; -; 64-bit logical right shift function for IA-32 -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathRShiftU64 ( -; IN UINT64 Operand, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMathRShiftU64 PROC - mov cl, [esp + 12] ; cl <- Count - xor edx, edx - mov eax, [esp + 8] - test cl, 32 ; Count >= 32? - jnz @F - mov edx, eax - mov eax, [esp + 4] -@@: - shrd eax, edx, cl - shr edx, cl - ret -InternalMathRShiftU64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/RShiftU64.c b/MdePkg/Library/BaseLib/Ia32/RShiftU64.c index 2db0d9752ff4..1c5d2f0411a4 100644 --- a/MdePkg/Library/BaseLib/Ia32/RShiftU64.c +++ b/MdePkg/Library/BaseLib/Ia32/RShiftU64.c @@ -2,13 +2,7 @@ 64-bit logical right shift function for IA-32 Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/RShiftU64.nasm b/MdePkg/Library/BaseLib/Ia32/RShiftU64.nasm index 67de7ee38602..97781b0833cf 100644 --- a/MdePkg/Library/BaseLib/Ia32/RShiftU64.nasm +++ b/MdePkg/Library/BaseLib/Ia32/RShiftU64.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/RdRand.S b/MdePkg/Library/BaseLib/Ia32/RdRand.S deleted file mode 100644 index 92048b32518f..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/RdRand.S +++ /dev/null @@ -1,80 +0,0 @@ -#------------------------------------------------------------------------------ ; -# Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# RdRand.S -# -# Abstract: -# -# Generates random number through CPU RdRand instruction under 32-bit platform. -# -# Notes: -# -#------------------------------------------------------------------------------ - -//------------------------------------------------------------------------------ -// Generates a 16 bit random number through RDRAND instruction. -// Return TRUE if Rand generated successfully, or FALSE if not. -// -// BOOLEAN EFIAPI InternalX86RdRand16 (UINT16 *Rand); -//------------------------------------------------------------------------------ -ASM_GLOBAL ASM_PFX(InternalX86RdRand16) -ASM_PFX(InternalX86RdRand16): - .byte 0x0f, 0xc7, 0xf0 // rdrand r16: "0f c7 /6 ModRM:r/m(w)" - jc rn16_ok // jmp if CF=1 - xor %eax, %eax // reg=0 if CF=0 - ret // return with failure status -rn16_ok: - mov 0x4(%esp), %edx - mov %ax, (%edx) - mov $0x1, %eax - ret - -//------------------------------------------------------------------------------ -// Generates a 32 bit random number through RDRAND instruction. -// Return TRUE if Rand generated successfully, or FALSE if not. -// -// BOOLEAN EFIAPI InternalX86RdRand32 (UINT32 *Rand); -//------------------------------------------------------------------------------ -ASM_GLOBAL ASM_PFX(InternalX86RdRand32) -ASM_PFX(InternalX86RdRand32): - .byte 0x0f, 0xc7, 0xf0 // rdrand r32: "0f c7 /6 ModRM:r/m(w)" - jc rn32_ok // jmp if CF=1 - xor %eax, %eax // reg=0 if CF=0 - ret // return with failure status -rn32_ok: - mov 0x4(%esp), %edx - mov %eax, (%edx) - mov $0x1, %eax - ret - -//------------------------------------------------------------------------------ -// Generates a 64 bit random number through RDRAND instruction. -// Return TRUE if Rand generated successfully, or FALSE if not. -// -// BOOLEAN EFIAPI InternalX86RdRand64 (UINT64 *Rand); -//------------------------------------------------------------------------------ -ASM_GLOBAL ASM_PFX(InternalX86RdRand64) -ASM_PFX(InternalX86RdRand64): - .byte 0x0f, 0xc7, 0xf0 // rdrand r32: "0f c7 /6 ModRM:r/m(w)" - jnc rn64_ret // jmp if CF=0 - mov 0x4(%esp), %edx - mov %eax, (%edx) - - .byte 0x0f, 0xc7, 0xf0 // generate another 32 bit RN - jnc rn64_ret // jmp if CF=0 - mov %eax, 0x4(%edx) - - mov $0x1, %eax - ret -rn64_ret: - xor %eax, %eax - ret // return with failure status diff --git a/MdePkg/Library/BaseLib/Ia32/RdRand.asm b/MdePkg/Library/BaseLib/Ia32/RdRand.asm deleted file mode 100644 index b7af662e0b76..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/RdRand.asm +++ /dev/null @@ -1,94 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; RdRand.asm -; -; Abstract: -; -; Generates random number through CPU RdRand instruction under 32-bit platform. -; -; Notes: -; -;------------------------------------------------------------------------------ - -.686P -.model flat, C - -.code - -;------------------------------------------------------------------------------ -; Generates a 16 bit random number through RDRAND instruction. -; Return TRUE if Rand generated successfully, or FALSE if not. -; -; BOOLEAN EFIAPI InternalX86RdRand16 (UINT16 *Rand); -;------------------------------------------------------------------------------ -InternalX86RdRand16 PROC - ; rdrand ax ; generate a 16 bit RN into ax - ; CF=1 if RN generated ok, otherwise CF=0 - db 0fh, 0c7h, 0f0h ; rdrand r16: "0f c7 /6 ModRM:r/m(w)" - jc rn16_ok ; jmp if CF=1 - xor eax, eax ; reg=0 if CF=0 - ret ; return with failure status -rn16_ok: - mov edx, dword ptr [esp + 4] - mov [edx], ax - mov eax, 1 - ret -InternalX86RdRand16 ENDP - -;------------------------------------------------------------------------------ -; Generates a 32 bit random number through RDRAND instruction. -; Return TRUE if Rand generated successfully, or FALSE if not. -; -; BOOLEAN EFIAPI InternalX86RdRand32 (UINT32 *Rand); -;------------------------------------------------------------------------------ -InternalX86RdRand32 PROC - ; rdrand eax ; generate a 32 bit RN into eax - ; CF=1 if RN generated ok, otherwise CF=0 - db 0fh, 0c7h, 0f0h ; rdrand r32: "0f c7 /6 ModRM:r/m(w)" - jc rn32_ok ; jmp if CF=1 - xor eax, eax ; reg=0 if CF=0 - ret ; return with failure status -rn32_ok: - mov edx, dword ptr [esp + 4] - mov [edx], eax - mov eax, 1 - ret -InternalX86RdRand32 ENDP - -;------------------------------------------------------------------------------ -; Generates a 64 bit random number through RDRAND instruction. -; Return TRUE if Rand generated successfully, or FALSE if not. -; -; BOOLEAN EFIAPI InternalX86RdRand64 (UINT64 *Rand); -;------------------------------------------------------------------------------ -InternalX86RdRand64 PROC - ; rdrand eax ; generate a 32 bit RN into eax - ; CF=1 if RN generated ok, otherwise CF=0 - db 0fh, 0c7h, 0f0h ; rdrand r32: "0f c7 /6 ModRM:r/m(w)" - jnc rn64_ret ; jmp if CF=0 - mov edx, dword ptr [esp + 4] - mov [edx], eax - - db 0fh, 0c7h, 0f0h ; generate another 32 bit RN - jnc rn64_ret ; jmp if CF=0 - mov [edx + 4], eax - - mov eax, 1 - ret -rn64_ret: - xor eax, eax - ret ; return with failure status -InternalX86RdRand64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/RdRand.nasm b/MdePkg/Library/BaseLib/Ia32/RdRand.nasm index 0668f43be967..d31ae03d7012 100644 --- a/MdePkg/Library/BaseLib/Ia32/RdRand.nasm +++ b/MdePkg/Library/BaseLib/Ia32/RdRand.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr0.asm b/MdePkg/Library/BaseLib/Ia32/ReadCr0.asm deleted file mode 100644 index ceb935700e07..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr0.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadCr0.Asm -; -; Abstract: -; -; AsmReadCr0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCr0 PROC - mov eax, cr0 - ret -AsmReadCr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr0.c b/MdePkg/Library/BaseLib/Ia32/ReadCr0.c index 0e39ee777613..e7f25b320677 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr0.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr0.c @@ -2,13 +2,7 @@ AsmReadCr0 function Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr0.nasm b/MdePkg/Library/BaseLib/Ia32/ReadCr0.nasm index d09ceeac1880..71ba0dfffbb5 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr0.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr0.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr2.asm b/MdePkg/Library/BaseLib/Ia32/ReadCr2.asm deleted file mode 100644 index 0391aad3d0af..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr2.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadCr2.Asm -; -; Abstract: -; -; AsmReadCr2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCr2 PROC - mov eax, cr2 - ret -AsmReadCr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr2.c b/MdePkg/Library/BaseLib/Ia32/ReadCr2.c index e75b9506e168..64b3dc345fa9 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr2.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr2.c @@ -2,13 +2,7 @@ AsmReadCr2 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr2.nasm b/MdePkg/Library/BaseLib/Ia32/ReadCr2.nasm index 5b83d8946498..07d96bdb7f5a 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr2.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr2.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr3.asm b/MdePkg/Library/BaseLib/Ia32/ReadCr3.asm deleted file mode 100644 index 41c5df6a64e1..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr3.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadCr3.Asm -; -; Abstract: -; -; AsmReadCr3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCr3 PROC - mov eax, cr3 - ret -AsmReadCr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr3.c b/MdePkg/Library/BaseLib/Ia32/ReadCr3.c index 2f01731f75a2..2b9f1a528fe3 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr3.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr3.c @@ -2,13 +2,7 @@ AsmReadCr3 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr3.nasm b/MdePkg/Library/BaseLib/Ia32/ReadCr3.nasm index 366e4ccd36b9..e0a31044d5c7 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr3.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr3.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr4.asm b/MdePkg/Library/BaseLib/Ia32/ReadCr4.asm deleted file mode 100644 index 38d1258d9faa..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr4.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadCr4.Asm -; -; Abstract: -; -; AsmReadCr4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCr4 PROC - mov eax, cr4 - ret -AsmReadCr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr4.c b/MdePkg/Library/BaseLib/Ia32/ReadCr4.c index d12bf5cb55b7..d710630bb139 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr4.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr4.c @@ -2,13 +2,7 @@ AsmReadCr4 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr4.nasm b/MdePkg/Library/BaseLib/Ia32/ReadCr4.nasm index 7276092b0dfc..5ba3f9fa9ae3 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr4.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr4.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCs.asm b/MdePkg/Library/BaseLib/Ia32/ReadCs.asm deleted file mode 100644 index 11f205bb46f2..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadCs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadCs.Asm -; -; Abstract: -; -; AsmReadCs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadCs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCs PROC - mov eax, cs - ret -AsmReadCs ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCs.c b/MdePkg/Library/BaseLib/Ia32/ReadCs.c index fe107029a172..ac63518c9fc2 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadCs.c @@ -2,13 +2,7 @@ AsmReadCs function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCs.nasm b/MdePkg/Library/BaseLib/Ia32/ReadCs.nasm index 3bfa816527ae..6a34870ce410 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCs.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadCs.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr0.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr0.asm deleted file mode 100644 index 6f0d61084ffc..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr0.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadDr0.Asm -; -; Abstract: -; -; AsmReadDr0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr0 PROC - mov eax, dr0 - ret -AsmReadDr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr0.c b/MdePkg/Library/BaseLib/Ia32/ReadDr0.c index a3a9387e3975..2cbb3a211ff2 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr0.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr0.c @@ -2,13 +2,7 @@ AsmReadDr0 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr0.nasm b/MdePkg/Library/BaseLib/Ia32/ReadDr0.nasm index 28a846e60252..88c2857785d0 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr0.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr0.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr1.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr1.asm deleted file mode 100644 index e77265677c54..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr1.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadDr1.Asm -; -; Abstract: -; -; AsmReadDr1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr1 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr1 PROC - mov eax, dr1 - ret -AsmReadDr1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr1.c b/MdePkg/Library/BaseLib/Ia32/ReadDr1.c index 7adbd78ec1d1..dd1e2c39fd7c 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr1.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr1.c @@ -2,13 +2,7 @@ AsmReadDr1 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr1.nasm b/MdePkg/Library/BaseLib/Ia32/ReadDr1.nasm index 63c3341582d8..f782fe380781 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr1.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr1.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr2.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr2.asm deleted file mode 100644 index cdb2ec6dd94b..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr2.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadDr2.Asm -; -; Abstract: -; -; AsmReadDr2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr2 PROC - mov eax, dr2 - ret -AsmReadDr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr2.c b/MdePkg/Library/BaseLib/Ia32/ReadDr2.c index 5ec96951e064..5c0e15043164 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr2.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr2.c @@ -2,13 +2,7 @@ AsmReadDr2 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr2.nasm b/MdePkg/Library/BaseLib/Ia32/ReadDr2.nasm index 49f16bba89ad..5379cea42330 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr2.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr2.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr3.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr3.asm deleted file mode 100644 index 807bef9ba794..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr3.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadDr3.Asm -; -; Abstract: -; -; AsmReadDr3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr3 PROC - mov eax, dr3 - ret -AsmReadDr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr3.c b/MdePkg/Library/BaseLib/Ia32/ReadDr3.c index 07b587cbb506..8fbda7ac1258 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr3.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr3.c @@ -2,13 +2,7 @@ AsmReadDr3 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr3.nasm b/MdePkg/Library/BaseLib/Ia32/ReadDr3.nasm index c09b2a1e1504..b9d0f3d7c039 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr3.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr3.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr4.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr4.asm deleted file mode 100644 index 47ed5853b398..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr4.asm +++ /dev/null @@ -1,47 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadDr4.Asm -; -; Abstract: -; -; AsmReadDr4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr4 PROC - ; - ; DR4 is alias to DR6 only if DE (in CR4) is cleared. Otherwise, reading - ; this register will cause a #UD exception. - ; - ; MS assembler doesn't support this instruction since no one would use it - ; under normal circustances. Here opcode is used. - ; - DB 0fh, 21h, 0e0h - ret -AsmReadDr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr4.c b/MdePkg/Library/BaseLib/Ia32/ReadDr4.c index c42fb1c4c224..6ce200a1e705 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr4.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr4.c @@ -2,13 +2,7 @@ AsmReadDr4 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr4.nasm b/MdePkg/Library/BaseLib/Ia32/ReadDr4.nasm index 5d784dfe8ae7..36a9013339ba 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr4.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr4.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr5.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr5.asm deleted file mode 100644 index 09154f663681..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr5.asm +++ /dev/null @@ -1,47 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadDr5.Asm -; -; Abstract: -; -; AsmReadDr5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr5 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr5 PROC - ; - ; DR5 is alias to DR7 only if DE (in CR4) is cleared. Otherwise, reading - ; this register will cause a #UD exception. - ; - ; MS assembler doesn't support this instruction since no one would use it - ; under normal circustances. Here opcode is used. - ; - DB 0fh, 21h, 0e8h - ret -AsmReadDr5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr5.c b/MdePkg/Library/BaseLib/Ia32/ReadDr5.c index 9743fe2cff3e..70330274c419 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr5.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr5.c @@ -2,13 +2,7 @@ AsmReadDr5 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr5.nasm b/MdePkg/Library/BaseLib/Ia32/ReadDr5.nasm index a12ecb6a1d15..dd7666cd2033 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr5.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr5.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr6.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr6.asm deleted file mode 100644 index 5ad9dcbd3339..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr6.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadDr6.Asm -; -; Abstract: -; -; AsmReadDr6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr6 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr6 PROC - mov eax, dr6 - ret -AsmReadDr6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr6.c b/MdePkg/Library/BaseLib/Ia32/ReadDr6.c index da0496531996..851daee0b018 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr6.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr6.c @@ -2,13 +2,7 @@ AsmReadDr6 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr6.nasm b/MdePkg/Library/BaseLib/Ia32/ReadDr6.nasm index 1daa3612e3a8..cb45e671c453 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr6.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr6.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr7.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr7.asm deleted file mode 100644 index 215a079f4644..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr7.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadDr7.Asm -; -; Abstract: -; -; AsmReadDr7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr7 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr7 PROC - mov eax, dr7 - ret -AsmReadDr7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr7.c b/MdePkg/Library/BaseLib/Ia32/ReadDr7.c index e3ec1eb347c4..344a41e88178 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr7.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr7.c @@ -2,13 +2,7 @@ AsmReadDr7 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr7.nasm b/MdePkg/Library/BaseLib/Ia32/ReadDr7.nasm index 2777a118edd9..e05003549379 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr7.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr7.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDs.asm b/MdePkg/Library/BaseLib/Ia32/ReadDs.asm deleted file mode 100644 index 68decd33f9fc..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadDs.Asm -; -; Abstract: -; -; AsmReadDs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadDs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDs PROC - mov eax, ds - ret -AsmReadDs ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDs.c b/MdePkg/Library/BaseLib/Ia32/ReadDs.c index a73aa2e1a774..1b9823c79954 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDs.c @@ -2,13 +2,7 @@ AsmReadDs function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDs.nasm b/MdePkg/Library/BaseLib/Ia32/ReadDs.nasm index f9b194c4ab0d..d726fac0cb7e 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDs.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadDs.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEflags.asm b/MdePkg/Library/BaseLib/Ia32/ReadEflags.asm deleted file mode 100644 index 4ef74e2d06fd..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadEflags.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadEflags.Asm -; -; Abstract: -; -; AsmReadEflags function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadEflags ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadEflags PROC - pushfd - pop eax - ret -AsmReadEflags ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEflags.c b/MdePkg/Library/BaseLib/Ia32/ReadEflags.c index f53747442b28..12c57d2df409 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadEflags.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadEflags.c @@ -2,13 +2,7 @@ AsmReadEflags function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEflags.nasm b/MdePkg/Library/BaseLib/Ia32/ReadEflags.nasm index 51c520263709..6f386226a4bd 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadEflags.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadEflags.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEs.asm b/MdePkg/Library/BaseLib/Ia32/ReadEs.asm deleted file mode 100644 index 7e5d929be7b2..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadEs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadEs.Asm -; -; Abstract: -; -; AsmReadEs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadEs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadEs PROC - mov eax, es - ret -AsmReadEs ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEs.c b/MdePkg/Library/BaseLib/Ia32/ReadEs.c index d537fcd8e5ac..760cd47b1522 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadEs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadEs.c @@ -2,13 +2,7 @@ AsmReadEs function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEs.nasm b/MdePkg/Library/BaseLib/Ia32/ReadEs.nasm index 497c647e3814..47c7679e5695 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadEs.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadEs.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadFs.asm b/MdePkg/Library/BaseLib/Ia32/ReadFs.asm deleted file mode 100644 index 9a5730866226..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadFs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadFs.Asm -; -; Abstract: -; -; AsmReadFs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadFs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadFs PROC - mov eax, fs - ret -AsmReadFs ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadFs.c b/MdePkg/Library/BaseLib/Ia32/ReadFs.c index 9cc92b559f56..9cd7af73910d 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadFs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadFs.c @@ -2,13 +2,7 @@ AsmReadFs function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadFs.nasm b/MdePkg/Library/BaseLib/Ia32/ReadFs.nasm index 2de629679b31..719d291a3757 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadFs.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadFs.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.asm b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.asm deleted file mode 100644 index b74c50a02e25..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadGdtr.Asm -; -; Abstract: -; -; AsmReadGdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86ReadGdtr ( -; OUT IA32_DESCRIPTOR *Gdtr -; ); -;------------------------------------------------------------------------------ -InternalX86ReadGdtr PROC - mov eax, [esp + 4] - sgdt fword ptr [eax] - ret -InternalX86ReadGdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.c b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.c index 01d0a7260175..10da346e27ff 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.c @@ -2,13 +2,7 @@ AsmReadGdtr function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.nasm b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.nasm index 2637cbd14bcd..20dc3ed62807 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGs.asm b/MdePkg/Library/BaseLib/Ia32/ReadGs.asm deleted file mode 100644 index 99dad143762d..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadGs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadGs.Asm -; -; Abstract: -; -; AsmReadGs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadGs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadGs PROC - mov eax, gs - ret -AsmReadGs ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGs.c b/MdePkg/Library/BaseLib/Ia32/ReadGs.c index 53eab438c55c..75f2814203d6 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadGs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadGs.c @@ -2,13 +2,7 @@ AsmReadGs function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGs.nasm b/MdePkg/Library/BaseLib/Ia32/ReadGs.nasm index 9c6fcee30368..2ef7e4f8756c 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadGs.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadGs.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.asm b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.asm deleted file mode 100644 index 803cfa781244..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadIdtr.Asm -; -; Abstract: -; -; AsmReadIdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86ReadIdtr ( -; OUT IA32_DESCRIPTOR *Idtr -; ); -;------------------------------------------------------------------------------ -InternalX86ReadIdtr PROC - mov eax, [esp + 4] - sidt fword ptr [eax] - ret -InternalX86ReadIdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.c b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.c index 42d9aab2eb17..3fcd8b5b355b 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.c @@ -2,13 +2,7 @@ AsmReadIdtr function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.nasm b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.nasm index 3ee40e5d51e7..9abfc8aaf853 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.asm b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.asm deleted file mode 100644 index 19c48d58b54f..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadLdtr.Asm -; -; Abstract: -; -; AsmReadLdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadLdtr ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadLdtr PROC - sldt ax - ret -AsmReadLdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c index d185572ff8e0..7575c2906018 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c @@ -2,13 +2,7 @@ AsmReadLdtr function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.nasm b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.nasm index 29eddf2c8a3c..716e61ad9056 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm0.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm0.asm deleted file mode 100644 index 68113d8f9f54..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm0.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadMm0.Asm -; -; Abstract: -; -; AsmReadMm0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm0 PROC - push eax - push eax - movq [esp], mm0 - pop eax - pop edx - ret -AsmReadMm0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm0.c b/MdePkg/Library/BaseLib/Ia32/ReadMm0.c index 8db4ca535610..590c4f4e649b 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm0.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm0.c @@ -2,13 +2,7 @@ AsmReadMm0 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm0.nasm b/MdePkg/Library/BaseLib/Ia32/ReadMm0.nasm index 1330c71a6863..2423f96f6ffa 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm0.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm0.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm1.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm1.asm deleted file mode 100644 index 4cc2a36d086d..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm1.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadMm1.Asm -; -; Abstract: -; -; AsmReadMm1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm1 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm1 PROC - push eax - push eax - movq [esp], mm1 - pop eax - pop edx - ret -AsmReadMm1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm1.c b/MdePkg/Library/BaseLib/Ia32/ReadMm1.c index f0750f420d92..e161bce41027 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm1.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm1.c @@ -2,13 +2,7 @@ AsmReadMm1 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm1.nasm b/MdePkg/Library/BaseLib/Ia32/ReadMm1.nasm index e411df817f83..6197eb8fa6b6 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm1.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm1.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm2.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm2.asm deleted file mode 100644 index 7980b68eb132..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm2.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadMm2.Asm -; -; Abstract: -; -; AsmReadMm2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm2 PROC - push eax - push eax - movq [esp], mm2 - pop eax - pop edx - ret -AsmReadMm2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm2.c b/MdePkg/Library/BaseLib/Ia32/ReadMm2.c index 17929b2f6419..3681737eb74e 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm2.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm2.c @@ -2,13 +2,7 @@ AsmReadMm2 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm2.nasm b/MdePkg/Library/BaseLib/Ia32/ReadMm2.nasm index 4190119c399b..aec27f634849 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm2.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm2.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm3.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm3.asm deleted file mode 100644 index d557e4c84dd3..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm3.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadMm3.Asm -; -; Abstract: -; -; AsmReadMm3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm3 PROC - push eax - push eax - movq [esp], mm3 - pop eax - pop edx - ret -AsmReadMm3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm3.c b/MdePkg/Library/BaseLib/Ia32/ReadMm3.c index a505f180ec61..272d90e6b076 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm3.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm3.c @@ -2,13 +2,7 @@ AsmReadMm3 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm3.nasm b/MdePkg/Library/BaseLib/Ia32/ReadMm3.nasm index 89125e8d3714..38edfb1598db 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm3.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm3.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm4.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm4.asm deleted file mode 100644 index c1507729ddf7..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm4.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadMm4.Asm -; -; Abstract: -; -; AsmReadMm4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm4 PROC - push eax - push eax - movq [esp], mm4 - pop eax - pop edx - ret -AsmReadMm4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm4.c b/MdePkg/Library/BaseLib/Ia32/ReadMm4.c index ecc3896cfc07..e6f8fb6d8beb 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm4.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm4.c @@ -2,13 +2,7 @@ AsmReadMm4 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm4.nasm b/MdePkg/Library/BaseLib/Ia32/ReadMm4.nasm index a0e8d1681e99..2b5471113ff7 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm4.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm4.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm5.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm5.asm deleted file mode 100644 index a6cfbf2fd386..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm5.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadMm5.Asm -; -; Abstract: -; -; AsmReadMm5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm5 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm5 PROC - push eax - push eax - movq [esp], mm5 - pop eax - pop edx - ret -AsmReadMm5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm5.c b/MdePkg/Library/BaseLib/Ia32/ReadMm5.c index e97471757e96..da5832736ef6 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm5.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm5.c @@ -2,13 +2,7 @@ AsmReadMm5 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm5.nasm b/MdePkg/Library/BaseLib/Ia32/ReadMm5.nasm index 2c96bfa20fdc..f7fab186e758 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm5.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm5.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm6.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm6.asm deleted file mode 100644 index 753670851ff8..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm6.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadMm6.Asm -; -; Abstract: -; -; AsmReadMm6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm6 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm6 PROC - push eax - push eax - movq [esp], mm6 - pop eax - pop edx - ret -AsmReadMm6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm6.c b/MdePkg/Library/BaseLib/Ia32/ReadMm6.c index a64cf507a0aa..cf738e3bf349 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm6.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm6.c @@ -2,13 +2,7 @@ AsmReadMm6 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm6.nasm b/MdePkg/Library/BaseLib/Ia32/ReadMm6.nasm index f6a6047a542e..381b73447c23 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm6.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm6.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm7.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm7.asm deleted file mode 100644 index 64ad7ab299a0..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm7.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadMm7.Asm -; -; Abstract: -; -; AsmReadMm7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm7 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm7 PROC - push eax - push eax - movq [esp], mm7 - pop eax - pop edx - ret -AsmReadMm7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm7.c b/MdePkg/Library/BaseLib/Ia32/ReadMm7.c index 0cea21956c12..c2430654b5f9 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm7.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm7.c @@ -2,13 +2,7 @@ AsmReadMm7 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm7.nasm b/MdePkg/Library/BaseLib/Ia32/ReadMm7.nasm index 655aa40761b6..0a418cbd4c01 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm7.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm7.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.asm b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.asm deleted file mode 100644 index e04808937cbf..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadMsr64.Asm -; -; Abstract: -; -; AsmReadMsr64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMsr64 ( -; IN UINT64 Index -; ); -;------------------------------------------------------------------------------ -AsmReadMsr64 PROC - mov ecx, [esp + 4] - rdmsr - ret -AsmReadMsr64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c index e16c91744c36..e64db9217938 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c @@ -2,13 +2,7 @@ AsmReadMsr64 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.nasm b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.nasm index f1dbd4111401..030f97df5b09 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadPmc.asm b/MdePkg/Library/BaseLib/Ia32/ReadPmc.asm deleted file mode 100644 index 0e87bfa03cc1..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadPmc.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadPmc.Asm -; -; Abstract: -; -; AsmReadPmc function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadPmc ( -; IN UINT32 PmcIndex -; ); -;------------------------------------------------------------------------------ -AsmReadPmc PROC - mov ecx, [esp + 4] - rdpmc - ret -AsmReadPmc ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadPmc.c b/MdePkg/Library/BaseLib/Ia32/ReadPmc.c index faa1f565810a..a74d31321f71 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadPmc.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadPmc.c @@ -2,13 +2,7 @@ AsmReadPmc function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadPmc.nasm b/MdePkg/Library/BaseLib/Ia32/ReadPmc.nasm index 8eb0501a6251..694456a23f0f 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadPmc.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadPmc.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadSs.asm b/MdePkg/Library/BaseLib/Ia32/ReadSs.asm deleted file mode 100644 index f881751d6dde..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadSs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadSs.Asm -; -; Abstract: -; -; AsmReadSs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadSs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadSs PROC - mov eax, ss - ret -AsmReadSs ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadSs.c b/MdePkg/Library/BaseLib/Ia32/ReadSs.c index f1ced5e0ed49..683ff39b6144 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadSs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadSs.c @@ -2,13 +2,7 @@ AsmReadSs function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadSs.nasm b/MdePkg/Library/BaseLib/Ia32/ReadSs.nasm index 6b3da79270bf..a71126f97c08 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadSs.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadSs.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTr.asm b/MdePkg/Library/BaseLib/Ia32/ReadTr.asm deleted file mode 100644 index 703bec7ef6b2..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadTr.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadTr.Asm -; -; Abstract: -; -; AsmReadTr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadTr ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadTr PROC - str ax - ret -AsmReadTr ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTr.c b/MdePkg/Library/BaseLib/Ia32/ReadTr.c index 23273f385356..b540b75c1e50 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadTr.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadTr.c @@ -2,13 +2,7 @@ AsmReadTr function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTr.nasm b/MdePkg/Library/BaseLib/Ia32/ReadTr.nasm index 811153c418e7..13ad3199ebf4 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadTr.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadTr.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTsc.asm b/MdePkg/Library/BaseLib/Ia32/ReadTsc.asm deleted file mode 100644 index 5c2004153a09..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadTsc.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; ReadTsc.Asm -; -; Abstract: -; -; AsmReadTsc function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadTsc ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadTsc PROC - rdtsc - ret -AsmReadTsc ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTsc.c b/MdePkg/Library/BaseLib/Ia32/ReadTsc.c index 79f676e6d9ee..ae8649fe1c94 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadTsc.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadTsc.c @@ -2,13 +2,7 @@ AsmReadTsc function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTsc.nasm b/MdePkg/Library/BaseLib/Ia32/ReadTsc.nasm index f28e20e445d6..9d518264fc9c 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadTsc.nasm +++ b/MdePkg/Library/BaseLib/Ia32/ReadTsc.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/SetJump.S b/MdePkg/Library/BaseLib/Ia32/SetJump.S deleted file mode 100644 index 744a77e7dc79..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/SetJump.S +++ /dev/null @@ -1,44 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# SetJump.S -# -# Abstract: -# -# Implementation of SetJump() on IA-32. -# -#------------------------------------------------------------------------------ - -ASM_GLOBAL ASM_PFX(SetJump), ASM_PFX(InternalAssertJumpBuffer) - -#------------------------------------------------------------------------------ -# UINTN -# EFIAPI -# SetJump ( -# OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer -# ); -#------------------------------------------------------------------------------ -ASM_PFX(SetJump): - pushl 0x4(%esp) - call ASM_PFX(InternalAssertJumpBuffer) # To validate JumpBuffer - pop %ecx - pop %ecx # ecx <- return address - movl (%esp), %edx - movl %ebx, (%edx) - movl %esi, 4(%edx) - movl %edi, 8(%edx) - movl %ebp, 12(%edx) - movl %esp, 16(%edx) - movl %ecx, 20(%edx) # eip value to restore in LongJump - xorl %eax, %eax - jmp *%ecx diff --git a/MdePkg/Library/BaseLib/Ia32/SetJump.asm b/MdePkg/Library/BaseLib/Ia32/SetJump.asm deleted file mode 100644 index 3c078ff97bd7..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/SetJump.asm +++ /dev/null @@ -1,51 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; SetJump.Asm -; -; Abstract: -; -; Implementation of SetJump() on IA-32. -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -InternalAssertJumpBuffer PROTO C - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; SetJump ( -; OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer -; ); -;------------------------------------------------------------------------------ -SetJump PROC - push DWORD [esp + 4] - call InternalAssertJumpBuffer ; To validate JumpBuffer - pop ecx - pop ecx ; ecx <- return address - mov edx, [esp] - mov [edx], ebx - mov [edx + 4], esi - mov [edx + 8], edi - mov [edx + 12], ebp - mov [edx + 16], esp - mov [edx + 20], ecx ; eip value to restore in LongJump - xor eax, eax - jmp ecx -SetJump ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/SetJump.c b/MdePkg/Library/BaseLib/Ia32/SetJump.c deleted file mode 100644 index 414c36e0f2d5..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/SetJump.c +++ /dev/null @@ -1,74 +0,0 @@ -/** @file - Implementation of SetJump() on IA-32. - - Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. - -**/ - - -#include "BaseLibInternals.h" - -/** - 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 -SetJump ( - OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer - ) -{ - _asm { - push [esp + 4] - call InternalAssertJumpBuffer - pop ecx - pop ecx - mov edx, [esp] - mov [edx], ebx - mov [edx + 4], esi - mov [edx + 8], edi - mov [edx + 12], ebp - mov [edx + 16], esp - mov [edx + 20], ecx - xor eax, eax - jmp ecx - } -} - diff --git a/MdePkg/Library/BaseLib/Ia32/SetJump.nasm b/MdePkg/Library/BaseLib/Ia32/SetJump.nasm index 58074b87ccb6..be66237ec8a2 100644 --- a/MdePkg/Library/BaseLib/Ia32/SetJump.nasm +++ b/MdePkg/Library/BaseLib/Ia32/SetJump.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR> +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; @@ -19,9 +13,12 @@ ; ;------------------------------------------------------------------------------ +%include "Nasm.inc" + SECTION .text extern ASM_PFX(InternalAssertJumpBuffer) +extern ASM_PFX(PcdGet32 (PcdControlFlowEnforcementPropertyMask)) ;------------------------------------------------------------------------------ ; UINTN @@ -37,6 +34,24 @@ ASM_PFX(SetJump): pop ecx pop ecx ; ecx <- return address mov edx, [esp] + + xor eax, eax + mov [edx + 24], eax ; save 0 to SSP + + mov eax, [ASM_PFX(PcdGet32 (PcdControlFlowEnforcementPropertyMask))] + test eax, eax + jz CetDone + mov eax, cr4 + bt eax, 23 ; check if CET is enabled + jnc CetDone + + mov eax, 1 + INCSSP_EAX ; to read original SSP + READSSP_EAX + mov [edx + 0x24], eax ; save SSP + +CetDone: + mov [edx], ebx mov [edx + 4], esi mov [edx + 8], edi diff --git a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.S b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.S deleted file mode 100644 index 265b6b72fe95..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.S +++ /dev/null @@ -1,38 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# CpuId.S -# -# Abstract: -# -# AsmCpuid function -# -# Notes: -# -#------------------------------------------------------------------------------ - - -#------------------------------------------------------------------------------ -# UINT64 -# EFIAPI -# InternalMathSwapBytes64 ( -# IN UINT64 Operand -# ); -#------------------------------------------------------------------------------ -ASM_GLOBAL ASM_PFX(InternalMathSwapBytes64) -ASM_PFX(InternalMathSwapBytes64): - movl 8(%esp), %eax # eax <- upper 32 bits - movl 4(%esp), %edx # edx <- lower 32 bits - bswapl %eax - bswapl %edx - ret diff --git a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.asm b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.asm deleted file mode 100644 index 1ab67db482c4..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; CpuId.Asm -; -; Abstract: -; -; AsmCpuid function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathSwapBytes64 ( -; IN UINT64 Operand -; ); -;------------------------------------------------------------------------------ -InternalMathSwapBytes64 PROC - mov eax, [esp + 8] ; eax <- upper 32 bits - mov edx, [esp + 4] ; edx <- lower 32 bits - bswap eax - bswap edx - ret -InternalMathSwapBytes64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.c b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.c index 3e03b6547489..2f857a4d962a 100644 --- a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.c +++ b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.c @@ -2,13 +2,7 @@ Implementation of 64-bit swap bytes Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.nasm b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.nasm index 32fc1a6457b8..f076be3dc625 100644 --- a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.nasm +++ b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/Thunk16.S b/MdePkg/Library/BaseLib/Ia32/Thunk16.S deleted file mode 100644 index f5189d0515e2..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/Thunk16.S +++ /dev/null @@ -1,222 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR> -# 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. -# -# Module Name: -# -# Thunk16.S -# -# Abstract: -# -# Real mode thunk -# -#------------------------------------------------------------------------------ - -#include <Library/BaseLib.h> - -ASM_GLOBAL ASM_PFX(m16Start), ASM_PFX(m16Size), ASM_PFX(mThunk16Attr), ASM_PFX(m16Gdt), ASM_PFX(m16GdtrBase), ASM_PFX(mTransition) -ASM_GLOBAL ASM_PFX(InternalAsmThunk16) - -# define the structure of IA32_REGS -.set _EDI, 0 #size 4 -.set _ESI, 4 #size 4 -.set _EBP, 8 #size 4 -.set _ESP, 12 #size 4 -.set _EBX, 16 #size 4 -.set _EDX, 20 #size 4 -.set _ECX, 24 #size 4 -.set _EAX, 28 #size 4 -.set _DS, 32 #size 2 -.set _ES, 34 #size 2 -.set _FS, 36 #size 2 -.set _GS, 38 #size 2 -.set _EFLAGS, 40 #size 4 -.set _EIP, 44 #size 4 -.set _CS, 48 #size 2 -.set _SS, 50 #size 2 -.set IA32_REGS_SIZE, 52 - - .text - .code16 - -ASM_PFX(m16Start): - -SavedGdt: .space 6 - -ASM_PFX(BackFromUserCode): - push %ss - push %cs - - calll L_Base1 # push eip -L_Base1: - pushfl - cli # disable interrupts - push %gs - push %fs - push %es - push %ds - pushal - .byte 0x66, 0xba # mov edx, imm32 -ASM_PFX(ThunkAttr): .space 4 - testb $THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15, %dl - jz 1f - movw $0x2401, %ax - int $0x15 - cli # disable interrupts - jnc 2f -1: - testb $THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL, %dl - jz 2f - inb $0x92, %al - orb $2, %al - outb %al, $0x92 # deactivate A20M# -2: - xorl %eax, %eax - movw %ss, %ax - leal IA32_REGS_SIZE(%esp), %ebp - mov %ebp, (_ESP - IA32_REGS_SIZE)(%bp) - mov (_EIP - IA32_REGS_SIZE)(%bp), %bx - shll $4, %eax - addl %eax, %ebp - .byte 0x66, 0xb8 # mov eax, imm32 -SavedCr4: .space 4 - movl %eax, %cr4 - lgdtl %cs:(SavedGdt - L_Base1)(%bx) - .byte 0x66, 0xb8 # mov eax, imm32 -SavedCr0: .space 4 - movl %eax, %cr0 - .byte 0xb8 # mov ax, imm16 -SavedSs: .space 2 - movl %eax, %ss - .byte 0x66, 0xbc # mov esp, imm32 -SavedEsp: .space 4 - lretl # return to protected mode - -_EntryPoint: .long ASM_PFX(ToUserCode) - ASM_PFX(m16Start) - .word 0x8 -_16Idtr: .word 0x3ff - .long 0 -_16Gdtr: .word GdtEnd - _NullSegDesc - 1 -_16GdtrBase: .long _NullSegDesc - -ASM_PFX(ToUserCode): - movw %ss, %dx - movw %cx, %ss # set new segment selectors - movw %cx, %ds - movw %cx, %es - movw %cx, %fs - movw %cx, %gs - movl %eax, %cr0 # real mode starts at next instruction - # which (per SDM) *must* be a far JMP. - ljmpw $0,$0 # will be filled in by InternalAsmThunk16 -L_Base: # to point here. - movl %ebp, %cr4 - movw %si, %ss # set up 16-bit stack segment - xchgl %ebx, %esp # set up 16-bit stack pointer - - movw IA32_REGS_SIZE(%esp), %bp # get BackToUserCode address from stack - mov %dx, %cs:(SavedSs - ASM_PFX(BackFromUserCode))(%bp) - mov %ebx, %cs:(SavedEsp - ASM_PFX(BackFromUserCode))(%bp) - lidtl %cs:(_16Idtr - ASM_PFX(BackFromUserCode))(%bp) - popal - pop %ds - pop %es - pop %fs - pop %gs - popfl - lretl # transfer control to user code - -_NullSegDesc: .quad 0 -_16CsDesc: - .word -1 - .word 0 - .byte 0 - .byte 0x9b - .byte 0x8f # 16-bit segment, 4GB limit - .byte 0 -_16DsDesc: - .word -1 - .word 0 - .byte 0 - .byte 0x93 - .byte 0x8f # 16-bit segment, 4GB limit - .byte 0 -GdtEnd: - - .code32 -# -# @param RegSet The pointer to a IA32_DWORD_REGS structure -# @param Transition The pointer to the transition code -# @return The address of the 16-bit stack after returning from user code -# -ASM_PFX(InternalAsmThunk16): - push %ebp - push %ebx - push %esi - push %edi - push %ds - push %es - push %fs - push %gs - movl 36(%esp), %esi # esi <- RegSet - movzwl _SS(%esi), %edx - mov _ESP(%esi), %edi - add $(-(IA32_REGS_SIZE + 4)), %edi - movl %edi, %ebx # ebx <- stack offset - imul $0x10, %edx, %eax - push $(IA32_REGS_SIZE / 4) - addl %eax, %edi # edi <- linear address of 16-bit stack - pop %ecx - rep - movsl # copy RegSet - movl 40(%esp), %eax # eax <- address of transition code - movl %edx, %esi # esi <- 16-bit stack segment - lea (SavedCr0 - ASM_PFX(m16Start))(%eax), %edx - movl %eax, %ecx - andl $0xf, %ecx - shll $12, %eax - lea (ASM_PFX(BackFromUserCode) - ASM_PFX(m16Start))(%ecx), %ecx - movw %cx, %ax - stosl # [edi] <- return address of user code - addl $(L_Base - ASM_PFX(BackFromUserCode)), %eax - movl %eax, (L_Base - SavedCr0 - 4)(%edx) - sgdtl (SavedGdt - SavedCr0)(%edx) - sidtl 0x24(%esp) - movl %cr0, %eax - movl %eax, (%edx) # save CR0 in SavedCr0 - andl $0x7ffffffe, %eax # clear PE, PG bits - movl %cr4, %ebp - mov %ebp, (SavedCr4 - SavedCr0)(%edx) - andl $0xffffffcf, %ebp # clear PAE, PSE bits - pushl $0x10 - pop %ecx # ecx <- selector for data segments - lgdtl (_16Gdtr - SavedCr0)(%edx) - pushfl - lcall *(_EntryPoint - SavedCr0)(%edx) - popfl - lidtl 0x24(%esp) - lea -IA32_REGS_SIZE(%ebp), %eax - pop %gs - pop %fs - pop %es - pop %ds - pop %edi - pop %esi - pop %ebx - pop %ebp - ret - - .const: - -ASM_PFX(m16Size): .word ASM_PFX(InternalAsmThunk16) - ASM_PFX(m16Start) -ASM_PFX(mThunk16Attr): .word ASM_PFX(ThunkAttr) - ASM_PFX(m16Start) -ASM_PFX(m16Gdt): .word _NullSegDesc - ASM_PFX(m16Start) -ASM_PFX(m16GdtrBase): .word _16GdtrBase - ASM_PFX(m16Start) -ASM_PFX(mTransition): .word _EntryPoint - ASM_PFX(m16Start) diff --git a/MdePkg/Library/BaseLib/Ia32/Thunk16.asm b/MdePkg/Library/BaseLib/Ia32/Thunk16.asm deleted file mode 100644 index 9311c1161f0e..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/Thunk16.asm +++ /dev/null @@ -1,260 +0,0 @@ - -#include "BaseLibInternals.h" - -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; Thunk.asm -; -; Abstract: -; -; Real mode thunk -; -;------------------------------------------------------------------------------ - - .686p - .model flat,C - -EXTERNDEF C m16Start:BYTE -EXTERNDEF C m16Size:WORD -EXTERNDEF C mThunk16Attr:WORD -EXTERNDEF C m16Gdt:WORD -EXTERNDEF C m16GdtrBase:WORD -EXTERNDEF C mTransition:WORD - -; -; Here is the layout of the real mode stack. _ToUserCode() is responsible for -; loading all these registers from real mode stack. -; -IA32_REGS STRUC 4t -_EDI DD ? -_ESI DD ? -_EBP DD ? -_ESP DD ? -_EBX DD ? -_EDX DD ? -_ECX DD ? -_EAX DD ? -_DS DW ? -_ES DW ? -_FS DW ? -_GS DW ? -_EFLAGS DD ? -_EIP DD ? -_CS DW ? -_SS DW ? -IA32_REGS ENDS - - .const - -; -; These are global constant to convey information to C code. -; -m16Size DW InternalAsmThunk16 - m16Start -mThunk16Attr DW _ThunkAttr - m16Start -m16Gdt DW _NullSegDesc - m16Start -m16GdtrBase DW _16GdtrBase - m16Start -mTransition DW _EntryPoint - m16Start - - .code - -m16Start LABEL BYTE - -SavedGdt LABEL FWORD - DW ? - DD ? -;------------------------------------------------------------------------------ -; _BackFromUserCode() takes control in real mode after 'retf' has been executed -; by user code. It will be shadowed to somewhere in memory below 1MB. -;------------------------------------------------------------------------------ -_BackFromUserCode PROC - ; - ; The order of saved registers on the stack matches the order they appears - ; in IA32_REGS structure. This facilitates wrapper function to extract them - ; into that structure. - ; - push ss - push cs - DB 66h - call @Base ; push eip -@Base: - pushf ; pushfd actually - cli ; disable interrupts - push gs - push fs - push es - push ds - pushaw ; pushad actually - DB 66h, 0bah ; mov edx, imm32 -_ThunkAttr DD ? - test dl, THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 - jz @1 - mov eax, 15cd2401h ; mov ax, 2401h & int 15h - cli ; disable interrupts - jnc @2 -@1: - test dl, THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL - jz @2 - in al, 92h - or al, 2 - out 92h, al ; deactivate A20M# -@2: - xor ax, ax ; xor eax, eax - mov eax, ss ; mov ax, ss - DB 67h - lea bp, [esp + sizeof (IA32_REGS)] - ; - ; esi's in the following 2 instructions are indeed bp in 16-bit code. Fact - ; is "esi" in 32-bit addressing mode has the same encoding of "bp" in 16- - ; bit addressing mode. - ; - mov word ptr (IA32_REGS ptr [esi - sizeof (IA32_REGS)])._ESP, bp - mov ebx, (IA32_REGS ptr [esi - sizeof (IA32_REGS)])._EIP - shl ax, 4 ; shl eax, 4 - add bp, ax ; add ebp, eax - DB 66h, 0b8h ; mov eax, imm32 -SavedCr4 DD ? - mov cr4, eax - DB 66h - lgdt fword ptr cs:[edi + (SavedGdt - @Base)] - DB 66h, 0b8h ; mov eax, imm32 -SavedCr0 DD ? - mov cr0, eax - DB 0b8h ; mov ax, imm16 -SavedSs DW ? - mov ss, eax - DB 66h, 0bch ; mov esp, imm32 -SavedEsp DD ? - DB 66h - retf ; return to protected mode -_BackFromUserCode ENDP - -_EntryPoint DD _ToUserCode - m16Start - DW 8h -_16Idtr FWORD (1 SHL 10) - 1 -_16Gdtr LABEL FWORD - DW GdtEnd - _NullSegDesc - 1 -_16GdtrBase DD _NullSegDesc - -;------------------------------------------------------------------------------ -; _ToUserCode() takes control in real mode before passing control to user code. -; It will be shadowed to somewhere in memory below 1MB. -;------------------------------------------------------------------------------ -_ToUserCode PROC - mov edx, ss - mov ss, ecx ; set new segment selectors - mov ds, ecx - mov es, ecx - mov fs, ecx - mov gs, ecx - mov cr0, eax ; real mode starts at next instruction - ; which (per SDM) *must* be a far JMP. - DB 0eah -_RealAddr DW 0,0 ; filled in by InternalAsmThunk16 - - mov cr4, ebp - mov ss, esi ; set up 16-bit stack segment - xchg sp, bx ; set up 16-bit stack pointer - -; mov bp, [esp + sizeof(IA32_REGS) - DB 67h - mov ebp, [esp + sizeof(IA32_REGS)] ; BackFromUserCode address from stack - -; mov cs:[bp + (SavedSs - _BackFromUserCode)], dx - mov cs:[esi + (SavedSs - _BackFromUserCode)], edx - -; mov cs:[bp + (SavedEsp - _BackFromUserCode)], ebx - DB 2eh, 66h, 89h, 9eh - DW SavedEsp - _BackFromUserCode - -; lidt cs:[bp + (_16Idtr - _BackFromUserCode)] - DB 2eh, 66h, 0fh, 01h, 9eh - DW _16Idtr - _BackFromUserCode - - popaw ; popad actually - pop ds - pop es - pop fs - pop gs - popf ; popfd - DB 66h ; Use 32-bit addressing for "retf" below - retf ; transfer control to user code -_ToUserCode ENDP - -_NullSegDesc DQ 0 -_16CsDesc LABEL QWORD - DW -1 - DW 0 - DB 0 - DB 9bh - DB 8fh ; 16-bit segment, 4GB limit - DB 0 -_16DsDesc LABEL QWORD - DW -1 - DW 0 - DB 0 - DB 93h - DB 8fh ; 16-bit segment, 4GB limit - DB 0 -GdtEnd LABEL QWORD - -;------------------------------------------------------------------------------ -; IA32_REGISTER_SET * -; EFIAPI -; InternalAsmThunk16 ( -; IN IA32_REGISTER_SET *RegisterSet, -; IN OUT VOID *Transition -; ); -;------------------------------------------------------------------------------ -InternalAsmThunk16 PROC USES ebp ebx esi edi ds es fs gs - mov esi, [esp + 36] ; esi <- RegSet, the 1st parameter - movzx edx, (IA32_REGS ptr [esi])._SS - mov edi, (IA32_REGS ptr [esi])._ESP - add edi, - (sizeof (IA32_REGS) + 4) ; reserve stack space - mov ebx, edi ; ebx <- stack offset - imul eax, edx, 16 ; eax <- edx * 16 - push sizeof (IA32_REGS) / 4 - add edi, eax ; edi <- linear address of 16-bit stack - pop ecx - rep movsd ; copy RegSet - mov eax, [esp + 40] ; eax <- address of transition code - mov esi, edx ; esi <- 16-bit stack segment - lea edx, [eax + (SavedCr0 - m16Start)] - mov ecx, eax - and ecx, 0fh - shl eax, 12 - lea ecx, [ecx + (_BackFromUserCode - m16Start)] - mov ax, cx - stosd ; [edi] <- return address of user code - add eax, _RealAddr + 4 - _BackFromUserCode - mov dword ptr [edx + (_RealAddr - SavedCr0)], eax - sgdt fword ptr [edx + (SavedGdt - SavedCr0)] - sidt fword ptr [esp + 36] ; save IDT stack in argument space - mov eax, cr0 - mov [edx], eax ; save CR0 in SavedCr0 - and eax, 7ffffffeh ; clear PE, PG bits - mov ebp, cr4 - mov [edx + (SavedCr4 - SavedCr0)], ebp - and ebp, NOT 30h ; clear PAE, PSE bits - push 10h - pop ecx ; ecx <- selector for data segments - lgdt fword ptr [edx + (_16Gdtr - SavedCr0)] - pushfd ; Save df/if indeed - call fword ptr [edx + (_EntryPoint - SavedCr0)] - popfd - lidt fword ptr [esp + 36] ; restore protected mode IDTR - lea eax, [ebp - sizeof (IA32_REGS)] ; eax <- the address of IA32_REGS - ret -InternalAsmThunk16 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/Thunk16.nasm b/MdePkg/Library/BaseLib/Ia32/Thunk16.nasm index 1c02140595dc..ffe39473c76c 100644 --- a/MdePkg/Library/BaseLib/Ia32/Thunk16.nasm +++ b/MdePkg/Library/BaseLib/Ia32/Thunk16.nasm @@ -4,13 +4,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/Wbinvd.asm b/MdePkg/Library/BaseLib/Ia32/Wbinvd.asm deleted file mode 100644 index 1200101eb0ca..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/Wbinvd.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; Wbinvd.Asm -; -; Abstract: -; -; AsmWbinvd function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .486p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWbinvd ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWbinvd PROC - wbinvd - ret -AsmWbinvd ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/Wbinvd.c b/MdePkg/Library/BaseLib/Ia32/Wbinvd.c index 16b9cf7baf88..92ff861dcd44 100644 --- a/MdePkg/Library/BaseLib/Ia32/Wbinvd.c +++ b/MdePkg/Library/BaseLib/Ia32/Wbinvd.c @@ -2,13 +2,7 @@ AsmWbinvd function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/Wbinvd.nasm b/MdePkg/Library/BaseLib/Ia32/Wbinvd.nasm index 7bdf793ebdf8..c7ddee1ca077 100644 --- a/MdePkg/Library/BaseLib/Ia32/Wbinvd.nasm +++ b/MdePkg/Library/BaseLib/Ia32/Wbinvd.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr0.asm b/MdePkg/Library/BaseLib/Ia32/WriteCr0.asm deleted file mode 100644 index d61df0eda1b2..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr0.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteCr0.Asm -; -; Abstract: -; -; AsmWriteCr0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr0 ( -; UINTN Cr0 -; ); -;------------------------------------------------------------------------------ -AsmWriteCr0 PROC - mov eax, [esp + 4] - mov cr0, eax - ret -AsmWriteCr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr0.c b/MdePkg/Library/BaseLib/Ia32/WriteCr0.c index 177da8084498..5b4ef4d95ac3 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr0.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr0.c @@ -2,13 +2,7 @@ AsmWriteCr0 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr0.nasm b/MdePkg/Library/BaseLib/Ia32/WriteCr0.nasm index 0c0ea5cca58f..52b18c7929e7 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr0.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr0.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr2.asm b/MdePkg/Library/BaseLib/Ia32/WriteCr2.asm deleted file mode 100644 index 27e355033aaa..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr2.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteCr2.Asm -; -; Abstract: -; -; AsmWriteCr2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr2 ( -; UINTN Cr2 -; ); -;------------------------------------------------------------------------------ -AsmWriteCr2 PROC - mov eax, [esp + 4] - mov cr2, eax - ret -AsmWriteCr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr2.c b/MdePkg/Library/BaseLib/Ia32/WriteCr2.c index efbdf63e14ab..89e8fd3675cb 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr2.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr2.c @@ -2,13 +2,7 @@ AsmWriteCr2 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr2.nasm b/MdePkg/Library/BaseLib/Ia32/WriteCr2.nasm index 2b7afa812c8d..5e4966bfc0d2 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr2.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr2.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr3.asm b/MdePkg/Library/BaseLib/Ia32/WriteCr3.asm deleted file mode 100644 index 8132253b09ee..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr3.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteCr3.Asm -; -; Abstract: -; -; AsmWriteCr3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr3 ( -; UINTN Cr3 -; ); -;------------------------------------------------------------------------------ -AsmWriteCr3 PROC - mov eax, [esp + 4] - mov cr3, eax - ret -AsmWriteCr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr3.c b/MdePkg/Library/BaseLib/Ia32/WriteCr3.c index 6aeb0f277a01..c1ef6f96c890 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr3.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr3.c @@ -2,13 +2,7 @@ AsmWriteCr3 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr3.nasm b/MdePkg/Library/BaseLib/Ia32/WriteCr3.nasm index 90a22198c200..90eb0c774e1f 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr3.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr3.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr4.asm b/MdePkg/Library/BaseLib/Ia32/WriteCr4.asm deleted file mode 100644 index 011d511d8043..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr4.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteCr4.Asm -; -; Abstract: -; -; AsmWriteCr4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr4 ( -; UINTN Cr4 -; ); -;------------------------------------------------------------------------------ -AsmWriteCr4 PROC - mov eax, [esp + 4] - mov cr4, eax - ret -AsmWriteCr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr4.c b/MdePkg/Library/BaseLib/Ia32/WriteCr4.c index f14556462d3a..4343a1ac114f 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr4.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr4.c @@ -2,13 +2,7 @@ AsmWriteCr4 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr4.nasm b/MdePkg/Library/BaseLib/Ia32/WriteCr4.nasm index 486fe2443084..e0ef3185b8d5 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr4.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr4.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr0.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr0.asm deleted file mode 100644 index bd426a8cd3ae..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr0.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteDr0.Asm -; -; Abstract: -; -; AsmWriteDr0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr0 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr0 PROC - mov eax, [esp + 4] - mov dr0, eax - ret -AsmWriteDr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr0.c b/MdePkg/Library/BaseLib/Ia32/WriteDr0.c index bd5e10119ac1..c199c8410ade 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr0.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr0.c @@ -2,13 +2,7 @@ AsmWriteDr0 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr0.nasm b/MdePkg/Library/BaseLib/Ia32/WriteDr0.nasm index 5c2af942a200..c6e47abbd323 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr0.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr0.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr1.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr1.asm deleted file mode 100644 index accf95b79359..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr1.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteDr1.Asm -; -; Abstract: -; -; AsmWriteDr1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr1 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr1 PROC - mov eax, [esp + 4] - mov dr1, eax - ret -AsmWriteDr1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr1.c b/MdePkg/Library/BaseLib/Ia32/WriteDr1.c index 695f3460c204..361b14a64a83 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr1.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr1.c @@ -2,13 +2,7 @@ AsmWriteDr1 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr1.nasm b/MdePkg/Library/BaseLib/Ia32/WriteDr1.nasm index a35389e03862..9bac37e40692 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr1.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr1.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr2.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr2.asm deleted file mode 100644 index d311fb017f6d..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr2.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteDr2.Asm -; -; Abstract: -; -; AsmWriteDr2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr2 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr2 PROC - mov eax, [esp + 4] - mov dr2, eax - ret -AsmWriteDr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr2.c b/MdePkg/Library/BaseLib/Ia32/WriteDr2.c index 8a24b94a9b56..2fb544a62503 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr2.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr2.c @@ -2,13 +2,7 @@ AsmWriteDr2 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr2.nasm b/MdePkg/Library/BaseLib/Ia32/WriteDr2.nasm index 936cefc8857d..70529670c463 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr2.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr2.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr3.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr3.asm deleted file mode 100644 index 59282da5ef36..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr3.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteDr3.Asm -; -; Abstract: -; -; AsmWriteDr3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr3 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr3 PROC - mov eax, [esp + 4] - mov dr3, eax - ret -AsmWriteDr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr3.c b/MdePkg/Library/BaseLib/Ia32/WriteDr3.c index 3a0921bffa52..4a74a63f9203 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr3.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr3.c @@ -2,13 +2,7 @@ AsmWriteDr3 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr3.nasm b/MdePkg/Library/BaseLib/Ia32/WriteDr3.nasm index d7a58cff6401..3f33710b66f1 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr3.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr3.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr4.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr4.asm deleted file mode 100644 index 4d61dc7c68b8..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr4.asm +++ /dev/null @@ -1,48 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteDr4.Asm -; -; Abstract: -; -; AsmWriteDr4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr4 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr4 PROC - mov eax, [esp + 4] - ; - ; DR4 is alias to DR6 only if DE (in CR4) is cleared. Otherwise, writing to - ; this register will cause a #UD exception. - ; - ; MS assembler doesn't support this instruction since no one would use it - ; under normal circustances. Here opcode is used. - ; - DB 0fh, 23h, 0e0h - ret -AsmWriteDr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr4.c b/MdePkg/Library/BaseLib/Ia32/WriteDr4.c index acfe93f3569d..c9f336e65a78 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr4.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr4.c @@ -2,13 +2,7 @@ AsmWriteDr4 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr4.nasm b/MdePkg/Library/BaseLib/Ia32/WriteDr4.nasm index 95c6d06315c8..590effbadae2 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr4.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr4.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr5.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr5.asm deleted file mode 100644 index 733f59964dc3..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr5.asm +++ /dev/null @@ -1,48 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteDr5.Asm -; -; Abstract: -; -; AsmWriteDr5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr5 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr5 PROC - mov eax, [esp + 4] - ; - ; DR5 is alias to DR7 only if DE (in CR4) is cleared. Otherwise, writing to - ; this register will cause a #UD exception. - ; - ; MS assembler doesn't support this instruction since no one would use it - ; under normal circustances. Here opcode is used. - ; - DB 0fh, 23h, 0e8h - ret -AsmWriteDr5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr5.c b/MdePkg/Library/BaseLib/Ia32/WriteDr5.c index 4e00cebf9f40..c2e0f404339b 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr5.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr5.c @@ -2,13 +2,7 @@ AsmWriteDr5 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr5.nasm b/MdePkg/Library/BaseLib/Ia32/WriteDr5.nasm index a6256eff1918..e1867df2a58f 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr5.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr5.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr6.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr6.asm deleted file mode 100644 index 132c96015a30..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr6.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteDr6.Asm -; -; Abstract: -; -; AsmWriteDr6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr6 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr6 PROC - mov eax, [esp + 4] - mov dr6, eax - ret -AsmWriteDr6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr6.c b/MdePkg/Library/BaseLib/Ia32/WriteDr6.c index 29ab48318011..30e5cd600c64 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr6.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr6.c @@ -2,13 +2,7 @@ AsmWriteDr6 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr6.nasm b/MdePkg/Library/BaseLib/Ia32/WriteDr6.nasm index 75ae84bd2f4d..de4996c65456 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr6.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr6.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr7.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr7.asm deleted file mode 100644 index 5978821a53f7..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr7.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteDr7.Asm -; -; Abstract: -; -; AsmWriteDr7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr7 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr7 PROC - mov eax, [esp + 4] - mov dr7, eax - ret -AsmWriteDr7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr7.c b/MdePkg/Library/BaseLib/Ia32/WriteDr7.c index aa2286f4e33b..fbbbd6b30811 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr7.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr7.c @@ -2,13 +2,7 @@ AsmWriteDr7 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr7.nasm b/MdePkg/Library/BaseLib/Ia32/WriteDr7.nasm index 06539e342d5d..d3ca89b1f762 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr7.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr7.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.asm b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.asm deleted file mode 100644 index c93b634e8fda..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteGdtr.Asm -; -; Abstract: -; -; AsmWriteGdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86WriteGdtr ( -; IN CONST IA32_DESCRIPTOR *Idtr -; ); -;------------------------------------------------------------------------------ -InternalX86WriteGdtr PROC - mov eax, [esp + 4] - lgdt fword ptr [eax] - ret -InternalX86WriteGdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.c b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.c index 905d585e4a4f..68fc76430f25 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.c @@ -2,13 +2,7 @@ AsmWriteGdtr function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.nasm b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.nasm index 4f4f590ab7ea..8efaed81346d 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.asm b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.asm deleted file mode 100644 index 1765b817d14b..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.asm +++ /dev/null @@ -1,44 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteIdtr.Asm -; -; Abstract: -; -; AsmWriteIdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86WriteIdtr ( -; IN CONST IA32_DESCRIPTOR *Idtr -; ); -;------------------------------------------------------------------------------ -InternalX86WriteIdtr PROC - mov eax, [esp + 4] - pushfd - cli - lidt fword ptr [eax] - popfd - ret -InternalX86WriteIdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.c b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.c index ceef0e83aeff..d498409c052f 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.c @@ -2,13 +2,7 @@ AsmWriteIdtr function Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.nasm b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.nasm index f82f3a8e4f95..480de7d42ff4 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.asm b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.asm deleted file mode 100644 index f5adf84e522e..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteLdtr.Asm -; -; Abstract: -; -; AsmWriteLdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteLdtr ( -; IN UINT16 Ldtr -; ); -;------------------------------------------------------------------------------ -AsmWriteLdtr PROC - mov eax, [esp + 4] - lldt ax - ret -AsmWriteLdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.c b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.c index fe9ad0f55e5c..779822c65408 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.c @@ -2,13 +2,7 @@ AsmWriteLdtr function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.nasm b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.nasm index e3d9e0d7df8a..35261c7fc85b 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm0.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm0.asm deleted file mode 100644 index dcb42fdedb4a..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm0.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteMm0.Asm -; -; Abstract: -; -; AsmWriteMm0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm0 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm0 PROC - movq mm0, [esp + 4] - ret -AsmWriteMm0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm0.c b/MdePkg/Library/BaseLib/Ia32/WriteMm0.c index 076ccd98fa8d..b762aa25223e 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm0.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm0.c @@ -2,13 +2,7 @@ AsmWriteMm0 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm0.nasm b/MdePkg/Library/BaseLib/Ia32/WriteMm0.nasm index c43005bb1eee..65a988f9075f 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm0.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm0.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm1.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm1.asm deleted file mode 100644 index 3e3cdc5696fa..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm1.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteMm1.Asm -; -; Abstract: -; -; AsmWriteMm1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm1 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm1 PROC - movq mm1, [esp + 4] - ret -AsmWriteMm1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm1.c b/MdePkg/Library/BaseLib/Ia32/WriteMm1.c index dadf7c1fc493..9e34d9f7cdfd 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm1.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm1.c @@ -2,13 +2,7 @@ AsmWriteMm1 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm1.nasm b/MdePkg/Library/BaseLib/Ia32/WriteMm1.nasm index b3171b64a767..1a04fe5899af 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm1.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm1.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm2.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm2.asm deleted file mode 100644 index d7c157b722a2..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm2.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteMm2.Asm -; -; Abstract: -; -; AsmWriteMm2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm2 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm2 PROC - movq mm2, [esp + 4] - ret -AsmWriteMm2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm2.c b/MdePkg/Library/BaseLib/Ia32/WriteMm2.c index 830a03e15470..85474434fdb5 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm2.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm2.c @@ -2,13 +2,7 @@ AsmWriteMm2 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm2.nasm b/MdePkg/Library/BaseLib/Ia32/WriteMm2.nasm index ff7bcee971e7..58b0c6be991c 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm2.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm2.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm3.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm3.asm deleted file mode 100644 index 236517d65b49..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm3.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteMm3.Asm -; -; Abstract: -; -; AsmWriteMm3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm3 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm3 PROC - movq mm3, [esp + 4] - ret -AsmWriteMm3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm3.c b/MdePkg/Library/BaseLib/Ia32/WriteMm3.c index c9c6476faa72..c059de73a245 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm3.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm3.c @@ -2,13 +2,7 @@ AsmWriteMm3 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm3.nasm b/MdePkg/Library/BaseLib/Ia32/WriteMm3.nasm index 0e60af5620c6..25f8125dab09 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm3.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm3.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm4.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm4.asm deleted file mode 100644 index 96fd73f2942e..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm4.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteMm4.Asm -; -; Abstract: -; -; AsmWriteMm4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm4 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm4 PROC - movq mm4, [esp + 4] - ret -AsmWriteMm4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm4.c b/MdePkg/Library/BaseLib/Ia32/WriteMm4.c index 18228115a2c1..99c180a52440 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm4.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm4.c @@ -2,13 +2,7 @@ AsmWriteMm4 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm4.nasm b/MdePkg/Library/BaseLib/Ia32/WriteMm4.nasm index 26552fb07a20..94e81252de6b 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm4.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm4.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm5.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm5.asm deleted file mode 100644 index 2bb558eb7191..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm5.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteMm5.Asm -; -; Abstract: -; -; AsmWriteMm5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm5 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm5 PROC - movq mm5, [esp + 4] - ret -AsmWriteMm5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm5.c b/MdePkg/Library/BaseLib/Ia32/WriteMm5.c index f6ad0e0be10d..434de3975467 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm5.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm5.c @@ -2,13 +2,7 @@ AsmWriteMm5 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm5.nasm b/MdePkg/Library/BaseLib/Ia32/WriteMm5.nasm index 8bf690c80bd3..a0bf6a14a367 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm5.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm5.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm6.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm6.asm deleted file mode 100644 index 90d71d636134..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm6.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteMm6.Asm -; -; Abstract: -; -; AsmWriteMm6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm6 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm6 PROC - movq mm6, [esp + 4] - ret -AsmWriteMm6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm6.c b/MdePkg/Library/BaseLib/Ia32/WriteMm6.c index 28e06b5ad0b4..dcb8064cef73 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm6.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm6.c @@ -2,13 +2,7 @@ AsmWriteMm6 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm6.nasm b/MdePkg/Library/BaseLib/Ia32/WriteMm6.nasm index 6234135a7043..9720689dd9bb 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm6.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm6.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm7.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm7.asm deleted file mode 100644 index e1065d500b93..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm7.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteMm7.Asm -; -; Abstract: -; -; AsmWriteMm7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm7 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm7 PROC - movq mm7, [esp + 4] - ret -AsmWriteMm7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm7.c b/MdePkg/Library/BaseLib/Ia32/WriteMm7.c index d7350bf1c808..833f64512abc 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm7.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm7.c @@ -2,13 +2,7 @@ AsmWriteMm7 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm7.nasm b/MdePkg/Library/BaseLib/Ia32/WriteMm7.nasm index c4afbe5540ff..9856b6c7a780 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm7.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm7.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.asm b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.asm deleted file mode 100644 index f13ba9b72c38..000000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.asm +++ /dev/null @@ -1,44 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. -; -; Module Name: -; -; WriteMsr64.Asm -; -; Abstract: -; -; AsmWriteMsr64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmWriteMsr64 ( -; IN UINT32 Index, -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMsr64 PROC - mov edx, [esp + 12] - mov eax, [esp + 8] - mov ecx, [esp + 4] - wrmsr - ret -AsmWriteMsr64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c index 39a792b98285..d045d3cde5e2 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c @@ -2,13 +2,7 @@ AsmWriteMsr64 function Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.nasm b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.nasm index 4eb9706a3747..0c17e66cf558 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.nasm +++ b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; 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. +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; diff --git a/MdePkg/Library/BaseLib/Ia32/WriteTr.nasm b/MdePkg/Library/BaseLib/Ia32/WriteTr.nasm new file mode 100644 index 000000000000..cc30b6c4007a --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteTr.nasm @@ -0,0 +1,30 @@ +;------------------------------------------------------------------------------ ; +; Copyright (c) 2017, Intel Corporation. All rights reserved.<BR> +; SPDX-License-Identifier: BSD-2-Clause-Patent +; +; Module Name: +; +; WriteTr.nasm +; +; Abstract: +; +; Write TR register +; +; Notes: +; +;------------------------------------------------------------------------------ + + SECTION .text + +;------------------------------------------------------------------------------ +; VOID +; AsmWriteTr ( +; UINT16 Selector +; ); +;------------------------------------------------------------------------------ +global ASM_PFX(AsmWriteTr) +ASM_PFX(AsmWriteTr): + mov eax, [esp+4] + ltr ax + ret + |