public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "gaoliming" <gaoliming@byosoft.com.cn>
To: <devel@edk2.groups.io>, <ray.ni@intel.com>,
	"'Wang, Jian J'" <jian.j.wang@intel.com>
Cc: "'Bi, Dandan'" <dandan.bi@intel.com>, "'Lou, Yun'" <yun.lou@intel.com>
Subject: 回复: [edk2-devel] [PATCH v2 1/6] MdeModulePkg: Replace Opcode with the corresponding instructions.
Date: Thu, 10 Feb 2022 15:44:40 +0800	[thread overview]
Message-ID: <01c201d81e52$0f93ddd0$2ebb9970$@byosoft.com.cn> (raw)
In-Reply-To: <MWHPR11MB1631C2A965AD1DFD82A4AD408C2F9@MWHPR11MB1631.namprd11.prod.outlook.com>

Ray, 
  I have given my reviewed-by for the whole patch set. 

https://edk2.groups.io/g/devel/message/85499?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3A
created%2C0%2Ccorresponding%2C20%2C2%2C20%2C88339058

Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Ni, Ray
> 发送时间: 2022年2月10日 13:37
> 收件人: Gao, Liming <gaoliming@byosoft.com.cn>; Wang, Jian J
> <jian.j.wang@intel.com>
> 抄送: Bi, Dandan <dandan.bi@intel.com>; Lou, Yun <yun.lou@intel.com>;
> devel@edk2.groups.io
> 主题: Re: [edk2-devel] [PATCH v2 1/6] MdeModulePkg: Replace Opcode with
> the corresponding instructions.
> 
> Reviewed-by: Ray Ni <ray.ni@intel.com>
> 
> Liming, Jian, can you give R-b as the package maintainers?
> 
> -----Original Message-----
> From: Lou, Yun <yun.lou@intel.com>
> Sent: Monday, January 10, 2022 11:13 PM
> To: devel@edk2.groups.io
> Cc: Lou, Yun <yun.lou@intel.com>; Ni, Ray <ray.ni@intel.com>; Bi, Dandan
> <dandan.bi@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
> Subject: [PATCH v2 1/6] MdeModulePkg: Replace Opcode with the
> corresponding instructions.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3790
> 
> Replace Opcode with the corresponding instructions.
> The code changes have been verified with CompareBuild.py tool, which
> can be used to compare the results of two different EDK II builds to
> determine if they generate the same binaries.
> (tool link: https://github.com/mdkinney/edk2/tree/sandbox/CompareBuild)
> 
> Signed-off-by: Jason Lou <yun.lou@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Dandan Bi <dandan.bi@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> ---
>  MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.nasm | 20
> +++----------------
>  MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.nasm  | 21
> +++-----------------
>  2 files changed, 6 insertions(+), 35 deletions(-)
> 
> diff --git
> a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.nasm
> b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.nasm
> index cfb418748f..07fc912fe8 100644
> --- a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.nasm
> +++ b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.nasm
> @@ -1,7 +1,7 @@
>  ;/** @file
> 
>  ;  Low leve IA32 specific debug support functions.
> 
>  ;
> 
> -;  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
> 
> +;  Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.<BR>
> 
>  ;  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  ;
> 
>  ;**/
> 
> @@ -26,20 +26,6 @@
> 
> 
>  %define FXSTOR_FLAG 0x1000000         ; bit cpuid 24 of feature flags
> 
> 
> 
> -;; The FXSTOR and FXRSTOR commands are used for saving and restoring the
> x87,
> 
> -;; MMX, SSE, SSE2, etc registers.  The initialization of the debugsupport
> driver
> 
> -;; MUST check the CPUID feature flags to see that these instructions are
> available
> 
> -;; and fail to init if they are not.
> 
> -
> 
> -;; fxstor [edi]
> 
> -%macro FXSTOR_EDI 0
> 
> -                         db 0xf, 0xae, 00000111y ; mod = 00, reg/op =
> 000, r/m = 111 = [edi]
> 
> -%endmacro
> 
> -
> 
> -;; fxrstor [esi]
> 
> -%macro FXRSTOR_ESI 0
> 
> -                         db 0xf, 0xae, 00001110y ; mod = 00, reg/op =
> 001, r/m = 110 = [esi]
> 
> -%endmacro
> 
>  SECTION .data
> 
> 
> 
>  global ASM_PFX(OrigVector)
> 
> @@ -348,7 +334,7 @@ ExtraPushDone:
>                  ; IMPORTANT!! The debug stack has been carefully
> constructed to
> 
>                  ; insure that esp and edi are 16 byte aligned when we
> get here.
> 
>                  ; They MUST be.  If they are not, a GP fault will occur.
> 
> -                FXSTOR_EDI
> 
> +                fxsave  [edi]
> 
> 
> 
>  ;; UEFI calling convention for IA32 requires that Direction flag in
EFLAGs is
> clear
> 
>                  cld
> 
> @@ -372,7 +358,7 @@ ExtraPushDone:
> 
> 
>  ;; FX_SAVE_STATE_IA32 FxSaveState;
> 
>                  mov     esi, esp
> 
> -                FXRSTOR_ESI
> 
> +                fxrstor [esi]
> 
>                  add     esp, 512
> 
> 
> 
>  ;; UINT32  Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;
> 
> diff --git a/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.nasm
> b/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.nasm
> index 9cc38a3128..c6c5e49189 100644
> --- a/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.nasm
> +++ b/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.nasm
> @@ -1,7 +1,7 @@
>  ;/** @file
> 
>  ;  Low level x64 routines used by the debug support driver.
> 
>  ;
> 
> -;  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
> 
> +;  Copyright (c) 2007 - 2022, Intel Corporation. All rights reserved.<BR>
> 
>  ;  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  ;
> 
>  ;**/
> 
> @@ -26,21 +26,6 @@
> 
> 
>  %define FXSTOR_FLAG 0x1000000         ; bit cpuid 24 of feature flags
> 
> 
> 
> -;; The FXSTOR and FXRSTOR commands are used for saving and restoring the
> x87,
> 
> -;; MMX, SSE, SSE2, etc registers.  The initialization of the debugsupport
> driver
> 
> -;; MUST check the CPUID feature flags to see that these instructions are
> available
> 
> -;; and fail to init if they are not.
> 
> -
> 
> -;; fxstor [rdi]
> 
> -%macro FXSTOR_RDI 0
> 
> -                         db 0xf, 0xae, 00000111y ; mod = 00, reg/op =
> 000, r/m = 111 = [rdi]
> 
> -%endmacro
> 
> -
> 
> -;; fxrstor [rsi]
> 
> -%macro FXRSTOR_RSI 0
> 
> -                         db 0xf, 0xae, 00001110y ; mod = 00, reg/op =
> 001, r/m = 110 = [rsi]
> 
> -%endmacro
> 
> -
> 
>  SECTION .data
> 
> 
> 
>  global ASM_PFX(OrigVector)
> 
> @@ -381,7 +366,7 @@ ExtraPushDone:
>                  ; IMPORTANT!! The debug stack has been carefully
> constructed to
> 
>                  ; insure that rsp and rdi are 16 byte aligned when we get
> here.
> 
>                  ; They MUST be.  If they are not, a GP fault will occur.
> 
> -                FXSTOR_RDI
> 
> +                fxsave  [rdi]
> 
> 
> 
>  ;; UEFI calling convention for x64 requires that Direction flag in EFLAGs
is
> clear
> 
>                  cld
> 
> @@ -404,7 +389,7 @@ ExtraPushDone:
> 
> 
>  ;; FX_SAVE_STATE_X64 FxSaveState;
> 
>                  mov     rsi, rsp
> 
> -                FXRSTOR_RSI
> 
> +                fxrstor [rsi]
> 
>                  add     rsp, 512
> 
> 
> 
>  ;; UINT64  Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;
> 
> --
> 2.28.0.windows.1
> 
> 
> 
> 
> 




      reply	other threads:[~2022-02-10  7:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 15:12 [PATCH v2 1/6] MdeModulePkg: Replace Opcode with the corresponding instructions Jason Lou
2022-01-10 15:12 ` [PATCH v2 2/6] MdePkg: " Jason Lou
2022-01-11  0:55   ` 回复: [edk2-devel] " gaoliming
2022-01-10 15:12 ` [PATCH v2 3/6] SourceLevelDebugPkg: " Jason Lou
2022-01-11  1:03   ` Wu, Hao A
2022-01-10 15:12 ` [PATCH v2 4/6] UefiCpuPkg: " Jason Lou
2022-02-10  5:35   ` Ni, Ray
2022-01-10 15:12 ` [PATCH v2 5/6] MdePkg: Remove the macro definitions regarding Opcode Jason Lou
2022-01-10 15:12 ` [PATCH v2 6/6] BaseTools: Upgrade the version of NASM tool Jason Lou
2022-01-17  0:49   ` Yuwei Chen
2022-02-10  5:36 ` [PATCH v2 1/6] MdeModulePkg: Replace Opcode with the corresponding instructions Ni, Ray
2022-02-10  7:44   ` gaoliming [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='01c201d81e52$0f93ddd0$2ebb9970$@byosoft.com.cn' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox