From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on060d.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe41::60d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3496E8186F for ; Wed, 4 Jan 2017 15:08:07 -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=FDP1olj1g8BgYZVU1HTsV3jBFGU62arSI2Usd8n6oAg=; b=oFd3tEf6ZIuy9Ve5LcpxinWX4nJsu/6KyncffcQuty0K0Ptbk6EeOG+47ilfl1e8QHozw1oDWhhR0SjmmazW54SAfAEWZVoJSl6Tr6JgwO79mMPpAFB5dD7Ilz49lVAPRGc0XbONcVD2CyDjXMu5yKVQp11zRujKwABVgErggDU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by CY4PR12MB1237.namprd12.prod.outlook.com (10.168.167.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Wed, 4 Jan 2017 23:08:04 +0000 From: Leo Duran To: CC: , , , , , Leo Duran Date: Wed, 4 Jan 2017 17:07:49 -0600 Message-ID: <1483571273-11187-1-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CY1PR08CA0011.namprd08.prod.outlook.com (10.163.94.149) To CY4PR12MB1237.namprd12.prod.outlook.com (10.168.167.12) X-MS-Office365-Filtering-Correlation-Id: 4ed0900c-13ad-416b-79ef-08d434f68a0d X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID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wz7YBgkCDMGZgqMm5dfvNMxqmf++n0tlFlTdyL/fRLhWrs4qwROTny+TeixMRu X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1237; 31:Dz0fijClul99l8zF4N+Qln732TX/4e95vPfDsbFKfS3c6MQaG6x4Y4aOAw41iHWC/4xnivswx6N3pKaYHnmqAWuu8bxODdyZYmodtBYPMpTjBbdrnY6XAH3dQMG3L7EDviQ3W3FFlFc3cUs2cPFXu/Nfcbb5JkjewhT68gCTYx1LJoSF9cHK4NRtC1HIoHjVH3hCGG6c53g1WJGwf5Icz1P9lbJqeLxS4Ff+0v1aORzesbZF3HyzJ5J0DJhNvTyE; 20:SAsoNECMcEkGE4u40ut7MbrdwTDekYvicfeh/Sb/CDVIUN+5f5rNEiQEEbM7sbzXB8Lzr6LQNqkGCaYYLcDmJQP8HqQEEQrypMVUAaNBBJ9OImnfqmFtxZJGqoi2iAUHO6amxQVv/1BKx5f+hW529dBtJPNBiPdjxGDfQEq9MOfoRUpF8dI7QvzZoPaA6gcvktZ5j+nJUXjkUyRO2ekhu6yAVRz4YM3uvoOImb0ND6fHexo8fzpW5a57uLsbP+J0itjygOH+W7YRhezVS+LzE5k4AHEs3Nkxu48lv2zy+MQn4XqoY8NWqmutr07TyOX6MuCeahjGY9lBAjJqd+Ti7jGvvmxHUBfETgSKODdGZuUv5xIz4wa8BODYaCKkLSM1Z3vbasK8f4yABoZDCZBem+uKJW1AhuxrJ10AZXpY0ZDUAo3Umk0FcmlF40X1naS8AgJBGtFPaJIhZp4vzUg/pldV9Cdfa2Mez+1x/v0CNNTa0olXvl0KJMmBgxn79sS/ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123555025)(20161123564025)(20161123562025)(20161123558021)(6072148); SRVR:CY4PR12MB1237; BCL:0; PCL:0; RULEID:; SRVR:CY4PR12MB1237; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1237; 4:GQU+MVN2lyn6XdtezASGCQv3fTCnpDtMq50Rjyn1t8Mrar3rTK/uC8WBYODA4oTvUZ8Fzc7DqTzEbc8WtX8HdHlYA78S58TEik9QGsC85mqs8c04NszhlFl5kPxs+jbATgJKU3QCLdCkhJCkBc9qA9rkK3FRfu69dFAGxKLJy85Y3uMqfaQnKv63eb1UjT245wSx3hSKkyaP7zdQ8sgQ+aciByzZHhs33HZvyu9yUf/LyFY5u3+gk6Nek0YBjnktRcBFWRVfxmejdekDhsmeHEr2Y3/iVAu/zM5p1jqbK6AUrcx1QdNWHjO3YtCsteB41z2hqitb1zNk8QvrVpYrmR377cE6Hb5wmaVriSnDLKZjzF6LvZwSkj4Nkng4nRvFt/Ajifdmn/opLUtTMlUK3geCH7teuZ84XmJ8+rmDRyHHR1hL2dO4VPq0QSalsAfqGRJhWZO4meMDSMTch7QOcIKX0e22VMoONmj4SkgYe0CbgQAYGAffASbEOymZGWTh2iFpwUgFy1cbq88+93txffzEkIKCaDCWl4g8jcPURMKv1bsx4zchOZcgmdchJIW0RSfPEZJuBrswczIb7nmm1p3QPuKCDK1Vw9+bd1Bo4xvELxWsHLLjy3DakXKbO/FU X-Forefront-PRVS: 0177904E6B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6029001)(7916002)(39860400002)(39840400002)(39410400002)(39450400003)(39850400002)(189002)(199003)(6666003)(66066001)(48376002)(2351001)(5003940100001)(105586002)(189998001)(92566002)(50226002)(5660300001)(50466002)(54906002)(53416004)(97736004)(42186005)(25786008)(6486002)(6116002)(8676002)(47776003)(106356001)(38730400001)(101416001)(4326007)(2906002)(50986999)(81156014)(81166006)(110136003)(68736007)(305945005)(86362001)(3846002)(7736002)(36756003)(33646002)(6916009)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1237; H:leduran-Precision-WorkStation-T5400.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR12MB1237; 23:gj5y+q15MCoKDqIYKS47wrz2vd8GHpqZOYtUQJX1Z?= =?us-ascii?Q?7bINU8At8V6LFgNFbXautuv4p4ZABVllVR2FbkbJYfBOve3c7wMgJ+HtOdER?= =?us-ascii?Q?Wmn+5EN4HSMGoBZoBNSzQDlnqM/UEecDCabMptamUSCnwuR3glo/GKkNH+Um?= =?us-ascii?Q?NRC6lDaEdaAEtwgntI94FyqtmsLmHh+QWBribqULyEoer0FPvvid1DpSPLF4?= =?us-ascii?Q?XNQ/b+VZNjxkZ0N3utVXE6ZLq5I5JaltTiQOK8ysat0qaqivRMXE0sfqhpe5?= =?us-ascii?Q?JyvR30ydzrpCroz09IjK+IOoNw7AjDbt6k9OyLreaNsBt9tVJRJZN6UuUeNV?= =?us-ascii?Q?OIc5feN3kV75cTyjlNsmnNkn8WbYVU1fxCGvHds0jrGOKlTpk/AnKTxv/6bf?= =?us-ascii?Q?x5j9zq12nScecj8OsXjOCo3nGQt4B5ujwDFoW5mcZNk9yUkbqtYHtaTngs2f?= =?us-ascii?Q?nKj4YbjjW2Y40zGASHrsxjrCKHiBDgZBS0dygPmpJuFMJCQ5IZo6ybRuGSeE?= =?us-ascii?Q?JK8iRVECEU5uXLPKVGEIkWziNBNXgr2Q5iqRDzMJBuDeny/u8AOZnSi0nxCH?= =?us-ascii?Q?CJ2uu72PTBXIz9F23v5vNK7Hs08xFm/IFEeXIEDdYD3Lgvq5zwdVPyg2vmp1?= =?us-ascii?Q?Rih99JB4QIP8nUdEgUnbePOpOEQcgKnegsgDut8M4JzWB6Ex3DKbPeMp1Fyo?= =?us-ascii?Q?aX4T6NkRhVlIgbcgRwI/p/x/g0MAVT/kIdupe1zghMs19sF2iEh23T+/fQE9?= =?us-ascii?Q?jLS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F8pJebUX9wn X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2017 23:08:04.6108 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1237 Subject: [PATCH 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: Wed, 04 Jan 2017 23:08:07 -0000 Content-Type: text/plain 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. Leo Duran (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 | 1 + CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc | 1 + DuetPkg/DuetPkgIa32.dsc | 1 + DuetPkg/DuetPkgX64.dsc | 1 + MdePkg/Include/Library/IoFifoLib.h | 175 ++++++++++++++++++++++ MdePkg/Library/BaseIoFifoLib/BaseIoFifoLib.inf | 45 ++++++ MdePkg/Library/BaseIoFifoLib/Ia32/IoFifo.asm | 139 +++++++++++++++++ MdePkg/Library/BaseIoFifoLib/Ia32/IoFifo.nasm | 135 +++++++++++++++++ MdePkg/Library/BaseIoFifoLib/X64/IoFifo.asm | 125 ++++++++++++++++ MdePkg/Library/BaseIoFifoLib/X64/IoFifo.nasm | 124 +++++++++++++++ MdePkg/MdePkg.dec | 3 + MdePkg/MdePkg.dsc | 1 + OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.nasm | 55 ------- OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c | 1 + OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf | 7 +- OvmfPkg/Library/QemuFwCfgLib/X64/IoLibExAsm.nasm | 52 ------- OvmfPkg/OvmfPkgIa32.dsc | 1 + OvmfPkg/OvmfPkgIa32X64.dsc | 1 + OvmfPkg/OvmfPkgX64.dsc | 1 + QuarkPlatformPkg/Quark.dsc | 1 + QuarkPlatformPkg/QuarkMin.dsc | 1 + UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.c | 1 - UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.h | 1 + UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf | 10 +- UefiCpuPkg/CpuIo2Dxe/Ia32/IoFifo.asm | 140 ----------------- UefiCpuPkg/CpuIo2Dxe/Ia32/IoFifo.nasm | 136 ----------------- UefiCpuPkg/CpuIo2Dxe/X64/IoFifo.asm | 126 ---------------- UefiCpuPkg/CpuIo2Dxe/X64/IoFifo.nasm | 125 ---------------- UefiCpuPkg/UefiCpuPkg.dsc | 1 + Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 1 + Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 1 + Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 1 + 32 files changed, 764 insertions(+), 650 deletions(-) create mode 100644 MdePkg/Include/Library/IoFifoLib.h create mode 100644 MdePkg/Library/BaseIoFifoLib/BaseIoFifoLib.inf create mode 100644 MdePkg/Library/BaseIoFifoLib/Ia32/IoFifo.asm create mode 100644 MdePkg/Library/BaseIoFifoLib/Ia32/IoFifo.nasm create mode 100644 MdePkg/Library/BaseIoFifoLib/X64/IoFifo.asm create mode 100644 MdePkg/Library/BaseIoFifoLib/X64/IoFifo.nasm delete mode 100644 OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.nasm delete mode 100644 OvmfPkg/Library/QemuFwCfgLib/X64/IoLibExAsm.nasm delete mode 100644 UefiCpuPkg/CpuIo2Dxe/Ia32/IoFifo.asm delete mode 100644 UefiCpuPkg/CpuIo2Dxe/Ia32/IoFifo.nasm delete mode 100644 UefiCpuPkg/CpuIo2Dxe/X64/IoFifo.asm delete mode 100644 UefiCpuPkg/CpuIo2Dxe/X64/IoFifo.nasm -- 1.9.1