grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems booting AROS64's bootstrap with grub2..


From: Kalamatee
Subject: Problems booting AROS64's bootstrap with grub2..
Date: Fri, 21 Mar 2008 00:53:41 +0000

OK,
 
Currently theres 2 problems im aware of that I could use some verification of ..
 
Firstly... Grub2 currently fails in loader/i386/pc/multiboot.c line 145 when trying to load the elf-32 boostrap code.
 
heres a readelf dump of the file in question ..
 
http://rafb.net/p/AH4Qkx97.html
 
As you can see, the first program segment has a FileSiz of 0x00000, but a MemSiz of 0x0f400.
 
Im not familiar with the elf specification and cant find any solid information that says whether this is legal or not, so ive tried playing with grub2s multboot elf loader code and found the following.
 
If I skip this segment completely AROS64 fails to jump into its 64bit environment using ljmp (presumably since the bss section contains random data causing it to jump somewhere outside of the valid memory range).  If I change the elf loader so it only attempts the grub_read_file when phdr->p_filesz > 0, AROS64 continues to boot as it is expected to. From this I suspect only attempting to load the file data when filesz > 0 is the correct behaviour (and if it is 0 but memsz > 0, it should still clear the segments memory range) - but could do with some verification from someone who understands the elf spec's.
 
Secondly, After addressing the first issue, AROS64 bails out further on.  Studying its code it appears to "require" the mmap data that grub legacy provided - however I cant seem to find mention of it in grub2.  Am i correct in assuming grub2 only currently passes a flat memory region to multiboot os'es via mem_upper/mem_lower? If yes, I can atleast look at fixing AROS to use this single region if the mmap data is unavailable.
 
Any help regarding these two issues would be greatly appreciated

reply via email to

[Prev in Thread] Current Thread [Next in Thread]