From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0616.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe41::616]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B40F281A10 for ; Fri, 6 Jan 2017 08:25:18 -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=SPZ5x0JDH4/k4y1ufNvH0fP+LguzX5jemIUEVJW9Qh4=; b=cjIH/bnnsOGvRneUDT+kwDm/cLU0x2Gte4w9G04wmhPA7l71PZq7Espl2zb8VfSE2PzCn5MN5wLX84Pma9FJYlQiO2RiOcb7+sDty51nEidh660GrgBnnzGCGCNFTRtpBamt01AHkopdwi0LBrz6jEtNx70XeGh5I5AqtppDfk8= 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 BN6PR12MB1235.namprd12.prod.outlook.com (10.168.227.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Fri, 6 Jan 2017 16:25:13 +0000 From: Leo Duran To: CC: , , , , , , , , , , , , Leo Duran Date: Fri, 6 Jan 2017 10:24:50 -0600 Message-ID: <1483719899-16125-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: BY2PR1001CA0066.namprd10.prod.outlook.com (10.164.163.34) To BN6PR12MB1235.namprd12.prod.outlook.com (10.168.227.21) X-MS-Office365-Filtering-Correlation-Id: 7d13a2de-cf5e-4673-5e69-08d436509883 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0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gWf6AOFQ9CqmslZW/W40MA6dpmzgDwt1jpnxQlTfw00BEB6pJX54TcZA7mKyhpLGaTQ==; 20:g93h8RI0hLSbXmDgvzsHWSuizs72uSCkApckioOH+VXrCDerx/cOA1giArv7OIWY9prb2I+q/3PmGMB+W0z31SupUzHNQ7+st2VDeA0xRo180Y+qXeeLTEPEMdwMqp4XSdg8IjHv6/OYn6lj/E/fFi4gQ2ozzN7ghPxO4nK6tvF6KaKOkbTqaXsVv/8k59ZG6YC35GWPbkcFgWbB2eBaTXSFlDDLv1rq92pY6Zp1vDIsrcDH8zcWe41gDk8Z9B2H+VindujY/9bZGJsrTkf7llIvqpusFFBcV5BJUuSb6HR0r+PwzzZHIOO3Z/HqDUHPBJ+X3WNTT73qCIjZAUl8pxX/eC7PRFg+iantCfODrLZuiUdkA7oq6lnoJbqozZW3rkI2fcJ5OfCeQCHqmqQC5dpSdumjCpff44POlxkS5PNVEr6uYUtuZDM1L92FYnV8EO77Y7oxmmYXQzM/p8DYimDIYb+/49MfCMKtrnFzxzlbjz69Qzr15evG5Wx6xQnk 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:BN6PR12MB1235; BCL:0; PCL:0; RULEID:; SRVR:BN6PR12MB1235; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1235; 4:rf6ldnGX5Bh+dz15b6gRex+/IP6fGbmc98JdxJGFFE6XONf9RUYxdJtMa7N4jqQG5HSppZFCRyhaCNzS7uUCcc6T8l4WWaNtCMYSxJtQkcc+JgKP6jDLZai6HEOJmDYrVORL3mL14qS12rbsQS3BpBsE170TnvFisTU5jJ4D82t6drIWY86fGPDCGDj4HQRA1qx3MRkLeTxmL1efryVbWAnEb8WM8XoQWe7MeSplMidjWCmsXMuvbXyBpY0p78cZoJi3aSfg99h/u79f07PmtDR5IBIbgw2FXDuVy6bfFABhcbWKSaMe7WwoZrtkLqvIDlnoBfXCcXcmYM0SxLKXAr4AZ3/rZ5qSCp9TCZyvXQlQfW+QjljF8JPrR5ZPWAUDOHgvJ11lThQyX73y3XTBQvtycGgOcJ7JHmW0oDhtD05TNJBHwzgQNocq/dAvrXPQ6XQQDMDReR2dXEJMARY6PCv40hA2lzIOhJwdE3I9xkgFd4w6EHe4y5/gmPZcm5A6f96oa/pqvDspPU5lpG9so6lzj3H1996BE4N9Q6vH/6/HOfobRgGyY3dq9f7kMqXGmYsH7/5it5cyNsbqIFgG1A== X-Forefront-PRVS: 01792087B6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6029001)(7916002)(39450400003)(39850400002)(39860400002)(39410400002)(39840400002)(189002)(199003)(54906002)(33646002)(6486002)(6116002)(97736004)(2906002)(42186005)(68736007)(7736002)(66066001)(36756003)(53416004)(50226002)(110136003)(50986999)(6916009)(92566002)(5003940100001)(189998001)(101416001)(81166006)(47776003)(4326007)(5660300001)(2351001)(6666003)(81156014)(106356001)(86362001)(305945005)(8676002)(38730400001)(50466002)(3846002)(25786008)(7416002)(48376002)(105586002)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1235; 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; BN6PR12MB1235; 23:9p4lEn5ZYvO39MB/h+GJ67NGD0WKejClpVt9FsVa0?= =?us-ascii?Q?JPnWh4cVkRg4p53ot/ZWyoY+k4NVHjIg+kDUD9ZbNy2ctcaVO8jfRM/WRtNe?= =?us-ascii?Q?KsTNhvJXEms0EgTbZh1nqeWwiEBr4oXKhLDK1h2UtKP0Sj2VJwNghmM+YR4V?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agnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1235; 7:MznDnXarkgZSCrNgaIPhpgw/7Vcg99/il0OvUwuUlioTi8r3hYrL0pxq2tVoHtJAHv1yl+g/bAXyC+zgaLNKo7Hbw9m820VUF/OlIcmucqUZZC2csklgJOINFONdrmOj3szFp8ImHI8FCcPJOFpa+pNuI7zJ5jW55QTsdsIZj65FlROSZdTlCR1osR7dfWArp041li7UXnDDSROvW5MDsvJksdadF8T40mQNqn8dDnJNDoXF1DzqstLhZSSkZ0K1NY7eAcXmbncYfTTyrd0L6hKDpU1TrHhsjWJqLbYorrqGYz6IFOKbSRIzZumhiA/jBM6TzP/VqNuKmhMJjAWmAu15i2+jORaLPeBtdIEuELQBLlNqNREnp5eWrkqmRxUD9RFrtjH3AkjXBsi2x6VlkwlWmldxD+OdSSB/aau0hP7QQj5+Tw+RGglFhPWknnNyLaBMbQED4W0pe0fLI1aMGg==; 20:wlywlURQ95mrCDAme80m4Vkb+1vBW+5TexDss4Lwz5VtOTyJkzIBpgEHjxrnSY9QNgxsWj4/cGMECwfA7tndUjOo8o7V6JAcXtHtC/41Pd+S7/VSuh3/prkggctqZfWFA75CjH75nHf9jxqOeRltjWYEVNq/32T4wcT1GNLS2vihuFcpN6vEsikif97wOXGHde5hNu4YbNNPjZHioh4rmNBbx+wSiNhWp9FFmvvpVCKME4udmrzv8IN5YChatMds X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2017 16:25:13.3118 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1235 Subject: [PATCH v4 0/9] 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 16:25:19 -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. Changes since v3: - Split patch (1 to 6 patches) to modify .DSC files per top-level package Brijesh Singh (9): MdePkg: Add BaseIoFifoLib library CorebootPayloadPkg: Modify .DSC files that include UefiCpuPkg/CpuIo2Dxe DuetPkg: Modify .DSC files that include UefiCpuPkg/CpuIo2Dxe OvmfPkg: Modify .DSC files that include UefiCpuPkg/CpuIo2Dxe QuarkPlatformPkg: Modify .DSC files that include UefiCpuPkg/CpuIo2Dxe UefiCpuPkg: Modify .DSC files that include UefiCpuPkg/CpuIo2Dxe Vlv2TbltDevicePkg: Modify .DSC files that include UefiCpuPkg/CpuIo2Dxe 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 | 55 +--- 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, 795 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