Skip to contentSkip to conversation

kexec cant load OpenBSD

Fastboot Vivek Goyal 2 participants 2 messages Apr 20, 2007 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 9 lines · Jon Steel

Hi

Im running Gentoo and Im trying to use kexec to start up OpenBSD. I've got it set up correct because I can do a boot into Gentoo. Here is what happens:

base ~ # kexec -l /boot/bsd --type="elf-x86"
Base address: d0200120 is not page aligned

Above address indicates that some loadable program segment is not page size(4K) aligned hence kexec is cribbing.

A, "readelf -l /boot/bsd" should display the various program headers. I think you shall have to modify linker script of OpenBSD kernel to generate page size aligned loadable segments.

This does raise a question in my mind, why all the program headers should be loaded at page size boundaries? Just because ease of handling or there is some other reason too?

Eric, you want to shed some light on this requirement?

Thanks
Vivek

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#2 lore raw
Quoted 18 lines · Vivek Goyal
Quoted 9 lines · Jon Steel

Hi

Im running Gentoo and Im trying to use kexec to start up OpenBSD. I've got it set up correct because I can do a boot into Gentoo. Here is what happens:

base ~ # kexec -l /boot/bsd --type="elf-x86"
Base address: d0200120 is not page aligned

Above address indicates that some loadable program segment is not page size(4K) aligned hence kexec is cribbing.

A, "readelf -l /boot/bsd" should display the various program headers. I think you shall have to modify linker script of OpenBSD kernel to generate page size aligned loadable segments.

Quoted 5 lines

This does raise a question in my mind, why all the program headers should be loaded at page size boundaries? Just because ease of handling or there is some other reason too?

Eric, you want to shed some light on this requirement?

A) The first problem is that we don't currently have support for OpenBSD and it does some weird things, and doesn't quite use the ELF fields generically. So specific support will have to be written for at least part of it.

B) In the kernel side of the interface the page alignment restriction is important because of how our intermediate buffers work. For user space ELF the page alignment of program segments is an important consideration to allow page sharing but for standalone executables we really shouldn't care and the restriction probably only exists because we have a simple translation from ELF segment to the kernel segments.

Eric

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec