From: "Dong, Eric" <eric.dong@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Ni, Ray" <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Subject: Re: [edk2-devel] [PATCH 1/3] UefiCpuPkg/PiSmmCpu: Add Internal function IsStaticPageTableEnabled
Date: Mon, 29 Jul 2019 11:33:06 +0000 [thread overview]
Message-ID: <ED077930C258884BBCB450DB737E662259EB622A@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20190727032850.337840-2-ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Ni,
> Ray
> Sent: Saturday, July 27, 2019 11:29 AM
> To: devel@edk2.groups.io
> Cc: Laszlo Ersek <lersek@redhat.com>
> Subject: [edk2-devel] [PATCH 1/3] UefiCpuPkg/PiSmmCpu: Add Internal
> function IsStaticPageTableEnabled
>
> The internal function reflects the status whether static page table is enabled.
>
> Signed-off-by: Ray Ni <ray.ni@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Eric Dong <eric.dong@intel.com.
> ---
> UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c | 16 ++++++++++++++++
> UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 15
> +++++++++++++++
> UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c | 16 ++++++++++++++++
> 3 files changed, 47 insertions(+)
>
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c
> b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c
> index 05fb455936..2a9af4b77d 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c
> @@ -28,6 +28,22 @@ EnableCet (
> VOID
> );
>
> +/**
> + Return whether Static Page Table is enabled.
> +
> + Note: Static Page Table is always disabled for IA32 build.
> +
> + @retval TRUE Static Page Table is enabled.
> + @retval FALSE Static Page Table is disabled.
> +**/
> +BOOLEAN
> +IsStaticPageTableEnabled (
> + VOID
> + )
> +{
> + return FALSE;
> +}
> +
> /**
> Create PageTable for SMM use.
>
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
> b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
> index 186809f431..14b7676c16 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
> @@ -1267,6 +1267,21 @@ EFIAPI
> PiSmmCpuSmiEntryFixupAddress (
> );
>
> +
> +/**
> + Return whether Static Page Table is enabled.
> +
> + Note: Static Page Table is always disabled for IA32 build.
> +
> + @retval TRUE Static Page Table is enabled.
> + @retval FALSE Static Page Table is disabled.
> +**/
> +BOOLEAN
> +IsStaticPageTableEnabled (
> + VOID
> + )
> +;
> +
> /**
> This function reads CR2 register when on-demand paging is enabled
> for 64 bit and no action for 32 bit.
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
> b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
> index a3b62f7787..18e3f9e08d 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
> @@ -37,6 +37,22 @@ EnableCet (
> VOID
> );
>
> +/**
> + Return whether Static Page Table is enabled.
> +
> + Note: Static Page Table is always disabled for IA32 build.
> +
> + @retval TRUE Static Page Table is enabled.
> + @retval FALSE Static Page Table is disabled.
> +**/
> +BOOLEAN
> +IsStaticPageTableEnabled (
> + VOID
> + )
> +{
> + return mCpuSmmStaticPageTable;
> +}
> +
> /**
> Check if 1-GByte pages is supported by processor or not.
>
> --
> 2.21.0.windows.1
>
>
>
next prev parent reply other threads:[~2019-07-29 11:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-27 3:28 [PATCH 0/3] Allow SMM access-out when static paging is OFF Ni, Ray
2019-07-27 3:28 ` [PATCH 1/3] UefiCpuPkg/PiSmmCpu: Add Internal function IsStaticPageTableEnabled Ni, Ray
2019-07-29 11:33 ` Dong, Eric [this message]
2019-07-29 11:33 ` [edk2-devel] " Laszlo Ersek
2019-07-30 15:20 ` Ni, Ray
2019-07-31 9:57 ` Laszlo Ersek
2019-07-31 16:40 ` Ni, Ray
2019-07-27 3:28 ` [PATCH 2/3] UefiCpuPkg/PiSmmCpu: Refine CR2 save/restore logic Ni, Ray
2019-07-29 11:33 ` Dong, Eric
2019-07-29 11:42 ` [edk2-devel] " Laszlo Ersek
2019-07-27 3:28 ` [PATCH 3/3] UefiCpuPkg/PiSmmCpu: Allow SMM access-out when static paging is OFF Ni, Ray
2019-07-29 11:33 ` Dong, Eric
2019-07-29 11:49 ` [edk2-devel] " Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ED077930C258884BBCB450DB737E662259EB622A@shsmsx102.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox