From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) by mx.groups.io with SMTP id smtpd.web11.226.1667925987308740399 for ; Tue, 08 Nov 2022 08:46:27 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@google.com header.s=20210112 header.b=DtkrxRBe; spf=pass (domain: flex--dionnaglaze.bounces.google.com, ip: 209.85.210.201, mailfrom: 34odqywskbb0glrqqdjod2hjrrjoh.frpghyhohgn5.jurxsv.lr@flex--dionnaglaze.bounces.google.com) Received: by mail-pf1-f201.google.com with SMTP id k131-20020a628489000000b0056b3e1a9629so7431902pfd.8 for ; Tue, 08 Nov 2022 08:46:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=tF9w9kbsc94MsZNIjfTb/79TvATct+1pSOEdHBSUqaY=; b=DtkrxRBeM0ifIb6T8XTKDzQKoxmO2PngJjWfe0Hqfr3HUqtM6wcTbf3oNHY7iaANJY qMgoQuSbV1FLsTdxmlqPp38CGU89XHk7Qi9ExV2Dvtp6LByg7jH+IDOWqtX4NVbdy+8X /i6QTDuyNohJbbzJgyP10jJBu6vmhd1ZtIBlR7O3TwA258lpKO0bCep/Ozi5QXP5MOv1 9FwcNQMJV9RZQ/wfNjq/+ULVc5qAJzkEfv3toIJseYb83YkBYP22vqaMRP6UmjOXoJwa 4/cOV3xl0cqI879fsITI55K3loo/4fugnWKf0TYSlwd0ZbktDp1cTpIvYBF4kveJjyr9 HkuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tF9w9kbsc94MsZNIjfTb/79TvATct+1pSOEdHBSUqaY=; b=3LmgbbTsrWrlsePXx7GP0EuHMiRg8JjNb70JdilrERUESYzIAWu/m4qrTxvfbi7wUR OdJ3FKozER6BaPCAx/NrGIvf49R0cHjLVj9Aqw7u1G1yM4rX2Ve0p2WuiFd2vcEoTga3 RYTVgqLcdi+1PqFJ1/waXVL7X1ALC7y2qi7rm2ZLxAPFTK+vSAZSWrQBelIGpeJwvHWc flC6lfDl2XcUM/olktnL122pLTEM9XXvXikzff2xoYZ8qni976rLaNal4axMxLXnYjcq sKcs24T8OLADYeZuMKW8HEhxQS9zV01zx2TdKFWdWl4gAEV2HqXcve0YrblGsK6s68re j6gw== X-Gm-Message-State: ACrzQf2fKmWa+k3c7+GuggebEENkDStXxBzzPF2Z+9gwd3vfpPw6sr7i ZDgm2ykz5Eox4QNn7cbDUKCw/4FGt03u0SlRHLflPI6G7Ez2+IJIlARAWXJAQSGBdrlAX4yCw7U g5OUi2LJ7FADkNZ5RX8S4vlq1FHAfnnBDh5WYVz2dmZu3F49ZtxLDIvOKGPWxrcUVQntCtCiC X-Google-Smtp-Source: AMsMyM56I+3qUmoDYKfT/8qQ965flH3E3hxAieUJdIkNB168f8uP8dgt+TvUSRWoZ1wCiEwmu8rWleqbhA1upEcfxQ== X-Received: from dionnaglaze.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:2ee6]) (user=dionnaglaze job=sendgmr) by 2002:aa7:9e85:0:b0:56c:683b:d31f with SMTP id p5-20020aa79e85000000b0056c683bd31fmr56942328pfq.48.1667925986691; Tue, 08 Nov 2022 08:46:26 -0800 (PST) Date: Tue, 8 Nov 2022 16:46:16 +0000 In-Reply-To: <20221108164616.3251967-1-dionnaglaze@google.com> Mime-Version: 1.0 References: <20221108164616.3251967-1-dionnaglaze@google.com> X-Mailer: git-send-email 2.38.1.431.g37b22c650d-goog Message-ID: <20221108164616.3251967-4-dionnaglaze@google.com> Subject: [PATCH 3/3] MdeModulePkg: Notify BeforeExitBootServices in CoreExitBootServices From: "Dionna Glaze" To: devel@edk2.groups.io Cc: Dionna Glaze , Gerd Hoffmann , James Bottomley , Jiewen Yao , Tom Lendacky , Ard Biesheuvel , "Min M. Xu" , Andrew Fish , "Michael D. Kinney" , Ray Ni , Jiewen Yao Content-Type: text/plain; charset="UTF-8" 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 Acked-by: Jiewen Yao Signed-off-by: Dionna Glaze --- 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.1.431.g37b22c650d-goog