From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web08.5263.1665060420127205755 for ; Thu, 06 Oct 2022 05:47:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YLBTgKEe; spf=pass (domain: kernel.org, ip: 145.40.68.75, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0F5DEB82088 for ; Thu, 6 Oct 2022 12:46:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2533C433D7 for ; Thu, 6 Oct 2022 12:46:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665060416; bh=JWaFNgdX5HIP1sau5/6xEdkp/FoeiYtwzhoI6s5fusI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=YLBTgKEe2V8m5uBW5xR9LlCxSJxqTXfGDKt+r/lJbr1iUgRLzByPGX13Ztzv++WKJ Oqx2in9f3vNF2ICjJrx8mIlV7wDgc9hB86xxEhkS6zwV9UGh9BV0+s2UJIu8w/NeR1 yZRplIh4cOM7FqQY7rEJPuKdNgFnmnVquZ+uzAYpTl72Uorae1th2Cx4sTLsINcbuQ giEW6PBEh2fcq1A7vWWl2nqABCEjZqsiCuAzSEiz2oEaX72bg7jnjQQTMa1LUwG+MT M31VnRRJHx6gH90wYuDKQNtU4bmqOOqkA/L5MRVYQjA1bB9Lmy95W/JVLbiX9Zk6x7 mXrbWCrkOZ17A== Received: by mail-lf1-f51.google.com with SMTP id b2so2527171lfp.6 for ; Thu, 06 Oct 2022 05:46:56 -0700 (PDT) X-Gm-Message-State: ACrzQf2XAku81DA6VqnaU4/+95fMz2mIay8OeGW/HcXIGh6KnW1gEdti FlUniIZ3iLr9iFLfq7fYKr69YKithOiE0SGSm0c= X-Google-Smtp-Source: AMsMyM6YZ1S46pKpz9D9ZiA7ay3t2hPrhbuRcawx2JCfxMw64CLKovGllLD/KSW2JR2cd/aAcCkJ9FifrXBggSbDMyk= X-Received: by 2002:a19:c20b:0:b0:4a2:40e5:78b1 with SMTP id l11-20020a19c20b000000b004a240e578b1mr1750930lfc.228.1665060414871; Thu, 06 Oct 2022 05:46:54 -0700 (PDT) MIME-Version: 1.0 References: <20221005203329.469866-1-dionnaglaze@google.com> <20221005203329.469866-4-dionnaglaze@google.com> In-Reply-To: <20221005203329.469866-4-dionnaglaze@google.com> From: "Ard Biesheuvel" Date: Thu, 6 Oct 2022 14:46:43 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 3/7] MdeModulePkg: Notify BeforeExitBootServices in CoreExitBootServices To: Dionna Glaze , "Liming Gao (Byosoft address)" , Michael Kinney Cc: devel@edk2.groups.io, Gerd Hoffmann , James Bottomley , Jiewen Yao , Tom Lendacky , "Min M. Xu" , Andrew Fish , Ray Ni Content-Type: text/plain; charset="UTF-8" (cc Liming & Mike) On Wed, 5 Oct 2022 at 22:33, Dionna Glaze wrote: > > Location of notification is has been specified in UEFI v2.9. > > Cc: Gerd Hoffmann > Cc: James Bottomley > Cc: Jiewen Yao > Cc: Tom Lendacky > Cc: Ard Biesheuvel > Cc: "Min M. Xu" > Cc: Andrew Fish > Cc: "Michael D. Kinney" > Cc: Ray Ni > > Signed-off-by: Dionna Glaze Reviewed-by: Ard Biesheuvel > --- > MdeModulePkg/Core/Dxe/DxeMain.inf | 1 + > MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 6 ++++++ > 2 files changed, 7 insertions(+) > > diff --git a/MdeModulePkg/Core/Dxe/DxeMain.inf b/MdeModulePkg/Core/Dxe/DxeMain.inf > index e4bca89577..35d5bf0dee 100644 > --- a/MdeModulePkg/Core/Dxe/DxeMain.inf > +++ b/MdeModulePkg/Core/Dxe/DxeMain.inf > @@ -100,6 +100,7 @@ > gEfiEventVirtualAddressChangeGuid ## CONSUMES ## Event > ## CONSUMES ## Event > ## PRODUCES ## Event > + gEfiEventBeforeExitBootServicesGuid > gEfiEventExitBootServicesGuid > gEfiHobMemoryAllocModuleGuid ## SOMETIMES_CONSUMES ## HOB > gEfiFirmwareFileSystem2Guid ## CONSUMES ## GUID # Used to compare with FV's file system guid and get the FV's file system format > diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c > index 5733f0c8ec..4683016ed7 100644 > --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c > +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c > @@ -763,6 +763,12 @@ CoreExitBootServices ( > { > EFI_STATUS Status; > > + // > + // Notify other drivers of their last chance to use boot services > + // before the memory map is terminated. > + // > + CoreNotifySignalList (&gEfiEventBeforeExitBootServicesGuid); > + > // > // Disable Timer > // > -- > 2.38.0.rc1.362.ged0d419d3c-goog >