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.web12.9581.1664379222858993405 for ; Wed, 28 Sep 2022 08:33:42 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@google.com header.s=20210112 header.b=lwC4lv5v; spf=pass (domain: flex--dionnaglaze.bounces.google.com, ip: 209.85.216.74, mailfrom: 3vmk0ywskbrs49fee17c1q57ff7c5.3fd45m5c54bt.7iflgj.9f@flex--dionnaglaze.bounces.google.com) Received: by mail-pj1-f74.google.com with SMTP id z9-20020a17090a468900b00202fdb32ba1so1204900pjf.1 for ; Wed, 28 Sep 2022 08:33:42 -0700 (PDT) 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; bh=00bVIT1+OCX+AaNlIKKNg+PLqQDTY2c7XfPYqSbU5Cg=; b=lwC4lv5vsqSqQTsGMc357Q8iLe1rAu/84P04LnnC2Rzoz73W0sEwXxWY4E1FIY/IN6 rNZGX0/4khT5OxQ1CowRUSLe4pBQZ71Mg3Db0L9kLcNeR9JlX67eZtJE4pZ5MeacuDvM F4lQqlW2MUVJE8X3gsbqAzt9WE72fa0j3QpcjrhjDdjwgyNbJ2Z0paLVx/R3gZrlq7Cf 4X7pjPJrMqTRVtr5KFWFFsR3LAUubhpH/q8RXM6PK6BXN0wBqFN67AZWjvHC6FJn+KOl MFixu3tiu6MuSWzfPAiq5rywItvAgPec0/ykJitLUG5RWGQBjpe/gAS9Scj0rsybCKz4 2j/Q== 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; bh=00bVIT1+OCX+AaNlIKKNg+PLqQDTY2c7XfPYqSbU5Cg=; b=rpf303pHRXD/Giu74hu14SHlocIeY6TjZUBvGUB2R5Ti+cLlNwJV8e0LmnGnDbMzEb eZW3wXQUtrlW3WLFuN00jkXwPktuIdF9m++KJq1QcG1kbH/FqLV15a9FDVnG+FeaK8r0 ABP9oz6AvBXYPbFAfG8pKAcxEL2crWUbuUfM4Yc7DOSCue5v2Ei0vaKymATiea5uot77 mKejOTutc1PQTkvg3SlNu37Q33uqwiT0jlEVa5meKQYBfJOZCzqoUwcyVa9TCwm7VcDO gTvU68fn+ywBt/c51ZmOboZ51AE1Y8aQ9EdTqx97ut8nIoFwhMENC6udVWlXpmAppGBj KU2g== X-Gm-Message-State: ACrzQf3/JwiN1t4j7tvrqgy1hRcL3VK295nbP8X3/6zJWkoCXTw7GSFe qu+KE8zupjBNdY4Nba7JnLl2JZ2jmY71vgh1vjcGQLV4NqkrWFnUppY177Vv+XhxW72W2KQhgP+ s8wcuwie90h8JbgxcY2PHLgDaWN3SFXSiu9pThPdC5FpauXi3Pm5zBqmQs1JgQBPk2AZdPwkC X-Google-Smtp-Source: AMsMyM5FUY7GMvGev4/4fYsPjOxOJo5yUPuwL93oRz7Z2q3YofKPJiUXkkn+hZ9aZ7V1OuuAoutDSS31NYI6jpEQLg== X-Received: from dionnaglaze.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:2ee6]) (user=dionnaglaze job=sendgmr) by 2002:a62:82cc:0:b0:553:e631:14f0 with SMTP id w195-20020a6282cc000000b00553e63114f0mr35197632pfd.63.1664379222108; Wed, 28 Sep 2022 08:33:42 -0700 (PDT) Date: Wed, 28 Sep 2022 15:33:19 +0000 In-Reply-To: <20220928153323.2583389-1-dionnaglaze@google.com> Mime-Version: 1.0 References: <20220928153323.2583389-1-dionnaglaze@google.com> X-Mailer: git-send-email 2.37.3.998.g577e59143f-goog Message-ID: <20220928153323.2583389-3-dionnaglaze@google.com> Subject: [PATCH v4 2/6] MdeModulePkg: Add PcdEnableUnacceptedMemory From: "Dionna Glaze" To: devel@edk2.groups.io Cc: Dionna Glaze , Gerd Hoffmann , James Bottomley , Jiewen Yao , Tom Lendacky , Ard Biesheuvel Content-Type: text/plain; charset="UTF-8" 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 --- 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