From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 7838D819F7 for ; Fri, 6 Jan 2017 03:12:05 -0800 (PST) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D38A96A6D3; Fri, 6 Jan 2017 11:12:05 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-54.phx2.redhat.com [10.3.116.54]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v06BC29C005344; Fri, 6 Jan 2017 06:12:02 -0500 To: "Gao, Liming" , Leo Duran , "edk2-devel@lists.01.org" References: <1483652965-14357-1-git-send-email-leo.duran@amd.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14D6CA2BD@shsmsx102.ccr.corp.intel.com> Cc: "brijesh.singh@amd.com" , "Justen, Jordan L" , "Fan, Jeff" , "Kinney, Michael D" , "Ma, Maurice" , "Agyeman, Prince" , "Ni, Ruiyu" , "Steele, Kelly" , "Wei, David" , "Guo, Mang" From: Laszlo Ersek Message-ID: <9bf84287-cdec-b5c0-26c6-16f5cd1e453f@redhat.com> Date: Fri, 6 Jan 2017 12:12:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14D6CA2BD@shsmsx102.ccr.corp.intel.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 06 Jan 2017 11:12:06 +0000 (UTC) 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 11:12:05 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 01/06/17 07:02, Gao, Liming wrote: > 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 class is required. Platform DSC files are not required to be > changed. But then all of the IoLib instances will have to be extended too: IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.inf MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf MdePkg/Library/DxeIoLibCpuIo2/DxeIoLibCpuIo2.inf MdePkg/Library/DxeIoLibEsal/DxeIoLibEsal.inf MdePkg/Library/PeiIoLibCpuIo/PeiIoLibCpuIo.inf MdePkg/Library/SmmIoLibSmmCpuIo2/SmmIoLibSmmCpuIo2.inf Thanks, Laszlo > > 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, Michael >> 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 not >> support string I/O instructions (rep ins/outs), and requires unrolled loops >> 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 => >> MdePkg/Library/BaseIoFifoLib}/Ia32/IoFifo.asm (96%) >> rename {UefiCpuPkg/CpuIo2Dxe => >> MdePkg/Library/BaseIoFifoLib}/Ia32/IoFifo.nasm (96%) >> rename {UefiCpuPkg/CpuIo2Dxe => >> MdePkg/Library/BaseIoFifoLib}/X64/IoFifo.asm (97%) >> rename {UefiCpuPkg/CpuIo2Dxe => >> 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 >