public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"kun.q@outlook.com" <kun.q@outlook.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>,
	Sami Mujawar <sami.mujawar@arm.com>,
	Supreeth Venkatesh <supreeth.venkatesh@arm.com>
Subject: Re: [edk2-devel] [PATCH v1 01/15] StandaloneMmPkg: StandaloneMmCoreEntryPoint: Extends support for X64
Date: Mon, 28 Dec 2020 00:11:00 +0000	[thread overview]
Message-ID: <CY4PR11MB1288085AD35C2EFC53D9ED428CD90@CY4PR11MB1288.namprd11.prod.outlook.com> (raw)
In-Reply-To: <MWHPR06MB310296E6B95A1FB0312C55ADF3C30@MWHPR06MB3102.namprd06.prod.outlook.com>

Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Kun Qin
> Sent: Saturday, December 19, 2020 2:50 AM
> To: devel@edk2.groups.io
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>; Sami Mujawar
> <sami.mujawar@arm.com>; Yao, Jiewen <jiewen.yao@intel.com>; Supreeth
> Venkatesh <supreeth.venkatesh@arm.com>
> Subject: [edk2-devel] [PATCH v1 01/15] StandaloneMmPkg:
> StandaloneMmCoreEntryPoint: Extends support for X64
> 
> This change extends StandaloneMmCoreEntryPoint library to support X64
> architecture.
> 
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
> 
> Signed-off-by: Kun Qin <kun.q@outlook.com>
> ---
> 
> StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/X64/Standalone
> MmCoreEntryPoint.c | 71 ++++++++++++++++++++
> 
> StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMm
> CoreEntryPoint.inf   |  3 +
>  2 files changed, 74 insertions(+)
> 
> diff --git
> a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/X64/Standalo
> neMmCoreEntryPoint.c
> b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/X64/Standalo
> neMmCoreEntryPoint.c
> new file mode 100644
> index 000000000000..dffa965b8425
> --- /dev/null
> +++
> b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/X64/Standalo
> neMmCoreEntryPoint.c
> @@ -0,0 +1,71 @@
> +/** @file
> +  Entry point to the Standalone Mm Core.
> +
> +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) Microsoft Corporation.
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +
> +#include <PiMm.h>
> +
> +#include <Library/StandaloneMmCoreEntryPoint.h>
> +#include <Library/DebugLib.h>
> +#include <Library/BaseLib.h>
> +
> +//
> +// Cache copy of HobList pointer.
> +//
> +VOID *gHobList = NULL;
> +
> +/**
> +  The entry point of PE/COFF Image for the STANDALONE MM Core.
> +
> +  This function is the entry point for the STANDALONE MM Core. This
> function is required to call
> +  ProcessModuleEntryPointList() and ProcessModuleEntryPointList() is
> never expected to return.
> +  The STANDALONE MM Core is responsible for calling
> ProcessLibraryConstructorList() as soon as the EFI
> +  System Table and the image handle for the STANDALONE MM Core itself
> have been established.
> +  If ProcessModuleEntryPointList() returns, then ASSERT() and halt the
> system.
> +
> +  @param  HobStart  Pointer to the beginning of the HOB List passed in
> from the PEI Phase.
> +
> +**/
> +VOID
> +EFIAPI
> +_ModuleEntryPoint (
> +  IN VOID  *HobStart
> +  )
> +{
> +  //
> +  // Cache a pointer to the HobList
> +  //
> +  gHobList = HobStart;
> +
> +  //
> +  // Call the Standalone MM Core entry point
> +  //
> +  ProcessModuleEntryPointList (HobStart);
> +
> +  //
> +  // TODO: Set page table here?? AARCH64 has this step for some reason
> +  //
> +}
> +
> +
> +/**
> +  Required by the EBC compiler and identical in functionality to
> _ModuleEntryPoint().
> +
> +  This function is required to call _ModuleEntryPoint() passing in HobStart.
> +
> +  @param  HobStart  Pointer to the beginning of the HOB List passed in
> from the PEI Phase.
> +
> +**/
> +VOID
> +EFIAPI
> +EfiMain (
> +  IN VOID  *HobStart
> +  )
> +{
> +  _ModuleEntryPoint (HobStart);
> +}
> diff --git
> a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneM
> mCoreEntryPoint.inf
> b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneM
> mCoreEntryPoint.inf
> index 7d6ee4e08ecb..3b7629bc8fb9 100644
> ---
> a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneM
> mCoreEntryPoint.inf
> +++
> b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneM
> mCoreEntryPoint.inf
> @@ -26,6 +26,9 @@ [Sources.AARCH64]
>    AArch64/SetPermissions.c
>    AArch64/CreateHobList.c
> 
> +[Sources.X64]
> +  X64/StandaloneMmCoreEntryPoint.c
> +
>  [Packages]
>    MdePkg/MdePkg.dec
>    MdeModulePkg/MdeModulePkg.dec
> --
> 2.28.0.windows.1
> 
> 
> 
> 
> 


  reply	other threads:[~2020-12-28  0:11 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201218185011.1366-1-kun.q@outlook.com>
2020-12-18 18:49 ` [PATCH v1 01/15] StandaloneMmPkg: StandaloneMmCoreEntryPoint: Extends support for X64 Kun Qin
2020-12-28  0:11   ` Yao, Jiewen [this message]
2020-12-18 18:49 ` [PATCH v1 02/15] StandaloneMmPkg: StandaloneMmCoreHobLib: Extend support for x64 Mm Core Kun Qin
2020-12-28  0:12   ` Yao, Jiewen
2021-03-24 20:33     ` [edk2-devel] " Dawn
2020-12-18 18:49 ` [PATCH v1 03/15] StandaloneMmPkg: StandaloneMmCoreMemoryAllocationLib: Fix compiler warning Kun Qin
2020-12-28  0:14   ` Yao, Jiewen
2020-12-28  4:07     ` Kun Qin
2020-12-18 18:50 ` [PATCH v1 04/15] StandaloneMmPkg: StandaloneMmMemLib: Extends support for X64 architecture Kun Qin
2020-12-28  0:18   ` Yao, Jiewen
2020-12-28  4:15     ` Kun Qin
2020-12-28  6:24       ` Yao, Jiewen
2020-12-28  6:36         ` Kun Qin
2020-12-28  6:37           ` [edk2-devel] " Yao, Jiewen
2020-12-18 18:50 ` [PATCH v1 05/15] MdeModulePkg: SmmLockBoxSmmLib: Support StandaloneMm for SmmLockBoxLib Kun Qin
2020-12-22  8:35   ` [edk2-devel] " Wu, Hao A
2020-12-18 18:50 ` [PATCH v1 06/15] MdeModulePkg: SmmReportStatusCodeLib: ReportStatusCodeLib in StandaloneMm Kun Qin
2020-12-22  8:35   ` [edk2-devel] " Wu, Hao A
2020-12-22 19:15     ` Kun Qin
2020-12-23  6:09       ` Wu, Hao A
2020-12-24  1:53         ` 回复: " gaoliming
2020-12-24  9:11           ` Kun Qin
2020-12-29  1:23             ` 回复: " gaoliming
2020-12-29  1:31               ` Kun Qin
2020-12-18 18:50 ` [PATCH v1 07/15] MdeModulePkg: FirmwarePerformanceDataTable: Added StandaloneMm support Kun Qin
2020-12-22  8:36   ` Wu, Hao A
2020-12-22 20:06     ` [edk2-devel] " Kun Qin
2020-12-18 18:50 ` [PATCH v1 08/15] MdeModulePkg: ReportStatusCodeRouter: Support StandaloneMm RSC Router Kun Qin
2020-12-22  8:42   ` Wu, Hao A
2020-12-18 18:50 ` [PATCH v1 09/15] MdePkg: UefiDevicePathLib: Support UefiDevicePathLib under StandaloneMm Kun Qin
2021-01-04 18:32   ` [edk2-devel] " Kun Qin
2021-01-05 13:25     ` 回复: " gaoliming
2020-12-18 18:50 ` [PATCH v1 10/15] PcAtChipsetPkg: AcpiTimerLib: Added StandaloneMm instance of AcpiTimerLib Kun Qin
2021-01-04 18:30   ` [edk2-devel] " Kun Qin
2020-12-18 18:50 ` [PATCH v1 11/15] SecurityPkg: Tcg2PhysicalPresenceLib: Introduce StandaloneMm instance Kun Qin
2020-12-28  0:08   ` Yao, Jiewen
2020-12-18 18:50 ` [PATCH v1 12/15] SecurityPkg: Tcg2PpVendorLibNull: Added support for MM_STANDALONE type Kun Qin
2020-12-28  0:08   ` Yao, Jiewen
2020-12-18 18:50 ` [PATCH v1 13/15] SecurityPkg: Tpm2DeviceLibDTpm: Introduce StandaloneMm instance Kun Qin
2020-12-28  0:08   ` Yao, Jiewen
2020-12-18 18:50 ` [PATCH v1 14/15] UefiCpuPkg: CpuIo2Smm: Support of CpuIo driver under StandaloneMm Kun Qin
2021-01-04 18:31   ` [edk2-devel] " Kun Qin
2020-12-18 18:50 ` [PATCH v1 15/15] UefiCpuPkg: SmmCpuExceptionHandlerLib: Added StandaloneMm module support Kun Qin
2021-01-04 18:30   ` [edk2-devel] " Kun Qin

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=CY4PR11MB1288085AD35C2EFC53D9ED428CD90@CY4PR11MB1288.namprd11.prod.outlook.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