From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0602.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe49::602]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E728181B14 for ; Tue, 10 Jan 2017 15:56:09 -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=j4mKlwMv7HyrGbogDag7mkJCq+m34VaAFaraS+T95Ec=; b=ziA/gmadzf7qYUW8CgHmDebsb4NPfFgzmUBegzYaFr2wz10imOqxpgg3pijnVx5wzp+1xjF8PW5qRfu42khbl6OdjBF1hYot4CKZztr35IYogX309ykxf/dQcS2Np7kTBDPl9VvkDPaYJdejsNdfPtUCssErTJAVFNc52JmwOFw= 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 MWHPR12MB1247.namprd12.prod.outlook.com (10.169.205.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.829.7; Tue, 10 Jan 2017 23:56:07 +0000 From: Leo Duran To: CC: , , , , , , Leo Duran Date: Tue, 10 Jan 2017 17:55:46 -0600 Message-ID: <1484092554-26224-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: BN6PR15CA0019.namprd15.prod.outlook.com (10.172.204.157) To MWHPR12MB1247.namprd12.prod.outlook.com (10.169.205.7) X-MS-Office365-Filtering-Correlation-Id: 5410c9f2-d086-4f6a-ca74-08d439b43f1d X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRV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ROYnfoXrQ9hHNCHOa2uPkmQrW41cUEvv+Li9InRGdYwq/LFpuaITlFkeaGEER2qiNQ6hLh1Pzo6cw== X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1247; 31:ljxBOMWSxfa8qkPx+NPmutWwoAHMA89NFnEniWIbbPzEHapZkQDJOyY/Sd+Ubdfbrgvvt6BdeS0HjDIcj+9AZN+J0iWqys6oLn6VPp6SMM8RYkKde8Z5JNDts02k7zwWyvuPEnodqmuaM+XB2X/mSPw5xwPQ6/FzXBJ8Q5hPx9IL530b2W0gbh/crHHVlu5VF5xCNyJmT1ppcWtTWXaa8/IcWzuy/0OUCW/8+63+mS7+cK/R7FeDeG3coe7H9LrX; 20:JlQ40pzhOox/hd1FyfDrgI4TEQEWnJpLOeXNVUnelF3mtY7b5iWbxdiRZQZU7Ln1grdJcg21vMaARtJHjkDckJ15VpodfO+0s5xcUb6+JMhP5e+Zsmfq6km6hxvxDsrkCbY1UGT8HRmCOYcr4kD9uZYFWqrp5Rdr63zKiQcZGmi/kjvI01EFFMo25Xja6qHjZyeCIwrAXvfacvDoQBuOIlwOqk9uLc1dcjK5GBUgm3txmbtmOLvX8UQezwc8hs33UNi3rg+VXgHyhVYOUrDd1yj1HQ/05FubL1Ta2o/wNa0MzWJD1zdjiF5iKA9HwvfW382Qhu3YRzpThLmdGxM3+YZlgQZGAGf4zfb0d6FQeAHAXMy5vT6vEOxhHDnN4UAxzhJ+iPHlsidH51H5oE6M4BKaIEdQTYsaxuWGdpPC+kXzXghxs5rzIFNID9mjh6QjQQPSfQIl+SCPjHbxOO/D6wNu64NUDzRMhFXpj7iTRglNMYLNTsjky12AStrMhlDt 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)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148); SRVR:MWHPR12MB1247; BCL:0; PCL:0; RULEID:; SRVR:MWHPR12MB1247; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1247; 4:KebmkZTHbsNpy9gjOE6IRVziyJuPZgDgx4zrNzPbglNddHy1ZGAyMxaCZ5OUCDR9sQsZ9QiMG9mr3IWOCNEzEK/Id/MgW/iyNSv8HB/4/MX8ysSFuiPJyOW0ePAwIPTpqAS1rr4//ey7J3TtgWXYvkbv7spFSWbDxzyR0DSRReXvInXE+/gBWbtlpYoErXFHyMtLc/mk2J6t8ye1ifbLp07UVGsvMigNAMTxNWi9VV9nFV9GD1JNQk5S5frD3nKieaEsE5FoRNTG/dvYKBJ7e7uh/k045LIFW7TUAItAsgQ94nYTrH+cP+EgI8MvcHsGlE4DxhLuhGB/FcVBctJjlJ2Vv4a5j5gbz+PleqpzrFIMZyxJajXD4QTY3PIm+LALkC0dGJmH2RcD5MAs4ZAyANnspqZPpI6GhTIuVOSLWDJO0YEYXghhLTLagpo0eYOeFMeUgnlGpeaQVcGr20PcTsSYeRMUG39Bp2RdAZ4cZY35COUBsLqYwLi630dN6lHdQxzrg+McUQWDiUGgPhcejsHPHcMzSWL4IKAzpCrJj4E87ZjGlSHZMH0ggk6XvTxOHvS+7ifm2Wbhu+gcu0522Q== X-Forefront-PRVS: 01834E39B7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6029001)(7916002)(39860400002)(39840400002)(39450400003)(39410400002)(39850400002)(189002)(199003)(105586002)(33646002)(101416001)(97736004)(92566002)(3846002)(189998001)(7736002)(305945005)(5660300001)(50466002)(50226002)(6116002)(48376002)(8676002)(6666003)(81166006)(81156014)(68736007)(110136003)(106356001)(2906002)(25786008)(47776003)(38730400001)(5003940100001)(42186005)(53416004)(54906002)(6916009)(6486002)(4326007)(66066001)(2351001)(36756003)(86362001)(50986999)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1247; 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; MWHPR12MB1247; 23:/7kEkmKlszKEUumCjQb5qofeZ6371Hxz6amDfDJuV?= =?us-ascii?Q?fQU5PqQMRfvZQ3OyzMnM9XnyFZ+n3vNLYuJO5iRm9H7Ycmcx5A0HYzta6qgB?= =?us-ascii?Q?WpQs6sSoYYz0ibBVMSzDvgJR8ZJKafi2Pk3w0WFrI7Ksfws3nLMEOWk3eR74?= =?us-ascii?Q?ZP//oRlLTB8tBSYljYjfu0gpVLXTzYA5BJ2fn1gUXY8AhNP4t6h9m8PhY9eu?= =?us-ascii?Q?U70MrPlT7Yh6teknnh3ndveqlVZlWXiqxjPavmhu43KuYSGgLwjS7v0xpemj?= =?us-ascii?Q?R6VF3imopiCPos3flYn+xhWuABlCgcA9LIvmRjjMPC+V2sHS9OGABs4xEGRQ?= =?us-ascii?Q?SGWGj8MEaTKiOV86lEgxXvW029ywO6ippv6t08pIIchO6sp0FfX8bmUvnwqC?= =?us-ascii?Q?7IXSUDUVufZ1JONLN7z5bluuN6ocKPWfdIJ711HxiYgHNSa4QGa1IUpAtmol?= =?us-ascii?Q?Jfh0bC161W5CoLNUSV5mGhHrEZs50oXV93++mzrMDww61+RLUk92o15CycGO?= =?us-ascii?Q?QxhBzYqNdC6YknR/LEuiX74TeBy7eNay7Pm4KyvPJ6J5WQa/rdbN9lB2hN2r?= =?us-ascii?Q?VWTTfNOZp850ZsbfNoVTawYdhvAiQq5LLbJyLOHuT6i0nKYQuGeX6MAF2FN8?= =?us-ascii?Q?Khw4jH4ed2VohAy2X4LI2b5NrOx913sCHF3k5NsebWbQtbgOHLZsptFAOfRU?= =?us-ascii?Q?rYC4ypYLPWKooaCl5KmMVwnjDKnWCERn117GXg9o7MbmCxpQNd2d7/Kh9TbW?= =?us-ascii?Q?1nfRACgMIPnqyk1VPr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+g9OUR8J82orcOzIK1qJesZQPGha5N1sBdS2qhMu056kmdbvrDhY+JouiXlwrQKpmfGMyqQFAP7qGmrDFWdHSWHu8MMsFIKoJEqjj817dRVyrachW9A==; 24:IyNm2Atmyub7xcD7W4OzvBEtz5oefBKOW8JWjsaSyeDHEdoFcq8uXzLdpX0aL0MRxER9UhrxC4lvEzD62/LnRxZIN5f9Mb3JFNgvB1MvfQE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1247; 7:16WReiHgqD+P7r9+euCMT05IYJOWzsSIRCDEOgTt6vnRflVMJSehikM+q5T0vNZDCqqcmKyzb187FlmU1XI42TAN8DEPLJOxcftbGw9EhsCNIxS2eyq+mrV+65rvUEpxUHBApvx5LLndSp0Db34DFX8FvfokemLwJSQ2ZdXhVC5FZrSEWfyfTVbxbdr1+tw5LcCGx3G3OkJH/P1OF5FEOhJDtoHL3/tFSJcCzyUxFh6u10jNnAemUfdyYBD2jFSPHYH+4nBmCgNoC9UPJ6IMBWs5g4q38y0itzcTdh20rbEwFA01Kcv5smwCKj7tPTvk3VxhOMNcL1i8bdwrFM/6HREGndunJO++R0Y3ZRxzMvMPrLXEN4etPw9PSJ6lUacq8NzcwtmaCZK3MdicVPyJxpFa1Es5UgCBDbMWlyv9jvHsLp6AoQxU3AkrDxTZKKDF9G5pXts7ZFuonKMdOSxAPg==; 20:jkNNdowDe5LaGBwlEbN/Ffb+JtlGMopDAXqJtwQkIGmb3LYQzHqNx9T1iNG48darjE4i9s0lAxuOfJAtw6jMhmjQBePobPPHE+V1UV3jG+kKflqtpXC6MzVi59dTv+T/QEAK+mhKyLARPx7JcMaxobD6cLeyrAYkhJnI66Bq/Y+O33bCBjrN3dXRUEopCk9/qyzYZZzWv7UIGRozJvgJfOLR9Evd9MOoNZYU08LZGEk4Mae/E9gxLMTGjLI7yYXe X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2017 23:56:07.0216 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1247 Subject: [PATCH 0/8] 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: Tue, 10 Jan 2017 23:56:10 -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 the BaseIoLibIntrinsic library and expands the IoLib class to include the ported I/O Fifo routines. 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. 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 hardware implementations, such as AMD's Secure Encrypted Virtualization (SEV). Leo Duran (8): MdePkg: Expand BaseIoLibIntrinsic (IoLib class) library MdePkg/DxeIoLibCpuIo2: Add new Fifo routines in IoLib class MdePkg/DxeIoLibEsal: Add new Fifo routines in IoLib class MdePkg/PeiIoLibCpuIo: 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 UefiCpuPkg: Modify CpuIo2Dxe to use new IoLib class library OvmfPkg: Modify QemuFwCfgLib to use new IoLib class library IntelFrameworkPkg/Library/DxeIoLibCpuIo/IoLib.c | 203 +++++++++++++++++++++ MdePkg/Include/Library/IoLib.h | 158 ++++++++++++++++ .../BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf | 6 +- .../Library/BaseIoLibIntrinsic}/Ia32/IoFifo.asm | 1 + .../Library/BaseIoLibIntrinsic}/Ia32/IoFifo.nasm | 1 + MdePkg/Library/BaseIoLibIntrinsic/IoLibArm.c | 182 ++++++++++++++++++ MdePkg/Library/BaseIoLibIntrinsic/IoLibEbc.c | 179 ++++++++++++++++++ MdePkg/Library/BaseIoLibIntrinsic/IoLibIpf.c | 201 ++++++++++++++++++++ .../Library/BaseIoLibIntrinsic}/X64/IoFifo.asm | 1 + .../Library/BaseIoLibIntrinsic}/X64/IoFifo.nasm | 1 + MdePkg/Library/DxeIoLibCpuIo2/IoLib.c | 203 +++++++++++++++++++++ MdePkg/Library/DxeIoLibEsal/IoLib.c | 203 +++++++++++++++++++++ MdePkg/Library/PeiIoLibCpuIo/IoLib.c | 203 +++++++++++++++++++++ MdePkg/Library/SmmIoLibSmmCpuIo2/IoLib.c | 203 +++++++++++++++++++++ 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 | 3 +- UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf | 11 +- UefiCpuPkg/CpuIo2Dxe/IoFifo.h | 176 ------------------ 22 files changed, 1751 insertions(+), 359 deletions(-) rename {UefiCpuPkg/CpuIo2Dxe => MdePkg/Library/BaseIoLibIntrinsic}/Ia32/IoFifo.asm (94%) rename {UefiCpuPkg/CpuIo2Dxe => MdePkg/Library/BaseIoLibIntrinsic}/Ia32/IoFifo.nasm (94%) rename {UefiCpuPkg/CpuIo2Dxe => MdePkg/Library/BaseIoLibIntrinsic}/X64/IoFifo.asm (95%) rename {UefiCpuPkg/CpuIo2Dxe => MdePkg/Library/BaseIoLibIntrinsic}/X64/IoFifo.nasm (95%) 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 -- 1.9.1