There's little reason not to derive the RISCV64 version of efibind.h from the AARCH64 version, especially as the current version is missing required macros such as EFI_DRIVER_ENTRY_POINT() which breaks the compilation of some drivers.
The only major difference we introduce from AARCH64 is to consider that any toolchain that supports RISCV64 is modern enough to support <stdint.h>. Also, as we preserve the added definition for BOOLEAN, we guard it with an ifndef in anticipation of MSVC RISCV64 support.</stdint.h>
We validated these changes by confirming that they now allow gnu-efi to be used to compile a set of UEFI drivers for RISCV64 (basically, this patch allows us to add RISCV64 to the supported archs for the Linux-gcc-gnu-efi CI builds of https://github.com/pbatard/efifs/actions).
commit b13646092513fb1a5befc19102704510668ba505
Thank you for the patch Pete