From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0609.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe4a::609]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 002CD81728 for ; Thu, 12 Jan 2017 22:38:17 -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=xwsQ36ey/QeUgBh7IR08LIN22yWLazc/voR5fClNf+k=; b=xpnhzSFIykoMg7Qk8KGoBPVStAUlcY+lm1K8vRlT1pHaY/1PaCL6Oo9oOYzRhY5GkE76txvfmyMSoIHbTgWW70xuNhNquorKS/Zp4wmVaRDu86KZsPDcDTJQ5G1NJBYzGEHjqZwGk+P2w4H9/KWgnKiPqZxdZc33CwkBLfJ5rFQ= Received: from DM5PR12MB1243.namprd12.prod.outlook.com (10.168.237.22) by BLUPR12MB0659.namprd12.prod.outlook.com (10.163.217.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.829.7; Fri, 13 Jan 2017 06:38:16 +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.0829.019; Fri, 13 Jan 2017 06:38:14 +0000 From: "Duran, Leo" To: "edk2-devel@lists.01.org" CC: "liming.gao@intel.com" , "michael.d.kinney@intel.com" , "jeff.fan@intel.com" , "jordan.l.justen@intel.com" , "lersek@redhat.com" , "Singh, Brijesh" Thread-Topic: [PATCH v2 00/10] IoLib class library Thread-Index: AQHSbWVAdHwBtIjGb0GSPXaBhCsQUqE18y8A Date: Fri, 13 Jan 2017 06:38:14 +0000 Message-ID: References: <1484288463-7109-1-git-send-email-leo.duran@amd.com> In-Reply-To: <1484288463-7109-1-git-send-email-leo.duran@amd.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: [2605:6000:e7c4:2000:557f:6cc5:dd44:5534] x-microsoft-exchange-diagnostics: 1; BLUPR12MB0659; 7:BUzpH9dT/038n5dhKjehyXMo2Q+mO+LtVVqFpg6wFVgm7GZaE8DqXnSKGnmG79C2ByfKxU+pgTlT9evgA6MWQY0TDGRKfTSr0d3hICRtm1fP09kyGMLd/OVtaaai2cKmeXAHiHCOc2s/URMjdvmlRueFijdwW77UVjGtSPl2wIrTgN8sqoMhwhpAp0+5zb9qWpEK9HcNmM192pMwi9gAJwo/Rk3eB528io6VaRCrPnVdHxUYgwo+TuY2dKD+QnZK3WZpqYJUAy2/Og4YAz3tl6bABsbURmCYMcm4nw8iiy2l4VE4CA7+g1Bp+mGUYhrwbR67xnnOS71MzcRT8uusrxq5L9baBiPoqq8vURzbqSd4Ei/ZyHfBQDR68OawL+YbnynuQVZYtXngvnMeLGj0/sJVCS7OcqDy3RK2rfozzHy55Jh1Qr/G+NOEZADaemTf6XLOBYiV+2takDAwR5xamQ==; 20:k/dkZDubu0hDLE3JOyLshRTIPlRqvk2ZrzvXrhvLnVSBcK31svlJTLVvT394yJ/ygffbjOJQFxx7bshAJtGYPLLEf/u8Jj7kG/DXhpbw5mBN+nsmNAbH/4IuvINr9wfdCRpjzsB3pGMfX4im0yXVHCAkimOwQ97A6ZxrsSHYWBsWqdZ2PNN0FRsxWGouk2wriqczurLpU5zaSv0ZQIhj0elvceMKA9QfoM/6VKTcuRLcreRfJBYKLSegDUWAecQ1 x-forefront-antispam-report: SFV:SKI; SCL:-1SFV:NSPM; SFS:(10009020)(6029001)(6009001)(7916002)(39450400003)(39840400002)(39850400002)(39410400002)(39860400002)(69234005)(377454003)(189002)(199003)(13464003)(3660700001)(97736004)(229853002)(7696004)(2900100001)(8676002)(77096006)(2501003)(6116002)(4326007)(102836003)(33656002)(2906002)(101416001)(8936002)(6506006)(50986999)(76176999)(110136003)(5640700003)(81166006)(81156014)(38730400001)(305945005)(99286003)(25786008)(54906002)(92566002)(3280700002)(54356999)(74316002)(86362001)(2950100002)(6436002)(3900700001)(2351001)(55016002)(7736002)(122556002)(105586002)(68736007)(6916009)(189998001)(5660300001)(106116001)(9686003)(106356001)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR12MB0659; H:DM5PR12MB1243.namprd12.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; x-ms-office365-filtering-correlation-id: 4445d1a5-d8cb-4eaa-999e-08d43b7ec09c x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BLUPR12MB0659; 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)(20161123555025)(20161123564025)(20161123558021)(20161123562025)(20161123560025)(6072148); SRVR:BLUPR12MB0659; BCL:0; PCL:0; RULEID:; SRVR:BLUPR12MB0659; x-forefront-prvs: 018632C080 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: 13 Jan 2017 06:38:14.7067 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR12MB0659 Subject: Re: [PATCH v2 00/10] IoLib class library 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, 13 Jan 2017 06:38:18 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable FYI: Just fixed some typos in the 'cover letter' . (Yes it was late, and was a bit tired :-)). Thanks, Leo. Changes since v1: - Fix coding style issue: Assigning value to local variable declaration. - Rework CpuIo2Dxe, CpuIoDxe, and CpuIoPei to use the Fifo routines in the new BaseIoLibIntrinsic (IoLib class) library. - Rework DxeIoLibCpuIo2, DxeIoLibCpuIo, and PeiIoLibCpuIo to use FiFo routines via the CPU I/O interfaces. - Minor cleanups on IoLib function prototypes. > -----Original Message----- > From: Duran, Leo > Sent: Friday, January 13, 2017 12:21 AM > To: edk2-devel@lists.01.org > Cc: liming.gao@intel.com; michael.d.kinney@intel.com; jeff.fan@intel.com; > jordan.l.justen@intel.com; lersek@redhat.com; Singh, Brijesh > ; Duran, Leo > Subject: [PATCH v2 00/10] IoLib class library >=20 > The UefiCpuPkg/CpuIo2Dxe driver and the QemuCfgLib library have > duplicate implementations of I/O Fifo routines. The patch series moves th= e > I/O Fifo routines into the BaseIoLibIntrinsic library and expands the IoL= ib class > to include the ported I/O Fifo routines. >=20 > The Fifo routines moved from the UefiCpuPkg/CpuIo2Dxe driver support > IA32 and X64 natively, and other architectures are supported by simply > looping through the basic IoRead/IoWrite routines as appropiate. >=20 > The intent of this patch series is twofold: > 1) Integrate I/O Fifo routines into the IoLib class library. > 2) Allow override of IoLib as may be required to support specific hardwar= e > implementations, such as AMD's Secure Encrypted Virtualization (SEV). >=20 > Changes since v1: > - Fix coding style issue: Assigning value to local variable declaration. > - Rework CpuIo2Dxe, CpuIoDxe, and CpuIoPei to use the Fifo routines in th= e > new BaseIoLibIntrinsic (IoLib class) library. > - Rework DxeIoLibCpuIo2Lib, DxeIoLibCpuLib, and PeiIoLibCouIoLib to use > FiFo > routines via the CPU I/O interfaces. > - Minor cleanups on function IoLib function prototypes. >=20 > Leo Duran (10): > MdePkg: Expand BaseIoLibIntrinsic (IoLib class) library > UefiCpuPkg: Modify CpuIo2Dxe to use new IoLib library > UefiCpuPkg: Modify CpuIoPei to support new IoLib library > IntelFrameworkModulePkg: Modify CpuIoDxe to support new IoLib library > MdePkg/DxeIoLibCpuIo2: Add new Fifo routines in IoLib class > MdePkg/PeiIoLibCpuIo: Add new Fifo routines in IoLib class > MdePkg/DxeIoLibEsal: Add new Fifo routines in IoLib class > MdePkg/SmmIoLibSmmCpuIo2: Add new Fifo routines in IoLib class > IntelFrameworkPkg/DxeIoLibCpuIo: Add new Fifo routines in IoLib class > OvmfPkg: Modify QemuFwCfgLib to use new IoLib class library >=20 > IntelFrameworkModulePkg/Universal/CpuIoDxe/CpuIo.c | 52 ++++ > .../Library/DxeIoLibCpuIo/DxeCpuIoLibInternal.h | 70 +++++- > IntelFrameworkPkg/Library/DxeIoLibCpuIo/IoLib.c | 248 > ++++++++++++++++++++ > MdePkg/Include/Library/IoLib.h | 152 ++++++++++++ > .../BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf | 6 +- > .../Library/BaseIoLibIntrinsic}/Ia32/IoFifo.asm | 19 +- > .../Library/BaseIoLibIntrinsic}/Ia32/IoFifo.nasm | 19 +- > MdePkg/Library/BaseIoLibIntrinsic/IoLibArm.c | 169 +++++++++++++ > MdePkg/Library/BaseIoLibIntrinsic/IoLibEbc.c | 171 ++++++++++++++ > MdePkg/Library/BaseIoLibIntrinsic/IoLibIpf.c | 201 +++++++++++++++= + > .../Library/BaseIoLibIntrinsic}/X64/IoFifo.asm | 19 +- > .../Library/BaseIoLibIntrinsic}/X64/IoFifo.nasm | 19 +- > .../Library/DxeIoLibCpuIo2/DxeCpuIo2LibInternal.h | 71 +++++- > MdePkg/Library/DxeIoLibCpuIo2/IoLib.c | 260 > +++++++++++++++++++- > MdePkg/Library/DxeIoLibEsal/IoLib.c | 216 +++++++++++++++= ++ > MdePkg/Library/PeiIoLibCpuIo/IoLib.c | 261 > +++++++++++++++++++++ > MdePkg/Library/SmmIoLibSmmCpuIo2/IoLib.c | 216 > +++++++++++++++++ > OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.nasm | 55 ----- > OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c | 54 +---- > OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf | 7 +- > OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf | 7 +- > OvmfPkg/Library/QemuFwCfgLib/X64/IoLibExAsm.nasm | 52 ---- > UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.c | 13 +- > UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf | 11 +- > UefiCpuPkg/CpuIo2Dxe/IoFifo.h | 176 -------------- > UefiCpuPkg/CpuIoPei/CpuIoPei.c | 52 ++++ > 26 files changed, 2179 insertions(+), 417 deletions(-) rename > {UefiCpuPkg/CpuIo2Dxe =3D> > MdePkg/Library/BaseIoLibIntrinsic}/Ia32/IoFifo.asm (85%) rename > {UefiCpuPkg/CpuIo2Dxe =3D> > MdePkg/Library/BaseIoLibIntrinsic}/Ia32/IoFifo.nasm (86%) rename > {UefiCpuPkg/CpuIo2Dxe =3D> > MdePkg/Library/BaseIoLibIntrinsic}/X64/IoFifo.asm (83%) rename > {UefiCpuPkg/CpuIo2Dxe =3D> > MdePkg/Library/BaseIoLibIntrinsic}/X64/IoFifo.nasm (84%) delete mode > 100644 OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.nasm > delete mode 100644 > OvmfPkg/Library/QemuFwCfgLib/X64/IoLibExAsm.nasm > delete mode 100644 UefiCpuPkg/CpuIo2Dxe/IoFifo.h >=20 > -- > 1.9.1