From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web12.13478.1600942984954609160 for ; Thu, 24 Sep 2020 03:23:05 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: jacek.kukiello@intel.com) IronPort-SDR: 4W/A22fvpY1cpLCy0ryZMU3oiQI5Qw+8gnGub3lNReuQGI4993ZsAMQG7xRzlk7qfFHBRbM/fd 5nCIIICoUNHw== X-IronPort-AV: E=McAfee;i="6000,8403,9753"; a="245956162" X-IronPort-AV: E=Sophos;i="5.77,297,1596524400"; d="scan'208";a="245956162" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2020 03:23:03 -0700 IronPort-SDR: V3KpenV44XAxeFbNh+rCFWDiP0l2NxqcHTExL0aRkFckbleygxmSeLLYNvWvq1s/UPmnLSsO7K KdMiWb0SewAg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,297,1596524400"; d="scan'208";a="338996289" Received: from jkukiell-desk.ger.corp.intel.com ([10.102.87.26]) by orsmga008.jf.intel.com with ESMTP; 24 Sep 2020 03:23:01 -0700 From: "Malgorzata Kukiello" To: devel@edk2.groups.io Cc: Malgorzata Kukiello , Michael D Kinney , Liming Gao , Zhiguang Liu , Oleksiy Yakovlev , Ard Biesheuvel Subject: [PATCH v2 1/2] MdePkg/UefiSpec: separate page access bitmask from SP and CRYPTO caps Date: Thu, 24 Sep 2020 12:21:32 +0200 Message-Id: <20200924102132.18248-3-jacek.kukiello@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 In-Reply-To: <20200924102132.18248-1-jacek.kukiello@intel.com> References: <20200924102132.18248-1-jacek.kukiello@intel.com> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2982 Operating systems are capable of treating SP and CRYPTO memory capabilities and not as attributes. This means that these capabilites cannot be hidden from OSs. For this reason, the SP and CRYPTO bits should be separated from the bitmask that we use for hiding the page-access attributes. Common mask for ATTRIBUTES was introduced in 3bd5c994c879f78e8e3d5346dc3b627f199291aa Signed-off-by: Malgorzata Kukiello Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Oleksiy Yakovlev Cc: Ard Biesheuvel (ARM address) --- MdePkg/Include/Uefi/UefiSpec.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h index 05b82e0be1..2b1b72d862 100644 --- a/MdePkg/Include/Uefi/UefiSpec.h +++ b/MdePkg/Include/Uefi/UefiSpec.h @@ -113,7 +113,8 @@ typedef enum { // Attributes bitmasks, grouped by type // #define EFI_CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP) -#define EFI_MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO) +#define EFI_MEMORY_ACCESS_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO) +#define EFI_MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_ACCESS_MASK | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO) /// /// Memory descriptor version number. -- 2.18.0.windows.1 --------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Sowackiego 173 | 80-298 Gdask | Sd Rejonowy Gdask Pnoc | VII Wydzia Gospodarczy Krajowego Rejestru Sdowego - KRS 101882 | NIP 957-07-52-316 | Kapita zakadowy 200.000 PLN. Ta wiadomo wraz z zacznikami jest przeznaczona dla okrelonego adresata i moe zawiera informacje poufne. W razie przypadkowego otrzymania tej wiadomoci, prosimy o powiadomienie nadawcy oraz trwae jej usunicie; jakiekolwiek przegldanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.