From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id D50F9D800EA for ; Mon, 20 May 2024 07:43:56 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=ysKJCGuU0FnQy3owaT2e6wiS/owZFbR2flM3FHFNsdI=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240206; t=1716191035; v=1; b=33JaduS9tDFW6r9TJ1t0rvj6qO+LFJLRoTSL8q99kZZoAAOymjgGIjgaqch1aTPBgs6Szqmu L3KDC6j2h8qXs8H2n2+sfNJtk24vHxorCfj8v5jVpnMXRHUUowMRyM4x9R9Xbjw/O+CnxHXK8lz m6c8l0b0IZqIgMBmYs1WFB4lNeWFPrqefuL02WpvX7bQtnDCWNWzyZfg6AmT5oldGOJaPlKt2qs jrgRj7M2CTANCnCxBqg/S9OdVTRdOlY1Q+yc5iWoBcKN5KeS3Ei/u5poVkVkXSK0ZR2HpwDAYkG NKiSeB5dJUiB7H1Io8GX8/bcUPh9tzC5ImoGe2FbCqwWQ== X-Received: by 127.0.0.2 with SMTP id qLKZYY7687511x5prGm9puBa; Mon, 20 May 2024 00:43:55 -0700 X-Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by mx.groups.io with SMTP id smtpd.web11.55732.1716191033927852007 for ; Mon, 20 May 2024 00:43:54 -0700 X-Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 0942CCE09CD for ; Mon, 20 May 2024 07:43:51 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C6E9C2BD10 for ; Mon, 20 May 2024 07:43:50 +0000 (UTC) X-Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-5238b7d0494so3211392e87.3 for ; Mon, 20 May 2024 00:43:50 -0700 (PDT) X-Gm-Message-State: slOE8MRWGU3AwehcGoNUh4Hjx7686176AA= X-Google-Smtp-Source: AGHT+IGg0IEpJBDSv2BznU7+p6kWy0GE6vfhigonTw5TkoZjtCVkzMhseWWWn69fF60xz8kJPWGNqyPBFlABqazRZbk= X-Received: by 2002:a05:6512:3b8c:b0:523:2984:7a04 with SMTP id 2adb3069b0e04-52329847d08mr23111557e87.36.1716191028493; Mon, 20 May 2024 00:43:48 -0700 (PDT) MIME-Version: 1.0 References: <20240510100827.1903-1-dun.tan@intel.com> <20240510100827.1903-3-dun.tan@intel.com> In-Reply-To: <20240510100827.1903-3-dun.tan@intel.com> From: "Ard Biesheuvel" Date: Mon, 20 May 2024 09:43:37 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH 02/18] OvmfPkg: Save MTRR by lockbox in CpuS3DataDxe To: Dun Tan Cc: devel@edk2.groups.io, Jiewen Yao , Gerd Hoffmann , Ray Ni , Jiaxin Wu Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Mon, 20 May 2024 00:43:54 -0700 Resent-From: ardb@kernel.org Reply-To: devel@edk2.groups.io,ardb@kernel.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=33JaduS9; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) On Fri, 10 May 2024 at 12:08, Dun Tan wrote: > > Save MTRR by lockbox in CpuS3DataDxe. In S3 boot, > The MTRR setting will be restored in S3Resume.c > in following patches. Then S3Resume.c will wakeup > all APs to load the MTRR setting. This can avoid > waking up APs in CpuS3.c. > > Signed-off-by: Dun Tan > Cc: Ard Biesheuvel > Cc: Jiewen Yao > Cc: Gerd Hoffmann > Cc: Ray Ni > Cc: Jiaxin Wu Reviewed-by: Ard Biesheuvel > --- > OvmfPkg/CpuS3DataDxe/CpuS3Data.c | 11 +++++++++++ > OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf | 2 ++ > 2 files changed, 13 insertions(+) > > diff --git a/OvmfPkg/CpuS3DataDxe/CpuS3Data.c b/OvmfPkg/CpuS3DataDxe/CpuS3Data.c > index 289048b75d..d1aba32842 100644 > --- a/OvmfPkg/CpuS3DataDxe/CpuS3Data.c > +++ b/OvmfPkg/CpuS3DataDxe/CpuS3Data.c > @@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #include > #include > #include > +#include > > #include > #include > @@ -130,6 +131,16 @@ CpuS3DataOnEndOfDxe ( > DEBUG ((DEBUG_VERBOSE, "%a\n", __func__)); > MtrrGetAllMtrrs (&AcpiCpuDataEx->MtrrTable); > > + // > + // Save MTRR in lockbox > + // > + Status = SaveLockBox ( > + &gEdkiiS3MtrrSettingGuid, > + &AcpiCpuDataEx->MtrrTable, > + sizeof (MTRR_SETTINGS) > + ); > + ASSERT_EFI_ERROR (Status); > + > // > // Close event, so it will not be invoked again. > // > diff --git a/OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf b/OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf > index 228d5ae1b2..f5032a9222 100644 > --- a/OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf > +++ b/OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf > @@ -46,9 +46,11 @@ > MtrrLib > UefiBootServicesTableLib > UefiDriverEntryPoint > + LockBoxLib > > [Guids] > gEfiEndOfDxeEventGroupGuid ## CONSUMES ## Event > + gEdkiiS3MtrrSettingGuid > > [Protocols] > gEfiMpServiceProtocolGuid ## CONSUMES > -- > 2.31.1.windows.1 > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119077): https://edk2.groups.io/g/devel/message/119077 Mute This Topic: https://groups.io/mt/106018122/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-