boot: Add RISCV32 and LoongArch support

This is completely untested, but should work in theory, as it's just
adding a couple defines according to the specs.
This commit is contained in:
Jan Janssen
2023-03-10 11:41:08 +01:00
parent c4ad9b23ca
commit 31ffb6b183
3 changed files with 18 additions and 6 deletions
+6
View File
@@ -16,8 +16,14 @@
# define TARGET_MACHINE_TYPE 0xAA64U
#elif defined(__arm__)
# define TARGET_MACHINE_TYPE 0x01C2U
#elif defined(__riscv) && __riscv_xlen == 32
# define TARGET_MACHINE_TYPE 0x5032U
#elif defined(__riscv) && __riscv_xlen == 64
# define TARGET_MACHINE_TYPE 0x5064U
#elif defined(__loongarch__) && __loongarch_grlen == 32
# define TARGET_MACHINE_TYPE 0x6232U
#elif defined(__loongarch__) && __loongarch_grlen == 64
# define TARGET_MACHINE_TYPE 0x6264U
#else
# error Unknown EFI arch
#endif