public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "duntan" <dun.tan@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Gao, Liming" <gaoliming@byosoft.com.cn>
Cc: "Ni, Ray" <ray.ni@intel.com>
Subject: Re: [edk2-devel] [PATCH 0/2] Remove string IO instruction in BaseIoLibIntrinsic.inf
Date: Mon, 27 Nov 2023 10:14:01 +0000	[thread overview]
Message-ID: <BN9PR11MB548338B81CEAC975D0C580DAE5BDA@BN9PR11MB5483.namprd11.prod.outlook.com> (raw)
In-Reply-To: <3c7a3287-cb94-4e13-8ef2-53bcae13745a@redhat.com>

Hi Mike and Liming,

Could you help to review this patch set? It's to remove string IO instruction in BaseIoLibIntrinsic and simplify BaseIoLibIntrinsic.

Thanks,
Dun

-----Original Message-----
From: Laszlo Ersek <lersek@redhat.com> 
Sent: Monday, November 13, 2023 9:08 PM
To: devel@edk2.groups.io; Ni, Ray <ray.ni@intel.com>; Tan, Dun <dun.tan@intel.com>
Subject: Re: [edk2-devel] [PATCH 0/2] Remove string IO instruction in BaseIoLibIntrinsic.inf

On 11/9/23 06:56, Ni, Ray wrote:
> Reviewed-by: Ray Ni <ray.ni@intel.com>
> 
> Thanks for providing the alternative solution that avoids impacting 
> OVMF boot performance.

This approach looks good to me.

The IA32 and X64 OVMF platforms use "BaseIoLibIntrinsicSev.inf", and that library instance is left alone.

The RISC-V OVMF platform uses "BaseIoLibIntrinsic.inf", but RISC-V already doesn't (can't) use the IA32/X64 NASM files.

So, surprisingly, the "IoFifo.nasm" files are actually unused, pre-patch; IA32 and X64 OVMF only uses the "IoFifoSev.nasm" files.

Acked-by: Laszlo Ersek <lersek@redhat.com>

Thanks!
Laszlo




> 
> Thanks,
> Ray
> ----------------------------------------------------------------------
> --
> *From:* devel@edk2.groups.io <devel@edk2.groups.io> on behalf of 
> duntan <dun.tan@intel.com>
> *Sent:* Thursday, November 9, 2023 10:49 AM
> *To:* devel@edk2.groups.io <devel@edk2.groups.io>
> *Subject:* [edk2-devel] [PATCH 0/2] Remove string IO instruction in 
> BaseIoLibIntrinsic.inf
>  
> Simplify IoRead/WriteFifo implement in BaseIoLibIntrinsic by 
> repeatedly calling IoRead/Write in C code. This can avoid calling 
> assembly code to use string I/O instructions.
> With this change, Ia32/IoFifo.nasm and X64/IoFifo.nasm can be removed. 
> Also source files for IA32 and X64 are the same.
> 
> Dun Tan (2):
>   MdePkg: Change IoLibFifo.c to IoLibFifoCc.c
>   MdePkg:simplify Fifo API in BaseIoLibIntrinsic
> 
>  MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf    |  10
> ++--------
>  MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicSev.inf |   2 +-
>  MdePkg/Library/BaseIoLibIntrinsic/Ia32/IoFifo.nasm          | 131
> ----------------------------------------------------------------------
> -------------------------------------------------------------
>  MdePkg/Library/BaseIoLibIntrinsic/IoLibFifo.c               |  59
> +++++++++++++++++++++++++++++++----------------------------
>  MdePkg/Library/BaseIoLibIntrinsic/IoLibFifoCc.c             | 217
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  MdePkg/Library/BaseIoLibIntrinsic/X64/IoFifo.nasm           | 120
> ----------------------------------------------------------------------
> --------------------------------------------------
>  6 files changed, 251 insertions(+), 288 deletions(-)
>  delete mode 100644 MdePkg/Library/BaseIoLibIntrinsic/Ia32/IoFifo.nasm
>  create mode 100644 MdePkg/Library/BaseIoLibIntrinsic/IoLibFifoCc.c
>  delete mode 100644 MdePkg/Library/BaseIoLibIntrinsic/X64/IoFifo.nasm
> 
> --
> 2.31.1.windows.1
> 
> 
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111734): https://edk2.groups.io/g/devel/message/111734
Mute This Topic: https://groups.io/mt/102478994/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2023-11-27 10:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09  2:49 [edk2-devel] [PATCH 0/2] Remove string IO instruction in BaseIoLibIntrinsic.inf duntan
2023-11-09  2:49 ` [edk2-devel] [PATCH 1/2] MdePkg: Change IoLibFifo.c to IoLibFifoCc.c duntan
2023-11-09  2:49 ` [edk2-devel] [PATCH 2/2] MdePkg:simplify Fifo API in BaseIoLibIntrinsic duntan
2023-11-09  5:56 ` [edk2-devel] [PATCH 0/2] Remove string IO instruction in BaseIoLibIntrinsic.inf Ni, Ray
2023-11-13 13:07   ` Laszlo Ersek
2023-11-27 10:14     ` duntan [this message]
     [not found] ` <1795D4A7BE9E02F3.6123@groups.io>
2023-12-06  9:25   ` [edk2-devel] [PATCH 1/2] MdePkg: Change IoLibFifo.c to IoLibFifoCc.c duntan
     [not found] ` <1795D4A7D7819C64.15940@groups.io>
2023-12-06  9:26   ` [edk2-devel] [PATCH 2/2] MdePkg:simplify Fifo API in BaseIoLibIntrinsic duntan
2023-12-11 17:34     ` Michael D Kinney
2023-12-11 21:12       ` Michael D Kinney

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=BN9PR11MB548338B81CEAC975D0C580DAE5BDA@BN9PR11MB5483.namprd11.prod.outlook.com \
    --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