From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web11.9823.1592990853180206174 for ; Wed, 24 Jun 2020 02:27:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MiaZACmP; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592990852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ScrOrp88ZTCkodG5aUitsExvzB0TX6Lmtpx8IR7Sn80=; b=MiaZACmPP09rDrt0121fZkgoKgY3cugcJTMmMGlsRnvZpdGFnkJFDmsMIFS1utUtneSB61 6cDnVJQsJkTGnvoEbi7R/2LJ9KLAadd1yfcCV5gSMsm1UkHus9MTyATQN6/aXy01Tn+shm SbM01VxxRy0L8brwmBq3w5LiTvLKk4w= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-465-XJKidj3HMp6aWEWHmcCp6w-1; Wed, 24 Jun 2020 05:27:30 -0400 X-MC-Unique: XJKidj3HMp6aWEWHmcCp6w-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0106F18A8220; Wed, 24 Jun 2020 09:27:29 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 447D45BAC4; Wed, 24 Jun 2020 09:27:27 +0000 (UTC) Subject: Re: [PATCH V2 1/3] MdePkg: Add New Memory Attributes To: Oleksiy Yakovlev , devel@edk2.groups.io Cc: liming.gao@intel.com, michael.d.kinney@intel.com, dandan.bi@intel.com, ray.ni@intel.com, rahul1.kumar@intel.com, Felixp@ami.com References: <20200623215556.80804-1-oleksiyy@ami.com> <20200623215556.80804-2-oleksiyy@ami.com> From: "Laszlo Ersek" Message-ID: <95c5644a-7af3-ae32-224f-200e5e06c7e8@redhat.com> Date: Wed, 24 Jun 2020 11:27:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200623215556.80804-2-oleksiyy@ami.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 06/23/20 23:55, Oleksiy Yakovlev wrote: > Add usage of EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO > attributes introduced in UEFI 2.8. > (UEFI 2.8, mantis 1919 and 1872). > Fix typos in EFI_MEMORY_CPU_CRYPTO description. > Add attributes bitmasks, grouped by type. > > Signed-off-by: Oleksiy Yakovlev > --- > MdePkg/Include/Uefi/UefiSpec.h | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h > index 558e1bc..05b82e0 100644 > --- a/MdePkg/Include/Uefi/UefiSpec.h > +++ b/MdePkg/Include/Uefi/UefiSpec.h > @@ -96,9 +96,9 @@ typedef enum { > #define EFI_MEMORY_SP 0x0000000000040000ULL > // > // If this flag is set, the memory region is capable of being > -// protected with the CPU?s memory cryptographic > +// protected with the CPU's memory cryptographic > // capabilities. If this flag is clear, the memory region is not > -// capable of being protected with the CPU?s memory > +// capable of being protected with the CPU's memory > // cryptographic capabilities or the CPU does not support CPU > // memory cryptographic capabilities. > // > @@ -109,6 +109,12 @@ typedef enum { > // > #define EFI_MEMORY_RUNTIME 0x8000000000000000ULL > > +// > +// 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) > + > /// > /// Memory descriptor version number. > /// > Reviewed-by: Laszlo Ersek