On 11/03/2009 06:57 AM, Alexander Graf wrote:
Yes, I'd prefer to see this. In earlier emails, Gleb made a reference
to a qemu-cfg "stream" interface that is used for acpi tables - maybe
the kernel could be put in one of the streams and the rom could copy
it into ram on boot.
I don't think streaming is the right approach here. Streaming would
mean the rom had to copy, which again either a lot of PIO accesses
(slow!) or a complicated DMA interface.
A rep/ins instruction will take one exit/page so it won't be
particularly slow.
I'd rather go for a RAM poking approach. As soon as the option rom is
loaded, it calls qemu via PIO telling it to "load the kernel in RAM
now" and as of the next instruction everything's in place at the
determined addresses. It's not like we could do anything about the
physical layout in the option rom anyways, usually the kernel tells us
what that looks like.
That works too, but if firmware config can use rep/ins, that's one less
interface we have to add.
--
Do not meddle in the internals of kernels, for they are subtle and quick to
panic.