From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7B9F3208F6129 for ; Tue, 19 Feb 2019 05:25:24 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Feb 2019 05:25:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,388,1544515200"; d="scan'208";a="119082485" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga008.jf.intel.com with ESMTP; 19 Feb 2019 05:25:23 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 19 Feb 2019 05:25:23 -0800 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 19 Feb 2019 05:25:22 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.102]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.232]) with mapi id 14.03.0415.000; Tue, 19 Feb 2019 21:25:21 +0800 From: "Gao, Liming" To: "Ni, Ray" , "Justen, Jordan L" , "edk2-devel@lists.01.org" CC: "Wu, Hao A" , Anthony Perard , Laszlo Ersek , "Zeng, Star" Thread-Topic: [PATCH 00/10] Fix PEI Core issue during TemporaryRamMigration Thread-Index: AQHUx/1jcHtSAGBEeEqSe2b3wJJsu6XnGs2Q Date: Tue, 19 Feb 2019 13:25:20 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3E1923@SHSMSX104.ccr.corp.intel.com> References: <20190218041141.21363-1-jordan.l.justen@intel.com> <734D49CCEBEEF84792F5B80ED585239D5C023766@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5C023766@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTVhMTI3OWMtMDg2OC00ZDlhLWIxODktMjVmYzc0ZGFiN2E4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMERNV1A4OHc0RUlDVXNNbmlONUFHZkE1RTV1N2RcL1l1cUZPNWRiKzdoT1FJTFVvcmJcL1dQWnNNVXpjaTNSc2M3In0= dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 00/10] Fix PEI Core issue during TemporaryRamMigration X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2019 13:25:24 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ray: In PI spec, TEMPORARY_RAM_SUPPORT_PPI is described as an optional PPI that= is only required for platforms that may have side effects when both Tempor= ary RAM and Permanent RAM are enabled. If a platform does not have any side= effects when both Temporary RAM and Permanent RAM are enabled, and the pla= tform is required to disable the use of Temporary RAM, then EFI_PEI_TEMPORA= RY_RAM_DONE should be produced. If a platform does not have any side effect= s when both Temporary RAM and Permanent RAM are enabled, and the platform i= s not required to disable the use of Temporary RAM, then neither EFI_PEI_TE= MPORARY_RAM_DONE nor EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI should be produced. Now, real platform has no side effect. So, only TempRamDone PPI is prod= uced. For emulator platform, is there any side effect when both Temporary R= AM and Permanent RAM are enabled?=20 Thanks Liming > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ni= , Ray > Sent: Tuesday, February 19, 2019 10:46 AM > To: Justen, Jordan L ; edk2-devel@lists.01.org > Cc: Wu, Hao A ; Anthony Perard ; Laszlo Ersek ; Zeng, Star > > Subject: Re: [edk2] [PATCH 00/10] Fix PEI Core issue during TemporaryRamM= igration >=20 > Jordan, > I find many real platforms do not implement the temporary ram migration > PPI and rely on the PeiCore migration logic. > So perhaps TemporaryRamMigration PPI was added to help platform to > destroy the temporary RAM (CAR in x86 platform). > But with the introduction of TemporaryRamDone PPI, maybe the > TemporaryRamMigration PPI can be retired. > The logic in PeiCore to call TemporaryRamMigration is just for backward > compatibility. > If that's true, do you still need to enhance PeiCore? >=20 > For the Emulator case, I already found without TemporaryRamMigration > the platform can still boot. >=20 > Does OVMF hard-depend on TemporaryRamMigration? Or it can reply on > the PeiCore migration logic + TemporaryDone PPI? >=20 > Thanks, > Ray >=20 > > -----Original Message----- > > From: Justen, Jordan L > > Sent: Monday, February 18, 2019 12:12 PM > > To: edk2-devel@lists.01.org > > Cc: Justen, Jordan L ; Liu Yu > > ; Andrew Fish ; Anthony > > Perard ; Ard Biesheuvel > > ; Wu, Hao A ; Wang, Jian > > J ; Julien Grall ; Lasz= lo Ersek > > ; Ni, Ray ; Zeng, Star > > > > Subject: [PATCH 00/10] Fix PEI Core issue during TemporaryRamMigration > > > > https://github.com/jljusten/edk2.git temp-ram-support > > > > This series fixes an issue that, while rare, is possible based on the w= ay the > > TemporaryRamSupport PPI is defined along with how it is used by the PEI > > Core. > > > > Liu Yu reported a boot issue with EmulatorPkg, which I believe was caus= ed by > > this issue. > > > > The details of the issue are described in the commit message of the > > "MdeModePkg/Core/Pei: Add code path to allow assembly temp-ram > > migration" patch. > > > > Along with this, I added a few Temporary RAM patches for EmulatorPkg an= d > > OvmfPkg. > > > > Cc: Liu Yu > > Cc: Andrew Fish > > Cc: Anthony Perard > > Cc: Ard Biesheuvel > > Cc: Hao Wu > > Cc: Jian J Wang > > Cc: Julien Grall > > Cc: Laszlo Ersek > > Cc: Ray Ni > > Cc: Star Zeng > > > > Jordan Justen (10): > > EmulatorPkg/build.sh: Fix missing usage of -b BUILDTARGET parameter > > EmulatorPkg/Unix/Host: Use PcdInitValueInTempStack to init temp-ram > > EmulatorPkg/Sec: Replace assembly temp-ram support with C code > > EmulatorPkg/Sec: Disable optimizations for TemporaryRamMigration > > function > > OvmfPkg/Sec: Swap TemporaryRam Stack and Heap locations > > OvmfPkg/Sec: Disable optimizations for TemporaryRamMigration > > MdeModePkg/Core/Pei: Add code path to allow assembly temp-ram > > migration > > MdeModulePkg/Core/Pei: Use assembly for X64 TemporaryRamMigration > > MdeModulePkg/Core/Pei: Use assembly for IA32 TemporaryRamMigration > > OvmfPkg/Sec: Fill Temp Ram after TemporaryRamMigration > > > > EmulatorPkg/Sec/Ia32/SwitchRam.S | 95 ------------------- > > EmulatorPkg/Sec/Ia32/SwitchRam.asm | 94 ------------------ > > EmulatorPkg/Sec/Ia32/TempRam.c | 65 ------------- > > EmulatorPkg/Sec/Sec.c | 76 ++++++++++++++- > > EmulatorPkg/Sec/Sec.inf | 13 +-- > > EmulatorPkg/Sec/X64/SwitchRam.S | 72 -------------- > > EmulatorPkg/Sec/X64/SwitchRam.asm | 76 --------------- > > EmulatorPkg/Unix/Host/Host.c | 2 +- > > EmulatorPkg/Unix/Host/Host.inf | 1 + > > EmulatorPkg/build.sh | 10 +- > > MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 59 ++++++++---- > > .../Dispatcher/Ia32/TemporaryRamMigration.S | 72 ++++++++++++++ > > .../Ia32/TemporaryRamMigration.nasm | 78 +++++++++++++++ > > .../Pei/Dispatcher/TemporaryRamMigration.c | 52 ++++++++++ > > .../Dispatcher/X64/TemporaryRamMigration.S | 69 ++++++++++++++ > > .../Dispatcher/X64/TemporaryRamMigration.nasm | 75 +++++++++++++++ > > MdeModulePkg/Core/Pei/PeiMain.h | 52 ++++++++++ > > MdeModulePkg/Core/Pei/PeiMain.inf | 14 +++ > > OvmfPkg/Sec/Ia32/SecEntry.nasm | 2 +- > > OvmfPkg/Sec/SecMain.c | 59 ++++++++---- > > OvmfPkg/Sec/X64/SecEntry.nasm | 2 +- > > 21 files changed, 577 insertions(+), 461 deletions(-) delete mode 100= 644 > > EmulatorPkg/Sec/Ia32/SwitchRam.S delete mode 100644 > > EmulatorPkg/Sec/Ia32/SwitchRam.asm > > delete mode 100644 EmulatorPkg/Sec/Ia32/TempRam.c delete mode > > 100644 EmulatorPkg/Sec/X64/SwitchRam.S delete mode 100644 > > EmulatorPkg/Sec/X64/SwitchRam.asm create mode 100644 > > MdeModulePkg/Core/Pei/Dispatcher/Ia32/TemporaryRamMigration.S > > create mode 100644 > > MdeModulePkg/Core/Pei/Dispatcher/Ia32/TemporaryRamMigration.nasm > > create mode 100644 > > MdeModulePkg/Core/Pei/Dispatcher/TemporaryRamMigration.c > > create mode 100644 > > MdeModulePkg/Core/Pei/Dispatcher/X64/TemporaryRamMigration.S > > create mode 100644 > > MdeModulePkg/Core/Pei/Dispatcher/X64/TemporaryRamMigration.nasm > > > > -- > > 2.20.0.rc1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel