From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by mx.groups.io with SMTP id smtpd.web12.10326.1664382809256132755 for ; Wed, 28 Sep 2022 09:33:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y5zfgLat; spf=pass (domain: kernel.org, ip: 145.40.73.55, 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 sin.source.kernel.org (Postfix) with ESMTPS id 61B13CE068A for ; Wed, 28 Sep 2022 16:33:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14DDCC43140 for ; Wed, 28 Sep 2022 16:33:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664382803; bh=u/m5qWkMRno1sc6A6NYz4oa5ILa7HagMSe0+C6rG8YQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Y5zfgLatYfwlUX6PX82DiHxHKwe1KBqdKx9xLdeLjtqJ1xoQ0LXr2U9/CCGHKd7RR BbfbPaX6juvi/npZ1Tr3vS7XP77X20/1Ehdk9Nr/g79i2Mge/oexCC0lPeDOjbsl4W 2k2myJi3ILptLETqzUqBizuKLFklAJ+XKjgwmCDJlEtO7U7FLTTuHZbK26QYGHIEdK yiUwQrNFYqwtgD1wEMzKinBjoopbsLjRINDNXIs4KisSzjVcw2/NDgTtPn3fJCTAjX OOq3X1gcmJtK6IRE4bnrkoa9Y9rrWdpcjmH/Qatmh0FLweWJbD1Iw/fuGie5G9MGpi UzPMXOmDtkZAQ== Received: by mail-lj1-f170.google.com with SMTP id s10so14946116ljp.5 for ; Wed, 28 Sep 2022 09:33:22 -0700 (PDT) X-Gm-Message-State: ACrzQf31t6NiEFsGC5CKPTAJWje/AG6iDsaU02ETaPxf2jYi0YUSioJN jM2JQcjPdCShWjTz87tRbEEe7qwAQUv5FrtVUTw= X-Google-Smtp-Source: AMsMyM7zE2C8RQlbrgF8kYFo8Nz6aGZi4MvSwURTwmdFuq6ybNJxpvFzuu8LTk/aaF+raA59Z6i0hfmgszuBljwwsjY= X-Received: by 2002:a05:651c:239c:b0:26d:94b8:781d with SMTP id bk28-20020a05651c239c00b0026d94b8781dmr6433194ljb.189.1664382801069; Wed, 28 Sep 2022 09:33:21 -0700 (PDT) MIME-Version: 1.0 References: <20220928153323.2583389-1-dionnaglaze@google.com> <20220928153323.2583389-3-dionnaglaze@google.com> In-Reply-To: <20220928153323.2583389-3-dionnaglaze@google.com> From: "Ard Biesheuvel" Date: Wed, 28 Sep 2022 18:33:09 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 2/6] MdeModulePkg: Add PcdEnableUnacceptedMemory To: Dionna Glaze Cc: devel@edk2.groups.io, Gerd Hoffmann , James Bottomley , Jiewen Yao , Tom Lendacky Content-Type: text/plain; charset="UTF-8" On Wed, 28 Sept 2022 at 17:33, Dionna Glaze wrote: > > This Pcd is used to toggle whether ExitBootServices should not accept > all unaccepted memory. It's the loaded image's responsibility to enable > support so that it doesn't get memory types it doesn't understand in its > memory map. > > Cc: Gerd Hoffmann > Cc: James Bottomley > Cc: Jiewen Yao > Cc: Tom Lendacky > Cc: Ard Biesheuvel > > Signed-off-by: Dionna Glaze The name PcdEnableUnacceptedMemory is a bit confusing imho. Could we rename this to PcdAcceptAllUnacceptedMemory or something like that? > --- > MdeModulePkg/MdeModulePkg.dec | 6 ++++++ > MdeModulePkg/MdeModulePkg.uni | 6 ++++++ > 2 files changed, 12 insertions(+) > > diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec > index 58e6ab0048..dd07b3725a 100644 > --- a/MdeModulePkg/MdeModulePkg.dec > +++ b/MdeModulePkg/MdeModulePkg.dec > @@ -2102,6 +2102,12 @@ > # @Prompt The shared bit mask when Intel Tdx is enabled. > gEfiMdeModulePkgTokenSpaceGuid.PcdTdxSharedBitMask|0x0|UINT64|0x10000025 > > + ## Indicates if the memory map may include unaccepted memory after ExitBootServices().

> + # TRUE - The memory map may include unaccepted memory after ExitBootServices().
> + # FALSE - The memory map may not include unaccepted memory after ExitBootServices().
> + # @Prompt Support unaccepted memory type. > + gEfiMdeModulePkgTokenSpaceGuid.PcdEnableUnacceptedMemory|FALSE|BOOLEAN|0x10000026 > + > [PcdsPatchableInModule] > ## Specify memory size with page number for PEI code when > # Loading Module at Fixed Address feature is enabled. > diff --git a/MdeModulePkg/MdeModulePkg.uni b/MdeModulePkg/MdeModulePkg.uni > index 33ce9f6198..fde57da123 100644 > --- a/MdeModulePkg/MdeModulePkg.uni > +++ b/MdeModulePkg/MdeModulePkg.uni > @@ -1338,3 +1338,9 @@ > #string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdPcieResizableBarSupport_HELP #language en-US "Indicates if the PCIe Resizable BAR Capability Supported.

\n" > "TRUE - PCIe Resizable BAR Capability is supported.
\n" > "FALSE - PCIe Resizable BAR Capability is not supported.
" > + > +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdEnableUnacceptedMemory_PROMPT #language en-US "Support unaccepted memory type" > +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdEnableUnacceptedMemory_HELP #language en-US "Indicates if the memory map may include unaccepted memory " > + "after ExitBootServices().

\n" > + "TRUE - The memory map may include unaccepted memory after ExitBootServices().
\n" > + "FALSE - The memory map may not include unaccepted memory after ExitBootServices().
\n" > -- > 2.37.3.998.g577e59143f-goog >