From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on062a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe40::62a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AF78A818D0 for ; Fri, 6 Jan 2017 07:23:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=NuEtbSEsuj5O8PQHoVPqXXfuehmKxHFtLwAu8Ckcc8o=; b=QT0YFXMMbXbKDs7H509cJVdJRtOpAt1ayiwSYxpW3L2MhzjZao+QV520JXws5hfRomsnU97wYjgXAd7KgoDn0n9GM/rIg82NovrF5kVjh7EkAfw+DBkY/FhMkcle0bEjfm575yWZCjWU0ZfmGyFUpBNq33/Dwh0eo2XuF/jTacs= Received: from DM5PR12MB1243.namprd12.prod.outlook.com (10.168.237.22) by CY1PR12MB0666.namprd12.prod.outlook.com (10.163.238.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.829.7; Fri, 6 Jan 2017 15:23:48 +0000 Received: from DM5PR12MB1243.namprd12.prod.outlook.com ([10.168.237.22]) by DM5PR12MB1243.namprd12.prod.outlook.com ([10.168.237.22]) with mapi id 15.01.0817.009; Fri, 6 Jan 2017 15:23:47 +0000 From: "Duran, Leo" To: 'Laszlo Ersek' , "Gao, Liming" , "edk2-devel@lists.01.org" CC: "Singh, Brijesh" , "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: AQHSZ52cOmPc+CcC30G0SQfvf+/kGaEq9c2AgABWXgCAAEV48A== Date: Fri, 6 Jan 2017 15:23:47 +0000 Message-ID: References: <1483652965-14357-1-git-send-email-leo.duran@amd.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14D6CA2BD@shsmsx102.ccr.corp.intel.com> <9bf84287-cdec-b5c0-26c6-16f5cd1e453f@redhat.com> In-Reply-To: <9bf84287-cdec-b5c0-26c6-16f5cd1e453f@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; x-originating-ip: [165.204.77.1] x-microsoft-exchange-diagnostics: 1; CY1PR12MB0666; 7:8YGaxLMputN/BkFS7qn73ZhODs6gw2KwRayF7AEGXV9CY1TD6ms2m+Gs6wOi6k3qe1kibAIX0SsfEuoLIysAwZTtHIB2xSIgoJAbqbTd6+Y65SmP0LkHom71bXNQUchFtSjraX2ODmOz7RdKcMsH78HD+cWdnrWAg3+FRIth07ay8xRmrgpWA4myizvsK/gVtX5F/PX90gGELgaiBRe8zSgyR7pPybBkjRKw+vITMzE4RsbFPv8stmihg0cHKQjbiFXqwjV3EcU+Fc5Gm1QwfXfkoHu1tE7tPBdlcFWrwEd+PUPf65nE+vpJ5r+JkYf2dyuUvWKyT0sj1XvSogQBMdqVx4mvbcM3g0yaeDNddPxPktNmZ9+br7zHwaqhS1VV066G6mFz+E1xBdZ5gpvP+XIyTQ8u9vicOXMl+AuYFh7MeWABzTW7G99I6O9xF0RBAOwjxjdr6sQivFJBOl2nVA==; 20:DrYJZuJ+iXImfcGEMmBwdErVlmRnZ5o5urOHwEOzTNKsBb6S6wXAgTsFYigFuFgsnpuiuF1NX0bMSYYRcNJcYPwAljDQ7kfxDN23ikcpOAK5scAzkA9gNQe1+gehxWKCY6ENQzEKCHYB7YsoqtBtg8rW8QXC/6wmnt01oRJ1U+UtBxRGMk1Z4NKV/6/S0FWV8Fldj50DS3tujULPfT85rSiB2KRTw7H07MB2bJweSacn1b9o33nZeiSf2ZWDILI5 x-forefront-antispam-report: SFV:SKI; SCL:-1SFV:NSPM; SFS:(10009020)(6009001)(6029001)(7916002)(39410400002)(39850400002)(39860400002)(39840400002)(39450400003)(377454003)(189002)(13464003)(24454002)(199003)(102836003)(55016002)(74316002)(99286003)(6116002)(7416002)(54356999)(77096006)(8676002)(97736004)(33656002)(38730400001)(5001770100001)(229853002)(189998001)(2900100001)(50986999)(3846002)(106116001)(106356001)(105586002)(76176999)(92566002)(101416001)(6436002)(68736007)(2950100002)(8936002)(66066001)(7696004)(6506006)(305945005)(54906002)(25786008)(4326007)(122556002)(5660300001)(9686002)(7736002)(2906002)(3280700002)(81166006)(81156014)(3660700001)(86362001)(491001)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0666; H:DM5PR12MB1243.namprd12.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; x-ms-office365-filtering-correlation-id: f5ab652a-d58b-42bc-aa70-08d43648028d x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY1PR12MB0666; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(767451399110)(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(6072148); SRVR:CY1PR12MB0666; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0666; x-forefront-prvs: 01792087B6 received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jan 2017 15:23:47.2604 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0666 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 15:23:53 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Laszlo Ersek [mailto:lersek@redhat.com] > Sent: Friday, January 06, 2017 5:12 AM > To: Gao, Liming ; Duran, Leo ; > edk2-devel@lists.01.org > Cc: Singh, Brijesh ; Justen, Jordan L > ; Fan, Jeff ; Kinney, > Michael D ; Ma, Maurice > ; Agyeman, Prince ; > Ni, Ruiyu ; Steele, Kelly ; W= ei, > David ; Guo, Mang > Subject: Re: [PATCH v3 0/4] BaseIoFifoLib >=20 > 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. >=20 > But then all of the IoLib instances will have to be extended too: >=20 > 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 >=20 > Thanks, > Laszlo >=20 [Duran, Leo] Correct. As I mentioned, one of the reasons for the new IoFifo library is to be able= to override it without having to duplicate the complete IoLib. > > > > 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 implementatio= ns. > >> 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 =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 > >