From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) by mx.groups.io with SMTP id smtpd.web09.2978.1626922138151922617 for ; Wed, 21 Jul 2021 19:48:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@google.com header.s=20161025 header.b=OiS0F1Ra; spf=pass (domain: google.com, ip: 209.85.208.181, mailfrom: chengchieh@google.com) Received: by mail-lj1-f181.google.com with SMTP id b29so5499877ljf.11 for ; Wed, 21 Jul 2021 19:48:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4tbOt/VKljLnzM7EUBLFHWU27tNo90Bkd9kUhnIMvH4=; b=OiS0F1RavbDNFWYLp/NOw4Dsm9gMxUGmS7RySMw7PCcIBlZ1eO3uJyLJgRas0LS+BL ap0FmmvnVnDbZF2kTqT/kUK7ABh1H/DgMuTnL/sCqC5gh4A3d6ABGQ15nI4Dt32AF3td TGW1Kt8jaGh00058oD3LuwWa4YTpHsBoq4PIsL6XL8+k0MpglbahfV2PK5cjKOzLFD6V moLOpToJXyrRdyTVNV4zFfkBTHqmDR9if+9WFo0yUiAyTiZbTbt8hKsMjEc9vuq+K6Cz RAF1SXK4QnJXhGJCkqVf3ozKsb1U5QqDvgU0M73gg9UZCErB0ShmqChOiqrGOq2l1Yoz fEsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4tbOt/VKljLnzM7EUBLFHWU27tNo90Bkd9kUhnIMvH4=; b=O8r+mNSRY5cQvf40EuqwFNaxr9AnyCnJSRQmAPcrQxX+zaY7hoLbWEh+QG08KLfArT gK8dhbdSw6WoOGVB4Z4s5tydfMIAFCTqDES2/ALeZgAlvcu4reHsjdTswRWsMpF3Rie1 AAfDJBVQWaRXKVwD+mZMFy24vc8bv3+RANZAalnAQANQH8WxES2xSpmYxBG5Oy+ygo2H 58YnR6yw7wXPlJyNAZwZRpfrkLdwqBW/T3gs0T/5OdG/jI67zkEl52fHKwY6YsJuSGyw s7JkCwUxObH3XglsEwW+zHFfGTAZ0VHOOop5RPpZZNaoLS1pB1LPa2pwOQnndWsWXQiA sW6g== X-Gm-Message-State: AOAM531pOhm/uqqT6jIayAETGzjrax7oj8q75cVTcqtTea4BK8xGwFE2 CtcaVY0siXSfM3rw/FAJcVhKq+PvU91q/aRvOTdonA== X-Google-Smtp-Source: ABdhPJxt3rWIdHv0Qn15wl60pKYgK3xem4dSs1thuThvEGDQQ8EZuquCM3lQQUYSDsiHSVWrmv4ta8NS9g1DzjDUguc= X-Received: by 2002:a2e:a164:: with SMTP id u4mr32125791ljl.121.1626922135685; Wed, 21 Jul 2021 19:48:55 -0700 (PDT) MIME-Version: 1.0 References: <20210721132328.1415485-1-chengchieh@google.com> In-Reply-To: From: Cheng-Chieh Huang Date: Thu, 22 Jul 2021 10:48:44 +0800 Message-ID: Subject: Re: [edk2-devel] [PATCH 0/6] UefiPayloadPkg: LinuxBoot Support in UefiPayload To: Daniel Schaefer Cc: "Ni, Ray" , "devel@edk2.groups.io" , Trammell Hudson , "Ma, Maurice" , "Dong, Guo" , "You, Benjamin" Content-Type: multipart/alternative; boundary="000000000000fa6b6e05c7ad53b6" --000000000000fa6b6e05c7ad53b6 Content-Type: text/plain; charset="UTF-8" On Thu, Jul 22, 2021 at 9:59 AM Daniel Schaefer wrote: > On 7/22/21 9:44 AM, Ni, Ray wrote: > > Cheng-Chieh, > > Thanks for the detailed explanation in doc > https://docs.google.com/document/d/1mU6ICHTh0ot8U45uuRENKOGI8cVzizdyWHGYHpEguVg/edit#heading=h.xzptrog8pyxf > . > > > > My original thought was LinuxBoot is a payload that aims to boot OS. > > But the idea of chaining UefiPayload producing UEFI services is very > brilliant. > > It can be and it is. The main usage of LinuxBoot is to load/boot another > Linux using the kexec mechanism. But in order to be able to boot > Windows, ESXI, ... a UEFI interface is required. > There have been a few proposals and POCs (like implementing UEFI > services in Linux) but UefiPayload is the most practical and easy way to > do it, for now. > > > Have you considered to produce the universal payload interfaces ( > https://universalpayload.github.io/documentation/ ) from LinuxBoot so no > LbParseLib is required? > > I don't think we've looked at it. But we liked it to be a string because > it allows easy forward compatibility and not having to recreate the > structs in higher-level languages like Go. > > Agree to Daniel. In the future, we can look for supporting HOB structure in u-root, but for now, we prefer to stick with the current approach. -- Cheng-Chieh > > Thanks, > > Ray > > > >> -----Original Message----- > >> From: devel@edk2.groups.io On Behalf Of > Cheng-Chieh Huang via groups.io > >> Sent: Wednesday, July 21, 2021 9:23 PM > >> To: devel@edk2.groups.io > >> Cc: Cheng-Chieh Huang ; Schaefer, Daniel < > daniel.schaefer@hpe.com>; Trammell Hudson > >> ; Ma, Maurice ; Dong, Guo < > guo.dong@intel.com>; You, Benjamin > >> > >> Subject: [edk2-devel] [PATCH 0/6] 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. > >> > >> LinuxBoot README: > >> > https://github.com/linuxboot/edk2/blob/uefipayload/UefiPayloadPkg/README.md > >> > >> PR to tianocore: > >> https://github.com/tianocore/edk2/pull/1820 > >> > >> Cheng-Chieh Huang (5): > >> Add LINUXBOOT payload target > >> Use legacy timer in Linuxboot payload > >> Update maximum logic processor to 256 > >> Reserve Payload config in runtime services data > >> Add DISABLE_MMX_SSE to avoid generating floating points operation > >> > >> Trammell Hudson (1): > >> LinuxBoot: use a text format for the configuration block. > >> > >> UefiPayloadPkg/UefiPayloadPkg.dsc | 29 +- > >> UefiPayloadPkg/UefiPayloadPkg.fdf | 5 + > >> .../Library/LbParseLib/LbParseLib.inf | 39 ++ > >> UefiPayloadPkg/Include/Linuxboot.h | 58 +++ > >> .../Library/LbParseLib/LbParseLib.c | 348 ++++++++++++++++++ > >> .../PciHostBridgeLib/PciHostBridgeSupport.c | 6 +- > >> .../UefiPayloadEntry/UefiPayloadEntry.c | 2 + > >> CryptoPkg/Library/OpensslLib/openssl | 2 +- > >> 8 files changed, 480 insertions(+), 9 deletions(-) > >> create mode 100644 UefiPayloadPkg/Library/LbParseLib/LbParseLib.inf > >> create mode 100644 UefiPayloadPkg/Include/Linuxboot.h > >> create mode 100644 UefiPayloadPkg/Library/LbParseLib/LbParseLib.c > >> > >> Cc: Cheng-Chieh Huang > >> Cc: Daniel Schaefer > >> Cc: Trammell Hudson > >> Cc: Maurice Ma > >> Cc: Guo Dong > >> Cc: Benjamin You > >> -- > >> 2.32.0.402.g57bb445576-goog > >> > >> > >> > >> > >> > > > --000000000000fa6b6e05c7ad53b6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Jul 22, 2021 at 9:59 AM Daniel Schae= fer <daniel.schaefer@hpe.com<= /a>> wrote:
O= n 7/22/21 9:44 AM, Ni, Ray wrote:
> Cheng-Chieh,
> Thanks for the detailed explanation in doc
https://docs.goog= le.com/document/d/1mU6ICHTh0ot8U45uuRENKOGI8cVzizdyWHGYHpEguVg/edit#heading= = =3Dh.xzptrog8pyxf .
>
> My original thought was LinuxBoot is a payload that aims to boot OS.<= br> > But the idea of chaining UefiPayload producing UEFI services is very = brilliant.

It can be and it is. The main usage of LinuxBoot is to load/boot another <= br> Linux using the kexec mechanism. But in order to be able to boot
Windows, ESXI, ... a UEFI interface is required.
There have been a few proposals and POCs (like implementing UEFI
services in Linux) but UefiPayload is the most practical and easy way to <= br> do it, for now.

> Have you considered to produce the universal payload interfaces (https://universalpayload.github.io/documentation/ )= from LinuxBoot so no LbParseLib is required?

I don't think we've looked at it. But we liked it to be a string b= ecause
it allows easy forward compatibility and not having to recreate the
structs in higher-level languages like Go.

Agree to Daniel. In the future, we can look for=C2= =A0supporting HOB structure in u-root, but for now, we prefer to stick wit= h the current approach.

--
Cheng-Chieh
=C2=A0
> Thanks,
> Ray
>
>> -----Original Message-----
>> From: d= evel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Cheng-Chieh Huang vi= a groups.= io
>> Sent: Wednesday, July 21, 2021 9:23 PM
>> To: dev= el@edk2.groups.io
>> Cc: Cheng-Chieh Huang <chengchieh@google.com>; Schaefer, Daniel <daniel.schaefer@h= pe.com>; Trammell Hudson
>> <hudson@t= rmm.net>; Ma, Maurice <maurice.ma@intel.com>; Dong, Guo <guo.dong@intel.com>; You, B= enjamin
>> <b= enjamin.you@intel.com>
>> Subject: [edk2-devel] [PATCH 0/6] UefiPayloadPkg: LinuxBoot Suppo= rt in UefiPayload
>>
>> These are necessary patches to Support LinuxBoot in UefiPayload.<= br> >> With these paches, we can boot to ESXi and Windows from a linux i= n QEMU.
>>
>> LinuxBoot README:
>> https://github.= com/linuxboot/edk2/blob/uefipayload/UefiPayloadPkg/README.md
>>
>> PR to tianocore:
>> https://github.com/tianocore/edk2/pull/1820=
>>
>> Cheng-Chieh Huang (5):
>>=C2=A0 =C2=A0 Add LINUXBOOT payload target
>>=C2=A0 =C2=A0 Use legacy timer in Linuxboot payload
>>=C2=A0 =C2=A0 Update maximum logic processor to 256
>>=C2=A0 =C2=A0 Reserve Payload config in runtime services data
>>=C2=A0 =C2=A0 Add DISABLE_MMX_SSE to avoid generating floating poi= nts operation
>>
>> Trammell Hudson (1):
>>=C2=A0 =C2=A0 LinuxBoot: use a text format for the configuration b= lock.
>>
>>=C2=A0 =C2=A0UefiPayloadPkg/UefiPayloadPkg.dsc=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 29 +-
>>=C2=A0 =C2=A0UefiPayloadPkg/UefiPayloadPkg.fdf=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A05 +
>>=C2=A0 =C2=A0.../Library/LbParseLib/LbParseLib.inf=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0|=C2=A0 39 ++
>>=C2=A0 =C2=A0UefiPayloadPkg/Include/Linuxboot.h=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 58 +++
>>=C2=A0 =C2=A0.../Library/LbParseLib/LbParseLib.c=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0| 348 ++++++++++++++++++
>>=C2=A0 =C2=A0.../PciHostBridgeLib/PciHostBridgeSupport.c=C2=A0 =C2= = =A0|=C2=A0 =C2=A06 +-
>>=C2=A0 =C2=A0.../UefiPayloadEntry/UefiPayloadEntry.c=C2=A0 =C2=A0 = = =C2=A0 =C2=A0|=C2=A0 =C2=A02 +
>>=C2=A0 =C2=A0CryptoPkg/Library/OpensslLib/openssl=C2=A0 =C2=A0 =C2= = =A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A02 +-
>>=C2=A0 =C2=A08 files changed, 480 insertions(+), 9 deletions(-) >>=C2=A0 =C2=A0create mode 100644 UefiPayloadPkg/Library/LbParseLib/= LbParseLib.inf
>>=C2=A0 =C2=A0create mode 100644 UefiPayloadPkg/Include/Linuxboot.h=
>>=C2=A0 =C2=A0create mode 100644 UefiPayloadPkg/Library/LbParseLib/= LbParseLib.c
>>
>> Cc: Cheng-Chieh Huang <chengchieh@google.com>
>> Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
>> Cc: Trammell Hudson <hudson@trmm.net>
>> Cc: Maurice Ma <maurice.ma@intel.com>
>> Cc: Guo Dong <guo.dong@intel.com>
>> Cc: Benjamin You <benjamin.you@intel.com>
>> --
>> 2.32.0.402.g57bb445576-goog
>>
>>
>>
>>
>>
>
--000000000000fa6b6e05c7ad53b6--