From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.15875.1678443478208068393 for ; Fri, 10 Mar 2023 02:17:58 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=A1smUTo5; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: jiaxin.wu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678443478; x=1709979478; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=lY6vgr3CONfoZiI0PYHxCzGMpMZzIemLmX5qpOFZLbc=; b=A1smUTo5qMo1zpVAKrCaF0v4NLSYGjnMlB/ZyxTxIkz5Kp7Q25Cydugl uYiHG+/cCayc4PQmAjYbNkvCNWO8EM4E0SAKkkfxs91J+LNpkOilXpkdq 0P+Pl6Df3s5hxbvnJfYNHW5kVxoaxcdwgDoxYooUPLFNwTmpz8bG8DSE6 5P3vVnK+Sr6DMvZrysdKemu1sYy6ttQDbJ5DH6jWL8N5zTTNpKNxnIRY9 47xwjLoYM1ast71+kTzL90CY+IXRXJ2o16+id9cWTHJfXtQP/m1jYTGo1 ZA7VXp/ux9Cjb7RNjIahvVUPKzmMlupH7D64xvN/i98ItS3+JEIWMLq9W g==; X-IronPort-AV: E=McAfee;i="6500,9779,10644"; a="336715553" X-IronPort-AV: E=Sophos;i="5.98,249,1673942400"; d="scan'208";a="336715553" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2023 02:17:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10644"; a="680155610" X-IronPort-AV: E=Sophos;i="5.98,249,1673942400"; d="scan'208";a="680155610" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga007.fm.intel.com with ESMTP; 10 Mar 2023 02:17:57 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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.2507.21; Fri, 10 Mar 2023 02:17:57 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) 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.2507.21; Fri, 10 Mar 2023 02:17:56 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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.2507.21 via Frontend Transport; Fri, 10 Mar 2023 02:17:56 -0800 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.46) 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.2507.21; Fri, 10 Mar 2023 02:17:41 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W/grKsLGPZkgR2YNWqvfVGslIBEeZcU6jIjNpyDCMkbiWLbZnqG+xi9lU3gTDazQCSY57MLhk78R5rFWiWrFzcFCNQQ6vsIlawocnfrJ6eZ9WgX91udi1LF2tHY1y+YiMiuGDfKP1EL2EcL3m19RlVxd4DTgEYagCmOks+l/qbLHNnA/Wt/eOcRvoHXed2GQZkByOZwk85FWlAnOOSApcNz1Om5hyhfY45RAZKq3t/7sPIORJrWuQi8zXLtTrfVB/vtubdKD53+XvV+w4MfDQKPUQN0i9RcWM4KDQA9ouGRHp/9MGOpo5qxCRIWSKNz0+E4k/6SX6vCRviK+/3cQLg== 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=zpgN0uhwkmvy54Qfi4w3xNC+SmxKmz3NqkJkpKIoraY=; b=RDT+eiSvXDJCeWXzoMXMQ8Ms/rA3dQiDlezpYFq48nh9dN8FLdiwdWdzPM9uOcxlDXS+rEORyUNqnWNU5Lnp5sh9ETMifMeRODmv0VJdflSMX2cJ+hR2gSLSbfAPQvh/mPi1p87+AnI/fACeViMkHBEVL9CCBhBzC3AbG2j/YWl+Cua5fm6UlVMUFYE/kV6MNcNJDhQC/qLh8gg8HfbHBvXnywd7RnjCDGf79/5/KzKCzKCknV3c8/g29ltTfuNMJTQiKpD64x5tm0Lw2vi1H8Wsq7VTrJWO1ZrC62Ub2W5AVUjnnCz8/Asr5YyoymbTlzmlYkK8a5xwfyg57jsoZQ== 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 MN0PR11MB6158.namprd11.prod.outlook.com (2603:10b6:208:3ca::18) by DS7PR11MB6101.namprd11.prod.outlook.com (2603:10b6:8:86::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19; Fri, 10 Mar 2023 10:17:39 +0000 Received: from MN0PR11MB6158.namprd11.prod.outlook.com ([fe80::63ee:208e:c3f4:9d22]) by MN0PR11MB6158.namprd11.prod.outlook.com ([fe80::63ee:208e:c3f4:9d22%5]) with mapi id 15.20.6178.019; Fri, 10 Mar 2023 10:17:39 +0000 From: "Wu, Jiaxin" To: "kraxel@redhat.com" CC: "devel@edk2.groups.io" , "Ni, Ray" , "Dong, Eric" , "Zeng, Star" , Laszlo Ersek , "Kumar, Rahul R" Subject: Re: [edk2-devel] [PATCH v9 0/6] Simplify SMM Relocation Process Thread-Topic: [edk2-devel] [PATCH v9 0/6] Simplify SMM Relocation Process Thread-Index: AQHZQc5EcXLoCsJN4UeWtoW8JeFW+q7XCm8AgAACvWCAAhHfAIAUlqOAgAAH/1CAABuXgIAGArGwgAAO9ACAAAEDcA== Date: Fri, 10 Mar 2023 10:17:39 +0000 Message-ID: References: <17443983D6ED8995.20300@groups.io> <20230221084854.ckcwtl4tt3onq623@sirius.home.kraxel.org> <20230306111315.pmglh65rd42llsue@sirius.home.kraxel.org> <20230306132037.seboq5tdsouqgrs4@sirius.home.kraxel.org> <20230310100120.bfl3wz6qpwh2i5nm@sirius.home.kraxel.org> In-Reply-To: <20230310100120.bfl3wz6qpwh2i5nm@sirius.home.kraxel.org> Accept-Language: zh-CN, 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-traffictypediagnostic: MN0PR11MB6158:EE_|DS7PR11MB6101:EE_ x-ms-office365-filtering-correlation-id: 5c3043b3-ddab-48f4-1b11-08db2150ad81 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MLPiFTCkPELzrlNssqe8neUsHHZfpq5lFCoRgUtlyHwBS91T2YG485t38U5MGYUwbcfsmnTt9To9y6NF39kFSBoDqmCM5fKagO9ha7XJ3mncc6fzFEFzswFix7beMbQ/tk0YI/F/QfX9a0yiB2puljQBDJpH1UUPxi0a0FAGcYviPduBVXY65R7j5X2Eb7ZjBMgeeBGSj2ibs/zWNIxER9wOXXy3rbzrZNMmIca2+LT8NN+0sy0KUT2zApsEhoLNncW2bba8dmkjV7LKVhWgHYx0yKSxe7siyIRV2piVE6570fXtgFWqy6bjk/me9Akm8dl+dJyRg2RnK1fqMVFL4xOd+8cJHTD9U+GNb8anDm9XIMJAxoPTYiyy0rL9hA01SZZr/vilZdeYOE087Y1WarspY7yEfqpwUEDRWvP8zYH2GH7306irg5L52KOsQG/2wGfJwLPoPMOMG3I7XFk+FnmTjQCyQkW93ZZ7rjc9LuBpXOXdtrbd/VSRq2B4cm3Eq0+cE0DSHDjF+svbqWS4965r2GANtVEwtBJOpLw8+jS8Izag+rmJtvnA4daPHbXN+uYVrxYnlIEBruv0AXfZQxo0IdtupGUCUsFOkva9x+9BhxoT+LHhnM4aAH8EBRUOOW9h0Zq3aDet93N7LFSm1b7MuceanBsLx0JQsJF9tZa7jD68bhTZobBeBLRObaKSgPLtkkGEhqM9ei6xy5TDg8yoF4hAV+wLTdNqc3X85xQ= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR11MB6158.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(396003)(366004)(376002)(136003)(39860400002)(346002)(451199018)(52536014)(8936002)(5660300002)(26005)(8676002)(33656002)(6506007)(9686003)(41300700001)(53546011)(38100700002)(122000001)(107886003)(82960400001)(83380400001)(186003)(76116006)(55016003)(86362001)(54906003)(316002)(66556008)(66446008)(4326008)(6916009)(64756008)(66476007)(7696005)(71200400001)(478600001)(38070700005)(66946007)(2906002)(21314003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?m5MKA0YoZTLjCF+EBeQkmL2KVS2MNk2GSn3GZI+3F4YnSg5HcxWsDXZVuGt9?= =?us-ascii?Q?IZGaV2wPbn17jhaUhJ6QLBTKWud7vqhXbrRYpaKp6iTqu2MFBAozgLXsz754?= =?us-ascii?Q?gjyGrKBqngDiuZXE844K3wFUM27RfSV5xbD/BVTFODhVPWeu7/TLa3FqeReA?= =?us-ascii?Q?jnf4rorBWMOf8S4CHjkmISf/T2RPDbfpdnX7Wt0I+PBJwd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LQmwvo+oklB8KBXR6xEvCW9Liw1HE1mFeYTlAqUlcWeQuQFvdI67CWo?= =?us-ascii?Q?TUulR40hFDoYh59LLu+LfvkhxLyFsAoHLfVTBV2SMwY05gV5b5erSTZEMhd9?= =?us-ascii?Q?dtx8G5I2nJ8iq9qAl/lzpAuIiDzTQN5vP6z7jChMTvBvNZXioBhwgebmh7U5?= =?us-ascii?Q?lkyBwdVA7IR2l6aromGpVC0f58jmbUqetjGZF+Xq5BMkufySSyOr8IJv/S11?= =?us-ascii?Q?6Ti+eBGoyfseHRBeiEynu3eclVHb2Gpb+v0MrYC0+D73KmmZZAa/UTnF7OYV?= =?us-ascii?Q?s4Z+1uhBS/2/uUlLyUociXQ8GTfu9N6kyWlA+4yy0WL2HwfsZU51rC8+bY7E?= =?us-ascii?Q?g1cUhEx609gWvHysxBQC8d57WjvyJTvtXmzYS8CSeHG+ccJ5lHxkClw1v0jy?= =?us-ascii?Q?tvIwvP5+TjbSDemK+x+1KqRxTpJJBjm7AuYVIfRzrPRc78Z5p6jW38aR19Aw?= =?us-ascii?Q?h0btRtv2fCcXtjYD983eXwd79SOtIPwpYriYdi7/?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN0PR11MB6158.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c3043b3-ddab-48f4-1b11-08db2150ad81 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Mar 2023 10:17:39.4608 (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: yVEF23DZZMA1cKRNSZIWVCZ/wQDWEocihNe24QsdYJ1gVvoRlvNDkf9VNUkKKzgYSjVs54PM2eUOAT3CWioIag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB6101 Return-Path: jiaxin.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I will have a try with the command.=20 For BIOS shell trigger S3, it just needs a simple application to provide th= e ACPI FACS waking vector, then write the power management control address = at offset 4.=20 Another way is that shell MM command can achieve the trigger action, for ex= ample like: mm -io (xxx+4) 0x3400 -w 4, but I suppose the system will crash= since there is no waking vector. Thanks, Jiaxin > -----Original Message----- > From: kraxel@redhat.com > Sent: Friday, March 10, 2023 6:01 PM > To: Wu, Jiaxin > Cc: devel@edk2.groups.io; Ni, Ray ; Dong, Eric > ; Zeng, Star ; Laszlo Ersek > ; Kumar, Rahul R > Subject: Re: [edk2-devel] [PATCH v9 0/6] Simplify SMM Relocation Process >=20 > On Fri, Mar 10, 2023 at 09:19:04AM +0000, Wu, Jiaxin wrote: > > Is this regression? I remember I tried the S3 on real silicon with the = patch > change, don't see the issue in normal boot work flow. The only difference= what > I did is to trigger S3 in the BIOS shell, but it does covered the SmmRest= oreCpu > test. > > > > Now, I'm trying to reproduce the issue on ovmf, and build the OVMF boot= on > windows qemu, but I saw below error during boot: > > SecCoreStartupWithStack(0xFFFCC000, 0x820000) > > ASSERT [SecMain] > c:\dev\code\edk2\MdePkg\Library\BasePcdLibNull\PcdLib.c(95): > ((BOOLEAN)(0=3D=3D1)) > > > > Build command is: > > build -p OvmfPkg\OvmfPkgIa32X64.dsc -a X64 -D SMM_REQUIRE -D > DEBUG_ON_SERIAL_PORT -D SOURCE_DEBUG_ENABLE > > > > Run qemu command is: > > qemu-system-x86_64 -bios > C:\Dev\Code\edk2\Build\Ovmf3264\DEBUG_VS2015x86\FV\OVMF.fd -hda > fat:rw:hda-contents -serial file:log001.log -net none >=20 > Mine is this: >=20 > qemu-system-x86_64 -enable-kvm -machine q35,smm=3Don -m 4G -net none \ > -drive > if=3Dpflash,format=3Draw,file=3DBuild/Ovmf3264/DEBUG_GCC5/FV/OVMF_CODE.fd= ,r > eadonly=3Don \ > -drive > if=3Dpflash,format=3Draw,file=3DBuild/Ovmf3264/DEBUG_GCC5/FV/OVMF_VARS.fd= ,s > napshot=3Don \ > -chardev vc,id=3Dfw.log -device isa- > debugcon,iobase=3D0x402,chardev=3Dfw.log \ > -cdrom /vmdisk/iso/Fedora-Workstation-Live-x86_64-37-1.7.iso \ > -device virtio-tablet-pci \ > -display gtk,show-tabs=3Don >=20 > > Anything need to be care to build OvmfPkgIa32X64? >=20 > It must be started with the correct flash configuration, see above. > The SMM-enabled builds also require the q35 machine type. >=20 > I have both SMM_REQUIRE and SECURE_BOOT enabled, that probably doesn't > make a difference though. I'm using the isa-debugcon instead of the > serial port to get the debug log, that should not matter either. >=20 > > BTW, how can I boot linux guest in windows qemu? >=20 > Just grab some live iso. The fedora image used above is available from > getfedora.org, but any live image should work. >=20 > How do you trigger suspend from efi shell? There seems to be no > builtin command for that. >=20 > take care, > Gerd