From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 3752CAC12CF for ; Mon, 13 Nov 2023 13:08:00 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=sWVAxjdPlYm09w+eII9F6MQvBwvrACh7jjx9icRWVBw=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1699880879; v=1; b=jpp61q0FNchmw6Hxy3IKY8LbuBpjCsWN1W+6x9Nkwbq7aSQgjiDqNbGXeoFAjKZLZYV45com eWNzH8ULILlEOO/Sb/pp3lgXqC0nbSlng7qzZa0pJFr5mS7CfyO2wMifrshTtpx5FhxE63KtxqW 5wfhKR232juJ+S1SzQtrLaP0= X-Received: by 127.0.0.2 with SMTP id 82CcYY7687511x4tJxCiLYMO; Mon, 13 Nov 2023 05:07:59 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.36158.1699880879066697284 for ; Mon, 13 Nov 2023 05:07:59 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-473-WemB62KSNUmUGYjs3B42Dg-1; Mon, 13 Nov 2023 08:07:54 -0500 X-MC-Unique: WemB62KSNUmUGYjs3B42Dg-1 X-Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 999C0857F78; Mon, 13 Nov 2023 13:07:54 +0000 (UTC) X-Received: from [10.39.192.220] (unknown [10.39.192.220]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1171DC0FE06; Mon, 13 Nov 2023 13:07:53 +0000 (UTC) Message-ID: <3c7a3287-cb94-4e13-8ef2-53bcae13745a@redhat.com> Date: Mon, 13 Nov 2023 14:07:52 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH 0/2] Remove string IO instruction in BaseIoLibIntrinsic.inf To: devel@edk2.groups.io, ray.ni@intel.com, "Tan, Dun" References: <20231109024958.1732-1-dun.tan@intel.com> From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 1IhMTyVlrrNS9TMR72eVWFFRx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=jpp61q0F; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 11/9/23 06:56, Ni, Ray wrote: > Reviewed-by: Ray Ni > > 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 Thanks! Laszlo > > Thanks, > Ray > ------------------------------------------------------------------------ > *From:* devel@edk2.groups.io on behalf of duntan > > *Sent:* Thursday, November 9, 2023 10:49 AM > *To:* 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 (#111152): https://edk2.groups.io/g/devel/message/111152 Mute This Topic: https://groups.io/mt/102478994/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-