The current grub risc-v ELF loader does not support some of the relocations produced by -mcmodel=large (e.g. when compiled with -mcmodel=large grub-mkimage returns 'error: relocation 0x2b is not implemented yet.'), so it has to be compiled with -mcmodel=medany, which only works if the grub code fits in 2GiB. The following patches add a range check to the grub EFI memory allocator to ensure this.
Adriano Cordova (2): kern/efi/mm.c: Add optional range check kern/efi/mm.c: use GRUB_MM_ADD_REGION_IN_RANGE on risc-v grub-core/kern/efi/mm.c | 60 ++++++++++++++++++++++++++++++++++++++--- include/grub/mm.h | 1 + 2 files changed, 57 insertions(+), 4 deletions(-) -- 2.48.1 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel