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.web10.2131.1657240422195536288 for ; Thu, 07 Jul 2022 17:33:42 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=D57aTIRv; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: eric.dong@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657240422; x=1688776422; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=/4ZXLZSK4/0p67/uNlzLrRl3j2YxtAt5mzO0JA4y798=; b=D57aTIRvgnsAw1CxGlxrYr3lTgz2lnBlc0JEKZjB+xeZvTlH8KZqJQsO Zgp+93sJO+ex5y6G5u/ZbUVJ3BWme2m0SWSaneRwgChuXilAQBhp0g5XZ Hg4JgYtIls9hkZlWN68wqzZ0gGz3trpyaW9xGGZrKXKWfFjQIh2mZCUMl ST38lonE//Mn2o9fm+o6YE6bFhhtMhkRGGRDU/lUGTVMz4zSCcYVxRthO rD2KBgBzqYfrG21X48ArwEpsQffEeD6js3gJTSKIbpmByQgpmyEG7jnTq qU50bq/O9Q843pJCwk7Ex/Na42TQrcbpDRDAlpKuecpYhWQgOvngeYVeQ g==; X-IronPort-AV: E=McAfee;i="6400,9594,10401"; a="267184155" X-IronPort-AV: E=Sophos;i="5.92,253,1650956400"; d="scan'208";a="267184155" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2022 17:33:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,253,1650956400"; d="scan'208";a="770606925" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga005.jf.intel.com with ESMTP; 07 Jul 2022 17:33:41 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 7 Jul 2022 17:33:40 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 7 Jul 2022 17:33:40 -0700 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.2308.27 via Frontend Transport; Thu, 7 Jul 2022 17:33:40 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.101) 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.2308.27; Thu, 7 Jul 2022 17:33:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kCVlx7HU6yWA9RIpY2jvIe3CQhF0UROtZ4C4YQShiNqOnGgLPAPFzgn+lF6xIQB6NdxMJ+a2VPsRIJvPgCwaob6BxXauxaj5ej6hbOtWfQ4A/BIcTUt2KZcO1mvJdxW4TNNPk5UyePHzojS9CFNVRshFhky40qlSHIeY6mN18Uq4q3/UQpe6/hFsjB3yqSIeK+eg8jgzLhnnzgzD8XWF37xlt9dzYZqo79I0/fsjIanUoxCuMU7mKuYzG/a06VB+27QJNwMqczkDuCPlmp1xySZOZiW2b/SdyrREQ4PO9FpmZssmT1iG6GK6k1DOtOinJC1/z/kuWKegR1YHosOU3A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RKbDFf2MKVzXfblPCtn8viFB16fzko6tQ+mcbNypZV8=; b=fLzf54kyLw2I5buL+6YwmdfKcykQ2ivm/I/13EgviAjjD8O1jvCiuVyRejSFcqBD3Hh/JcCMOXjiVyh/LHLyDEms9tuy9lvG+wHq1PtyFL60RRUpd7kHPcrdu08X/EEvz+RGhRuAxTUq1ycSTsnHo4Hu74nfw8VA96dLVqeFUxjEO36WYTwrdrEDJK4d2zHJLBmS9aHtnXZZbZPSWtcBPYqL6iaHLTMpMMqMRoGayp0BQSIAXQGXNCPdhFhkmH3uorsu572pdmftM33bMax0ZDUxKpLMBxON7t292i8z9O/PXp/DWGrmT6+SSwvo3tNCZzVaLwUSLD1j6N9y0BIHlw== 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 Received: from DM4PR11MB6480.namprd11.prod.outlook.com (2603:10b6:8:8d::17) by MWHPR1101MB2109.namprd11.prod.outlook.com (2603:10b6:301:53::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.15; Fri, 8 Jul 2022 00:33:38 +0000 Received: from DM4PR11MB6480.namprd11.prod.outlook.com ([fe80::8dd2:4591:74a6:6a18]) by DM4PR11MB6480.namprd11.prod.outlook.com ([fe80::8dd2:4591:74a6:6a18%9]) with mapi id 15.20.5417.016; Fri, 8 Jul 2022 00:33:38 +0000 From: "Dong, Eric" To: "Oram, Isaac W" , "devel@edk2.groups.io" CC: "Ni, Ray" , "Kumar, Rahul1" , "De, Debkumar" , "Han, Harry" , "West, Catharine" Subject: Re: [edk2-devel][PATCH V1 1/1] UefiCpuPkg/SecCore: Add debug messages to illuminate data flow Thread-Topic: [edk2-devel][PATCH V1 1/1] UefiCpuPkg/SecCore: Add debug messages to illuminate data flow Thread-Index: AQHYingvaRF/oGGbWEmODtX3cZhtea1zr62Q Date: Fri, 8 Jul 2022 00:33:38 +0000 Message-ID: References: <7d4d38650ef62db212eb010f6731638ca94e2c07.1656369860.git.isaac.w.oram@intel.com> In-Reply-To: <7d4d38650ef62db212eb010f6731638ca94e2c07.1656369860.git.isaac.w.oram@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b5604875-7102-4608-33d1-08da60798035 x-ms-traffictypediagnostic: MWHPR1101MB2109:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: QgFEkZjEREYtWk1/jGOu9QfMpB/XAekVaOLv5CBHoqUQBPqIi2f3OVJupgqriwLzT4cJXFBxnXrgG9oiZBEs80K0/EAIof2frOaV7o5nAf/GXsKrPDgnPfdAe5FBF8OGarg7Yljfk7xsxLezRSBH+be2zPYWy+wwtLAe4w40B44+Fl3Q7nS7bZ4gV1eGIb2/ftSrllvMlD3NXW2L+HD8pg06RAM8zGHmhUb9v2LQgspLhplWXzlH5RBo1wWUDe7rBsFzO/+uAO5cStk8NIGH5SakYH6TMh4e4HzG9VU89prVl0DC6cm+A1M8Pp6U0w1ThkrBmhh2wheIuLca5obpmnRMqPCya8YX3f27khfKNVwVGUaDJ2D+8T7T1A5I+eNUDBSLgGRUZfpeBp6At0XuF9YjQszwnSI+BYBumb++fidzP2rUix1yCIqgBMXmAe03kcEKk9j13TmEtXK7jB+48nhBbXm+EqtW8wgarBPk7kdiRbuwjy0Krca74vLrQCf9FiqlPvcjvMpD6vO4o1PGmMieuDf/s3WYLhSeABrpd6FBDmje8qKCpDRR5CkPOIrOEr9fpi6g7Kmp2kBfNmDI2EGXXJ9lplXxxUZ1Ah6EK3ZgLLj9lGz0li+NG/SKA/DpRqIXn6D6TZGTSJSYUGoX52t6QQPKHn+3xqwj1jvWlQI6vTTOc0Qu2xnqdRyckFxnj5mbhjr5cleguDf0wA+Yj+yTbkD8G9sqP6BxcaR88NjytLUE4S6VPY+OPrImF3x+dRGUS99zKj4K/8hzgLXaTNjQlWZjlleBzuradWeGYT1R4TBpuyjDpd1vggoAmlF+ x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR11MB6480.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(376002)(39860400002)(396003)(366004)(346002)(136003)(122000001)(33656002)(5660300002)(7696005)(55016003)(71200400001)(66446008)(53546011)(82960400001)(8936002)(15650500001)(76116006)(52536014)(478600001)(83380400001)(9686003)(110136005)(38100700002)(86362001)(316002)(6506007)(107886003)(41300700001)(2906002)(38070700005)(66946007)(54906003)(66476007)(186003)(26005)(4326008)(64756008)(66556008)(8676002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?D5imvXw/3SyyhRdevDL/uVEwON37wjLENOE8dNy1LMbPlUgVOdfzIiBmkexT?= =?us-ascii?Q?JtyTRtzWaszOzd3acbXzpBl4UemlkgW3aho/MkuLt5K1zLxJ5uFbTrSDt02y?= =?us-ascii?Q?0WBW+Zl/e6FM3fe5RD06heM8MEGN9p54qydztNpOlfD+NCGGsGM0fxL0KEDU?= =?us-ascii?Q?VDPDmiJtjrAlCEaw9X+RAti47qsZHFocaTL2Y/mQSfxs+62c84dp4mGz5rwF?= =?us-ascii?Q?bUar7E7dWDN3LGyNEdxnSMyLnCuwbZPtusfZ67SHqZVCK4TnIEwuikrTOJUE?= =?us-ascii?Q?H+xG2BT/mKVSB+pU7a2x1DfHyIOVpSdvQHqtZPSf0P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g+P47rD32FUr6GoK6kLeSGrLD2XjnZKfrc1BsumYYRdjC4rEjp?= =?us-ascii?Q?bZik7D84ahUkbLq3vB3z1AIveNECL4eAGLK7xDDO5X9v5iPt2mka53rDQStY?= =?us-ascii?Q?RRNOmCuD8j5wlcoduJUYeQxbS1B7K32Wq1cg/qPvYs/yp2WsuQAbEjHZ7RJl?= =?us-ascii?Q?TiipORgCFDwb4T+SQQQLwO+/tEKj0sxNH4G/5C3M+sBP2k7I3fbub5N8CbHj?= =?us-ascii?Q?PNTfIVhXV+VRvbXdpTgl9yi/3AAWfRgCQJB2WUWDTBlqDYH5VTL+FsUehcWc?= =?us-ascii?Q?gnSwlsMMX0Rh23unnzZXVqttuZCvs0FOpLT157/wUfBO8HHgfsZVC5CVFEVp?= =?us-ascii?Q?pHyIQKq420ax0h+cxPGz9vc+dIGOH43htyJRItfW?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6480.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b5604875-7102-4608-33d1-08da60798035 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jul 2022 00:33:38.4313 (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: TU/vUN48tsDM5bZFlszhowK6pYE3g+eWr1piV4xOQVeJxR1jU5Cs9jRT0ZnZoEd3EvG7UPIQglhuBY8x9rLPbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1101MB2109 Return-Path: eric.dong@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Eric Dong -----Original Message----- From: Oram, Isaac W =20 Sent: Tuesday, June 28, 2022 6:49 AM To: devel@edk2.groups.io Cc: Oram, Isaac W ; Dong, Eric ; Ni, Ray ; Kumar, Rahul1 ; De, = Debkumar ; Han, Harry ; West, C= atharine Subject: [edk2-devel][PATCH V1 1/1] UefiCpuPkg/SecCore: Add debug messages = to illuminate data flow Add debug messages to make it easier to verify PlatformSecLib is passing th= e data properly. Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Debkumar De Cc: Harry Han Cc: Catharine West Signed-off-by: Isaac Oram --- UefiCpuPkg/SecCore/SecMain.c | 37 ++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/UefiCpuPkg/SecCore/SecMain.c b/UefiCpuPkg/SecCore/SecMain.c in= dex a7526be9dd..4edf0ce972 100644 --- a/UefiCpuPkg/SecCore/SecMain.c +++ b/UefiCpuPkg/SecCore/SecMain.c @@ -167,6 +167,15 @@ SecStartup ( EFI_SOFTWARE_SEC | EFI_SW_SEC_PC_ENTRY_POINT ); =20 + DEBUG (( + DEBUG_INFO, + "%a() TempRAM Base: 0x%x, TempRAM Size: 0x%x, BootFirmwareVolume 0x%x\= n", + __FUNCTION__, + TempRamBase, + SizeOfRam, + BootFirmwareVolume + )); + PeiStackSize =3D PcdGet32 (PcdPeiTemporaryRamStackSize); if (PeiStackSize =3D=3D 0) { PeiStackSize =3D (SizeOfRam >> 1); @@ -229,6 +238,20 @@ SecStartup ( SecCoreData.StackBase =3D (VOID *)(UINTN)(TempRamBase + Sec= CoreData.PeiTemporaryRamSize); SecCoreData.StackSize =3D PeiStackSize; =20 + DEBUG (( + DEBUG_INFO, + "%a() BFV Base: 0x%x, BFV Size: 0x%x, TempRAM Base: 0x%x, TempRAM Size= : 0x%x, PeiTempRamBase: 0x%x, PeiTempRamSize: 0x%x, StackBase: 0x%x, StackS= ize: 0x%x\n", + __FUNCTION__, + SecCoreData.BootFirmwareVolumeBase, + SecCoreData.BootFirmwareVolumeSize, + SecCoreData.TemporaryRamBase, + SecCoreData.TemporaryRamSize, + SecCoreData.PeiTemporaryRamBase, + SecCoreData.PeiTemporaryRamSize, + SecCoreData.StackBase, + SecCoreData.StackSize + )); + // // Initialize Debug Agent to support source level debug in SEC/PEI phase= s before memory ready. // @@ -318,6 +341,13 @@ SecStartupPhase2 ( } } =20 + DEBUG (( + DEBUG_INFO, + "%a() PeiCoreEntryPoint: 0x%x\n", + __FUNCTION__, + PeiCoreEntryPoint + )); + if (PpiList !=3D NULL) { AllSecPpiList =3D (EFI_PEI_PPI_DESCRIPTOR *)SecCoreData->PeiTemporaryR= amBase; =20 @@ -360,6 +390,13 @@ SecStartupPhase2 ( // SecCoreData->PeiTemporaryRamBase =3D (VOID *)(((UINTN)SecCoreData->Pe= iTemporaryRamBase + 7) & ~0x07); SecCoreData->PeiTemporaryRamSize &=3D ~(UINTN)0x07; + DEBUG (( + DEBUG_INFO, + "%a() PeiTemporaryRamBase: 0x%x, PeiTemporaryRamSize: 0x%x\n", + __FUNCTION__, + SecCoreData->PeiTemporaryRamBase, + SecCoreData->PeiTemporaryRamSize + )); } else { // // No addition PPI, PpiList directly point to the common PPI list. -- 2.36.1.windows.1