From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0607.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe42::607]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6496981C60 for ; Fri, 13 Jan 2017 12:10:36 -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=z2h+ucGSc3vsfAvh9YWJ19x4PG/zMJEi1Y+pwhXj/TE=; b=L97VsFI7rEWKeFRK/+f7lRDD8WT8TTzepkGz9DzUAS1MJT4a7U35+xnrhAokyiY+tPPW47KGMRfMAFXRrPMBD1MPBr4k2UxwwWc375vy/QedgYh10ihW12kLxTo0luUWzyj7b9NicAtxHyz7lodZxCA5k8abjUF3Iru6FyGXrL8= 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 CY4PR12MB1238.namprd12.prod.outlook.com (10.168.167.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Fri, 13 Jan 2017 20:10:33 +0000 From: Leo Duran To: CC: , , , , , , Leo Duran Date: Fri, 13 Jan 2017 14:09:50 -0600 Message-ID: <1484338200-31337-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: BLUPR16CA0013.namprd16.prod.outlook.com (10.164.14.23) To CY4PR12MB1238.namprd12.prod.outlook.com (10.168.167.13) X-MS-Office365-Filtering-Correlation-Id: 54a841d9-9ed0-423b-a54e-08d43bf03bb6 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY4PR12MB1238; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1238; 3:DqWdXu40TfILSocwuRA/prfprxEvZUbS66AsJHiOrQ4oPuUs4kjTK8/1d5oUnk3Qf4XlgY5tceAD669ZG4bdf1DID5c9+GER4T5D7MuFS354sk5VqT6QEYd6YY/bmAUwrcnt2eKNR1YFMbivi5Ux8ntFdzddbrrEWWk6vD1McMo9sWfwPXQFhGYlwFRSHyiaRIB6R6ENCZisOl6XmykaxuN8Jdzkthkmm8w/o+vJs9Mdc9scqvicEkdIvNSTY882cZ+cmkTQ0xbjJWcVB1yuxA== X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1238; 25:Ey8YH0JFi0REI74EE2n6w247hPOQWOtoSOS6HBIHawBVo01EYDbDqwfj8MBoL+c2RE2/LXKZ9xzgAWR1cgSXSu9AQGqbJdtbXMTFeaQDHy3vQaoOg3OtnF3jarqaFq4ur/3eDxMcANcXQ5fBL9x14rRFbtWISlEXCFX9NvybjXPtpMq8NjJRUlV4dy+BHsvwRymmsGSfpQsf0g6oyHIqIJKU82zeGUcwkc6Yc4ha2f4h1uGEMZUTJD70sYU/naVHpv/rpJhYa1OA7RPaFYPclQmDj1nIpsf9DCSGFcWAHfllXBV3vtSPf0Te3Ttf6GvVKCDsLrYN6IDrcuKQ10JjO/BDgC8HkSeVuapYmDEXONgJYWKElvdiXIZYljNc7WCXuIP4VnQlgsumBFqz6RfOJS8sVl6CgD4iASqodnXBQYVFkdvshpvRQitagrgNYzipLvSUtmOn+uqE/zQggxuEgXZLW6maaXelw4nuRV7yX5T/7hC4no599120/kejeEUBbn/yN1Fu4BAmo3NAIN5xQamFZAhOOv5zO7CVM9lw1qtUVUu3Ger2aQqESgCJSzbAAaukcrsPQnx5mfEyqvUaJFmibGvNZont+1Yhzs1haQdaZOFc67pz0TsQlyGiZmjszCtaYK84FGNf2fG26YLA1mTMCtsBJbra4w6qCgVkyGy91W/QT+B2qr/vnG1/fBcqeEhg/SzqkJl3kV3JFo1l2LGnSuykS0AT+6+imt7cSx3Byrtvc2FDKRAn2YLBQNZ2 X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1238; 31:EU7L4PpMSJORYYWRAqC0YqFxsMO89DoKI1Fs6S/tllm+fW7oYQud75qMHkkackVRtnJew1ob8ktmvfngYdh9YURzfsy7nkGJxjEOIhe0TxMnUhr7LwzEXvg95MPfsZETw2U7Q4JHO+k96c+2w+XXocLKc/QGEhQo/xJrGBBLTFSobXUSbiXF+uPEf1byz4utvJn35RMkuJ6qnwe8rphbFL8EbBf7/zHEn5qYslLXyxXCt6LudmI1AoFfeQt+c+LJbWTyKxSKPRUBQzrzFlXEKw==; 20:8I7FuK4nNsFXViRTu4gP6p6He8Ge/bKKC32xbc7TapZcAl1GOihCJbzcHbx+fxBfVsQhEmpVUB63c4rR8YLZQNzvuhuPrUnu+HNmviNPK6sSWA+/jF3qY0+ptQ071gsy0xffyU72qPbGd1PNZ6gveX/l2Mofg/P8+yFza+6ZeUdTRBNjdR6dqKimbFjrhk/f4z1Lf57hdxFz2Lv4oDgtNqS3VPkYZApSJVSR0r3lTvDCXVlvwIWBUK9zHpR7vHgm0mkKpdN8fIP+/tBgyN4BNV7JSlq52m6NfaDY7ojNlidIfOGnuf2HdMj33Qw+84f6viPzT99LISmrvZWFZOcxvLlxGS8YxuduPwJgDz9gdDVkTuTVZYb3Amg6Dfz+dr41ywssEnLjglvkkqzBu17LyQeKu6GoZsBqEGp3aUAUd7PPf61BB/IEq9kevkaoUUDVvWedD/p2pmvsJ3opJKuL+AxJM4VqverN8pmRyPQZ7lgV4XGDMWSChZZnPt4RYu9k 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:CY4PR12MB1238; BCL:0; PCL:0; RULEID:; SRVR:CY4PR12MB1238; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1238; 4:c5Hsw2nI3bsHQMz+9tkjlNFslnWARWUSYvWJuHVxeU/xgdwTzNd/hnHZ6KsG59MV20nmGjLsllnuEUCajjjdWWDUbJIV2QkJqgbCduTSeJwa0cCnl3VK1eCp7Wq5xJOtID7dx29Ny6vqZ60YUqhAD6jT2AW8JH8Gm1Q1Pd48PGQELyarbIgAOnyS54dBUsuGnBv/TBOw72GbOvRYqON76Zg+FE9fHqNZ6kOecRGOe0W+n9OUjmO0zwTDIfjkHo8POPm+HS+kSbI1nRv+djj7Js1RqnPB72fYivYt7N8oz/rSo21WyQ2flomZlq4Ir3OrFyh7NyhK0wEt+v6YBnMVxgncNEFLUlsrAKFArYx7vYLrPvEElSg2gHlTVgTnbC13Eo1hURk1Fdg1NzkJ+3Ypoc6n50NPx7oG4JNuHL7ddTSchBNdpW8Gsrhgo/pQ2JaADPoj147f3nekAyUuTIrPJvz/Tbaq9TfklLA2P7J8UX4+s4ckL3S8mnUtI2umbVw2R9VRfute/G0Y2ZsezGEwDPpluD5rQ0yXVyDR8AKRbg/QyELHDpn+bAS2oBZ3jQvL1vIusWRkgGmlR6NrYSymFQ== X-Forefront-PRVS: 018632C080 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6029001)(6009001)(7916002)(39840400002)(39860400002)(39410400002)(39850400002)(39450400003)(189002)(199003)(6486002)(106356001)(101416001)(105586002)(2351001)(38730400001)(6916009)(6666003)(48376002)(54906002)(47776003)(7736002)(305945005)(110136003)(5660300001)(25786008)(50466002)(66066001)(86362001)(33646002)(4326007)(5003940100001)(42186005)(53416004)(97736004)(2906002)(6116002)(92566002)(3846002)(36756003)(68736007)(8676002)(50226002)(189998001)(81166006)(50986999)(81156014)(27001)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1238; 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; CY4PR12MB1238; 23:PqvcsUs3nAx25QGRRfcwfg8BXRna8kbgDubSej68k?= =?us-ascii?Q?o1yy3zyxoBH+doWLG7iIvIHuXghAtYIoeeF4Qs2+jrNJRW70Mqa2JubapCot?= =?us-ascii?Q?Qkre8ig0crEgGVlODIcXh8CIH8GFT2UEiMekps+FHKG1xtv0+VqrfB78Y0Ri?= =?us-ascii?Q?tCot2dfpyXtF8dtXf4cmSsDCI5rGwCN3+pKQAWBG2pQeF05/f7mJPf+WDt/G?= =?us-ascii?Q?4KSi0g2QA717asvGRBw1smB98A4L7iO1ZraMYj3d0tZgdzbGodFZTzp6lMRe?= =?us-ascii?Q?ZGDTw7dY5X02FLlEeEYx4X41fHX1JhiTzI0gu8PQZ/GpYfCe+KSCTEY9D/lz?= =?us-ascii?Q?yi1jrFbH1Cf2hGpkW/t4KPgCfw6N+H7n64oHY79FelzjrsccimZXDWwdWNv+?= =?us-ascii?Q?zAyruPhzfAS5f8PLJB81ac8pgUe2adbeeohblg0TYqoDCI4sCKD6CM4kY7FT?= =?us-ascii?Q?i21wX2vgh2JuReJGt5Q28XrSdaJK36/sHCnx+DR//+8H0E4s+IJKWySET4bN?= =?us-ascii?Q?wa3cJxl/mkrjLvEHzIyFdacYvL4QKAbQwJBrn6C2tfunRNKQq9Dc/4go/hgV?= =?us-ascii?Q?krdYH2pvW1DbpqZ/eTeuxTWBoSTfSwOhj9e5UXjDTVvLEWWGC+DuQDxMNSf7?= =?us-ascii?Q?vnGyF33uBYCXEoFZgkbszt127+4pgCyrx+ItGw01qkVV1Nicj7m3DfnuJti8?= =?us-ascii?Q?pcKSHm77XlMdJADTUY3RhU7QJ89idMfSh04XagczRGLSbYDXROo292TU9eSA?= =?us-ascii?Q?Zgfm63drh1c/aL/GV+lP1kJ4h2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ginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2017 20:10:33.7410 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1238 Subject: [PATCH v3 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 20:10:36 -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). Changes since v2: - Rework DxeIoLibEsal to use FiFo routines via the CPU I/O interfaces. Changes only to: [PATCH v2 07/10] MdePkg/DxeIoLibEsal 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 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 | 278 ++++++++++++++++++++- 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, 2239 insertions(+), 419 deletions(-) rename {UefiCpuPkg/CpuIo2Dxe => MdePkg/Library/BaseIoLibIntrinsic}/Ia32/IoFifo.asm (85%) rename {UefiCpuPkg/CpuIo2Dxe => MdePkg/Library/BaseIoLibIntrinsic}/Ia32/IoFifo.nasm (86%) rename {UefiCpuPkg/CpuIo2Dxe => MdePkg/Library/BaseIoLibIntrinsic}/X64/IoFifo.asm (83%) rename {UefiCpuPkg/CpuIo2Dxe => 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 -- 1.9.1