From nobody Mon Feb 9 01:51:46 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+94605+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+94605+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1664579200; cv=none; d=zohomail.com; s=zohoarc; b=h+02rX7HNZNo9YZOuObDjXJZbcGr2ZNckPDId/6DTEl/LWv4QzNYbQ7jYfP1GF5RLlSQ+7tD6bcOBXCnloDnbfwUbJZFq37JP02EpLVu2dWmRmqSQCZhuNwSIw2w5hJRmzQkklyzZwYuYOkowDoensck4SaSBxJTB1TK9J20XRo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664579200; 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=EdmQgqL6P1+LxCncH8XEDvfVu9TZoo6AH0REiQN078A=; b=a6iTAPL3LgLeehEMNQbJjUGZKgK18BhuBT8uRpfC3G28OHvuFYIWwzOZWgk01+S78JCdK97d4LCRIRiDdTew2oztAO4C6Zn9Engbv0MRM5+w8hpOT1AENGOXMRQIK79O0zPXLtUAUxjiHGDGLhxqHTvlKi1LH109W7Cze9LwqeI= 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+94605+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1664579200495912.1273878257654; Fri, 30 Sep 2022 16:06:40 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id cVHIYY1788612xBzGzIsLVSO; Fri, 30 Sep 2022 16:06:40 -0700 X-Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) by mx.groups.io with SMTP id smtpd.web09.903.1664579199497912173 for ; Fri, 30 Sep 2022 16:06:39 -0700 X-Received: by mail-pg1-f201.google.com with SMTP id 126-20020a630284000000b0043942ef3ac7so3617908pgc.11 for ; Fri, 30 Sep 2022 16:06:39 -0700 (PDT) X-Gm-Message-State: 2TlGMzFtYTIAk8v0GvqhR9qSx1787277AA= X-Google-Smtp-Source: AMsMyM71UQMqDiB7KkkCcT+kq/JE+p5blswd47QBijS4bx1mcRUyTvbn0e/qpfyyPFdR4yxPr+twNy4TttCCwu4EzA== X-Received: from dionnaglaze.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:2ee6]) (user=dionnaglaze job=sendgmr) by 2002:a17:902:ce81:b0:179:f3fe:7fef with SMTP id f1-20020a170902ce8100b00179f3fe7fefmr11389841plg.119.1664579198981; Fri, 30 Sep 2022 16:06:38 -0700 (PDT) Date: Fri, 30 Sep 2022 23:06:25 +0000 In-Reply-To: <20220930230627.3371754-1-dionnaglaze@google.com> Mime-Version: 1.0 References: <20220930230627.3371754-1-dionnaglaze@google.com> Message-ID: <20220930230627.3371754-6-dionnaglaze@google.com> Subject: [edk2-devel] [PATCH v5 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=1664579200; bh=TIuV1XvsJP/XGFzoFk8+mNSRr/iiqHsiPbtAnmlRXWE=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=YORX1v7TxeVyIz+3IY48R2t29j9YnRwdu/63RCjQQt2xfQWXJ+QnOuAudlL3/ivfx8+ 1Me4YQwS3vm8qsIJEgmJ3ywHoEaqkH1euR+h3enTHuH53Z60cNXkLdrcXvwSfNEqGZJh1 tbrvYi0BuRe5zd1Uk5LNWi7pmbVXwstWxa8= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1664579200971100004 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/AcceptAllUnacceptedMemory.h | 40 +++++++++++++++++= +++ MdePkg/MdePkg.dec | 5 ++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Protocol/AcceptAllUnacceptedMemory.h b/MdePkg/I= nclude/Protocol/AcceptAllUnacceptedMemory.h new file mode 100644 index 0000000000..e50831836c --- /dev/null +++ b/MdePkg/Include/Protocol/AcceptAllUnacceptedMemory.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 43b099b396..452c40683e 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -1019,8 +1019,11 @@ gEfiPeiDelayedDispatchPpiGuid =3D { 0x869c711d, 0x649c, 0x44fe, { 0x8b,= 0x9e, 0x2c, 0xbb, 0x29, 0x11, 0xc3, 0xe6 }} =20 [Protocols] + ## Include/Protocol/AcceptAllUnacceptedMemory.h + gBz3987AcceptAllUnacceptedMemoryProtocolGuid =3D { 0xc5a010fe, 0x38a7, 0= x4531, {0x8a, 0x4a, 0x05, 0x00, 0xd2, 0xfd, 0x16, 0x49 }} + ## Include/Protocol/ExitBootServicesCallback.h - gEdkiiExitBootServicesCallbackProtocolGuid =3D { 0xf5684799, 0x9a33, 0x4= 0f7, {0xa1, 0x5c, 0x10, 0x8e, 0x0e, 0x6b, 0x45, 0x25 }} + gEdkiiExitBootServicesCallbackProtocolGuid =3D { 0xf5684799, 0x9a33, 0= x40f7, {0xa1, 0x5c, 0x10, 0x8e, 0x0e, 0x6b, 0x45, 0x25 }} =20 ## Include/Protocol/MemoryAccept.h gEfiMemoryAcceptProtocolGuid =3D { 0x38c74800, 0x5590, 0x4db4, { 0xa0,= 0xf3, 0x67, 0x5d, 0x9b, 0x8e, 0x80, 0x26 }} --=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 (#94605): https://edk2.groups.io/g/devel/message/94605 Mute This Topic: https://groups.io/mt/94028465/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-