From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7743D818F4 for ; Thu, 5 Jan 2017 22:02:59 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP; 05 Jan 2017 22:02:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,323,1477983600"; d="scan'208";a="46213302" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 05 Jan 2017 22:02:57 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 5 Jan 2017 22:02:57 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Fri, 6 Jan 2017 14:02:54 +0800 From: "Gao, Liming" To: Leo Duran , "edk2-devel@lists.01.org" CC: "brijesh.singh@amd.com" , "lersek@redhat.com" , "Justen, Jordan L" , "Fan, Jeff" , "Kinney, Michael D" , "Ma, Maurice" , "Agyeman, Prince" , "Ni, Ruiyu" , "Steele, Kelly" , "Wei, David" , "Guo, Mang" Thread-Topic: [PATCH v3 0/4] BaseIoFifoLib Thread-Index: AQHSZ52i6iwuFEC9WEmLgb48CAuxwqEq8/fQ Date: Fri, 6 Jan 2017 06:02:53 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D6CA2BD@shsmsx102.ccr.corp.intel.com> References: <1483652965-14357-1-git-send-email-leo.duran@amd.com> In-Reply-To: <1483652965-14357-1-git-send-email-leo.duran@amd.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v3 0/4] BaseIoFifoLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 06:02:59 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Leo: FifoIo is one width type of EFI_CPU_IO_PROTOCOL_WIDTH. So, how about add = new APIs into IoLib together with other Io APIs? If so, no new library clas= s is required. Platform DSC files are not required to be changed.=20 Thanks Liming >-----Original Message----- >From: Leo Duran [mailto:leo.duran@amd.com] >Sent: Friday, January 06, 2017 5:49 AM >To: edk2-devel@lists.01.org >Cc: brijesh.singh@amd.com; lersek@redhat.com; Justen, Jordan L >; Fan, Jeff ; Kinney, Micha= el >D ; Gao, Liming ; Ma, >Maurice ; Agyeman, Prince >; Ni, Ruiyu ; Steele, Kelly >; Wei, David ; Guo, Mang >; Leo Duran >Subject: [PATCH v3 0/4] BaseIoFifoLib > >The UefiCpuPkg/CpuIo2Dxe driver and the QemuCfgLib library have duplicate >implementations of I/O Fifo routines. The patch series moves the I/O Fifo >routines into a common BaseIofifoLib library supporting IA32 and X64 >architectures under MdePkg. > >The intent of this patch series is twofold: >1) Consolidate I/O Fifo routines into a common BaseIofifoLib library. >2) Allow override of BaseIofifoLib for specific platform implementations. >For example, the OVMF package can provide its own version of BaseIoFifoLib >to support Secure Encrypted Virtualization (SEV) guests, since SEV does no= t >support string I/O instructions (rep ins/outs), and requires unrolled loop= s >of single in/out instructions. > >Brijesh Singh (4): > MdePkg: Add BaseIoFifoLib library > Modify .DSC files that include UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf > Modify UefiCpuPkg/CpuIo2Dxe to use new BaseIoFifoLib library. > Modify QemuFwCfgLib to use new BaseIoFifoLib library. > > CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc | 3 + > CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc | 3 + > DuetPkg/DuetPkgIa32.dsc | 2 + > DuetPkg/DuetPkgX64.dsc | 2 + > MdePkg/Include/Library/IoFifoLib.h | 176 +++++++++++++ > MdePkg/Library/BaseIoFifoLib/BaseIoFifoLib.inf | 44 ++++ > .../Library/BaseIoFifoLib}/Ia32/IoFifo.asm | 280 ++++++++++------= ----- > .../Library/BaseIoFifoLib}/Ia32/IoFifo.nasm | 272 ++++++++++------= ---- > .../Library/BaseIoFifoLib}/X64/IoFifo.asm | 252 +++++++++-------= --- > .../Library/BaseIoFifoLib}/X64/IoFifo.nasm | 250 +++++++++-------= -- > MdePkg/MdePkg.dec | 4 + > MdePkg/MdePkg.dsc | 2 + > OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.nasm | 55 ---- > OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c | 54 +--- > OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf | 8 +- > OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf | 8 +- > OvmfPkg/Library/QemuFwCfgLib/X64/IoLibExAsm.nasm | 52 ---- > OvmfPkg/OvmfPkgIa32.dsc | 2 + > OvmfPkg/OvmfPkgIa32X64.dsc | 2 + > OvmfPkg/OvmfPkgX64.dsc | 2 + > QuarkPlatformPkg/Quark.dsc | 2 + > QuarkPlatformPkg/QuarkMin.dsc | 2 + > UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.c | 3 +- > UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.h | 3 + > UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf | 12 +- > UefiCpuPkg/UefiCpuPkg.dsc | 2 + > Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 2 + > Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 2 + > Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 2 + > 29 files changed, 794 insertions(+), 709 deletions(-) > create mode 100644 MdePkg/Include/Library/IoFifoLib.h > create mode 100644 MdePkg/Library/BaseIoFifoLib/BaseIoFifoLib.inf > rename {UefiCpuPkg/CpuIo2Dxe =3D> >MdePkg/Library/BaseIoFifoLib}/Ia32/IoFifo.asm (96%) > rename {UefiCpuPkg/CpuIo2Dxe =3D> >MdePkg/Library/BaseIoFifoLib}/Ia32/IoFifo.nasm (96%) > rename {UefiCpuPkg/CpuIo2Dxe =3D> >MdePkg/Library/BaseIoFifoLib}/X64/IoFifo.asm (97%) > rename {UefiCpuPkg/CpuIo2Dxe =3D> >MdePkg/Library/BaseIoFifoLib}/X64/IoFifo.nasm (97%) > delete mode 100644 OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.nasm > delete mode 100644 OvmfPkg/Library/QemuFwCfgLib/X64/IoLibExAsm.nasm > >-- >1.9.1