From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on061e.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe40::61e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9C56A21A0483A for ; Wed, 12 Apr 2017 11:56:53 -0700 (PDT) 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=OjyL46l54Xj5eT4oS2TU+dGAPTBTmC1xRnCBZ5wYe18=; b=mmpWLb/isUOn9OOFM6EEmeqmXrF+hu3HOKKNCvYPUEstVwyzOEdCmXEG4Hru58xl5s+YROvZaqL8XaFqN6g8XGCcN/R991GwFztHIci0Q2pzMP7hr1wu4fB2i8j3U2uxNWI6Zod9kIS5jlJjBCjfpeSyt8bW19g0/R+IxsJWLOY= Authentication-Results: ml01.01.org; dkim=none (message not signed) header.d=none;ml01.01.org; dmarc=none action=none header.from=amd.com; Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by DM5PR12MB1242.namprd12.prod.outlook.com (10.168.237.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Wed, 12 Apr 2017 18:56:51 +0000 From: Leo Duran To: CC: Leo Duran Date: Wed, 12 Apr 2017 13:56:39 -0500 Message-ID: <1492023400-16132-1-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR22CA0050.namprd22.prod.outlook.com (10.171.142.12) To DM5PR12MB1242.namprd12.prod.outlook.com (10.168.237.21) X-MS-Office365-Filtering-Correlation-Id: c3616382-770f-4249-7ec2-08d481d5ae89 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:DM5PR12MB1242; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1242; 3:m7bcvzrJq16dAF2f3J8kwHE6kPi1jtIMEA/LI7n9XLWMuTjFhzuiOHPB9obBgtFlgYrdaNSrrZhGa5s/igU746aZASxyK/E/H4HzpvIwLgmxMEf3aaJF7wvX9xn37jTfi+5r+kdrsRsO5+pS8YCl6zc0Z/0H+XSs5hNFZyGxUDu2pS+vEhRONStS2H43r/1tju9vjV9T/mOd548awyOZo4x5PNTeO0sEyHC70Tu7gMh9pLTsY26nexlfStqdDIh3XpcNkrJKPaqnIRpmNCEDSVvl9e6e1qvVmPX5k4zMeM/ckvdrKANnTzZPMT86zpvYeHvs7E3pm0y267SwM7Xm8/GOxy4sZrdWQRq3s30F6I8=; 25:aoYXCM28hvUgMJMR0CI+yi2XPB5b35GOw5yVOfDnSJDZePKmDH/r4EvQgqT1RPkIAFEO5cgKTbrSj4LB/sk+xZ1/E9meJxDodVpHtQHi7ybRs4LT/fVBZrkdI3sONZP0u7REECFBYKR2mlvjY/ElPutYyFoZngx8cHyQnBDA7W2W7AAUZkB2YU+bJ8VAhQdDLTPuDWTHGfu/9aGTlDbB6k6bB1/tRgFgVxiH49N9NjcmFnEeiIydODQ/YFljHD/I8VdSUSkmDcfpoHa3xD2ZlR5BWCpuJoYaw//MRgGUDglIREoUAvug5zmYWk/z1dVB7ABHgkhek0vl5gW9X42o9EfhuW12D+H/eLWyOBGWtq6tMzO4py+rRXYGxbgJJOGZzUDTbrG1LO7sMYA304idDVZSkEG4vQJ/XMtZeCBpza/ojFW0FroGy9+q3QMUXQSHePxQprcSfEvVkZsGO1+SSw== X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1242; 31:gJNUG1QMB/xqqY7NLDJ7Aq5/l8RjiebeJWBYx44vhPYANfwDd4vmVyhBka+DDrZEFQNvyn/L0jVB0eq2ahrejRJ4/ltEcugSyVLQg750lCBbFjzMM/vFqtY+7+RYCE+55yqbGf0CC3yn6J8G3d9++/OSPHyu6auWYtaqsOt9hZYioD2Lpm6h6h1kfX+Vi7MLOskonaa/vwajkiHDWlm3WE/6YaY8Lx9XtO499h5Sqd4vMRZKm7Jo2j91BrQ38Uko; 20:046z6I2AbJJH6AfY0yU18ifle9eKd2CTj+QTdgot4jievwVMaaTYtd5+AitHYFRiquAwtegXRtkfBV0Cu7Qk9AhRvMr2oXugEwJHtwUSmkoni0fmGL3Y032UbGnLGD7WMUhWRecmXE8XxwD+Xpc37dvJ0FmmDiO2rMDShUbXfZ896Box0hGSNRqV6E9/F8G/xkrK10vIKhOcsI3JGnhzhcEImm3D73QlvoRNF44w4Mrami0jZo1VhHWVofE1WThowLK9bndevIGBepVUuBkdfVi0kF3IXAyB/Mqeo89kNzN/6bVUMPRg56uEZZV2rHKnKDTzp+UPIlXZ2SOj/6o6k1ejkKlpLfbn5x42UAgVVXI3OI+NSKAOqbOYcdNnChKt9NvFF7mppSU4xrAdW5Pt8P/FVbnzAShTXcwHbqhXu80yXPL5djZrsCvKoPGqZr8c5mc92DgePCNjwPNFRqJnkeD6jUXwV42JrZ2jNzCISn8aKXvm8sWrkA+DyZf/rZw9 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(6072148); SRVR:DM5PR12MB1242; BCL:0; PCL:0; RULEID:; SRVR:DM5PR12MB1242; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1242; 4:p6BHaFHs1mtGoxTktwNrI360QND6Xu7y6cHbC/H5i3hU5GWRgN14+KPJJELWzrmEOa7qAPd+7Kmvdo+x/hErAWuukg3VsLjRvVqish7eVq/SNoemLJZFE1kNgNXIRR2B4vpcuRQvifd/fyjzka34O6u2loJRp6ITKwBrKbgACAFbH73M+XarByKH4JjknBDsZrjCizDIbXQu6JCQbJLqKax3eIa/vcMC4bWOyXUmvsNvpAUks+MOQmhBXfsLgY9tCvIxN//Sm7UvoQmdFBqqqzA8hKp9ux1VYc5yPE5mRqQRT5qq1bbVVzt7AvCkpnk3rptE8MMlujt7FGPPPrtHG1iuWQLrVbTUIT1DeZ1gPqR0eU6lbnlNyX0/elsKtjHD+jYH0RrZnSxTSsDTTfMj5ZYqua1Fa+7fsR1DOT9G9VP6H2aOasR6QY06bVndBYkutOWQOnmkfWImGyLYrFyEqzUf1xxasQFbO3ewZwpUCA/6KojvDD/74Eh7GNDuV1VoRCLPu0RON3s2B0VuRFsvhxq4ueHpWOBzxcjLp7nzVGvuovbZnwkYQRg1eZlniRYq8r03E+IMUqLnALOFXQQkHA8NmzeXeM4n/sZiqaolTDewhWMeUdh8rrHZBDmpufDIPSxMuCwNeeSbntwbmhF818/o/dDFRq2/9JifkiOeHP+sGKNtNQhVg68N6qFJxZxAmf/ql+GvnGZaMImN72ssiAY+C2XTq//EsJEJ/b8SQ8Q= X-Forefront-PRVS: 027578BB13 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39860400002)(39400400002)(39850400002)(39840400002)(39450400003)(39410400002)(33646002)(6916009)(5660300001)(50466002)(305945005)(50226002)(189998001)(48376002)(86362001)(2351001)(53936002)(38730400002)(110136004)(6116002)(53416004)(81166006)(36756003)(42186005)(8676002)(50986999)(3846002)(5003940100001)(47776003)(6486002)(66066001)(2906002)(6666003)(25786009)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1242; H:leduran-Precision-WorkStation-T5400.amd.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR12MB1242; 23:p/RgPogjkRv9ReKX4LDbOY1Py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3gFSvw7GrFgtE4fnMe1XkI73PmhGFYdREkB8XkcSYyVgeQ5jAtrryL?= =?us-ascii?Q?ehwp/iJ88pHHlSOnYVACSK2rwpL1t592LSQ5VpFMg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1242; 6:P0CnzOiUBb/SLyBXs4WZPPbSDwT+g2bzmwdEpv2EcWcAmtKnrca6nKIumKTIYRq1VK1Csj3teukCZX03kPvhL4qK9d1cjAlYesy3+uFUjkV3+OFoHfwUNWwBo9AGHLHe1FzN4BRPVBXKd+cp8LjiHwBb2j072EsISEF2vu+SThS9EcJHn9CJU0UrteACP7vpxwluOVDLd7Zl1AP77d9UWeTloM7rGbVL5EPpw1l0qq7ktF/c4/5ZSwUly1wInHInVVjWXnDx/241JhkUtUr6gJNCf6E1iyDw8PclQlhgYLQ2p85oHNmrVAxMq0ZdRQy3Np5MbrXu1onORBLT6wR8RAn27Y7UBctcegE9YLjIoZWvlog4WPPyHHvuDbDESvM52Je0tOcI0Ce6FEkhNN+JUGHXHsqaB31bHILqZ/wR7oK5FEgqIROIGfLKzssfDSgVmZWeP11bNJghyL7nbWDEWaWulwsMdF5DqovqJzR0cYM=; 5:pdkaw2qnC0GMKGKyTUp8Ds1wuhOG7aDfYUyuQtUhD/UdNbkXACrmxA6TzB5JQ3mAekUw61c5XGpFyPw815o9RA8JqzG6gk7tfk13PUDYVtIBKnX943irVWDG+jQgvA6hg2rikkF64/7gI3wdOIkprg==; 24:P6fhRxO6ILvLTm83hCtBM7lhO4p4ATietcz9O30SOnRoriUn85eHk7KHePF+pB5LYRGIRV2DSInUfhBTdxHvQ8ThKD3Bq7yUn9w+oTFGFhk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1242; 7:l5dBok9SJ/RQvzsNJ2Vfl8xhrLYJDAiRurJAYW60EmBt0kXaZAeMUDBIcbSVLyScnm8TP9yykMdUXOAZ6kLlztRWraAXWb4oTuYlw3mbGKiGJf5m/oJa7hakomx1t8u+7XBfA5+vapJxddKhdzLSjCMAgTuvNWD8MMCp5zqxfbXhfQxN8eMLBN0MH39ZO2z5HSPP2cgil1QnjBPTc2A4xe+FVXSMqIQFBVjZybPi5oXGFw9BYtOj2auzbbIf78JKdtcEeo2caht3kK4/96UAU2R3iqd+4G8LiIzAb3injkM9uUFkDxTUifyG+q0a6H95Av12AhU3cemF8BnLjKaFOg==; 20:mhLEYAKpFSS6npCTKL06/rkIy3evVWQwhwgmuX4pmEoy5n8No8jcmLeyLNoeU8d6YiWD6CySxnmbYFoor7NoeOxtJ5ND5GvmYAtRW99jGxNTOFAnDXdQzb7E2rjJM8tVx09q47YXlZWHZ+KnJWc2qK14e2giyzJlBgvrW1CEJK2j6Ddp2DoVUSQX8kLDpVktDjbHgBpuwKYh6z8AcVzxdl4wvP42ZqEkQGlXJZ00Rz8760lkGbvzyxC9XUVROFNt X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2017 18:56:51.8773 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1242 Subject: [PATCH] MdeModulePkg: Add EFI_GCD_MEMORY_SPACE_NOTIFY_PROTOCOL X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 18:56:54 -0000 Content-Type: text/plain GCD consumes the protocol to issue a Notify() on Add/Remove operations. The intended use-case is to allow OvmfPkg take actions on behalf of an SEV-enabled guest. The new protocol is simply added to the list of optional protocols handled by DxeMain, and as such leverages the existing DxeProtocolNotify framework. I will follow this patch with "proof-of-concept" OvmfPkg driver that installs the protocol to take pertinent actions based on GCD notifications. Leo Duran (1): MdeModulePkg: Add EFI_GCD_MEMORY_SPACE_NOTIFY_PROTOCOL MdeModulePkg/Core/Dxe/DxeMain.h | 10 +++- MdeModulePkg/Core/Dxe/DxeMain.inf | 4 ++ MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 7 +++ MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c | 9 ++- MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 8 +++ .../Include/Protocol/GcdMemorySpaceNotify.h | 65 ++++++++++++++++++++++ MdeModulePkg/MdeModulePkg.dec | 3 + 7 files changed, 100 insertions(+), 6 deletions(-) create mode 100644 MdeModulePkg/Include/Protocol/GcdMemorySpaceNotify.h -- 2.7.4