bug-grub
[Top][All Lists]
Advanced

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

Question about multiboot-elf


From: Maciek Nowacki
Subject: Question about multiboot-elf
Date: Thu, 10 May 2001 14:13:34 -0600
User-agent: Mutt/1.3.17i

Hello,

I'm looking at using GRUB to load a Multiboot compliant kernel. I'm using a
reduced Linux kernel as a starting point for playing with this (the goal is
to eventually load the ELF executable 'vmlinux' as produced by 'make
vmlinux').

Anyway, the first problem seems to be that the kernel would like to be loaded
at 0xc0010000, which is of course a virtual address that occurs 3 gigabytes
lower in physical memory. GRUB reports that there isn't enough memory for
loading such an image, since there isn't on my machine. However, compiling
the kernel to load at 0x00010000 (specify in arch/i386/vmlinux.lds) probably
is more trouble than it's worth. It would break the entire userspace and much
of the kernel, since programs would want to load right into kernel space -
they generally load at about the 128MB mark.

Every Linux loader currently just dumps the kernel (bzImage) into memory
starting at 0x00010000 (1MB) and jumps to that address, and all is well. Is
there a field in ELF that could convince GRUB to do the same? (load at this
physical address despite the given virtual entry point..)

Alternately, I suppose that GRUB could be hacked to map 0xc0000000-0xffffffff
to the physical range 0x00000000-0x30000000. Then a kernel targeted for
0xc0010000 would load at 1MB. This seems to be a clean solution, at least
compared to code at the beginning of the kernel quickly patching things up so
that address mapping is correct - which would require that GRUB disregard the
ELF entry point.

Perhaps Multiboot could be amended to contain a simple address range map in
the header?

-- Maciek Nowacki



reply via email to

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