From nobody Wed Feb 11 04:00:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94768+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94768+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1665002029; cv=none; d=zohomail.com; s=zohoarc; b=Ihxw2fbODt1mzpobsuZwswpV7lDQdZyIsspqMIC/pZ2j1R+LXCpy9S0vGGTyF+sz2nculRCQsHByE7Z+EzqvkzF2x22ymS2+Nt7VabOdXXcLp9Es9dS1zW3BkPbExRzsNQv92OSsmpiZWfhkimNCoCJ/gpuoJKnx8sTtN4+ZCrI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665002029; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=6q/MdEVc62W7Y0IknDWOrl5AiO10jXH1GQisKz9msgY=; b=ZNwlKcT5zOjGJeSbOoEFnoLB+Y0WZJ9DHj1V4jsKmGyZFxKaEt7ZZgJcYBfFgJ6H2g188hPZHD4zATBkprjUW/mvBFAFSWQMw1IRyQHMJyWWOF5gSNe3iP813VDAfuzD5+bdhiEWbIJUeFCmY5XuA54cL8mJDq7luF5T6a4G8yc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94768+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665002029659653.873994987692; Wed, 5 Oct 2022 13:33:49 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id pUMcYY1788612xWYV1sk6556; Wed, 05 Oct 2022 13:33:49 -0700 X-Received: from mail-oa1-f73.google.com (mail-oa1-f73.google.com [209.85.160.73]) by mx.groups.io with SMTP id smtpd.web12.443.1665002028695765467 for ; Wed, 05 Oct 2022 13:33:48 -0700 X-Received: by mail-oa1-f73.google.com with SMTP id 586e51a60fabf-132693a4072so5999221fac.4 for ; Wed, 05 Oct 2022 13:33:48 -0700 (PDT) X-Gm-Message-State: XFhNuFdkxmnnsICgXP2nk1ifx1787277AA= X-Google-Smtp-Source: AMsMyM7PvxRynJgqJ2M+zOa0pkVj0E3Vo1N37vo+RB7LL6H/xEEedpyLmr8f215ZYYKYADpPDwqxSIQB8A5i5Uzt5A== X-Received: from dionnaglaze.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:2ee6]) (user=dionnaglaze job=sendgmr) by 2002:a05:6870:34d:b0:127:cb87:a169 with SMTP id n13-20020a056870034d00b00127cb87a169mr713168oaf.87.1665002027978; Wed, 05 Oct 2022 13:33:47 -0700 (PDT) Date: Wed, 5 Oct 2022 20:33:27 +0000 In-Reply-To: <20221005203329.469866-1-dionnaglaze@google.com> Mime-Version: 1.0 References: <20221005203329.469866-1-dionnaglaze@google.com> Message-ID: <20221005203329.469866-6-dionnaglaze@google.com> Subject: [edk2-devel] [PATCH v7 5/7] MdePkg: Introduce the AcceptAllUnacceptedMemory protocol From: "Dionna Glaze via groups.io" 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" Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,dionnaglaze@google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665002029; bh=j6UOV08kCRp8XjEIBoxsijnAew36fhDeRUO0LzbRHB8=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=J0AbDn4orhlO87hobyNdZvb6B5FmhwVsMIzkDrA5MrmTVMk2nR/+NSZR+zOUt/Vi84E L7DZAVq2u6Fhv4LkkCKaPQBQW2OZU3ZnJ7WkX6WdP2eLIL5Tsmf9tyOPSxjGpPcPPd7AU rStG4x4IfInnrOmT3h+d+ZwI5j967kfl49A= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665002031763100021 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The default behavior for unaccepted memory is to accept all memory when ExitBootServices is called. An OS loader can use this protocol to Disable this behavior to assume responsibility for memory acceptance and to affirm that the OS can handle the unaccepted memory type. This is a candidate for standardization. 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" Signed-off-by: Dionna Glaze --- MdePkg/Include/Protocol/Bz3987AcceptAllUnacceptedMemory.h | 40 +++++++++++= +++++++++ MdePkg/MdePkg.dec | 3 ++ 2 files changed, 43 insertions(+) diff --git a/MdePkg/Include/Protocol/Bz3987AcceptAllUnacceptedMemory.h b/Md= ePkg/Include/Protocol/Bz3987AcceptAllUnacceptedMemory.h new file mode 100644 index 0000000000..e50831836c --- /dev/null +++ b/MdePkg/Include/Protocol/Bz3987AcceptAllUnacceptedMemory.h @@ -0,0 +1,40 @@ +/** @file + The file provides the protocol that disables the behavior that all memory + gets accepted at ExitBootServices(). This protocol is only meant to be c= alled + by the OS loader, and not EDK2 itself. + + Copyright (c) 2022, Google LLC. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ +#ifndef _ACCEPT_ALL_UNACCEPTED_MEMORY_H_ +#define _ACCEPT_ALL_UNACCEPTED_MEMORY_H_ + +#define BZ3987_ACCEPT_ALL_UNACCEPTED_MEMORY_PROTOCOL_GUID \ + {0xc5a010fe, \ + 0x38a7, \ + 0x4531, \ + {0x8a, 0x4a, 0x05, 0x00, 0xd2, 0xfd, 0x16, 0x49}} + +typedef struct _BZ3987_ACCEPT_ALL_UNACCEPTED_MEMORY_PROTOCOL + BZ3987_ACCEPT_ALL_UNACCEPTED_MEMORY_PROTOCOL; + +/** + @param This A pointer to a BZ3987_ACCEPT_ALL_UNACCEPTED_MEMORY_PROTOCOL. +**/ +typedef +EFI_STATUS +(EFIAPI *BZ3987_DISABLE_ACCEPT_ALL_UNACCEPTED_MEMORY)( + IN BZ3987_ACCEPT_ALL_UNACCEPTED_MEMORY_PROTOCOL *This + ); + +/// +/// The BZ3987_ACCEPT_ALL_UNACCEPTED_MEMORY_PROTOCOL allows the OS loader = to +/// indicate to EDK2 that ExitBootServices should not accept all memory. +/// +struct _BZ3987_ACCEPT_ALL_UNACCEPTED_MEMORY_PROTOCOL { + BZ3987_DISABLE_ACCEPT_ALL_UNACCEPTED_MEMORY Disable; +}; + +extern EFI_GUID gBz3987AcceptAllUnacceptedMemoryProtocolGuid; + +#endif diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 32c3501e66..a453b67b7e 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -1022,6 +1022,9 @@ gEfiPeiDelayedDispatchPpiGuid =3D { 0x869c711d, 0x649c, 0x44fe, { 0x8b,= 0x9e, 0x2c, 0xbb, 0x29, 0x11, 0xc3, 0xe6 }} =20 [Protocols] + ## Include/Protocol/Bz3987AcceptAllUnacceptedMemory.h + gBz3987AcceptAllUnacceptedMemoryProtocolGuid =3D { 0xc5a010fe, 0x38a7, 0= x4531, {0x8a, 0x4a, 0x05, 0x00, 0xd2, 0xfd, 0x16, 0x49 }} + ## Include/Protocol/MemoryAccept.h gEfiMemoryAcceptProtocolGuid =3D { 0x38c74800, 0x5590, 0x4db4, { 0xa0,= 0xf3, 0x67, 0x5d, 0x9b, 0x8e, 0x80, 0x26 }} =20 --=20 2.38.0.rc1.362.ged0d419d3c-goog -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94768): https://edk2.groups.io/g/devel/message/94768 Mute This Topic: https://groups.io/mt/94144534/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-