From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0613.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe45::613]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6EB16819BB for ; Thu, 5 Jan 2017 13:49:38 -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=qVtdmVGpvCHYQYrOUs4PaPjFG5r/xrKnpq0pJsqrQHk=; b=lnChADVrpK8fVuxzomiLxhhgLAt5WiaaX+HwQomqpdMgvrFDSc775O7LJZdeB4vXmJAxv1LAqjHJj9MH7AuFutKKI53/zIW7pbJXt8Jz5vLemUOhzudoAJYR1uHNjd2x5rs2lKQECH+emzLP4dfDoAJ4BR3Hf57rr3RPSsM/AhM= 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 DM5PR12MB1243.namprd12.prod.outlook.com (10.168.237.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Thu, 5 Jan 2017 21:49:34 +0000 From: Leo Duran To: CC: , , , , , , , , , , , , Leo Duran Date: Thu, 5 Jan 2017 15:49:21 -0600 Message-ID: <1483652965-14357-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: MWHPR14CA0005.namprd14.prod.outlook.com (10.173.227.15) To DM5PR12MB1243.namprd12.prod.outlook.com (10.168.237.22) X-MS-Office365-Filtering-Correlation-Id: 23bd4fbd-1208-4e1b-dcb7-08d435b4bdd5 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM5PR12MB1243; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1243; 3:5PCvgbqSkSvLIh08mL+zcdYdevpTQc2iZ53/RVlSt+SLG0/vdLcCf9X8XwAm++XOwnzv4a91Ex3DljF/mYxDBC89oriSQg1OXAQiKVsrN72v90Cy+HTz02R+rApuArvpindSpFOHbHIg/ffeds7RF1Uw5nSSb37SebyomuDVvE4fMBY5/lirCPMRt4qjoZTN5t/fsvcYUVoZwel1XiO3RxTL3TPFP1zRcV13lU2LkPAqZ7vscuvNdoDp1atlKlB7A/eRT8XZeFpmxFRhDKuIhQ== X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1243; 25:oMuQGrJdhfLhp9BRafhIh3F46F395oc72X/EKneW7kK+ErJa5fEzARE29FnguAGRw5T9hf8ZmuJjYKOrnpIe51fbRecJTcREoEODId0PqW7gCHQpXYRIP0VY9wvCRwHnqUJjgvYaYcNdCaRWvQMc7BbqN9c29KaqPfERmO0O/sm4s59F5NVel4Up5Z1QD4aSETaeu9jDMDBVRZWoIZjvvOMbajIl+ztQXO/RZsFFi17XDmvdIluHt+ZCc/w70pAWe34Y3qyvB+rtpL0Q4mWN8LnA9lBvm0wdyN17q1/tkn3KLN7oJh69i9J0mwBPMVz9k6w3IQHq4bZl3n1ua5OUi8HvigdpHHvlni7bfy0taY+xtnxFrJSLukbzzIVqTtBrlW4ACcLXW/T6wiRvIJ2ejtSNHFvP8ZXV6xFEDz2/V+wM+OC3t+OaGbNuNIuS7el5ADD5li8BhKzrZ35LGyuMhk6iqFgUspkBojr1IOBjtzqfK67lfVJVeme5+bUFl7w1ZXqQAMtNyczOTzohI3wa0zkzbY5vInhiGcXMLT7rvz6neVuil/AnhutpOHuxfmdCbx57Q0qN7M4I2ppxiNo+LYJp4VPDehKdl6VyUY2kY+7P+qe2JyKdfF3FSo/LhSME+ssAFeDbQ6feANWG50zUU6f9pgYWN7eZx33LBW0rzAKZJoCqqv0KHNy7OwitJVCoF7A2ne9M84Hw+C5/rVEX+8x+9Wjm90si2e7cKFABcNnQDQimhPmbPDHWA18Rni6q X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1243; 31:iE3M5GocnFeb2JIlOSGiGBr5e+YCc+NFYhjCuDWiSU6BsyhEnex0jVUPoxNDHOqLHbEX1kaiqCkSs4m/IxkWvheHqrvzrlyZLL59tGQp8GGlFipI6aUTr1d5CKNxJPQQwRfHIYSaNNZ8njcvo51iZRFAo5/1hwWFBB8DJmVnjJHUWJ69haP/2iWhu+EqSY4+UwfOHbchNushKUTK4hLgq1xNLwH1TEu5cE2SlTx08rrRIBhaBKttCQI8RqUlC+CNn97rY8ZwnXKzb8M00e4OTA==; 20:YgDt1lU11x0o12YxNd3vioPOqs81AMRG26LVZW8bvEijlrUBYyxYPWUJXSoUiamohn3P7lQGAo6aMwwLBBHk1UIG45r77JH+m5LNP+rtvr+7SySfZtShKib+wkAMKpWUs6oOpy42bdiKvF1Bi4JRmEvnbU7pMoLrHH9H8t/5Vjyi977o3B2O0bEZ93URTnpbN88zCA4ucs52UF1q+yHekb/LYh/OXfgzttE61AtPPNNDq8yf5YY6NtdlNdxtqffl8gmA1Ry2ld03JxCkLAkgYSdCladOXdfljvi16xXlTWeHIXXgMHKmAMPIz/FMhwSh+LUVT7Xu56Plu0KNMgJ2ue42OkoO7KhFFU6i8WfbPAnB+RHAKLpEqk3Y+LST10lOwtJQ6dM10sU+7vifPaLSEHm7BFTA6nNfwm94DtTbZtcehZlWiNK1LF0x59KyeoDJQKnXK7kyeEsLNbjivZDVCc2RCqjh3GR0nyaFDsrGSrxKYHQrqzw+8u5HVtqKmTgJ 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)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148); SRVR:DM5PR12MB1243; BCL:0; PCL:0; RULEID:; SRVR:DM5PR12MB1243; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1243; 4:I7ONaw35ZW/ODJxnh8mRFZifRkywQhcwxYKJ1VFVT5F4g1AuC9jM/sZLHu961axcn9KaV9HfYuWC4CcAPNH2v3nvAZaFIW4q92nD0o9knPrxs9F5VurvYK+Hx/84WHMBZAeR9cIIH8YH6Ky/KwRy897wttuXGmHjkuwK6O50Y93IG+yPZQrH2axgzfx6qdaGAgcB1eJnxjKllnp1k2lYOVj3D/juwdEENKHRJeafeMVnVw3DHYp357DGIaJJ+30GDUP5fZPmCPGVQRhGpFCQ7346CIu6GG9zE6qR45RcHAae4lLoVvqDGgEtmTh2R+v4u7uvOp2Wz0EztEJ2lIOp/7I8hr8TMcVwEUcJ3lHsTIzzQsRs5l11LkR9RXrdEl4iq3WeNjEg94tXv1VBFLr0Q26Ac9SyxTFqEVCIptRxLQBCGKErvesaSj0JtOfwWRQtKVo+072OXJv2B8Px3DlDAw4qrB1AVB0LXOaKJRXLMUYC6MUcNW6auc2RWBkTdR8gN02rytMAdh1c8QMEooxEeM1Jhslms1ZUIXVkfznpGIOMB5fXhvYSlbOzZUVkzZxSYigbdk/g5u/YcqQNeZZTOA== X-Forefront-PRVS: 0178184651 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6029001)(6009001)(7916002)(39840400002)(39450400003)(39860400002)(39850400002)(39410400002)(189002)(199003)(5003940100001)(8676002)(50226002)(105586002)(92566002)(6666003)(42186005)(25786008)(54906002)(68736007)(189998001)(53416004)(3846002)(305945005)(106356001)(4326007)(7416002)(36756003)(86362001)(50986999)(6486002)(33646002)(81166006)(48376002)(50466002)(2351001)(6116002)(38730400001)(6916009)(47776003)(66066001)(5660300001)(2906002)(81156014)(110136003)(101416001)(97736004)(7736002)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1243; 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; DM5PR12MB1243; 23:CNuerk4eB4bJhyweKGM93xeOplugjXThDvIxesegN?= =?us-ascii?Q?e8YkSgYW5gkPXuVJmiDAm7BYw0RBUjSeYI/sdOJJXMCBJ/Z3aCX82Ga0Lu8Q?= =?us-ascii?Q?ahaK5keXvuEG9LFuRIgWKW389X/t6mcG8a9gK8kgYyxqHuNZczfqsnQxag4Z?= =?us-ascii?Q?amXIBtcc+H00d50ZGmN5hWHXTm40E3aqEoQlQlxSzo7h3/KEvJ9A6Mz1PkmR?= =?us-ascii?Q?4e4ItzKNr/1YYb0VcqsyECyUv2y19IDwWTygkMrqglO/BAGc95G7NpCC9xD+?= =?us-ascii?Q?b0ZpVyrHKgUmDhOgZgu0cDQLiFdKR+NUIpVs4M9KBo3X46tW1mEyf4Q2Y6Jv?= =?us-ascii?Q?MLpidAnl2y1wYbWxQEngpjsFCSFeRVFD8alrDmvuUZ7us18/kTDHmg6hTQ6y?= =?us-ascii?Q?KFRrEJH+h+JYRd5dsCzhOqU5vg8VZSu1RG0AW0/YZN/Sm+MhhSg+iKdC6bqb?= =?us-ascii?Q?tD5PX7EoEFWyDNUA4MPEKWbt5T85Y5rOGrdC31QE7vrwndskjkJ74PEvll9c?= =?us-ascii?Q?QKF7N59SvxAI4pFenomphvQmG32hcGPIRWI/01Uz+6STjdr1A+wNzbeu3RGF?= =?us-ascii?Q?Aymnz5scuG2jU9DY2moG2z75gLZUDbGpUuOgUPo9izHAhychQUcmO5GfquB4?= =?us-ascii?Q?HurzrrilezDBJwbVINt9J6/yw7HnN3bTexuanCrjKpHc9D/mYoUwZUcMZgjX?= =?us-ascii?Q?lhW2J2dMRFXw3UXRMgbXEa/v2msigAtH/6ec/bfzeV7tfiIN0fMGUq/R7Otu?= =?us-ascii?Q?MRfCeaTfGr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5BHFgoChmMlEmK7Sut7y3u34i72O X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2017 21:49:34.7095 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1243 Subject: [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: Thu, 05 Jan 2017 21:49:38 -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. 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