From: "Guo Dong" <guo.dong@intel.com>
To: Akihiko Odaki <akihiko.odaki@gmail.com>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Wang, Jian J" <jian.j.wang@intel.com>,
"Gao, Liming" <gaoliming@byosoft.com.cn>,
"Bi, Dandan" <dandan.bi@intel.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>,
"Liu, Zhiguang" <zhiguang.liu@intel.com>,
"Ni, Ray" <ray.ni@intel.com>,
"Ma, Maurice" <maurice.ma@intel.com>,
"You, Benjamin" <benjamin.you@intel.com>
Subject: Re: [PATCH] UefiPayloadPkg: Keep reserved MMIO at runtime
Date: Sun, 10 Apr 2022 23:27:14 +0000 [thread overview]
Message-ID: <BYAPR11MB3622B4F5AE669F68829E2FB59EEB9@BYAPR11MB3622.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220409022521.3913-1-akihiko.odaki@gmail.com>
This patch changed both MdeModulePkg and UefiPayloadPkg, had better split them into 2 patches?
Thanks,
Guo
-----Original Message-----
From: Akihiko Odaki <akihiko.odaki@gmail.com>
Sent: Friday, April 8, 2022 7:25 PM
Cc: devel@edk2.groups.io; Wang, Jian J <jian.j.wang@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Bi, Dandan <dandan.bi@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Liu, Zhiguang <zhiguang.liu@intel.com>; Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin <benjamin.you@intel.com>; Akihiko Odaki <akihiko.odaki@gmail.com>
Subject: [PATCH] UefiPayloadPkg: Keep reserved MMIO at runtime
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
---
MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 9 +++++++++
MdePkg/Include/Pi/PiHob.h | 2 ++
UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c | 3 ++-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c index 3763467bdb..623b316c61 100644
--- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
+++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
@@ -2628,6 +2628,15 @@ CoreInitializeGcdServices (
ResourceHob->ResourceLength, Capabilities );++ if (!EFI_ERROR (Status) &&+ (ResourceHob->ResourceAttribute & EFI_RESOURCE_ATTRIBUTE_RUNTIME) == EFI_RESOURCE_ATTRIBUTE_RUNTIME) {+ Status = CoreSetMemorySpaceAttributes(+ ResourceHob->PhysicalStart,+ ResourceHob->ResourceLength,+ EFI_MEMORY_RUNTIME+ );+ } } if (GcdIoType != EfiGcdIoTypeNonExistent) {diff --git a/MdePkg/Include/Pi/PiHob.h b/MdePkg/Include/Pi/PiHob.h
index e9f0ab4309..92bacbe62c 100644
--- a/MdePkg/Include/Pi/PiHob.h
+++ b/MdePkg/Include/Pi/PiHob.h
@@ -296,6 +296,8 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE; // #define EFI_RESOURCE_ATTRIBUTE_MORE_RELIABLE 0x02000000 +#define EFI_RESOURCE_ATTRIBUTE_RUNTIME 0x04000000+ /// /// Describes the resource properties of all fixed, /// nonrelocatable resource ranges found on the processordiff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c
index 0fed1e3691..a50f1c0271 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c
+++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c
@@ -74,7 +74,8 @@ MemInfoCallbackMmio (
EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE | EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE | EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |- EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE;+ EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE |+ EFI_RESOURCE_ATTRIBUTE_RUNTIME; BuildResourceDescriptorHob (Type, Attribue, (EFI_PHYSICAL_ADDRESS)Base, Size); DEBUG ((DEBUG_INFO, "buildhob: base = 0x%lx, size = 0x%lx, type = 0x%x\n", Base, Size, Type));--
2.35.1
prev parent reply other threads:[~2022-04-10 23:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-09 2:25 [PATCH] UefiPayloadPkg: Keep reserved MMIO at runtime Akihiko Odaki
2022-04-10 23:27 ` Guo Dong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BYAPR11MB3622B4F5AE669F68829E2FB59EEB9@BYAPR11MB3622.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox