<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Segoe UI Emoji";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">For the HPET timer failure, not sure it has relation with 8259 since OvmfPkg uses 8259 timer by default.<o:p></o:p></p>
<p class="MsoNormal">For “Reserve Payload config in runtime services data”, yes, I will remove that WA once platform hook lib is updated late.<o:p></o:p></p>
<p class="MsoNormal">This patch logic looks good to me, only some minor coding style issue I added comments in PR.
<a href="https://github.com/tianocore/edk2/pull/1873/files">https://github.com/tianocore/edk2/pull/1873/files</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Guo<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Cheng-Chieh Huang <chengchieh@google.com> <br>
<b>Sent:</b> Thursday, August 12, 2021 1:52 AM<br>
<b>To:</b> Ni, Ray <ray.ni@intel.com><br>
<b>Cc:</b> devel@edk2.groups.io; Schaefer, Daniel <daniel.schaefer@hpe.com>; Trammell Hudson <hudson@trmm.net>; Ma, Maurice <maurice.ma@intel.com>; Dong, Guo <guo.dong@intel.com>; You, Benjamin <benjamin.you@intel.com><br>
<b>Subject:</b> Re: [edk2-devel] [PATCH v2 0/4] UefiPayloadPkg: LinuxBoot Support in UefiPayload<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Hi Ray,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">1. UefiPayloadPkg: Add LINUXBOOT payload target<br>
  a. Why is IO/MEM align in AdjustRootBridgeResource() skipped for Linux Payload?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-> This alignment is too conservative and causes the system to run out of IO resources. AFAIK, we do not need this in UEFI OS and our use case involves larger systems (let's say server) .<br>
  b. can you please run ECC to make sure the C source code complains to EDKII coding standard?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-> sure will do.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">2. UefiPayloadPkg: Use legacy timer in Linuxboot payload<br>
  a. Can you kindly explain the reason of HPET timer failure? Is this patch a temporary workaround?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> ->  This is taken from OvmfPkg's Xen package. Current Hpet driver does not work well after we hand over control to OS. Yes we can consider this as a workaround. This should not affect functionality because we will go back to the regular
 TSC/HPET timer in linux after booting to the next OS.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">4. UefiPayloadPkg: Reserve Payload config in runtime services data<br>
  a. Why?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-> Currently, due to some design issue, this Hook will also be called in BDS. Dong said he will work on a fix for this and he suggested that I gate it LINUXBOOT_PAYLOAD and he will clean it up in his fix.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> For more details, please see earlier mail thread titled [PATCH v1 4/6] UefiPayloadPkg: Reserve Payload config in runtime services data<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">> By the way, can you please add me to the CC list since I am the maintainer of UefiPayloadPkg (newly become so you might not notice that<span style="font-family:"Segoe UI Emoji",sans-serif">😊</span>) next time you send updates?<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">Sure.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">--<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Cheng-Chieh<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">On Thu, Aug 12, 2021 at 12:49 PM Ni, Ray <<a href="mailto:ray.ni@intel.com" target="_blank">ray.ni@intel.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal" style="margin-bottom:12.0pt">I will leave all comments to the patches here since I have difficulty to find individual patches without these patches sending to me directly.<br>
<br>
In general, the commit messages are too short to explain the background/reason of the code change. Can you please put more explanation in the commit message?<br>
<br>
1. UefiPayloadPkg: Add LINUXBOOT payload target<br>
  a. Why is IO/MEM align in AdjustRootBridgeResource() skipped for Linux Payload?<br>
  b. can you please run ECC to make sure the C source code complains to EDKII coding standard?<br>
<br>
2. UefiPayloadPkg: Use legacy timer in Linuxboot payload<br>
  a. Can you kindly explain the reason of HPET timer failure? Is this patch a temporary workaround?<br>
<br>
3. UefiPayloadPkg: Update maximum logic processor to 256<br>
  a. It still has the limitation of 256 threads. I am ok with your code change.<br>
<br>
4. UefiPayloadPkg: Reserve Payload config in runtime services data<br>
  a. Why?<br>
<br>
<br>
By the way, can you please add me to the CC list since I am the maintainer of UefiPayloadPkg (newly become so you might not notice that<span style="font-family:"Segoe UI Emoji",sans-serif">😊</span>) next time you send updates?<br>
<br>
Thanks,<br>
ray<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" target="_blank">groups.io</a><br>
Sent: Saturday, August 7, 2021 10:51 PM<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>>; Schaefer, Daniel <<a href="mailto:daniel.schaefer@hpe.com" target="_blank">daniel.schaefer@hpe.com</a>>; Trammell Hudson <<a href="mailto:hudson@trmm.net" target="_blank">hudson@trmm.net</a>>;
 Ma, Maurice <<a href="mailto:maurice.ma@intel.com" target="_blank">maurice.ma@intel.com</a>>; Dong, Guo <<a href="mailto:guo.dong@intel.com" target="_blank">guo.dong@intel.com</a>>; You, Benjamin <<a href="mailto:benjamin.you@intel.com" target="_blank">benjamin.you@intel.com</a>><br>
Subject: [edk2-devel] [PATCH v2 0/4] UefiPayloadPkg: LinuxBoot Support in UefiPayload<br>
<br>
These are necessary patches to Support LinuxBoot in UefiPayload.<br>
With these paches, we can boot to ESXi and Windows from a linux in QEMU.<br>
<br>
This is second parse. In addition to fixing reviwer's suggestions, I removed the following CLs.<br>
* Add DISABLE_MMX_SSE to avoid generating floating points operation<br>
-> will send a seperate patch to add these flags to BaseTools<br>
<br>
* LinuxBoot: use a text format for the configuration block.<br>
-> will work with Trammell Hudson to cover this patch to EDK2 style.<br>
<br>
LinuxBoot README:<br>
<a href="https://github.com/linuxboot/edk2/blob/uefipayload/UefiPayloadPkg/README.md" target="_blank">https://github.com/linuxboot/edk2/blob/uefipayload/UefiPayloadPkg/README.md</a><br>
<br>
v2 PR to tianocore:<br>
<a href="https://github.com/tianocore/edk2/pull/1873" target="_blank">https://github.com/tianocore/edk2/pull/1873</a><br>
<br>
Cheng-Chieh Huang (4):<br>
  UefiPayloadPkg: Add LINUXBOOT payload target<br>
  UefiPayloadPkg: Use legacy timer in Linuxboot payload<br>
  UefiPayloadPkg: Update maximum logic processor to 256<br>
  UefiPayloadPkg: Reserve Payload config in runtime services data<br>
<br>
 UefiPayloadPkg/UefiPayloadPkg.dsc                              |  24 ++-<br>
 UefiPayloadPkg/UefiPayloadPkg.fdf                              |   5 +<br>
 UefiPayloadPkg/Library/LbParseLib/LbParseLib.inf               |  39 +++++<br>
 UefiPayloadPkg/Library/LbParseLib/Linuxboot.h                  |  47 +++++<br>
 UefiPayloadPkg/Library/LbParseLib/LbParseLib.c                 | 182 ++++++++++++++++++++<br>
 UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c |   6 +-<br>
 UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c             |   4 +<br>
 7 files changed, 299 insertions(+), 8 deletions(-)  create mode 100644 UefiPayloadPkg/Library/LbParseLib/LbParseLib.inf<br>
 create mode 100644 UefiPayloadPkg/Library/LbParseLib/Linuxboot.h<br>
 create mode 100644 UefiPayloadPkg/Library/LbParseLib/LbParseLib.c<br>
<br>
Cc: Cheng-Chieh Huang <<a href="mailto:chengchieh@google.com" target="_blank">chengchieh@google.com</a>><br>
Cc: Daniel Schaefer <<a href="mailto:daniel.schaefer@hpe.com" target="_blank">daniel.schaefer@hpe.com</a>><br>
Cc: Trammell Hudson <<a href="mailto:hudson@trmm.net" target="_blank">hudson@trmm.net</a>><br>
Cc: Maurice Ma <<a href="mailto:maurice.ma@intel.com" target="_blank">maurice.ma@intel.com</a>><br>
Cc: Guo Dong <<a href="mailto:guo.dong@intel.com" target="_blank">guo.dong@intel.com</a>><br>
Cc: Benjamin You <<a href="mailto:benjamin.you@intel.com" target="_blank">benjamin.you@intel.com</a>><br>
<br>
<br>
--<br>
2.32.0.605.g8dce9f2422-goog<br>
<br>
<br>
<br>
<br>
<br>
<o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</body>
</html>


 <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/79329">View/Reply Online (#79329)</a> |    |  <a target="_blank" href="https://groups.io/mt/84731094/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>