From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web09.39677.1609114267522642133 for ; Sun, 27 Dec 2020 16:11:07 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=hj1yPgQw; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: jiewen.yao@intel.com) IronPort-SDR: 67zNjvzgeB5euDKXwiOADBXVACDSrM8Ptj+H/pvFuu6ZXfxar8o9EkAGXKLOvuAbp3LMa4tkJW sF1yKk2/L1FQ== X-IronPort-AV: E=McAfee;i="6000,8403,9847"; a="164047201" X-IronPort-AV: E=Sophos;i="5.78,453,1599548400"; d="scan'208";a="164047201" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2020 16:11:06 -0800 IronPort-SDR: fs+vWECA3vV/Lp5PEgbobKN/VFmukou6LJqC39qTIpPhifVL3VqP9Y3ii0KYyluHyhsSMoER1B ckipkY6gg1Og== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,453,1599548400"; d="scan'208";a="459538260" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga001.fm.intel.com with ESMTP; 27 Dec 2020 16:11:06 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 27 Dec 2020 16:11:05 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 27 Dec 2020 16:11:05 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Sun, 27 Dec 2020 16:11:05 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.103) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Sun, 27 Dec 2020 16:11:02 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P0GcSVMtqYKGywCw5q7QbKzGlDI+M62JRGF3bB7dsoPVHsAp76HCjQx8SngAzBgp3uTktKHPyy/ew6GH2cN+a8QKL/IEp/8dD0PoCRGrdq7kYoOt9bac2voAbNrtALCvSQtZ9oeY1/4OMu874I8YWCdLypzRbRGHl/P0zQtZZhmd8Ta2hOTT99tiBjedXEsZCz59/2DEzH432mSjf93gs3WuSu2fMYr9n5pispqzX4V5Lwoooq06XXYwfEs4LjzCv1cqO8qbP62ITyXRF8dDE7+NsZpj7KZ8LjD71kHRruwUeXfTkd8v5qJGV7gQyzlb0yiY33HkCdaru4McGii4IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C2RiahCwH7xPPns85nA7eJoAiChk0qhr4PhgvbkRW7s=; b=hD+K2HI2ZoUsR/k9S3ea4tsc2VPEKpH16Ps/+fmwYPElJ8KBVx6V10+kZ9nV1o4GsIP7Jiif1MWWG9YYKSplhA94BF9V36qGJ3g2EaA4ddb/AACs32XuMj3Mq8D1lRR5vT/HnuX0SerATU6LKt5NwfYcpmBNe8gffASZr8gTVw1zSRXM4VIS+qXi33s4zxoIRxXkAa4FoLpMc0NQnoZApbj9HlEBgv//OhFwxl8cBrqkzpxxmlZ+aNK27yyO5IAMxdF048y7jic7WJudIEiyWEvEqU5v9/+1qtocCylL+os4LsWBiQOD13So3StetWZg2MmoUa1mqFB5gZMAohnjUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C2RiahCwH7xPPns85nA7eJoAiChk0qhr4PhgvbkRW7s=; b=hj1yPgQwWzo38ysqcd6ej6beLM6V6XtQVH5q/NUxjFMweNWCzLtmupJSXwsdclb7g1LpBhoKnfZriJPoUJDY3E4Joye2qeYXXi+t0xMAqH4PHn+tKs93LqPR5XS/zIIZoEtGxGOCxZ+XfgYx1oBcI4myQOlF9JJ6Dl2Vj3NUQcc= Received: from CY4PR11MB1288.namprd11.prod.outlook.com (2603:10b6:903:23::8) by CY4PR11MB0054.namprd11.prod.outlook.com (2603:10b6:910:79::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3611.31; Mon, 28 Dec 2020 00:11:00 +0000 Received: from CY4PR11MB1288.namprd11.prod.outlook.com ([fe80::e058:fd5a:28d8:2b17]) by CY4PR11MB1288.namprd11.prod.outlook.com ([fe80::e058:fd5a:28d8:2b17%12]) with mapi id 15.20.3700.031; Mon, 28 Dec 2020 00:11:00 +0000 From: "Yao, Jiewen" To: "devel@edk2.groups.io" , "kun.q@outlook.com" CC: Ard Biesheuvel , Sami Mujawar , Supreeth Venkatesh Subject: Re: [edk2-devel] [PATCH v1 01/15] StandaloneMmPkg: StandaloneMmCoreEntryPoint: Extends support for X64 Thread-Topic: [edk2-devel] [PATCH v1 01/15] StandaloneMmPkg: StandaloneMmCoreEntryPoint: Extends support for X64 Thread-Index: AQHW1W6uDr9HMTM3eke/3Fl54ZD6IKoLsOEw Date: Mon, 28 Dec 2020 00:11:00 +0000 Message-ID: References: <20201218185011.1366-1-kun.q@outlook.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.37] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c0bac79b-ea3d-4720-1dec-08d8aac50ed9 x-ms-traffictypediagnostic: CY4PR11MB0054: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3968; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OvyTY2Wa/wYdrj9e/0G1px2Ptfm9ZsFxUgz4iihP1QDQDyr5Px1p+DG7xZBtuQP8TIEfEOqczKHYyrj2pEI/Tf+i8nb7GHak4gRjXSK067/RnIMAlYkV6r5BxQrCwREA2D9E0aGLS4kpflG+5c9v/1nicYldmoaVzJPcZ5N73cHKWsv6XCM9c+n2zNrN8uRRpCgIUY/sU2TH7secUso3sJyG6CK61OfWK8beE1cIXzNeuoXAJGRtjAAIVqPMB1xiofvnljEUrMFe7/08h4GQXpmrXaIK6GMCYhoxWXssN3TMFzvl2OoA6vQxKYivoZ6aJ4dTy+ULqMTzmU16X65RkTPez5K2Fi6Vr9bmFZOvxfmV2xXCD/djXkWua1QKecGBeHBUXreKvYNEjRmYOEe4qw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR11MB1288.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(4636009)(39860400002)(346002)(376002)(136003)(366004)(396003)(66476007)(4326008)(966005)(66446008)(26005)(54906003)(110136005)(5660300002)(2906002)(83380400001)(45080400002)(64756008)(52536014)(76116006)(86362001)(66946007)(8676002)(6506007)(19627235002)(8936002)(9686003)(316002)(7696005)(53546011)(71200400001)(55016002)(66556008)(33656002)(478600001)(186003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?J6x1p2leu3jUkqhDO139vPPT6CIzGKSlInm0Miz/Qq2fkgZ4mf+266WhTB8v?= =?us-ascii?Q?u6x7ZkoFJ2q9YzAAEcR3s35a36TsMkz1OzHxPXA6o0xqGvT1y5lfhoIfAdDO?= =?us-ascii?Q?cXA6EPX/I21yBxnBlSvrvOcCRXFv0zUdGnFR+dSZxPb0w0s9UsCKdaM+AaXw?= =?us-ascii?Q?DhNTTA428W1u7bv+O9aNxDSj0DIJckUbzGwZCeWOUGQmpe6HoqTv4PeOeeeC?= =?us-ascii?Q?N9QxIS9FECEkTHPIpdbEyrcSklcIVTtOz2D3OyBfdhXGvnkZtsJp0qaf2weZ?= =?us-ascii?Q?jn+BCwwgn7Lj3hMP3+8FPsnyWiaO5Tl2T327Go2MkELGQLOOFwx96mg58XfW?= =?us-ascii?Q?ib0xeVGTMCpy5Vr7Wik2YaWVZ1xPpqqbh82jwGZoE5PWuc5TXSkW9PptfoFa?= =?us-ascii?Q?pNQ+/2BzEkbNVquQixwkUddvb4CbjxBPls/UjLj9RZ5UjdS0XaCjV8ftpV9r?= =?us-ascii?Q?2jESqTj5ORTUvpRDkljJ4ZoR+e9elYVElnFBjpG+CPwtnZ2va5GZB39Ecopd?= =?us-ascii?Q?uVm+NuMhWSFoqERbdCKb2Up1mGyWsm5mCEC8RK+Gi7LKWRFJQOPxlwXnbmb6?= =?us-ascii?Q?sf/zXV3PgbnTOKkFCtLjVm1G0NG0sjn5JR5ygA86aGNsLSv6eWeYpdhSsndW?= =?us-ascii?Q?jq8K6c+VHfZirDUpSTnrY84kr2P1bZXet4bHJ1177Z6C83meciopUa8eD0NK?= =?us-ascii?Q?v4yjZiOWIV4KHibH7lyAuEiMQaeIsY8Mbw+7XW36nSLecJL41tcTqQKc3RFK?= =?us-ascii?Q?veSFQ+9492pzEAnUpV407zdedME+m1cc5eGjd6Ox1IaULo1U8lzH/UWKsjVX?= =?us-ascii?Q?GErJN7EpTjVeq9oXcLwF6Yriup0+tPL9aJPOG6Sa8vx7BrOivvFFjNwdRurn?= =?us-ascii?Q?yt1SmZV2V3YU+hYcYDCP45KefVO2vWmB8gvHFtryGHRaE8oxUAmqW68eNxa6?= =?us-ascii?Q?Olq7kglU+PNPs3us22avzHagsgBAiVRTefdshbyAIW0=3D?= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR11MB1288.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c0bac79b-ea3d-4720-1dec-08d8aac50ed9 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Dec 2020 00:11:00.5115 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: XkWBvkxFlEXbhkG/z8AwvJgU1/8Q6T0iPqaVD0yajVZSUB6ioaaU7qsbFe3Kyi/zxduDulrv9zfNvYmeTPwVUA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB0054 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jiewen Yao > -----Original Message----- > From: 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 ; Sami Mujawar > ; Yao, Jiewen ; Supreeth > Venkatesh > Subject: [edk2-devel] [PATCH v1 01/15] StandaloneMmPkg: > StandaloneMmCoreEntryPoint: Extends support for X64 >=20 > This change extends StandaloneMmCoreEntryPoint library to support X64 > architecture. >=20 > Cc: Ard Biesheuvel > Cc: Sami Mujawar > Cc: Jiewen Yao > Cc: Supreeth Venkatesh >=20 > Signed-off-by: Kun Qin > --- >=20 > StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/X64/Standalone > MmCoreEntryPoint.c | 71 ++++++++++++++++++++ >=20 > StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMm > CoreEntryPoint.inf | 3 + > 2 files changed, 74 insertions(+) >=20 > 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.
> +Copyright (c) Microsoft Corporation. > +SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > + > +#include > + > +#include > +#include > +#include > + > +// > +// Cache copy of HobList pointer. > +// > +VOID *gHobList =3D 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 =3D 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 HobS= tart. > + > + @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 >=20 > +[Sources.X64] > + X64/StandaloneMmCoreEntryPoint.c > + > [Packages] > MdePkg/MdePkg.dec > MdeModulePkg/MdeModulePkg.dec > -- > 2.28.0.windows.1 >=20 >=20 >=20 >=20 >=20