URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=15590>
Summary: Address fields in Multiboot header not used Project: GNU GRUB Submitted by: jmmv Submitted on: Tue 01/31/06 at 11:46 Category: Booting Severity: Major Priority: 5 - Normal Item Group: Software Error Status: None Privacy: Public Assigned to: None Originator Name: Julio M. Merino Vidal Originator Email: [EMAIL PROTECTED] Open/Closed: Open Release: 0.97 Reproducibility: Every Time Planned Release: _______________________________________________________ Details: The Multiboot header defines a set of fields that can be used to tell the boot loader where to load a kernel image. These fields must be specified when loading an a.out image, in which case they are properly used by GRUB. However, when the image is an ELF file, these fields are optional and unfortunately GRUB does not honour them. This makes it impossible to load a Multiboot kernel which is mapped to a very high virtual memory address, because GRUB will always spit out a "ERR_WONT_FIT" error. In my specific case, I've adapted the NetBSD kernel to be Multiboot-compliant. NetBSD is built to be executed at the 0xc0100000 virtual address. However, the kernel must be loaded at a lower address (0x00100000) because it relocates itself later on. If you look at the code in GRUB to boot NetBSD kernels natively, you'll see how it "truncates" the addresses in the ELF file by doing an (& 0xFFFFFF). If GRUB honoured the address fields in the Multiboot header, I'd use them to explicitly tell it where to place the kernel. _______________________________________________________ Carbon-Copy List: CC Address | Comment ------------------------------------+----------------------------- [EMAIL PROTECTED] | _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Tue 01/31/06 at 11:46 Name: grub-elf-addr.diff Size: 1.45KB By: jmmv Sample patch. <http://savannah.gnu.org/bugs/download.php?item_id=15590&item_file_id=3347> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=15590> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-grub mailing list Bug-grub@gnu.org http://lists.gnu.org/mailman/listinfo/bug-grub