[edk2-devel] [edk2-test PATCH v1 0/2] Add RISCV64 support to SctPkg

Daniel Schaefer posted 2 patches 3 years, 4 months ago
Failed in applying to current master (apply log)
uefi-sct/SctPkg/Application/InstallSct/InstallSctDef.h                                                                     |   3 +
uefi-sct/SctPkg/Library/SctLib/Riscv64/SctLibPlat.h                                                                        |  32 +++
uefi-sct/SctPkg/Library/SctLib/Riscv64/initplat.c                                                                          |  45 ++++
uefi-sct/SctPkg/Library/SctLib/SctLib.inf                                                                                  |   6 +
uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/GoVirtual.S                                                                           |  45 ++++
uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/VirtualMemory.c                                                                       | 182 +++++++++++++
uefi-sct/SctPkg/SCRT/SCRTApp/SCRTApp.inf                                                                                   |   6 +
uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Debug.c                                                                            |  88 +++++++
uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c                                                                             |  68 +++++
uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.c                                                                               | 134 ++++++++++
uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.h                                                                               |  48 ++++
uefi-sct/SctPkg/SCRT/SCRTDriver/SCRTDriver.inf                                                                             |   7 +
uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/DebugSupportBBTest.inf                                |   6 +
uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/DebugSupportBBTestCacheFunction.c             | 137 ++++++++++
uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/DebugSupportBBTestExceptionCallbackFunction.c | 276 ++++++++++++++++++++
uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/PlatformIsa.c                                 |  30 +++
uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/Usb2Hc/BlackBoxTest/Usb2HcTest.inf                                              |   4 +
uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UsbHc/BlackBoxTest/Riscv64/TimerInterrupt.c                                     |  51 ++++
uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UsbHc/BlackBoxTest/UsbHcTest.inf                                                |   4 +
uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf                                                   |   5 +
uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/EntsLibPlat.h                                         |  55 ++++
uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/InitPlat.c                                            |  55 ++++
uefi-sct/SctPkg/Tools/Source/GenBin/GNUmakefile                                                                            |   3 +
uefi-sct/SctPkg/UEFI/IHV_SCT.dsc                                                                                           |  14 +-
uefi-sct/SctPkg/UEFI/Protocol/DebugSupport.h                                                                               |  62 ++++-
uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc                                                                                          |  14 +-
uefi-sct/SctPkg/build.sh                                                                                                   |  10 +-
27 files changed, 1386 insertions(+), 4 deletions(-)
create mode 100644 uefi-sct/SctPkg/Library/SctLib/Riscv64/SctLibPlat.h
create mode 100644 uefi-sct/SctPkg/Library/SctLib/Riscv64/initplat.c
create mode 100644 uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/GoVirtual.S
create mode 100644 uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/VirtualMemory.c
create mode 100644 uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Debug.c
create mode 100644 uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c
create mode 100644 uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.c
create mode 100644 uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.h
create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/DebugSupportBBTestCacheFunction.c
create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/DebugSupportBBTestExceptionCallbackFunction.c
create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/PlatformIsa.c
create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UsbHc/BlackBoxTest/Riscv64/TimerInterrupt.c
create mode 100644 uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/EntsLibPlat.h
create mode 100644 uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/InitPlat.c
[edk2-devel] [edk2-test PATCH v1 0/2] Add RISCV64 support to SctPkg
Posted by Daniel Schaefer 3 years, 4 months ago
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3042

With this patch series we can build the UEFI SCT for RISCV64. It was confirmed
to be working on the U-Boot UEFI implementation by Heinrich.
It hasn't been tested on EDK2 yet.

Build requirements are the same as for the EDK2 RISCV64 port and detailed here:
https://github.com/riscv/riscv-uefi-edk2-docs

The second patch is a big one because it adds architecture specific files by
copying them from the Aarch64 directory. Only a single file, an assembly file
needed modifications. I'm not sure why the other ones are in an architecture
specific directory. They're all C files and seem to be generic. We can probably
unify them.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Abner Chang <abner.chang@hpe.com>
Cc: Gilbert Chen <gilbert.chen@hpe.com>
Cc: Eric Jin <eric.jin@intel.com>
Cc: G Edhaya Chandran <Edhaya.Chandran@arm.com>
Cc: Barton Gao <gaojie@byosoft.com.cn>
Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>

Daniel Schaefer (2):
  SctPkg: Add RISCV64 support
  SctPkg: Enable RISCV64 support using AARCH64 sources

 uefi-sct/SctPkg/Application/InstallSct/InstallSctDef.h                                                                     |   3 +
 uefi-sct/SctPkg/Library/SctLib/Riscv64/SctLibPlat.h                                                                        |  32 +++
 uefi-sct/SctPkg/Library/SctLib/Riscv64/initplat.c                                                                          |  45 ++++
 uefi-sct/SctPkg/Library/SctLib/SctLib.inf                                                                                  |   6 +
 uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/GoVirtual.S                                                                           |  45 ++++
 uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/VirtualMemory.c                                                                       | 182 +++++++++++++
 uefi-sct/SctPkg/SCRT/SCRTApp/SCRTApp.inf                                                                                   |   6 +
 uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Debug.c                                                                            |  88 +++++++
 uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c                                                                             |  68 +++++
 uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.c                                                                               | 134 ++++++++++
 uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.h                                                                               |  48 ++++
 uefi-sct/SctPkg/SCRT/SCRTDriver/SCRTDriver.inf                                                                             |   7 +
 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/DebugSupportBBTest.inf                                |   6 +
 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/DebugSupportBBTestCacheFunction.c             | 137 ++++++++++
 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/DebugSupportBBTestExceptionCallbackFunction.c | 276 ++++++++++++++++++++
 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/PlatformIsa.c                                 |  30 +++
 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/Usb2Hc/BlackBoxTest/Usb2HcTest.inf                                              |   4 +
 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UsbHc/BlackBoxTest/Riscv64/TimerInterrupt.c                                     |  51 ++++
 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UsbHc/BlackBoxTest/UsbHcTest.inf                                                |   4 +
 uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf                                                   |   5 +
 uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/EntsLibPlat.h                                         |  55 ++++
 uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/InitPlat.c                                            |  55 ++++
 uefi-sct/SctPkg/Tools/Source/GenBin/GNUmakefile                                                                            |   3 +
 uefi-sct/SctPkg/UEFI/IHV_SCT.dsc                                                                                           |  14 +-
 uefi-sct/SctPkg/UEFI/Protocol/DebugSupport.h                                                                               |  62 ++++-
 uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc                                                                                          |  14 +-
 uefi-sct/SctPkg/build.sh                                                                                                   |  10 +-
 27 files changed, 1386 insertions(+), 4 deletions(-)
 create mode 100644 uefi-sct/SctPkg/Library/SctLib/Riscv64/SctLibPlat.h
 create mode 100644 uefi-sct/SctPkg/Library/SctLib/Riscv64/initplat.c
 create mode 100644 uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/GoVirtual.S
 create mode 100644 uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/VirtualMemory.c
 create mode 100644 uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Debug.c
 create mode 100644 uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c
 create mode 100644 uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.c
 create mode 100644 uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.h
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/DebugSupportBBTestCacheFunction.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/DebugSupportBBTestExceptionCallbackFunction.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/PlatformIsa.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UsbHc/BlackBoxTest/Riscv64/TimerInterrupt.c
 create mode 100644 uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/EntsLibPlat.h
 create mode 100644 uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/InitPlat.c

-- 
2.28.0



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68139): https://edk2.groups.io/g/devel/message/68139
Mute This Topic: https://groups.io/mt/78637295/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [edk2-test PATCH v1 0/2] Add RISCV64 support to SctPkg
Posted by Heinrich Schuchardt 3 years, 4 months ago
On 12/1/20 5:17 PM, Daniel Schaefer wrote:
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3042
>
> With this patch series we can build the UEFI SCT for RISCV64. It was confirmed
> to be working on the U-Boot UEFI implementation by Heinrich.
> It hasn't been tested on EDK2 yet.
>
> Build requirements are the same as for the EDK2 RISCV64 port and detailed here:
> https://github.com/riscv/riscv-uefi-edk2-docs
>
> The second patch is a big one because it adds architecture specific files by
> copying them from the Aarch64 directory. Only a single file, an assembly file
> needed modifications. I'm not sure why the other ones are in an architecture
> specific directory. They're all C files and seem to be generic. We can probably
> unify them.

Hello Daniel,

thanks a lot for your patches.

You address the uefi-sct/SctPkg/TestCase/UEFI/EFI directory.

Are you planning future patches for uefi-sct/SctPkg/TestCase/UEFI/IHV too?

Best regards

Heinrich


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68141): https://edk2.groups.io/g/devel/message/68141
Mute This Topic: https://groups.io/mt/78637295/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [edk2-test PATCH v1 0/2] Add RISCV64 support to SctPkg
Posted by Daniel Schaefer 3 years, 4 months ago
On 12/2/20 12:59 AM, Heinrich Schuchardt wrote:
> On 12/1/20 5:17 PM, Daniel Schaefer wrote:
>> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3042
>>
>> With this patch series we can build the UEFI SCT for RISCV64. It was confirmed
>> to be working on the U-Boot UEFI implementation by Heinrich.
>> It hasn't been tested on EDK2 yet.
>>
>> Build requirements are the same as for the EDK2 RISCV64 port and detailed here:
>> https://github.com/riscv/riscv-uefi-edk2-docs
>>
>> The second patch is a big one because it adds architecture specific files by
>> copying them from the Aarch64 directory. Only a single file, an assembly file
>> needed modifications. I'm not sure why the other ones are in an architecture
>> specific directory. They're all C files and seem to be generic. We can probably
>> unify them.
> 
> Hello Daniel,
> 
> thanks a lot for your patches.
> 
> You address the uefi-sct/SctPkg/TestCase/UEFI/EFI directory.
> 
> Are you planning future patches for uefi-sct/SctPkg/TestCase/UEFI/IHV too?

I grepped the repo for strings related to arm64 and aarch64. I ported what I found.
Do you see anything that's not ported?

The only thing I see, is in Protocol/UsbIo/BlackBoxTest/UsbIoTestConformance.c
where some code is not used for ARM because:

   // Note: This function uses the EDKII Glu library from EDKII compatibility pkg.

   // which is not ported to ARM yet. Hence for the time being just return success.


I'm not yet sure what library that's referring to, but most likely it's also
not implemented for RISC-V.

Thanks for testing!
Does the SCT result look like what you expect? Or are some tests failing that you expect to succeed?

- Daniel


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68142): https://edk2.groups.io/g/devel/message/68142
Mute This Topic: https://groups.io/mt/78637295/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [edk2-test PATCH v1 0/2] Add RISCV64 support to SctPkg
Posted by Heinrich Schuchardt 3 years, 4 months ago
On 12/1/20 6:11 PM, Daniel Schaefer wrote:
> On 12/2/20 12:59 AM, Heinrich Schuchardt wrote:
>> On 12/1/20 5:17 PM, Daniel Schaefer wrote:
>>> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3042
>>>
>>> With this patch series we can build the UEFI SCT for RISCV64. It was
>>> confirmed
>>> to be working on the U-Boot UEFI implementation by Heinrich.
>>> It hasn't been tested on EDK2 yet.
>>>
>>> Build requirements are the same as for the EDK2 RISCV64 port and
>>> detailed here:
>>> https://github.com/riscv/riscv-uefi-edk2-docs
>>>
>>> The second patch is a big one because it adds architecture specific
>>> files by
>>> copying them from the Aarch64 directory. Only a single file, an
>>> assembly file
>>> needed modifications. I'm not sure why the other ones are in an
>>> architecture
>>> specific directory. They're all C files and seem to be generic. We
>>> can probably
>>> unify them.
>>
>> Hello Daniel,
>>
>> thanks a lot for your patches.
>>
>> You address the uefi-sct/SctPkg/TestCase/UEFI/EFI directory.
>>
>> Are you planning future patches for uefi-sct/SctPkg/TestCase/UEFI/IHV
>> too?
>
> I grepped the repo for strings related to arm64 and aarch64. I ported
> what I found.
> Do you see anything that's not ported?

uefi-sct/SctPkg/UEFI/IHV_SCT.dsc is the only IHV related file with
AARCH64 in it and that one is covered by your patch series.

>
> The only thing I see, is in
> Protocol/UsbIo/BlackBoxTest/UsbIoTestConformance.c
> where some code is not used for ARM because:
>
>   // Note: This function uses the EDKII Glu library from EDKII
> compatibility pkg.
>
>   // which is not ported to ARM yet. Hence for the time being just
> return success.
>
>
> I'm not yet sure what library that's referring to, but most likely it's
> also
> not implemented for RISC-V.

I assume this refers to:
https://github.com/tianocore/edk/tree/master/Foundation/Library/EdkIIGlueLib

The files of this library are in edk2/MdePkg/Library now.

>
> Thanks for testing!
> Does the SCT result look like what you expect? Or are some tests failing
> that you expect to succeed?

Not all tests have run yet. Running SCT on QEMU is really slow.

But from what I can see there is no difference to AARCH64 results on QEMU.

Best regards

Heinrich


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68143): https://edk2.groups.io/g/devel/message/68143
Mute This Topic: https://groups.io/mt/78637295/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [edk2-test PATCH v1 0/2] Add RISCV64 support to SctPkg
Posted by Daniel Schaefer 3 years, 2 months ago
On 12/2/20 1:37 AM, Heinrich Schuchardt wrote:
> On 12/1/20 6:11 PM, Daniel Schaefer wrote:
>> On 12/2/20 12:59 AM, Heinrich Schuchardt wrote:
>>> On 12/1/20 5:17 PM, Daniel Schaefer wrote:
>>>> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3042
>>>>
>>>> With this patch series we can build the UEFI SCT for RISCV64. It was
>>>> confirmed
>>>> to be working on the U-Boot UEFI implementation by Heinrich.
>>>> It hasn't been tested on EDK2 yet.
>>>>
>>>> Build requirements are the same as for the EDK2 RISCV64 port and
>>>> detailed here:
>>>> https://github.com/riscv/riscv-uefi-edk2-docs
>>>>
>>>> The second patch is a big one because it adds architecture specific
>>>> files by
>>>> copying them from the Aarch64 directory. Only a single file, an
>>>> assembly file
>>>> needed modifications. I'm not sure why the other ones are in an
>>>> architecture
>>>> specific directory. They're all C files and seem to be generic. We
>>>> can probably
>>>> unify them.
>>>
>>> Hello Daniel,
>>>
>>> thanks a lot for your patches.
>>>
>>> You address the uefi-sct/SctPkg/TestCase/UEFI/EFI directory.
>>>
>>> Are you planning future patches for uefi-sct/SctPkg/TestCase/UEFI/IHV
>>> too?
>>
>> I grepped the repo for strings related to arm64 and aarch64. I ported
>> what I found.
>> Do you see anything that's not ported?
> 
> uefi-sct/SctPkg/UEFI/IHV_SCT.dsc is the only IHV related file with
> AARCH64 in it and that one is covered by your patch series.
> 
>>
>> The only thing I see, is in
>> Protocol/UsbIo/BlackBoxTest/UsbIoTestConformance.c
>> where some code is not used for ARM because:
>>
>>    // Note: This function uses the EDKII Glu library from EDKII
>> compatibility pkg.
>>
>>    // which is not ported to ARM yet. Hence for the time being just
>> return success.
>>
>>
>> I'm not yet sure what library that's referring to, but most likely it's
>> also
>> not implemented for RISC-V.
> 
> I assume this refers to:
> https://github.com/tianocore/edk/tree/master/Foundation/Library/EdkIIGlueLib
> 
> The files of this library are in edk2/MdePkg/Library now.

Wow, that code is ancient then. I'm not gonna ifdef it out for RISC-V.
If it works for x86 it might work for RISC-V now.
Maybe the ARM people can try it on ARM first ;)

>> Thanks for testing!
>> Does the SCT result look like what you expect? Or are some tests failing
>> that you expect to succeed?
> 
> Not all tests have run yet. Running SCT on QEMU is really slow.
> 
> But from what I can see there is no difference to AARCH64 results on QEMU.

Sounds great! I assume all the tests have succeeded now?

> Best regards
> 
> Heinrich
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#71465): https://edk2.groups.io/g/devel/message/71465
Mute This Topic: https://groups.io/mt/78637295/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [edk2-test PATCH v1 0/2] Add RISCV64 support to SctPkg
Posted by Heinrich Schuchardt 3 years, 2 months ago
On 08.02.21 15:30, Daniel Schaefer wrote:
> On 12/2/20 1:37 AM, Heinrich Schuchardt wrote:
>> On 12/1/20 6:11 PM, Daniel Schaefer wrote:
>>> On 12/2/20 12:59 AM, Heinrich Schuchardt wrote:
>>>> On 12/1/20 5:17 PM, Daniel Schaefer wrote:
>>>>> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3042
>>>>>
>>>>> With this patch series we can build the UEFI SCT for RISCV64. It was
>>>>> confirmed
>>>>> to be working on the U-Boot UEFI implementation by Heinrich.
>>>>> It hasn't been tested on EDK2 yet.
>>>>>
>>>>> Build requirements are the same as for the EDK2 RISCV64 port and
>>>>> detailed here:
>>>>> https://github.com/riscv/riscv-uefi-edk2-docs
>>>>>
>>>>> The second patch is a big one because it adds architecture specific
>>>>> files by
>>>>> copying them from the Aarch64 directory. Only a single file, an
>>>>> assembly file
>>>>> needed modifications. I'm not sure why the other ones are in an
>>>>> architecture
>>>>> specific directory. They're all C files and seem to be generic. We
>>>>> can probably
>>>>> unify them.
>>>>
>>>> Hello Daniel,
>>>>
>>>> thanks a lot for your patches.
>>>>
>>>> You address the uefi-sct/SctPkg/TestCase/UEFI/EFI directory.
>>>>
>>>> Are you planning future patches for uefi-sct/SctPkg/TestCase/UEFI/IHV
>>>> too?
>>>
>>> I grepped the repo for strings related to arm64 and aarch64. I ported
>>> what I found.
>>> Do you see anything that's not ported?
>>
>> uefi-sct/SctPkg/UEFI/IHV_SCT.dsc is the only IHV related file with
>> AARCH64 in it and that one is covered by your patch series.
>>
>>>
>>> The only thing I see, is in
>>> Protocol/UsbIo/BlackBoxTest/UsbIoTestConformance.c
>>> where some code is not used for ARM because:
>>>
>>>    // Note: This function uses the EDKII Glu library from EDKII
>>> compatibility pkg.
>>>
>>>    // which is not ported to ARM yet. Hence for the time being just
>>> return success.
>>>
>>>
>>> I'm not yet sure what library that's referring to, but most likely it's
>>> also
>>> not implemented for RISC-V.
>>
>> I assume this refers to:
>> https://github.com/tianocore/edk/tree/master/Foundation/Library/EdkIIGlueLib
>>
>>
>> The files of this library are in edk2/MdePkg/Library now.
>
> Wow, that code is ancient then. I'm not gonna ifdef it out for RISC-V.
> If it works for x86 it might work for RISC-V now.
> Maybe the ARM people can try it on ARM first ;)
>
>>> Thanks for testing!
>>> Does the SCT result look like what you expect? Or are some tests failing
>>> that you expect to succeed?
>>
>> Not all tests have run yet. Running SCT on QEMU is really slow.
>>
>> But from what I can see there is no difference to AARCH64 results on
>> QEMU.
>
> Sounds great! I assume all the tests have succeeded now?

The SCT version built for RISC-V with you patches returned equivalent
results to ARM for U-Boot.

Best regards

Heinrich


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#71469): https://edk2.groups.io/g/devel/message/71469
Mute This Topic: https://groups.io/mt/78637295/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [edk2-test PATCH v1 0/2] Add RISCV64 support to SctPkg
Posted by Leif Lindholm 3 years, 4 months ago
On Wed, Dec 02, 2020 at 00:17:50 +0800, Daniel Schaefer wrote:
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3042
> 
> With this patch series we can build the UEFI SCT for RISCV64. It was confirmed
> to be working on the U-Boot UEFI implementation by Heinrich.
> It hasn't been tested on EDK2 yet.
> 
> Build requirements are the same as for the EDK2 RISCV64 port and detailed here:
> https://github.com/riscv/riscv-uefi-edk2-docs
> 
> The second patch is a big one because it adds architecture specific files by
> copying them from the Aarch64 directory. Only a single file, an assembly file
> needed modifications. I'm not sure why the other ones are in an architecture
> specific directory. They're all C files and seem to be generic. We can probably
> unify them.

It seems to me this can be trivially unified for all !x86 platforms,
and I don't think it would take much more to unify for all platforms.
Certainly, looking at the code you copy, that could already do with
some cleanup of its own.

/
    Leif

> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Cc: Abner Chang <abner.chang@hpe.com>
> Cc: Gilbert Chen <gilbert.chen@hpe.com>
> Cc: Eric Jin <eric.jin@intel.com>
> Cc: G Edhaya Chandran <Edhaya.Chandran@arm.com>
> Cc: Barton Gao <gaojie@byosoft.com.cn>
> Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
> 
> Daniel Schaefer (2):
>   SctPkg: Add RISCV64 support
>   SctPkg: Enable RISCV64 support using AARCH64 sources
> 
>  uefi-sct/SctPkg/Application/InstallSct/InstallSctDef.h                                                                     |   3 +
>  uefi-sct/SctPkg/Library/SctLib/Riscv64/SctLibPlat.h                                                                        |  32 +++
>  uefi-sct/SctPkg/Library/SctLib/Riscv64/initplat.c                                                                          |  45 ++++
>  uefi-sct/SctPkg/Library/SctLib/SctLib.inf                                                                                  |   6 +
>  uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/GoVirtual.S                                                                           |  45 ++++
>  uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/VirtualMemory.c                                                                       | 182 +++++++++++++
>  uefi-sct/SctPkg/SCRT/SCRTApp/SCRTApp.inf                                                                                   |   6 +
>  uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Debug.c                                                                            |  88 +++++++
>  uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c                                                                             |  68 +++++
>  uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.c                                                                               | 134 ++++++++++
>  uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.h                                                                               |  48 ++++
>  uefi-sct/SctPkg/SCRT/SCRTDriver/SCRTDriver.inf                                                                             |   7 +
>  uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/DebugSupportBBTest.inf                                |   6 +
>  uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/DebugSupportBBTestCacheFunction.c             | 137 ++++++++++
>  uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/DebugSupportBBTestExceptionCallbackFunction.c | 276 ++++++++++++++++++++
>  uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/PlatformIsa.c                                 |  30 +++
>  uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/Usb2Hc/BlackBoxTest/Usb2HcTest.inf                                              |   4 +
>  uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UsbHc/BlackBoxTest/Riscv64/TimerInterrupt.c                                     |  51 ++++
>  uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UsbHc/BlackBoxTest/UsbHcTest.inf                                                |   4 +
>  uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf                                                   |   5 +
>  uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/EntsLibPlat.h                                         |  55 ++++
>  uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/InitPlat.c                                            |  55 ++++
>  uefi-sct/SctPkg/Tools/Source/GenBin/GNUmakefile                                                                            |   3 +
>  uefi-sct/SctPkg/UEFI/IHV_SCT.dsc                                                                                           |  14 +-
>  uefi-sct/SctPkg/UEFI/Protocol/DebugSupport.h                                                                               |  62 ++++-
>  uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc                                                                                          |  14 +-
>  uefi-sct/SctPkg/build.sh                                                                                                   |  10 +-
>  27 files changed, 1386 insertions(+), 4 deletions(-)
>  create mode 100644 uefi-sct/SctPkg/Library/SctLib/Riscv64/SctLibPlat.h
>  create mode 100644 uefi-sct/SctPkg/Library/SctLib/Riscv64/initplat.c
>  create mode 100644 uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/GoVirtual.S
>  create mode 100644 uefi-sct/SctPkg/SCRT/SCRTApp/Riscv64/VirtualMemory.c
>  create mode 100644 uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Debug.c
>  create mode 100644 uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c
>  create mode 100644 uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.c
>  create mode 100644 uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Io.h
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/DebugSupportBBTestCacheFunction.c
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/DebugSupportBBTestExceptionCallbackFunction.c
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DebugSupport/BlackBoxTest/Riscv64/PlatformIsa.c
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/UsbHc/BlackBoxTest/Riscv64/TimerInterrupt.c
>  create mode 100644 uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/EntsLibPlat.h
>  create mode 100644 uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Riscv64/InitPlat.c
> 
> -- 
> 2.28.0
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68177): https://edk2.groups.io/g/devel/message/68177
Mute This Topic: https://groups.io/mt/78637295/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-