All of lore.kernel.org
 help / color / mirror / Atom feed
* Call to grub_file_read fails in grub_multiboot_load_elf64
@ 2020-05-03 20:17 Chris Plant
  2020-05-11 14:39 ` Daniel Kiper
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Plant @ 2020-05-03 20:17 UTC (permalink / raw)
  To: grub-devel

Hello,

I'm fairly new to grub coding, and I'm trying to get multiboot2 working
on the arm64-efi target for an OS project. However, I'm running up
against an issue with a call to grub_file_read from
grub_multiboot_load_elf64 around line 170 in multiboot_elf.c.  This
causes a synchronous error (esr 0x96000045) which is a Data Abort
caused by a translation error in the level 1 table during a write.

At first I thought it was that the load address in the ELF header (this
is used as a "target" in the relocator_alloc_chunk_addr) was the issue,
but tweaking that around doesn't seem to change any issue.

Does anyone have any experience with the ARM64-EFI target or the
multiboot2 code who could help me understand where the issue is?

Cheers,

Chris Plant




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

* Re: Call to grub_file_read fails in grub_multiboot_load_elf64
  2020-05-03 20:17 Call to grub_file_read fails in grub_multiboot_load_elf64 Chris Plant
@ 2020-05-11 14:39 ` Daniel Kiper
  2020-05-11 15:09   ` Chris Plant
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Kiper @ 2020-05-11 14:39 UTC (permalink / raw)
  To: chris; +Cc: grub-devel, leif, ardb

Adding Leif and Ard,

On Sun, May 03, 2020 at 09:17:50PM +0100, Chris Plant via Grub-devel wrote:
> Hello,
>
> I'm fairly new to grub coding, and I'm trying to get multiboot2 working
> on the arm64-efi target for an OS project. However, I'm running up
> against an issue with a call to grub_file_read from
> grub_multiboot_load_elf64 around line 170 in multiboot_elf.c.  This
> causes a synchronous error (esr 0x96000045) which is a Data Abort
> caused by a translation error in the level 1 table during a write.
>
> At first I thought it was that the load address in the ELF header (this
> is used as a "target" in the relocator_alloc_chunk_addr) was the issue,
> but tweaking that around doesn't seem to change any issue.
>
> Does anyone have any experience with the ARM64-EFI target or the
> multiboot2 code who could help me understand where the issue is?

First of all, why cannot you use EFI loader for ARM? There is no
the Multiboot2 specification for ARM...

Daniel


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

* Re: Call to grub_file_read fails in grub_multiboot_load_elf64
  2020-05-11 14:39 ` Daniel Kiper
@ 2020-05-11 15:09   ` Chris Plant
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Plant @ 2020-05-11 15:09 UTC (permalink / raw)
  To: Daniel Kiper; +Cc: leif, ardb, Daniel Kiper, The development of GNU GRUB

Hello Daniel,

Firstly, I want to apologise, because as is nearly always the case,
when I've gone away and looked at this more closely, most of the
problems I've encountered (this one included) are my fault, this was a
mismatch between two macros.  I've now got grub booting the OS happily
with the appropriate Multiboot2 tags.

Secondly, why not EFI for ARM?  I'm playing around with GNU Mach (why? 
Lockdown!) on a Raspberry Pi 3, and initially I was using no
bootloader.  

However, as my project/time consumer moved on I needed GRUB to keep
things more ARM64 general and to provide various things that align
better with the i386 version of Mach.

When I'm happy with the code, and I've managed to get into the GRUB
coding standards, I'll submit a patch for people to tear to pieces, but
it basically just enables Multiboot2 on ARM64, with the associated
cpu_relocator code that is required.  

With regards to the Multiboot2 specification for ARM64, I'll document
this within the patch, but it's very similar to the MIPS registers at
the moment.

Chris

On Mon, 2020-05-11 at 16:39 +0200, Daniel Kiper wrote:
> Adding Leif and Ard,
> 
> On Sun, May 03, 2020 at 09:17:50PM +0100, Chris Plant via Grub-devel
> wrote:
> > Hello,
> > 
> > I'm fairly new to grub coding, and I'm trying to get multiboot2
> > working
> > on the arm64-efi target for an OS project. However, I'm running up
> > against an issue with a call to grub_file_read from
> > grub_multiboot_load_elf64 around line 170 in multiboot_elf.c.  This
> > causes a synchronous error (esr 0x96000045) which is a Data Abort
> > caused by a translation error in the level 1 table during a write.
> > 
> > At first I thought it was that the load address in the ELF header
> > (this
> > is used as a "target" in the relocator_alloc_chunk_addr) was the
> > issue,
> > but tweaking that around doesn't seem to change any issue.
> > 
> > Does anyone have any experience with the ARM64-EFI target or the
> > multiboot2 code who could help me understand where the issue is?
> 
> First of all, why cannot you use EFI loader for ARM? There is no
> the Multiboot2 specification for ARM...
> 
> Daniel
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel



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

end of thread, other threads:[~2020-05-11 15:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-03 20:17 Call to grub_file_read fails in grub_multiboot_load_elf64 Chris Plant
2020-05-11 14:39 ` Daniel Kiper
2020-05-11 15:09   ` Chris Plant

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.