<div dir="ltr"><div>Hi Guo,</div><div><br></div><div>Thanks for the review. This is a quick fix for today's PlatformHookLib design. PlatformHookLib (probably via PlatformBootManagerLib) will be linked by BDS and potentially called again in Windows bootloader. If we did not reserve this range of memory, system will crash the system when it was called. This can be reproduced if we boot Windows 2018. I also did not think reserving this memory til runtime is a good idea, but I am not sure why we want to link PlatformHookLib to PlatformBootManagerLib. I tried to remove PlatformHookLib in PlatformBootManagerLib and it seems to work as well. maybe we should take this approach. what do you think?</div><div><br></div><div>--</div><div>Cheng-Chieh</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 4, 2021 at 10:44 AM Dong, Guo <<a href="mailto:guo.dong@intel.com" target="_blank">guo.dong@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
why build runtime memory allocation hob here? <br>
The PayloadEntry should already got the information and build a new HOB list to DXE core, will anyone access these region late?<br>
If yes, maybe you need add LINUXBOOT_PAYLOAD flag for this code, and update commit message on this.<br>
<br>
Thanks,<br>
Guo<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:devel@edk2.groups.io" target="_blank">devel@edk2.groups.io</a> <<a href="mailto:devel@edk2.groups.io" target="_blank">devel@edk2.groups.io</a>> On Behalf Of Cheng-Chieh Huang via <a href="http://groups.io" rel="noreferrer" target="_blank">groups.io</a><br>
Sent: Wednesday, July 21, 2021 6:23 AM<br>
To: <a href="mailto:devel@edk2.groups.io" target="_blank">devel@edk2.groups.io</a><br>
Cc: Cheng-Chieh Huang <<a href="mailto:chengchieh@google.com" target="_blank">chengchieh@google.com</a>><br>
Subject: [edk2-devel] [PATCH v1 4/6] UefiPayloadPkg: Reserve Payload config in runtime services data<br>
<br>
Signed-off-by: Cheng-Chieh Huang <<a href="mailto:chengchieh@google.com" target="_blank">chengchieh@google.com</a>><br>
---<br>
 UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c | 2 ++<br>
 1 file changed, 2 insertions(+)<br>
<br>
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c<br>
index ae16f25c7c0e..70afbf83ed4a 100644<br>
--- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c<br>
+++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c<br>
@@ -517,6 +517,8 @@ BuildGenericHob (<br>
<br>
   // The UEFI payload FV<br>
   BuildMemoryAllocationHob (PcdGet32 (PcdPayloadFdMemBase), PcdGet32 (PcdPayloadFdMemSize), EfiBootServicesData);<br>
+  // The UEFI payload config FV<br>
+  BuildMemoryAllocationHob (PcdGet32 (PcdPayloadFdMemBase) - SIZE_64KB, SIZE_64KB, EfiRuntimeServicesData);<br>
<br>
   //<br>
   // Build CPU memory space and IO space hob<br>
-- <br>
2.32.0.402.g57bb445576-goog<br>
<br>
<br>
<br>
<br>
<br>
<br>
</blockquote></div>


 <div width="1" style="color:white;clear:both">_._,_._,_</div> <hr>   Groups.io Links:<p>   You receive all messages sent to this group.    <p> <a target="_blank" href="https://edk2.groups.io/g/devel/message/78648">View/Reply Online (#78648)</a> |    |  <a target="_blank" href="https://groups.io/mt/84357536/1813853">Mute This Topic</a>  | <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>    <a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> | <a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |  <a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>  [edk2-devel-archive@redhat.com]<br> <div width="1" style="color:white;clear:both">_._,_._,_</div>