public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] RISC-V/PlatformPkg: Fix compilation breakage in OpenSBI
@ 2021-03-24 13:59 Loic Devulder
  2021-03-25  0:46 ` [edk2-devel] " Abner Chang
  0 siblings, 1 reply; 3+ messages in thread
From: Loic Devulder @ 2021-03-24 13:59 UTC (permalink / raw)
  To: devel

platform_ops and platform structures have older entries that don't exist
anymore on recent OpenSBI versions, so we can remove them.

Cc: Abner Chang <abner.chang@hpe.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Gilbert Chen <gilbert.chen@hpe.com>

Signed-off-by: Loic Devulder <ldevulder@suse.com>
---
 .../PlatformPkg/Library/OpensbiPlatformLibNull/Platform.c     | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Platform/RISC-V/PlatformPkg/Library/OpensbiPlatformLibNull/Platform.c b/Platform/RISC-V/PlatformPkg/Library/OpensbiPlatformLibNull/Platform.c
index e78d811f4c..84b5f5dec8 100644
--- a/Platform/RISC-V/PlatformPkg/Library/OpensbiPlatformLibNull/Platform.c
+++ b/Platform/RISC-V/PlatformPkg/Library/OpensbiPlatformLibNull/Platform.c
@@ -28,8 +28,7 @@ const struct sbi_platform_operations platform_ops = {
     .timer_event_stop   = NULL,
     .timer_event_start  = NULL,
     .timer_init         = NULL,
-    .system_reboot      = NULL,
-    .system_shutdown    = NULL
+    .system_reset       = NULL
 };
 
 const struct sbi_platform platform = {
@@ -39,6 +38,5 @@ const struct sbi_platform platform = {
     .features           = 0,
     .hart_count         = 0,
     .hart_stack_size    = 0,
-    .disabled_hart_mask = 0,
     .platform_ops_addr  = 0
 };
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [PATCH] RISC-V/PlatformPkg: Fix compilation breakage in OpenSBI
  2021-03-24 13:59 [PATCH] RISC-V/PlatformPkg: Fix compilation breakage in OpenSBI Loic Devulder
@ 2021-03-25  0:46 ` Abner Chang
  2021-03-25 10:01   ` Loic Devulder
  0 siblings, 1 reply; 3+ messages in thread
From: Abner Chang @ 2021-03-25  0:46 UTC (permalink / raw)
  To: devel@edk2.groups.io, ldevulder@suse.com

Hi Loic,
The current edk2 RISC-V is incorporated with opensbi v0.8, please check below link
https://github.com/riscv/riscv-uefi-edk2-docs

We have to update below library with the latest opensbi with your changes,
https://github.com/tianocore/edk2-platforms/tree/master/Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbiLib 

I believe your changes don't impact the build and the functionalities because we don't use those parameters in edk2. However, this change should be adopted with Edk2OpenSbiLib upgrade.
Daniel is currently working on edk2 RISC-V OVMF and also updated opensbi to the latest version. However there is a compatible issue when switching mode and we are fixing it now.
We can share more information with you if you would like to know.

Thanks
Abner
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Loic Devulder via groups.io
> Sent: Wednesday, March 24, 2021 9:59 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH] RISC-V/PlatformPkg: Fix compilation breakage
> in OpenSBI
> 
> platform_ops and platform structures have older entries that don't exist
> anymore on recent OpenSBI versions, so we can remove them.
> 
> Cc: Abner Chang <abner.chang@hpe.com>
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> Cc: Gilbert Chen <gilbert.chen@hpe.com>
> 
> Signed-off-by: Loic Devulder <ldevulder@suse.com>
> ---
>  .../PlatformPkg/Library/OpensbiPlatformLibNull/Platform.c     | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/Platform/RISC-
> V/PlatformPkg/Library/OpensbiPlatformLibNull/Platform.c b/Platform/RISC-
> V/PlatformPkg/Library/OpensbiPlatformLibNull/Platform.c
> index e78d811f4c..84b5f5dec8 100644
> --- a/Platform/RISC-
> V/PlatformPkg/Library/OpensbiPlatformLibNull/Platform.c
> +++ b/Platform/RISC-V/PlatformPkg/Library/OpensbiPlatformLibNull/Platfor
> +++ m.c
> @@ -28,8 +28,7 @@ const struct sbi_platform_operations platform_ops = {
>      .timer_event_stop   = NULL,
>      .timer_event_start  = NULL,
>      .timer_init         = NULL,
> -    .system_reboot      = NULL,
> -    .system_shutdown    = NULL
> +    .system_reset       = NULL
>  };
> 
>  const struct sbi_platform platform = {
> @@ -39,6 +38,5 @@ const struct sbi_platform platform = {
>      .features           = 0,
>      .hart_count         = 0,
>      .hart_stack_size    = 0,
> -    .disabled_hart_mask = 0,
>      .platform_ops_addr  = 0
>  };
> --
> 2.30.1
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [PATCH] RISC-V/PlatformPkg: Fix compilation breakage in OpenSBI
  2021-03-25  0:46 ` [edk2-devel] " Abner Chang
@ 2021-03-25 10:01   ` Loic Devulder
  0 siblings, 0 replies; 3+ messages in thread
From: Loic Devulder @ 2021-03-25 10:01 UTC (permalink / raw)
  To: Abner Chang, devel

[-- Attachment #1: Type: text/plain, Size: 1357 bytes --]

On Thu, Mar 25, 2021 at 01:46 AM, Abner Chang wrote:

> 
> Hi Loic,
> The current edk2 RISC-V is incorporated with opensbi v0.8, please check
> below link
> https://github.com/riscv/riscv-uefi-edk2-docs

Yes, I think this is the version I used. In fact I followed https://github.com/tianocore/edk2-platforms#submodules to add the needed submodule.

> 
> We have to update below library with the latest opensbi with your changes,
> 
> https://github.com/tianocore/edk2-platforms/tree/master/Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbiLib
> 
> 
> I believe your changes don't impact the build and the functionalities
> because we don't use those parameters in edk2.

Sounds like yes. I tested in qemu without any issue, but that was not a full regression test ;-)

> 
> However, this change should be adopted with Edk2OpenSbiLib upgrade.
> Daniel is currently working on edk2 RISC-V OVMF and also updated opensbi
> to the latest version. However there is a compatible issue when switching
> mode and we are fixing it now.
> We can share more information with you if you would like to know.

So if this fix will be included in Daniel's changes that fine. I just wanted to share the fix if anyone else had issue and also check if the issue was not on my side, I'm a newbie on edk2 and on RISC-V :D

> 
> 
> Thanks
> Abner

[-- Attachment #2: Type: text/html, Size: 1814 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-25 10:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-24 13:59 [PATCH] RISC-V/PlatformPkg: Fix compilation breakage in OpenSBI Loic Devulder
2021-03-25  0:46 ` [edk2-devel] " Abner Chang
2021-03-25 10:01   ` Loic Devulder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox