From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0600.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe45::600]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 599C681F3A for ; Mon, 27 Feb 2017 06:13:02 -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=c9s9yMT8caScjfBpDHm+e3bJAKr02DYUNE9MQyvLYI0=; b=bQ2DCJ3FSbf5pPBCEtitRDMN6j4Nt3Q7OBLR8TekwI1aPEAP4HritBouPKrn3BATBGWGDXXC0aaVCz02YiFJ8nbzW5yWNjP3W4NNgSAX7HNpe8T3QgKygvGrpibdrfTkknzX1aJxCHTAimbDV8h4kQl07laYNz5VpCW32R/AneY= Received: from DM5PR12MB1243.namprd12.prod.outlook.com (10.168.237.22) by DM5PR12MB1609.namprd12.prod.outlook.com (10.172.40.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.12; Mon, 27 Feb 2017 14:13:00 +0000 Received: from DM5PR12MB1243.namprd12.prod.outlook.com ([10.168.237.22]) by DM5PR12MB1243.namprd12.prod.outlook.com ([10.168.237.22]) with mapi id 15.01.0933.019; Mon, 27 Feb 2017 14:12:59 +0000 From: "Duran, Leo" To: "Zeng, Star" , "edk2-devel@ml01.01.org" CC: "Tian, Feng" , Laszlo Ersek , "Singh, Brijesh" Thread-Topic: [PATCH v4 1/6] MdeModulePkg: Add PCD PcdPteMemoryEncryptionAddressOrMask Thread-Index: AQHSkFfSMeh1OnuTaE+P3PrNxyLqO6F8H2yAgADGggA= Date: Mon, 27 Feb 2017 14:12:59 +0000 Message-ID: References: <1488130987-2544-1-git-send-email-leo.duran@amd.com> <1488130987-2544-2-git-send-email-leo.duran@amd.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B82C0D8@shsmsx102.ccr.corp.intel.com> In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103B82C0D8@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; x-originating-ip: [165.204.53.123] x-microsoft-exchange-diagnostics: 1; DM5PR12MB1609; 7:mQVVsw0tXkQribxXS8YQhCMz4Leb23fMgwiB+HLrR3rgRnBDrS8yb0+cp/6LnyWQNW4V2HgOb8AfXEhHzU4ob6J2AcsKyPkUr4p9wr7U6vWuSpxL7lDi3zskNX/g2TfXPwFBmkPqpMJBrfhPREPSx0V5+sk5RSaOG3DhwUxKfFKbi849zmyg06EHGqQ3TqyAQvySmIKuiYI3vYg7zIvikxGYN0kUwsHOyh6HvzaPsHvgX6XA5l3e5X8xx6+YKZXINg33vcA0Kl7fgqY3IJXXyk7++UNz9JdKkOMKY3//OHwd0iU4Z/bVdbsMS3LkIus9bPhh+VasveR4Bll6Mlh7dA==; 20:sS1Sb8crV3xX/5chooGPKD1Xdn/KYwemDosfdqbsIVxc3wFQNICnuxpySeM2C0xWRJLtkRAUQ3E4WeIQRAaYWzYC7CkK9aks7HTOxyod0LDcTOrP8SnSvokWXtBwzaCu7RmTKiI3PoCzfk4QWJwAfTvuX4tqcPVrRq15ASbxsw/ix522oDYmh9LDnkTKJrfQUYj0ZZiNN8GGW067cv3PEcPbBUDGV3sRvU4yrWNyvZgZAu7X2nfvFX4JLLvLx9Vo x-forefront-antispam-report: SFV:SKI; SCL:-1SFV:NSPM; SFS:(10009020)(6029001)(6009001)(7916002)(39410400002)(39450400003)(39860400002)(39840400002)(39850400002)(189002)(199003)(13464003)(377454003)(68736007)(189998001)(2950100002)(97736004)(105586002)(25786008)(77096006)(99286003)(5660300001)(53936002)(55016002)(122556002)(33656002)(9686003)(54906002)(66066001)(92566002)(86362001)(6506006)(2906002)(2900100001)(81156014)(81166006)(2501003)(50986999)(76176999)(74316002)(102836003)(6246003)(305945005)(3846002)(7736002)(54356999)(8936002)(229853002)(6116002)(7696004)(4326007)(106116001)(3280700002)(53546006)(38730400002)(101416001)(6436002)(106356001)(8676002)(3660700001)(213903007); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1609; H:DM5PR12MB1243.namprd12.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; x-ms-office365-filtering-correlation-id: 22479a6c-3d2a-4e50-21e6-08d45f1abc58 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:DM5PR12MB1609; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(767451399110)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123558025)(20161123555025)(20161123560025)(20161123562025)(20161123564025)(6072148); SRVR:DM5PR12MB1609; BCL:0; PCL:0; RULEID:; SRVR:DM5PR12MB1609; x-forefront-prvs: 02318D10FB received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Feb 2017 14:12:59.7591 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1609 Subject: Re: [PATCH v4 1/6] MdeModulePkg: Add PCD PcdPteMemoryEncryptionAddressOrMask 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: Mon, 27 Feb 2017 14:13:02 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Please see below. > -----Original Message----- > From: Zeng, Star [mailto:star.zeng@intel.com] > Sent: Sunday, February 26, 2017 8:20 PM > To: Duran, Leo ; edk2-devel@ml01.01.org > Cc: Tian, Feng ; Laszlo Ersek ; > Singh, Brijesh ; Zeng, Star > Subject: RE: [PATCH v4 1/6] MdeModulePkg: Add PCD > PcdPteMemoryEncryptionAddressOrMask >=20 > We saw you defined 4K/2M/1G in previous patch series, #define > PAGING_4K_ADDRESS_MASK_64 0x000FFFFFFFFFF000ull #define > PAGING_2M_ADDRESS_MASK_64 0x000FFFFFFFE00000ull #define > PAGING_1G_ADDRESS_MASK_64 0x000FFFFFC0000000ull But only 1G mask > is defined and used in this patch series, is that on purpose? > #define PAGING_1G_ADDRESS_MASK_64 0x000FFFFFC0000000ull >=20 > That means PcdPteMemoryEncryptionAddressOrMask will be just valid as 1G > aligned, right? >=20 > Thanks, > Star [Duran, Leo] Correct... The mask *must* allow for 1G pages, so I've simplif= ied the logic. > -----Original Message----- > From: Leo Duran [mailto:leo.duran@amd.com] > Sent: Monday, February 27, 2017 1:43 AM > To: edk2-devel@ml01.01.org > Cc: Leo Duran ; Tian, Feng ; > Zeng, Star ; Laszlo Ersek ; > Brijesh Singh > Subject: [PATCH v4 1/6] MdeModulePkg: Add PCD > PcdPteMemoryEncryptionAddressOrMask >=20 > This PCD holds the address mask for page table entries when memory > encryption is enabled on AMD processors supporting the Secure Encrypted > Virtualization (SEV) feature. >=20 > Cc: Feng Tian > Cc: Star Zeng > Cc: Laszlo Ersek > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Brijesh Singh > Signed-off-by: Leo Duran > Reviewed-by: Star Zeng > --- > MdeModulePkg/MdeModulePkg.dec | 8 ++++++++ > 1 file changed, 8 insertions(+) >=20 > diff --git a/MdeModulePkg/MdeModulePkg.dec > b/MdeModulePkg/MdeModulePkg.dec index 426634f..f45ca84 100644 > --- a/MdeModulePkg/MdeModulePkg.dec > +++ b/MdeModulePkg/MdeModulePkg.dec > @@ -6,6 +6,8 @@ > # Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
= # > Copyright (c) 2016, Linaro Ltd. All rights reserved.
# (C) Copyright= 2016 > Hewlett Packard Enterprise Development LP
> +# Copyright (c) 2017, AMD Incorporated. All rights reserved.
# > # This program and the accompanying materials are licensed and made > available under # the terms and conditions of the BSD License that > accompanies this distribution. > # The full text of the license may be found at @@ -1702,6 +1704,12 @@ > # @Prompt A list of system FMP ImageTypeId GUIDs >=20 > gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGu > id|{0x0}|VOID*|0x30001046 >=20 > + ## This PCD holds the address mask for page table entries when memory > + encryption is # enabled on AMD processors supporting the Secure > Encrypted Virtualization (SEV) feature. > + # This mask should be applied when creating 1:1 virtual to physical > mapping tables. > + # > + > + > gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrM > ask|0x0 > + |UINT64|0x30001047 > + > [PcdsPatchableInModule] > ## Specify memory size with page number for PEI code when > # Loading Module at Fixed Address feature is enabled. > -- > 2.7.4