[edk2-devel] [PATCH 1/3] UefiCpuPkg/PiSmmCpu: Add Internal function IsStaticPageTableEnabled

Dong, Eric eric.dong at intel.com
Mon Jul 29 11:33:06 UTC 2019


Reviewed-by: Eric Dong <eric.dong at intel.com>

> -----Original Message-----
> From: devel at edk2.groups.io [mailto:devel at edk2.groups.io] On Behalf Of Ni,
> Ray
> Sent: Saturday, July 27, 2019 11:29 AM
> To: devel at edk2.groups.io
> Cc: Laszlo Ersek <lersek at 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 at intel.com>
> Cc: Laszlo Ersek <lersek at redhat.com>
> Cc: Eric Dong <eric.dong at 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
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#44513): https://edk2.groups.io/g/devel/message/44513
Mute This Topic: https://groups.io/mt/32616001/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list