* [edk2-platforms] PATCH v2 1/5] U540, U500: Add filesystem drivers
2021-10-04 11:28 [edk2-platforms][PATCH v2 0/5] Improvements for booting to Linux on RISC-V Daniel Schaefer
@ 2021-10-04 11:28 ` Daniel Schaefer
2021-10-04 11:28 ` [edk2-platforms][PATCH v2 2/5] RISC-V/CpuDxe: Ignore set memory attributes failure Daniel Schaefer
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Daniel Schaefer @ 2021-10-04 11:28 UTC (permalink / raw)
To: devel; +Cc: Abner Chang, Sunil V L, Leif Lindholm
Not DiskIoDxe because we don't have a disk, just for loading from
Ramdisks.
Cc: Abner Chang <abner.chang@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Reviewed-By: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
---
Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc | 7 ++++++-
Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf | 4 +++-
Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc | 7 ++++++-
Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf | 4 +++-
4 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc
index 124f0d02cc..cdc1b9ee8f 100644
--- a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc
+++ b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc
@@ -1,7 +1,7 @@
## @file
# RISC-V EFI on SiFive VC707 (U500) RISC-V platform
#
-# Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+# Copyright (c) 2019-2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -507,6 +507,11 @@
MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
+ #
+ # FAT filesystem + GPT/MBR partitioning + UDF filesystem
+ #
+ FatPkg/EnhancedFatDxe/Fat.inf
+ MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
ShellPkg/Application/Shell/Shell.inf {
<LibraryClasses>
diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf
index dac6f85272..f262e4fe17 100644
--- a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf
+++ b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf
@@ -1,7 +1,7 @@
# @file
# Flash definition file on SiFive VC707 (U500) RISC-V platform
#
-# Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+# Copyright (c) 2019-2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -178,6 +178,8 @@ INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
+INF FatPkg/EnhancedFatDxe/Fat.inf
+INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
!ifndef $(SOURCE_DEBUG_ENABLE)
INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
index db7905774a..be70ef5294 100644
--- a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
+++ b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
@@ -1,7 +1,7 @@
## @file
# RISC-V EFI on SiFive Freedom U540 HiFive Unleashed RISC-V platform
#
-# Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+# Copyright (c) 2019-2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -506,6 +506,11 @@
MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
+ #
+ # FAT filesystem + GPT/MBR partitioning + UDF filesystem
+ #
+ FatPkg/EnhancedFatDxe/Fat.inf
+ MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
ShellPkg/Application/Shell/Shell.inf {
<LibraryClasses>
diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf
index 5622e589d6..c0ce09fcee 100644
--- a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf
+++ b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf
@@ -1,7 +1,7 @@
# @file
# Flash definition file on SiFive Freedom U540 HiFive Unleashed RISC-V platform
#
-# Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+# Copyright (c) 2019-2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -178,6 +178,8 @@ INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
+INF FatPkg/EnhancedFatDxe/Fat.inf
+INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
!ifndef $(SOURCE_DEBUG_ENABLE)
INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
--
2.33.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [edk2-platforms][PATCH v2 2/5] RISC-V/CpuDxe: Ignore set memory attributes failure
2021-10-04 11:28 [edk2-platforms][PATCH v2 0/5] Improvements for booting to Linux on RISC-V Daniel Schaefer
2021-10-04 11:28 ` [edk2-platforms] PATCH v2 1/5] U540, U500: Add filesystem drivers Daniel Schaefer
@ 2021-10-04 11:28 ` Daniel Schaefer
2021-10-04 11:28 ` [edk2-platforms][PATCH v2 3/5] U540, U500: Add initrd command to boot Linux Daniel Schaefer
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Daniel Schaefer @ 2021-10-04 11:28 UTC (permalink / raw)
To: devel; +Cc: Abner Chang, Sunil V L, Leif Lindholm
While enumerating the PCIe devices, the driver tries to set some caching
attributes on the memory.
Cc: Abner Chang <abner.chang@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Reviewed-By: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
---
Silicon/RISC-V/ProcessorPkg/Universal/CpuDxe/CpuDxe.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Silicon/RISC-V/ProcessorPkg/Universal/CpuDxe/CpuDxe.c b/Silicon/RISC-V/ProcessorPkg/Universal/CpuDxe/CpuDxe.c
index 27a07b1561..b8b8e91a6c 100644
--- a/Silicon/RISC-V/ProcessorPkg/Universal/CpuDxe/CpuDxe.c
+++ b/Silicon/RISC-V/ProcessorPkg/Universal/CpuDxe/CpuDxe.c
@@ -1,7 +1,7 @@
/** @file
RISC-V CPU DXE driver.
- Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+ Copyright (c) 2016 - 2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -269,7 +269,7 @@ CpuSetMemoryAttributes (
)
{
DEBUG ((DEBUG_INFO, "%a: Set memory attributes not supported yet\n", __FUNCTION__));
- return EFI_UNSUPPORTED;
+ return EFI_SUCCESS;
}
/**
--
2.33.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [edk2-platforms][PATCH v2 3/5] U540, U500: Add initrd command to boot Linux
2021-10-04 11:28 [edk2-platforms][PATCH v2 0/5] Improvements for booting to Linux on RISC-V Daniel Schaefer
2021-10-04 11:28 ` [edk2-platforms] PATCH v2 1/5] U540, U500: Add filesystem drivers Daniel Schaefer
2021-10-04 11:28 ` [edk2-platforms][PATCH v2 2/5] RISC-V/CpuDxe: Ignore set memory attributes failure Daniel Schaefer
@ 2021-10-04 11:28 ` Daniel Schaefer
2021-10-04 14:26 ` Sunil V L
2021-10-04 11:28 ` [edk2-platforms][PATCH v2 4/5] U540: BuildCpuHob with 48 to indicate size memory space Daniel Schaefer
` (3 subsequent siblings)
6 siblings, 1 reply; 9+ messages in thread
From: Daniel Schaefer @ 2021-10-04 11:28 UTC (permalink / raw)
To: devel; +Cc: Abner Chang, Sunil V L, Leif Lindholm
Cc: Abner Chang <abner.chang@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
---
Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc | 7 ++++++-
Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf | 1 +
Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc | 7 ++++++-
Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf | 1 +
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc
index cdc1b9ee8f..9f0a25f8a6 100644
--- a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc
+++ b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc
@@ -97,6 +97,7 @@
UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
SortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
+ ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
@@ -513,6 +514,11 @@
FatPkg/EnhancedFatDxe/Fat.inf
MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
+ OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
+ <PcdsFixedAtBuild>
+ gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
+ }
+
ShellPkg/Application/Shell/Shell.inf {
<LibraryClasses>
ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
@@ -524,7 +530,6 @@
NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
- ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf
index f262e4fe17..5f3ac8e0b7 100644
--- a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf
+++ b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf
@@ -187,6 +187,7 @@ INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
INF ShellPkg/Application/Shell/Shell.inf
#
diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
index be70ef5294..afe63c80ba 100644
--- a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
+++ b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
@@ -97,6 +97,7 @@
UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
SortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
+ ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
@@ -512,6 +513,11 @@
FatPkg/EnhancedFatDxe/Fat.inf
MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
+ OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
+ <PcdsFixedAtBuild>
+ gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
+ }
+
ShellPkg/Application/Shell/Shell.inf {
<LibraryClasses>
ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
@@ -523,7 +529,6 @@
NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
- ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf
index c0ce09fcee..a1a4b342e3 100644
--- a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf
+++ b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf
@@ -187,6 +187,7 @@ INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
INF ShellPkg/Application/Shell/Shell.inf
#
--
2.33.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [edk2-platforms][PATCH v2 3/5] U540, U500: Add initrd command to boot Linux
2021-10-04 11:28 ` [edk2-platforms][PATCH v2 3/5] U540, U500: Add initrd command to boot Linux Daniel Schaefer
@ 2021-10-04 14:26 ` Sunil V L
0 siblings, 0 replies; 9+ messages in thread
From: Sunil V L @ 2021-10-04 14:26 UTC (permalink / raw)
To: Daniel Schaefer; +Cc: devel, Abner Chang, Leif Lindholm
On Mon, Oct 04, 2021 at 07:28:27PM +0800, Daniel Schaefer wrote:
> Cc: Abner Chang <abner.chang@hpe.com>
> Cc: Sunil V L <sunilvl@ventanamicro.com>
> Cc: Leif Lindholm <leif@nuviainc.com>
>
> Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
> ---
> Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc | 7 ++++++-
> Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf | 1 +
> Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc | 7 ++++++-
> Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf | 1 +
> 4 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc
> index cdc1b9ee8f..9f0a25f8a6 100644
> --- a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc
> +++ b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc
> @@ -97,6 +97,7 @@
> UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
> SortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
> + ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
> UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
> FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
> VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
> @@ -513,6 +514,11 @@
> FatPkg/EnhancedFatDxe/Fat.inf
> MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
>
> + OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
> + <PcdsFixedAtBuild>
> + gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
> + }
> +
> ShellPkg/Application/Shell/Shell.inf {
> <LibraryClasses>
> ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
> @@ -524,7 +530,6 @@
> NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
> NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
> HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
> - ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
> FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
> SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
> PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf
> index f262e4fe17..5f3ac8e0b7 100644
> --- a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf
> +++ b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf
> @@ -187,6 +187,7 @@ INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
>
> INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
>
> +INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
> INF ShellPkg/Application/Shell/Shell.inf
>
> #
> diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
> index be70ef5294..afe63c80ba 100644
> --- a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
> +++ b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
> @@ -97,6 +97,7 @@
> UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
> SortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
> + ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
> UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
> FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
> VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
> @@ -512,6 +513,11 @@
> FatPkg/EnhancedFatDxe/Fat.inf
> MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
>
> + OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
> + <PcdsFixedAtBuild>
> + gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
> + }
> +
> ShellPkg/Application/Shell/Shell.inf {
> <LibraryClasses>
> ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
> @@ -523,7 +529,6 @@
> NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
> NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
> HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
> - ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
> FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
> SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
> PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf
> index c0ce09fcee..a1a4b342e3 100644
> --- a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf
> +++ b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf
> @@ -187,6 +187,7 @@ INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
>
> INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
>
> +INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
> INF ShellPkg/Application/Shell/Shell.inf
Looks good to me.
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Regards
Sunil
>
> #
> --
> 2.33.0
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [edk2-platforms][PATCH v2 4/5] U540: BuildCpuHob with 48 to indicate size memory space
2021-10-04 11:28 [edk2-platforms][PATCH v2 0/5] Improvements for booting to Linux on RISC-V Daniel Schaefer
` (2 preceding siblings ...)
2021-10-04 11:28 ` [edk2-platforms][PATCH v2 3/5] U540, U500: Add initrd command to boot Linux Daniel Schaefer
@ 2021-10-04 11:28 ` Daniel Schaefer
2021-10-04 11:28 ` [edk2-platforms][PATCH v2 5/5] Signal EndOfDxe in boot manager Daniel Schaefer
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Daniel Schaefer @ 2021-10-04 11:28 UTC (permalink / raw)
To: devel; +Cc: Abner Chang, Sunil V L, Leif Lindholm
Otherwise it will crash on QEMU 6.0 with:
> Loading driver at 0x000BF814000 EntryPoint=0x000BF81428A PciHostBridgeDxe.efi
> InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF BF351F98
> ProtectUefiImageCommon - 0xBF365BC0
> - 0x00000000BF814000 - 0x00000000000124C0
> PROGRESS CODE: V03040002 I0
> ProcessPciHost: Config[0x30000000+0x10000000) Bus[0x0..0xFF] Io[0x0+0x10000)@0x3000000 Mem32[0x40000000+0x40000000)@0x0 Mem64[0x400000000+0x400000000)@0x0
> CpuSetMemoryAttributes: Set memory attributes not supported yet
> CpuSetMemoryAttributes: Set memory attributes not supported yet
> RootBridge: PciRoot(0x0)
> Support/Attr: 70001 / 70001
> DmaAbove4G: Yes
> NoExtConfSpace: No
> AllocAttr: 3 (CombineMemPMem Mem64Decode)
> Bus: 0 - FF Translation=0
> Io: 0 - FFFF Translation=0
> Mem: 40000000 - 7FFFFFFF Translation=0
> MemAbove4G: 400000000 - 7FFFFFFFF Translation=0
> PMem: FFFFFFFFFFFFFFFF - 0 Translation=0
> PMemAbove4G: FFFFFFFFFFFFFFFF - 0 Translation=0
> CpuSetMemoryAttributes: Set memory attributes not supported yet
>
> ASSERT_EFI_ERROR (Status = Not Found)
> ASSERT [PciHostBridgeDxe] /edk2/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c(332): !EFI_ERROR (CheckStatus)
> QEMU: Terminated
Change works on QEMU 5.2 and 6.0.
Cc: Abner Chang <abner.chang@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Reviewed-By: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
---
Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/Universal/Pei/PlatformPei/Platform.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/Universal/Pei/PlatformPei/Platform.c b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/Universal/Pei/PlatformPei/Platform.c
index 6641e10f2e..9a2cb9413c 100644
--- a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/Universal/Pei/PlatformPei/Platform.c
+++ b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/Universal/Pei/PlatformPei/Platform.c
@@ -1,7 +1,7 @@
/**@file
Platform PEI driver
- Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+ Copyright (c) 2019-2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2011, Andrei Warkentin <andreiw@motorola.com>
@@ -199,7 +199,7 @@ MiscInitialization (
// of IO space. (Side note: unlike other HOBs, the CPU HOB is needed during
// S3 resume as well, so we build it unconditionally.)
//
- BuildCpuHob (32, 32);
+ BuildCpuHob (48, 32);
}
/**
--
2.33.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [edk2-platforms][PATCH v2 5/5] Signal EndOfDxe in boot manager
2021-10-04 11:28 [edk2-platforms][PATCH v2 0/5] Improvements for booting to Linux on RISC-V Daniel Schaefer
` (3 preceding siblings ...)
2021-10-04 11:28 ` [edk2-platforms][PATCH v2 4/5] U540: BuildCpuHob with 48 to indicate size memory space Daniel Schaefer
@ 2021-10-04 11:28 ` Daniel Schaefer
2021-10-05 9:22 ` [edk2-platforms][PATCH v2 0/5] Improvements for booting to Linux on RISC-V Abner Chang
[not found] ` <16AB180F61492DFC.29868@groups.io>
6 siblings, 0 replies; 9+ messages in thread
From: Daniel Schaefer @ 2021-10-04 11:28 UTC (permalink / raw)
To: devel; +Cc: Abner Chang, Sunil V L, Leif Lindholm
Otherwise we can't load a 3rd party image because we're still in DXE.
MdeModulePkg/Universal/SecurityStubDxe/Defer3rdPartyImageLoad.c prevents
that.
Cc: Abner Chang <abner.chang@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Reviewed-By: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
---
Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c | 7 ++++++-
Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c b/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
index 82cd311df5..d67f4836fc 100644
--- a/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
+++ b/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
@@ -1,7 +1,7 @@
/** @file
This file include all platform actions
-Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -155,6 +155,11 @@ PlatformBootManagerBeforeConsole (
EFI_INPUT_KEY F2;
EFI_BOOT_MANAGER_LOAD_OPTION BootOption;
+ //
+ // Signal EndOfDxe PI Event
+ //
+ EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);
+
//
// Update the console variables.
//
diff --git a/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
index afba07573f..2bf89a3c44 100644
--- a/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+++ b/Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
@@ -1,7 +1,7 @@
## @file
# Include all platform action which can be customized by IBV/OEM.
#
-# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+# Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -48,6 +48,7 @@
PrintLib
[Guids]
+ gEfiEndOfDxeEventGroupGuid
[Protocols]
gEfiGenericMemTestProtocolGuid ## CONSUMES
--
2.33.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [edk2-platforms][PATCH v2 0/5] Improvements for booting to Linux on RISC-V
2021-10-04 11:28 [edk2-platforms][PATCH v2 0/5] Improvements for booting to Linux on RISC-V Daniel Schaefer
` (4 preceding siblings ...)
2021-10-04 11:28 ` [edk2-platforms][PATCH v2 5/5] Signal EndOfDxe in boot manager Daniel Schaefer
@ 2021-10-05 9:22 ` Abner Chang
[not found] ` <16AB180F61492DFC.29868@groups.io>
6 siblings, 0 replies; 9+ messages in thread
From: Abner Chang @ 2021-10-05 9:22 UTC (permalink / raw)
To: Schaefer, Daniel, devel@edk2.groups.io; +Cc: Sunil V L, Leif Lindholm
[-- Attachment #1: Type: text/plain, Size: 1937 bytes --]
All good.
Reviewed-by: Abner Chang <abner.chang@hpe.com>
________________________________
From: Schaefer, Daniel <daniel.schaefer@hpe.com>
Sent: Monday, October 4, 2021 7:28 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Leif Lindholm <leif@nuviainc.com>
Subject: [edk2-platforms][PATCH v2 0/5] Improvements for booting to Linux on RISC-V
Changes from v1:
- Remove ShellLib override in 3/5
Tested on the unpublshed riscvvirt branch and it can still boot to
Linux.
Cc: Abner Chang <abner.chang@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Daniel Schaefer (5):
U540, U500: Add filesystem drivers
RISC-V/CpuDxe: Ignore set memory attributes failure
U540, U500: Add initrd command to boot Linux
U540: BuildCpuHob with 48 to indicate size memory space
Signal EndOfDxe in boot manager
Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c | 7 ++++++-
Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 3 ++-
Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc | 14 ++++++++++++--
Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf | 5 ++++-
Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc | 14 ++++++++++++--
Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf | 5 ++++-
Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/Universal/Pei/PlatformPei/Platform.c | 4 ++--
Silicon/RISC-V/ProcessorPkg/Universal/CpuDxe/CpuDxe.c | 4 ++--
8 files changed, 44 insertions(+), 12 deletions(-)
--
2.33.0
[-- Attachment #2: Type: text/html, Size: 4554 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <16AB180F61492DFC.29868@groups.io>]
* Re: [edk2-devel] [edk2-platforms][PATCH v2 0/5] Improvements for booting to Linux on RISC-V
[not found] ` <16AB180F61492DFC.29868@groups.io>
@ 2021-10-19 5:59 ` Abner Chang
0 siblings, 0 replies; 9+ messages in thread
From: Abner Chang @ 2021-10-19 5:59 UTC (permalink / raw)
To: devel@edk2.groups.io, Chang, Abner (HPS SW/FW Technologist),
Schaefer, Daniel
Cc: Sunil V L, Leif Lindholm
[-- Attachment #1: Type: text/plain, Size: 2330 bytes --]
Merged.
Thanks
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Abner Chang
Sent: Tuesday, October 5, 2021 5:22 PM
To: Schaefer, Daniel <daniel.schaefer@hpe.com>; devel@edk2.groups.io
Cc: Sunil V L <sunilvl@ventanamicro.com>; Leif Lindholm <leif@nuviainc.com>
Subject: Re: [edk2-devel] [edk2-platforms][PATCH v2 0/5] Improvements for booting to Linux on RISC-V
All good.
Reviewed-by: Abner Chang <abner.chang@hpe.com>
________________________________
From: Schaefer, Daniel <daniel.schaefer@hpe.com>
Sent: Monday, October 4, 2021 7:28 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Leif Lindholm <leif@nuviainc.com>
Subject: [edk2-platforms][PATCH v2 0/5] Improvements for booting to Linux on RISC-V
Changes from v1:
- Remove ShellLib override in 3/5
Tested on the unpublshed riscvvirt branch and it can still boot to
Linux.
Cc: Abner Chang <abner.chang@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Daniel Schaefer (5):
U540, U500: Add filesystem drivers
RISC-V/CpuDxe: Ignore set memory attributes failure
U540, U500: Add initrd command to boot Linux
U540: BuildCpuHob with 48 to indicate size memory space
Signal EndOfDxe in boot manager
Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c | 7 ++++++-
Platform/RISC-V/PlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 3 ++-
Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc | 14 ++++++++++++--
Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.fdf | 5 ++++-
Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc | 14 ++++++++++++--
Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.fdf | 5 ++++-
Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/Universal/Pei/PlatformPei/Platform.c | 4 ++--
Silicon/RISC-V/ProcessorPkg/Universal/CpuDxe/CpuDxe.c | 4 ++--
8 files changed, 44 insertions(+), 12 deletions(-)
--
2.33.0
[-- Attachment #2: Type: text/html, Size: 7813 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread