* [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
@ 2022-04-22 3:50 duntan
2022-04-22 3:55 ` Ni, Ray
2022-04-22 5:08 ` Guo Dong
0 siblings, 2 replies; 6+ messages in thread
From: duntan @ 2022-04-22 3:50 UTC (permalink / raw)
To: devel; +Cc: Ray Ni, Guo Dong, Benjamin You, Sean Rhodes, Zhiguang Liu
Add definition for UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE Hob.
This Hob is used to pass Linux Kernel command Line to Payload
Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Dun Tan <dun.tan@intel.com>
---
UefiPayloadPkg/Include/Guid/LinuxCommandLine.h | 28 ++++++++++++++++++++++++++++
UefiPayloadPkg/UefiPayloadPkg.dec | 1 +
2 files changed, 29 insertions(+)
diff --git a/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h b/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h
new file mode 100644
index 0000000000..0bb75238e7
--- /dev/null
+++ b/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h
@@ -0,0 +1,28 @@
+/** @file
+ Define the structure for the Linux command line Hob.
+
+Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef LINUX_COMMAND_LINE_GUID_H_
+#define LINUX_COMMAND_LINE_GUID_H_
+
+#include <Uefi.h>
+#include <UniversalPayload/UniversalPayload.h>
+
+#pragma pack (1)
+
+typedef struct {
+ UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;
+ UINT32 Count;
+ CHAR8 CommandLine[0];
+} UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE;
+
+#pragma pack()
+
+#define UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE_REVISION 1
+
+extern GUID gEdkiiLinuxCommandLineGuid;
+#endif
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec b/UefiPayloadPkg/UefiPayloadPkg.dec
index 5c1aeb8235..494ef94932 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dec
+++ b/UefiPayloadPkg/UefiPayloadPkg.dec
@@ -35,6 +35,7 @@
gUefiAcpiBoardInfoGuid = {0xad3d31b, 0xb3d8, 0x4506, {0xae, 0x71, 0x2e, 0xf1, 0x10, 0x6, 0xd9, 0xf}}
gUefiSerialPortInfoGuid = { 0x6c6872fe, 0x56a9, 0x4403, { 0xbb, 0x98, 0x95, 0x8d, 0x62, 0xde, 0x87, 0xf1 } }
gLoaderMemoryMapInfoGuid = { 0xa1ff7424, 0x7a1a, 0x478e, { 0xa9, 0xe4, 0x92, 0xf3, 0x57, 0xd1, 0x28, 0x32 } }
+ gEdkiiLinuxCommandLineGuid = {0xb5aeb34f, 0x3047, 0x4955, {0xb8, 0x80, 0xad, 0xd3, 0x6d, 0x86, 0xdc, 0x0f}}
# SMM variable support
gNvVariableInfoGuid = { 0x7a345dca, 0xc26, 0x4f2a, { 0xa8, 0x9a, 0x57, 0xc0, 0x8d, 0xdd, 0x22, 0xee } }
--
2.31.1.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
2022-04-22 3:50 [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB duntan
@ 2022-04-22 3:55 ` Ni, Ray
2022-04-22 5:08 ` Guo Dong
1 sibling, 0 replies; 6+ messages in thread
From: Ni, Ray @ 2022-04-22 3:55 UTC (permalink / raw)
To: Tan, Dun, devel@edk2.groups.io
Cc: Dong, Guo, You, Benjamin, Rhodes, Sean, Liu, Zhiguang
Reviewed-by: Ray Ni <ray.ni@intel.com>
> -----Original Message-----
> From: Tan, Dun <dun.tan@intel.com>
> Sent: Friday, April 22, 2022 11:51 AM
> To: devel@edk2.groups.io
> Cc: Ni, Ray <ray.ni@intel.com>; Dong, Guo <guo.dong@intel.com>; You, Benjamin <benjamin.you@intel.com>; Rhodes, Sean
> <sean@starlabs.systems>; Liu, Zhiguang <zhiguang.liu@intel.com>
> Subject: [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
>
> Add definition for UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE Hob.
> This Hob is used to pass Linux Kernel command Line to Payload
>
> Signed-off-by: Dun Tan <dun.tan@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Benjamin You <benjamin.you@intel.com>
> Cc: Sean Rhodes <sean@starlabs.systems>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Signed-off-by: Dun Tan <dun.tan@intel.com>
> ---
> UefiPayloadPkg/Include/Guid/LinuxCommandLine.h | 28 ++++++++++++++++++++++++++++
> UefiPayloadPkg/UefiPayloadPkg.dec | 1 +
> 2 files changed, 29 insertions(+)
>
> diff --git a/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h b/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h
> new file mode 100644
> index 0000000000..0bb75238e7
> --- /dev/null
> +++ b/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h
> @@ -0,0 +1,28 @@
> +/** @file
> + Define the structure for the Linux command line Hob.
> +
> +Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef LINUX_COMMAND_LINE_GUID_H_
> +#define LINUX_COMMAND_LINE_GUID_H_
> +
> +#include <Uefi.h>
> +#include <UniversalPayload/UniversalPayload.h>
> +
> +#pragma pack (1)
> +
> +typedef struct {
> + UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;
> + UINT32 Count;
> + CHAR8 CommandLine[0];
> +} UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE;
> +
> +#pragma pack()
> +
> +#define UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE_REVISION 1
> +
> +extern GUID gEdkiiLinuxCommandLineGuid;
> +#endif
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec b/UefiPayloadPkg/UefiPayloadPkg.dec
> index 5c1aeb8235..494ef94932 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dec
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dec
> @@ -35,6 +35,7 @@
> gUefiAcpiBoardInfoGuid = {0xad3d31b, 0xb3d8, 0x4506, {0xae, 0x71, 0x2e, 0xf1, 0x10, 0x6, 0xd9, 0xf}}
> gUefiSerialPortInfoGuid = { 0x6c6872fe, 0x56a9, 0x4403, { 0xbb, 0x98, 0x95, 0x8d, 0x62, 0xde, 0x87, 0xf1 } }
> gLoaderMemoryMapInfoGuid = { 0xa1ff7424, 0x7a1a, 0x478e, { 0xa9, 0xe4, 0x92, 0xf3, 0x57, 0xd1, 0x28, 0x32 } }
> + gEdkiiLinuxCommandLineGuid = {0xb5aeb34f, 0x3047, 0x4955, {0xb8, 0x80, 0xad, 0xd3, 0x6d, 0x86, 0xdc, 0x0f}}
>
> # SMM variable support
> gNvVariableInfoGuid = { 0x7a345dca, 0xc26, 0x4f2a, { 0xa8, 0x9a, 0x57, 0xc0, 0x8d, 0xdd, 0x22, 0xee } }
> --
> 2.31.1.windows.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
2022-04-22 3:50 [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB duntan
2022-04-22 3:55 ` Ni, Ray
@ 2022-04-22 5:08 ` Guo Dong
2022-04-22 6:59 ` duntan
1 sibling, 1 reply; 6+ messages in thread
From: Guo Dong @ 2022-04-22 5:08 UTC (permalink / raw)
To: Tan, Dun, devel@edk2.groups.io
Cc: Ni, Ray, You, Benjamin, Rhodes, Sean, Liu, Zhiguang
Minor comments:
It would be great if adding some descriptions to the fields to make its usage more clear.
Maybe we need give this header file and structure a more generic name by using "OS" instead of "LINUX" so that bootloader could pass command line to Android and other OSes using same structure.
With current definition it looks bootloader could only pass 1 command line to payload. I am not sure if there is a case that bootloader need pass multiple command line so that payload could pick up one of them for OS.
+typedef struct {
+ UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;
+ UINT32 Count;
+ CHAR8 CommandLine[0];
+} UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE;
Thanks,
Guo
-----Original Message-----
From: Tan, Dun <dun.tan@intel.com>
Sent: Thursday, April 21, 2022 8:51 PM
To: devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; Dong, Guo <guo.dong@intel.com>; You, Benjamin <benjamin.you@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Liu, Zhiguang <zhiguang.liu@intel.com>
Subject: [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
Add definition for UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE Hob.
This Hob is used to pass Linux Kernel command Line to Payload
Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Dun Tan <dun.tan@intel.com>
---
UefiPayloadPkg/Include/Guid/LinuxCommandLine.h | 28 ++++++++++++++++++++++++++++
UefiPayloadPkg/UefiPayloadPkg.dec | 1 +
2 files changed, 29 insertions(+)
diff --git a/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h b/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h
new file mode 100644
index 0000000000..0bb75238e7
--- /dev/null
+++ b/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h
@@ -0,0 +1,28 @@
+/** @file
+ Define the structure for the Linux command line Hob.
+
+Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef LINUX_COMMAND_LINE_GUID_H_
+#define LINUX_COMMAND_LINE_GUID_H_
+
+#include <Uefi.h>
+#include <UniversalPayload/UniversalPayload.h>
+
+#pragma pack (1)
+
+typedef struct {
+ UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;
+ UINT32 Count;
+ CHAR8 CommandLine[0];
+} UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE;
+
+#pragma pack()
+
+#define UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE_REVISION 1
+
+extern GUID gEdkiiLinuxCommandLineGuid; #endif
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec b/UefiPayloadPkg/UefiPayloadPkg.dec
index 5c1aeb8235..494ef94932 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dec
+++ b/UefiPayloadPkg/UefiPayloadPkg.dec
@@ -35,6 +35,7 @@
gUefiAcpiBoardInfoGuid = {0xad3d31b, 0xb3d8, 0x4506, {0xae, 0x71, 0x2e, 0xf1, 0x10, 0x6, 0xd9, 0xf}}
gUefiSerialPortInfoGuid = { 0x6c6872fe, 0x56a9, 0x4403, { 0xbb, 0x98, 0x95, 0x8d, 0x62, 0xde, 0x87, 0xf1 } }
gLoaderMemoryMapInfoGuid = { 0xa1ff7424, 0x7a1a, 0x478e, { 0xa9, 0xe4, 0x92, 0xf3, 0x57, 0xd1, 0x28, 0x32 } }
+ gEdkiiLinuxCommandLineGuid = {0xb5aeb34f, 0x3047, 0x4955, {0xb8,
+ 0x80, 0xad, 0xd3, 0x6d, 0x86, 0xdc, 0x0f}}
# SMM variable support
gNvVariableInfoGuid = { 0x7a345dca, 0xc26, 0x4f2a, { 0xa8, 0x9a, 0x57, 0xc0, 0x8d, 0xdd, 0x22, 0xee } }
--
2.31.1.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
2022-04-22 5:08 ` Guo Dong
@ 2022-04-22 6:59 ` duntan
2022-04-26 21:07 ` Guo Dong
0 siblings, 1 reply; 6+ messages in thread
From: duntan @ 2022-04-22 6:59 UTC (permalink / raw)
To: Dong, Guo, devel@edk2.groups.io
Cc: Ni, Ray, You, Benjamin, Rhodes, Sean, Liu, Zhiguang
Hi Guo,
Thanks for the comments!
This Hob is used to pass Linux command line to LinuxPayload instead of OSes. For LinuxPayload, it only needs the Linux Command Line.
Thanks,
Dun
-----Original Message-----
From: Dong, Guo <guo.dong@intel.com>
Sent: Friday, April 22, 2022 1:09 PM
To: Tan, Dun <dun.tan@intel.com>; devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; You, Benjamin <benjamin.you@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Liu, Zhiguang <zhiguang.liu@intel.com>
Subject: RE: [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
Minor comments:
It would be great if adding some descriptions to the fields to make its usage more clear.
Maybe we need give this header file and structure a more generic name by using "OS" instead of "LINUX" so that bootloader could pass command line to Android and other OSes using same structure.
With current definition it looks bootloader could only pass 1 command line to payload. I am not sure if there is a case that bootloader need pass multiple command line so that payload could pick up one of them for OS.
+typedef struct {
+ UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;
+ UINT32 Count;
+ CHAR8 CommandLine[0];
+} UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE;
Thanks,
Guo
-----Original Message-----
From: Tan, Dun <dun.tan@intel.com>
Sent: Thursday, April 21, 2022 8:51 PM
To: devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; Dong, Guo <guo.dong@intel.com>; You, Benjamin <benjamin.you@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Liu, Zhiguang <zhiguang.liu@intel.com>
Subject: [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
Add definition for UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE Hob.
This Hob is used to pass Linux Kernel command Line to Payload
Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Dun Tan <dun.tan@intel.com>
---
UefiPayloadPkg/Include/Guid/LinuxCommandLine.h | 28 ++++++++++++++++++++++++++++
UefiPayloadPkg/UefiPayloadPkg.dec | 1 +
2 files changed, 29 insertions(+)
diff --git a/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h b/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h
new file mode 100644
index 0000000000..0bb75238e7
--- /dev/null
+++ b/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h
@@ -0,0 +1,28 @@
+/** @file
+ Define the structure for the Linux command line Hob.
+
+Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef LINUX_COMMAND_LINE_GUID_H_
+#define LINUX_COMMAND_LINE_GUID_H_
+
+#include <Uefi.h>
+#include <UniversalPayload/UniversalPayload.h>
+
+#pragma pack (1)
+
+typedef struct {
+ UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;
+ UINT32 Count;
+ CHAR8 CommandLine[0];
+} UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE;
+
+#pragma pack()
+
+#define UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE_REVISION 1
+
+extern GUID gEdkiiLinuxCommandLineGuid; #endif
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec b/UefiPayloadPkg/UefiPayloadPkg.dec
index 5c1aeb8235..494ef94932 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dec
+++ b/UefiPayloadPkg/UefiPayloadPkg.dec
@@ -35,6 +35,7 @@
gUefiAcpiBoardInfoGuid = {0xad3d31b, 0xb3d8, 0x4506, {0xae, 0x71, 0x2e, 0xf1, 0x10, 0x6, 0xd9, 0xf}}
gUefiSerialPortInfoGuid = { 0x6c6872fe, 0x56a9, 0x4403, { 0xbb, 0x98, 0x95, 0x8d, 0x62, 0xde, 0x87, 0xf1 } }
gLoaderMemoryMapInfoGuid = { 0xa1ff7424, 0x7a1a, 0x478e, { 0xa9, 0xe4, 0x92, 0xf3, 0x57, 0xd1, 0x28, 0x32 } }
+ gEdkiiLinuxCommandLineGuid = {0xb5aeb34f, 0x3047, 0x4955, {0xb8,
+ 0x80, 0xad, 0xd3, 0x6d, 0x86, 0xdc, 0x0f}}
# SMM variable support
gNvVariableInfoGuid = { 0x7a345dca, 0xc26, 0x4f2a, { 0xa8, 0x9a, 0x57, 0xc0, 0x8d, 0xdd, 0x22, 0xee } }
--
2.31.1.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
2022-04-22 6:59 ` duntan
@ 2022-04-26 21:07 ` Guo Dong
2022-04-27 9:04 ` duntan
0 siblings, 1 reply; 6+ messages in thread
From: Guo Dong @ 2022-04-26 21:07 UTC (permalink / raw)
To: Tan, Dun, devel@edk2.groups.io
Cc: Ni, Ray, You, Benjamin, Rhodes, Sean, Liu, Zhiguang
Hi Dun,
This patch adds an interface (passing command line HOB) between bootloader and UEFI payload.
Do you mean the use case is that bootloader passes this HOB to UEFI payload, then UEFI payload would launch LinuxPayload with this command line?
If so, how the UEFI payload knows it is LinuxPayload so it would pass this command line?
Thanks,
Guo
-----Original Message-----
From: Tan, Dun <dun.tan@intel.com>
Sent: Thursday, April 21, 2022 11:59 PM
To: Dong, Guo <guo.dong@intel.com>; devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; You, Benjamin <benjamin.you@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Liu, Zhiguang <zhiguang.liu@intel.com>
Subject: RE: [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
Hi Guo,
Thanks for the comments!
This Hob is used to pass Linux command line to LinuxPayload instead of OSes. For LinuxPayload, it only needs the Linux Command Line.
Thanks,
Dun
-----Original Message-----
From: Dong, Guo <guo.dong@intel.com>
Sent: Friday, April 22, 2022 1:09 PM
To: Tan, Dun <dun.tan@intel.com>; devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; You, Benjamin <benjamin.you@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Liu, Zhiguang <zhiguang.liu@intel.com>
Subject: RE: [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
Minor comments:
It would be great if adding some descriptions to the fields to make its usage more clear.
Maybe we need give this header file and structure a more generic name by using "OS" instead of "LINUX" so that bootloader could pass command line to Android and other OSes using same structure.
With current definition it looks bootloader could only pass 1 command line to payload. I am not sure if there is a case that bootloader need pass multiple command line so that payload could pick up one of them for OS.
+typedef struct {
+ UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;
+ UINT32 Count;
+ CHAR8 CommandLine[0];
+} UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE;
Thanks,
Guo
-----Original Message-----
From: Tan, Dun <dun.tan@intel.com>
Sent: Thursday, April 21, 2022 8:51 PM
To: devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; Dong, Guo <guo.dong@intel.com>; You, Benjamin <benjamin.you@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Liu, Zhiguang <zhiguang.liu@intel.com>
Subject: [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
Add definition for UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE Hob.
This Hob is used to pass Linux Kernel command Line to Payload
Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Dun Tan <dun.tan@intel.com>
---
UefiPayloadPkg/Include/Guid/LinuxCommandLine.h | 28 ++++++++++++++++++++++++++++
UefiPayloadPkg/UefiPayloadPkg.dec | 1 +
2 files changed, 29 insertions(+)
diff --git a/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h b/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h
new file mode 100644
index 0000000000..0bb75238e7
--- /dev/null
+++ b/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h
@@ -0,0 +1,28 @@
+/** @file
+ Define the structure for the Linux command line Hob.
+
+Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef LINUX_COMMAND_LINE_GUID_H_
+#define LINUX_COMMAND_LINE_GUID_H_
+
+#include <Uefi.h>
+#include <UniversalPayload/UniversalPayload.h>
+
+#pragma pack (1)
+
+typedef struct {
+ UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;
+ UINT32 Count;
+ CHAR8 CommandLine[0];
+} UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE;
+
+#pragma pack()
+
+#define UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE_REVISION 1
+
+extern GUID gEdkiiLinuxCommandLineGuid; #endif
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec b/UefiPayloadPkg/UefiPayloadPkg.dec
index 5c1aeb8235..494ef94932 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dec
+++ b/UefiPayloadPkg/UefiPayloadPkg.dec
@@ -35,6 +35,7 @@
gUefiAcpiBoardInfoGuid = {0xad3d31b, 0xb3d8, 0x4506, {0xae, 0x71, 0x2e, 0xf1, 0x10, 0x6, 0xd9, 0xf}}
gUefiSerialPortInfoGuid = { 0x6c6872fe, 0x56a9, 0x4403, { 0xbb, 0x98, 0x95, 0x8d, 0x62, 0xde, 0x87, 0xf1 } }
gLoaderMemoryMapInfoGuid = { 0xa1ff7424, 0x7a1a, 0x478e, { 0xa9, 0xe4, 0x92, 0xf3, 0x57, 0xd1, 0x28, 0x32 } }
+ gEdkiiLinuxCommandLineGuid = {0xb5aeb34f, 0x3047, 0x4955, {0xb8,
+ 0x80, 0xad, 0xd3, 0x6d, 0x86, 0xdc, 0x0f}}
# SMM variable support
gNvVariableInfoGuid = { 0x7a345dca, 0xc26, 0x4f2a, { 0xa8, 0x9a, 0x57, 0xc0, 0x8d, 0xdd, 0x22, 0xee } }
--
2.31.1.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
2022-04-26 21:07 ` Guo Dong
@ 2022-04-27 9:04 ` duntan
0 siblings, 0 replies; 6+ messages in thread
From: duntan @ 2022-04-27 9:04 UTC (permalink / raw)
To: Dong, Guo, devel@edk2.groups.io
Cc: Ni, Ray, You, Benjamin, Rhodes, Sean, Liu, Zhiguang
Hi Guo,
We may plan to have a LinuxPayloadEntry in Edk2 to launch LinuxPayload instead of UEFI payload entry.
UEFI payload does not need to be aware of this HOB.
Thanks,
Dun
-----Original Message-----
From: Dong, Guo <guo.dong@intel.com>
Sent: Wednesday, April 27, 2022 5:08 AM
To: Tan, Dun <dun.tan@intel.com>; devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; You, Benjamin <benjamin.you@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Liu, Zhiguang <zhiguang.liu@intel.com>
Subject: RE: [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
Hi Dun,
This patch adds an interface (passing command line HOB) between bootloader and UEFI payload.
Do you mean the use case is that bootloader passes this HOB to UEFI payload, then UEFI payload would launch LinuxPayload with this command line?
If so, how the UEFI payload knows it is LinuxPayload so it would pass this command line?
Thanks,
Guo
-----Original Message-----
From: Tan, Dun <dun.tan@intel.com>
Sent: Thursday, April 21, 2022 11:59 PM
To: Dong, Guo <guo.dong@intel.com>; devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; You, Benjamin <benjamin.you@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Liu, Zhiguang <zhiguang.liu@intel.com>
Subject: RE: [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
Hi Guo,
Thanks for the comments!
This Hob is used to pass Linux command line to LinuxPayload instead of OSes. For LinuxPayload, it only needs the Linux Command Line.
Thanks,
Dun
-----Original Message-----
From: Dong, Guo <guo.dong@intel.com>
Sent: Friday, April 22, 2022 1:09 PM
To: Tan, Dun <dun.tan@intel.com>; devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; You, Benjamin <benjamin.you@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Liu, Zhiguang <zhiguang.liu@intel.com>
Subject: RE: [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
Minor comments:
It would be great if adding some descriptions to the fields to make its usage more clear.
Maybe we need give this header file and structure a more generic name by using "OS" instead of "LINUX" so that bootloader could pass command line to Android and other OSes using same structure.
With current definition it looks bootloader could only pass 1 command line to payload. I am not sure if there is a case that bootloader need pass multiple command line so that payload could pick up one of them for OS.
+typedef struct {
+ UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;
+ UINT32 Count;
+ CHAR8 CommandLine[0];
+} UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE;
Thanks,
Guo
-----Original Message-----
From: Tan, Dun <dun.tan@intel.com>
Sent: Thursday, April 21, 2022 8:51 PM
To: devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; Dong, Guo <guo.dong@intel.com>; You, Benjamin <benjamin.you@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Liu, Zhiguang <zhiguang.liu@intel.com>
Subject: [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB
Add definition for UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE Hob.
This Hob is used to pass Linux Kernel command Line to Payload
Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Dun Tan <dun.tan@intel.com>
---
UefiPayloadPkg/Include/Guid/LinuxCommandLine.h | 28 ++++++++++++++++++++++++++++
UefiPayloadPkg/UefiPayloadPkg.dec | 1 +
2 files changed, 29 insertions(+)
diff --git a/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h b/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h
new file mode 100644
index 0000000000..0bb75238e7
--- /dev/null
+++ b/UefiPayloadPkg/Include/Guid/LinuxCommandLine.h
@@ -0,0 +1,28 @@
+/** @file
+ Define the structure for the Linux command line Hob.
+
+Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef LINUX_COMMAND_LINE_GUID_H_
+#define LINUX_COMMAND_LINE_GUID_H_
+
+#include <Uefi.h>
+#include <UniversalPayload/UniversalPayload.h>
+
+#pragma pack (1)
+
+typedef struct {
+ UNIVERSAL_PAYLOAD_GENERIC_HEADER Header;
+ UINT32 Count;
+ CHAR8 CommandLine[0];
+} UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE;
+
+#pragma pack()
+
+#define UNIVERSAL_PAYLOAD_LINUX_COMMAND_LINE_REVISION 1
+
+extern GUID gEdkiiLinuxCommandLineGuid; #endif
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec b/UefiPayloadPkg/UefiPayloadPkg.dec
index 5c1aeb8235..494ef94932 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dec
+++ b/UefiPayloadPkg/UefiPayloadPkg.dec
@@ -35,6 +35,7 @@
gUefiAcpiBoardInfoGuid = {0xad3d31b, 0xb3d8, 0x4506, {0xae, 0x71, 0x2e, 0xf1, 0x10, 0x6, 0xd9, 0xf}}
gUefiSerialPortInfoGuid = { 0x6c6872fe, 0x56a9, 0x4403, { 0xbb, 0x98, 0x95, 0x8d, 0x62, 0xde, 0x87, 0xf1 } }
gLoaderMemoryMapInfoGuid = { 0xa1ff7424, 0x7a1a, 0x478e, { 0xa9, 0xe4, 0x92, 0xf3, 0x57, 0xd1, 0x28, 0x32 } }
+ gEdkiiLinuxCommandLineGuid = {0xb5aeb34f, 0x3047, 0x4955, {0xb8,
+ 0x80, 0xad, 0xd3, 0x6d, 0x86, 0xdc, 0x0f}}
# SMM variable support
gNvVariableInfoGuid = { 0x7a345dca, 0xc26, 0x4f2a, { 0xa8, 0x9a, 0x57, 0xc0, 0x8d, 0xdd, 0x22, 0xee } }
--
2.31.1.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-04-27 9:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-22 3:50 [PATCH] UefiPayloadPkg: Add definition for LinuxCommandLine HOB duntan
2022-04-22 3:55 ` Ni, Ray
2022-04-22 5:08 ` Guo Dong
2022-04-22 6:59 ` duntan
2022-04-26 21:07 ` Guo Dong
2022-04-27 9:04 ` duntan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox