From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) by mx.groups.io with SMTP id smtpd.web10.2770.1667942172863703658 for ; Tue, 08 Nov 2022 13:16:12 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@google.com header.s=20210112 header.b=m/SCL7wc; spf=pass (domain: flex--dionnaglaze.bounces.google.com, ip: 209.85.216.74, mailfrom: 3hmdqywskbxcydjiivbgvuzbjjbgz.xjhyzqzgzyfx.bmjpkn.dj@flex--dionnaglaze.bounces.google.com) Received: by mail-pj1-f74.google.com with SMTP id b1-20020a17090a10c100b0020da29fa5e5so12740pje.2 for ; Tue, 08 Nov 2022 13:16:12 -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=m/SCL7wcLSPRyZ9/OeOT6KoWBGEh1abuzXbU9+O/WzEhW/X4McQJepFEkmcdVRrvO6 ZPtPwULL9/XZAcDFGEgH8IJHK/OBZo0XACb2waSj8OIqnCgg6IEzKFzKy92biBXLGAD5 qf9HTOM7gKpi7dClWGM7CfnN29XZ02vhJztYITlkodH6lzhETbW7FaDZS1AOfHPqRlhA oY+9nnwZLFlNCbUdudXEotykTAADWnPEWGNRhweiMGgXP5kmbzD/XwvQ/D7PDmE/H7Ew YOZsPCDlamw/+yQmhkTGOoOkLt1g+I2l3HD1Tk3GeXHwfO4nmsZ9HZOEKgil0i3pEuyZ MtGA== 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=FaMrzJN/eUFEUK6t3NMGwcmNWXIT8mmZF92UL+nrDsLqpBEo1e2VSg1Nr/keIJTImj WgpctOB8Lu6i1gx+l/fy+eWvcNhqbiMK19kMbimR87P4SewqykPy55mZFl5owq/XEoG1 Ha5RI1b8OaiLVzzfPa5P9NsfEuRbcbguQUkFLCV9SoUiWPBd2gV5APBNaHIoNtaxX++w NibmY5SH3g0/xdgxlDrLIFYBVtSIEoL2lZtlvdOsa/KdYMs8Z8ky2a5jr59tPK0BjpUo /IqyFWGIoE28qIW8Y9kz+tCbzDSJyJXQeGcg7vgo/MQnAGuiiX+sBIvaSN5/zjX4dUQi DF4Q== X-Gm-Message-State: ACrzQf2mZvE2CeRf35X22Ckj08WAf6KucL9nU/8GKXwKYNfiePMv1K18 kxyuY/Ks6WNakMqtCMhd2pOq/STXRT++zptqVmUt1e8zWhoZjfyjdKUyQwE9quVE9sdXlGKnMFh FGE9ifmzHWfwXsPEzcbhml2ChI/47r4nn2z4zKZHyXCXOoBE3DJuviNXC4OdDeRpt/6ML9wG8 X-Google-Smtp-Source: AMsMyM52b43j0lsJZTaTz7SNH6ttj2WF/idc81ohFeTzGOi9KSuBRmOzfrY1+ZSkoPLYz0Dg+O0QKxrViA5+d8C51A== X-Received: from dionnaglaze.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:2ee6]) (user=dionnaglaze job=sendgmr) by 2002:a05:6a00:1d25:b0:56b:add7:fe2f with SMTP id a37-20020a056a001d2500b0056badd7fe2fmr1063063pfx.51.1667942172214; Tue, 08 Nov 2022 13:16:12 -0800 (PST) Date: Tue, 8 Nov 2022 21:15:56 +0000 In-Reply-To: <20221108211557.3306520-1-dionnaglaze@google.com> Mime-Version: 1.0 References: <20221108211557.3306520-1-dionnaglaze@google.com> X-Mailer: git-send-email 2.38.1.431.g37b22c650d-goog Message-ID: <20221108211557.3306520-4-dionnaglaze@google.com> Subject: [PATCH v2 3/4] 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