[edk2-devel] [PATCH v2 0/4] UefiPayloadPkg: LinuxBoot Support in UefiPayload

Guo Dong guo.dong at intel.com
Mon Aug 16 04:42:51 UTC 2021


For the HPET timer failure, not sure it has relation with 8259 since OvmfPkg uses 8259 timer by default.
For “Reserve Payload config in runtime services data”, yes, I will remove that WA once platform hook lib is updated late.
This patch logic looks good to me, only some minor coding style issue I added comments in PR. https://github.com/tianocore/edk2/pull/1873/files

Thanks,
Guo

From: Cheng-Chieh Huang <chengchieh at google.com>
Sent: Thursday, August 12, 2021 1:52 AM
To: Ni, Ray <ray.ni at intel.com>
Cc: devel at edk2.groups.io; Schaefer, Daniel <daniel.schaefer at hpe.com>; Trammell Hudson <hudson at trmm.net>; Ma, Maurice <maurice.ma at intel.com>; Dong, Guo <guo.dong at intel.com>; You, Benjamin <benjamin.you at intel.com>
Subject: Re: [edk2-devel] [PATCH v2 0/4] UefiPayloadPkg: LinuxBoot Support in UefiPayload

Hi Ray,

1. UefiPayloadPkg: Add LINUXBOOT payload target
  a. Why is IO/MEM align in AdjustRootBridgeResource() skipped for Linux Payload?
-> 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) .
  b. can you please run ECC to make sure the C source code complains to EDKII coding standard?
-> sure will do.

2. UefiPayloadPkg: Use legacy timer in Linuxboot payload
  a. Can you kindly explain the reason of HPET timer failure? Is this patch a temporary workaround?
 ->  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.

4. UefiPayloadPkg: Reserve Payload config in runtime services data
  a. Why?
-> 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.
 For more details, please see earlier mail thread titled [PATCH v1 4/6] UefiPayloadPkg: Reserve Payload config in runtime services data


> 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😊) next time you send updates?
Sure.

--
Cheng-Chieh
On Thu, Aug 12, 2021 at 12:49 PM Ni, Ray <ray.ni at intel.com<mailto:ray.ni at intel.com>> wrote:
I will leave all comments to the patches here since I have difficulty to find individual patches without these patches sending to me directly.

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?

1. UefiPayloadPkg: Add LINUXBOOT payload target
  a. Why is IO/MEM align in AdjustRootBridgeResource() skipped for Linux Payload?
  b. can you please run ECC to make sure the C source code complains to EDKII coding standard?

2. UefiPayloadPkg: Use legacy timer in Linuxboot payload
  a. Can you kindly explain the reason of HPET timer failure? Is this patch a temporary workaround?

3. UefiPayloadPkg: Update maximum logic processor to 256
  a. It still has the limitation of 256 threads. I am ok with your code change.

4. UefiPayloadPkg: Reserve Payload config in runtime services data
  a. Why?


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😊) next time you send updates?

Thanks,
ray

-----Original Message-----
From: devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>> On Behalf Of Cheng-Chieh Huang via groups.io<http://groups.io>
Sent: Saturday, August 7, 2021 10:51 PM
To: devel at edk2.groups.io<mailto:devel at edk2.groups.io>
Cc: Cheng-Chieh Huang <chengchieh at google.com<mailto:chengchieh at google.com>>; Schaefer, Daniel <daniel.schaefer at hpe.com<mailto:daniel.schaefer at hpe.com>>; Trammell Hudson <hudson at trmm.net<mailto:hudson at trmm.net>>; Ma, Maurice <maurice.ma at intel.com<mailto:maurice.ma at intel.com>>; Dong, Guo <guo.dong at intel.com<mailto:guo.dong at intel.com>>; You, Benjamin <benjamin.you at intel.com<mailto:benjamin.you at intel.com>>
Subject: [edk2-devel] [PATCH v2 0/4] UefiPayloadPkg: LinuxBoot Support in UefiPayload

These are necessary patches to Support LinuxBoot in UefiPayload.
With these paches, we can boot to ESXi and Windows from a linux in QEMU.

This is second parse. In addition to fixing reviwer's suggestions, I removed the following CLs.
* Add DISABLE_MMX_SSE to avoid generating floating points operation
-> will send a seperate patch to add these flags to BaseTools

* LinuxBoot: use a text format for the configuration block.
-> will work with Trammell Hudson to cover this patch to EDK2 style.

LinuxBoot README:
https://github.com/linuxboot/edk2/blob/uefipayload/UefiPayloadPkg/README.md

v2 PR to tianocore:
https://github.com/tianocore/edk2/pull/1873

Cheng-Chieh Huang (4):
  UefiPayloadPkg: Add LINUXBOOT payload target
  UefiPayloadPkg: Use legacy timer in Linuxboot payload
  UefiPayloadPkg: Update maximum logic processor to 256
  UefiPayloadPkg: Reserve Payload config in runtime services data

 UefiPayloadPkg/UefiPayloadPkg.dsc                              |  24 ++-
 UefiPayloadPkg/UefiPayloadPkg.fdf                              |   5 +
 UefiPayloadPkg/Library/LbParseLib/LbParseLib.inf               |  39 +++++
 UefiPayloadPkg/Library/LbParseLib/Linuxboot.h                  |  47 +++++
 UefiPayloadPkg/Library/LbParseLib/LbParseLib.c                 | 182 ++++++++++++++++++++
 UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c |   6 +-
 UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c             |   4 +
 7 files changed, 299 insertions(+), 8 deletions(-)  create mode 100644 UefiPayloadPkg/Library/LbParseLib/LbParseLib.inf
 create mode 100644 UefiPayloadPkg/Library/LbParseLib/Linuxboot.h
 create mode 100644 UefiPayloadPkg/Library/LbParseLib/LbParseLib.c

Cc: Cheng-Chieh Huang <chengchieh at google.com<mailto:chengchieh at google.com>>
Cc: Daniel Schaefer <daniel.schaefer at hpe.com<mailto:daniel.schaefer at hpe.com>>
Cc: Trammell Hudson <hudson at trmm.net<mailto:hudson at trmm.net>>
Cc: Maurice Ma <maurice.ma at intel.com<mailto:maurice.ma at intel.com>>
Cc: Guo Dong <guo.dong at intel.com<mailto:guo.dong at intel.com>>
Cc: Benjamin You <benjamin.you at intel.com<mailto:benjamin.you at intel.com>>


--
2.32.0.605.g8dce9f2422-goog







-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#79329): https://edk2.groups.io/g/devel/message/79329
Mute This Topic: https://groups.io/mt/84731094/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20210816/69278012/attachment.htm>


More information about the edk2-devel-archive mailing list