[edk2] [Patch] UefiCpuPkg: Use FINIT instead of hex values

Michael Kinney posted 1 patch 6 years, 11 months ago
Failed in applying to current master (apply log)
UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
[edk2] [Patch] UefiCpuPkg: Use FINIT instead of hex values
Posted by Michael Kinney 6 years, 11 months ago
https://bugzilla.tianocore.org/show_bug.cgi?id=560

Update X64 NASM file to match IA32 NASM file
and use FINIT instruction instead of hand
assembled hex values for the FINIT instruction.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
index 904b64e..41cd84e 100644
--- a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
+++ b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------
 ;*
-;*   Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+;*   Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
 ;*   This program and the accompanying materials
 ;*   are licensed and made available under the terms and conditions of the BSD License
 ;*   which accompanies this distribution.  The full text of the license may be found at
@@ -41,10 +41,7 @@ ASM_PFX(InitializeFloatingPointUnits):
     ;
     ; Initialize floating point units
     ;
-    ; The following opcodes stand for instruction 'finit'
-    ; to be supported by some 64-bit assemblers
-    ;
-    DB      0x9B, 0xDB, 0xE3
+    finit
     fldcw   [mFpuControlWord]
 
     ;
-- 
2.6.3.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] UefiCpuPkg: Use FINIT instead of hex values
Posted by Fan, Jeff 6 years, 11 months ago
Reviewed-by: Jeff Fan <jeff.fan@intel.com>

-----Original Message-----
From: Kinney, Michael D 
Sent: Friday, May 19, 2017 2:37 PM
To: edk2-devel@lists.01.org
Cc: Fan, Jeff; Gao, Liming; Kinney, Michael D
Subject: [Patch] UefiCpuPkg: Use FINIT instead of hex values

https://bugzilla.tianocore.org/show_bug.cgi?id=560

Update X64 NASM file to match IA32 NASM file and use FINIT instruction instead of hand assembled hex values for the FINIT instruction.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
index 904b64e..41cd84e 100644
--- a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
+++ b/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------
 ;*
-;*   Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+;*   Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
 ;*   This program and the accompanying materials
 ;*   are licensed and made available under the terms and conditions of the BSD License
 ;*   which accompanies this distribution.  The full text of the license may be found at
@@ -41,10 +41,7 @@ ASM_PFX(InitializeFloatingPointUnits):
     ;
     ; Initialize floating point units
     ;
-    ; The following opcodes stand for instruction 'finit'
-    ; to be supported by some 64-bit assemblers
-    ;
-    DB      0x9B, 0xDB, 0xE3
+    finit
     fldcw   [mFpuControlWord]
 
     ;
--
2.6.3.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel