Skip to content

Conversation

@xypron
Copy link

@xypron xypron commented Jun 2, 2022

The proposed RISC-V boot protocol specification requires that calling
GetBootHartId() with a value of This other than the protocol interface
address shall result in EFI_INVALID_PARAMETER. It is not sufficient
to test that This is not NULL.

Cf. https://bugzilla.tianocore.org/show_bug.cgi?id=3837

Fixes: 6daebc9 ("RISC-V: Implement RISCV_EFI_BOOT_PROTOCOL")
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com

Abner Chang and others added 17 commits May 27, 2022 18:17
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
This patch adds required modules to qemu virt platform
build. In qemu, ACPI tables are created by qemu itself
and edk2 just installs them in proper way for OS
consumption.

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
The firmware should install either  DT or ACPI tables,
not both. This patch detects that qemu has created ACPI
tables and provide preference to ACPI in that case and
avoids installing DT.

Ideally, this should be given as choice to the user as
in ARM platform.

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
RISC-V platforms need to support new RISCV_EFI_BOOT_PROTOCOL
to communicate the boot hart id to the OS. This patch
implements this protocol.

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Currently, opensbi is integrated as a library in EDK2. Hence,
it is always required to boot EDK2 in M-mode. This patch enables
booting EDK2 in S-mode. A prior stage M-mode firmware like
opensbi is mandatory in this case to boot edk2 in S-Mode.

This enables working with latest opensbi without going
through the process of integration with EDK2.

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Currently, the system memory size is hardcoded. But the
system memory can be configured while launching qemu. Hence,
this patch enables reading memory configured at runtime.

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
On Qemu, timer frequency is 10000000. But EDK2 is currently using
1000000. Due to this, the timeout expires much faster.

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
boot-hartid in DT is always updated with a build time constant
hartid. This works only when EDK2 is booted in M-mode.
Instead of hard coded hartid, use the hartid which is
populated in the Firmware Context structure during boot.

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
The proposed RISC-V boot protocol specification requires that calling
GetBootHartId() with a value of This other than the protocol interface
address shall result in EFI_INVALID_PARAMETER. It is not sufficient
to test that This is not NULL.

Cf. https://bugzilla.tianocore.org/show_bug.cgi?id=3837

Fixes: 6daebc9 ("RISC-V: Implement RISCV_EFI_BOOT_PROTOCOL")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
@vlsunil vlsunil force-pushed the dev-upstream branch 2 times, most recently from e4758c7 to 7af484d Compare June 8, 2022 13:08
@vlsunil vlsunil self-requested a review as a code owner August 13, 2025 13:15
@vlsunil vlsunil force-pushed the dev-upstream branch 2 times, most recently from e8da983 to fcd7aee Compare November 14, 2025 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants