> Building real mode code with kernel binary (vmlinux) has got another
> disadvantage that it breaks using vmlinux for kdump purposes. One compiles
> the kernel binary to execute from a different address but real mode code/data
> will continue to be at virtual/physical addr 0 and kexec can not load it
> as that physical memory is not available at all. Kdump skips the real mode
> code execution.
But that is exactly what you want and need for kdump, isn't it?
The ELF file did not change, the program header has the last index at
address 0 that you do not want to load because you do not want to
execute the real-mode code. Load the rest and provide the 4 Kbytes
parameter page - it should work.
> I don't know much about Gujin, but advantage here seems to be that it has
> capability to load elf files and that's why the attempt to turn kernel binary
> into a compressed elf image. Why don't we then simply add an ELF header to
> bzImage and Gujin and any ELF loader including Gujin, should be able to load
> it? (As Eric had done in one of the implementations in the past?) Why to
>create the new infrastructure?
Because I think when a program evolves it has to get simpler to generate,
run and maintain/debug - while doing more stuff. The number of assembler
lines has to reduce because they are difficult to maintain.
Removing a ELF header to modify the binary and stick another ELF header
is not exactly what I think simpler - a bit like linking at a fix address and
then modifying the whole set.
HPA wrote:
> Well, Gujin wants additional code too.
> Putting an ELF header on bzImage broke some bootloaders (GRUB, I believe),
> so that's not going to happen again. See the relocatable bzImage thread...
I also refuses to load a big file at a fixed address before asking the BIOS
for information, I only crash once the memory when I am pretty sure everything
seems alright, interruption disabled, just before jumping to the kernel
entry point. Cannot do that with bzImage. Cannot easily debug without
this feature.
> Thanks
> Vivek
Thanks for you comment.
Etienne.
___________________________________________________________________________
D?couvrez une nouvelle fa?on d'obtenir des r?ponses ? toutes vos questions !
Profitez des connaissances, des opinions et des exp?riences des internautes sur Yahoo! Questions/R?ponses
http://fr.answers.yahoo.com
On Tue, Feb 06, 2007 at 01:12:05PM +0000, Etienne Lorrain wrote:
> > Building real mode code with kernel binary (vmlinux) has got another
> > disadvantage that it breaks using vmlinux for kdump purposes. One compiles
> > the kernel binary to execute from a different address but real mode code/data
> > will continue to be at virtual/physical addr 0 and kexec can not load it
> > as that physical memory is not available at all. Kdump skips the real mode
> > code execution.
>
> But that is exactly what you want and need for kdump, isn't it?
> The ELF file did not change, the program header has the last index at
> address 0 that you do not want to load because you do not want to
> execute the real-mode code. Load the rest and provide the 4 Kbytes
> parameter page - it should work.
How do I know which program header is real mode code and the boot loader
is not supposed to load it? May be PT_LOAD header with physical addr 0?
What happens if changes happen and down the line we start compiling
real mode code for non-zero address? Hence I think keeping real mode
code out of vmlinux might prove to be a good idea.
Secondly, if you compile real mode code with vmlinux, what would be the
entry point for this ELF file? Real mode entry? Then I have not way to
find out from ELF headers where is the protected mode entry point and
I can not do use this vmlinux with kexec/kdump.
OTOH, now bzImage is relocatable. Is this image going to be relocatable?
How do we take care of that?
Thanks
Vivek