Tyson D Sawyer <[EMAIL PROTECTED]> writes:
> I have succeded in booting an initrd image stored in my 2MB BIOS flash
> chip. I can choose between the initrd image in the flash or the default
> image on an IDE device based on a button that is connected to a GPI bit
> on the southbridge.
>
> The next step is to be able to choose a different kernel image to go
> with it and clean things up so I can submit a patch.
>
> The last issue I ran into before a sucessful boot was that linuxbios
> seems to shave a Meg off the top of RAM causing the kernel to think that
> my ramdisk image extended beyond the end of RAM. This says to me that
> either the comment that goes with the adjustment to totalram size before
> passing it to the kernel is wrong or some of the kernel source doesn't
> know that this is the case. From linuxbiosmain.c:
>
>
> /* the ram address should be the last mbyte, AFAIK. Subtract one
> for the
> * low 1 MB. So subtract 2K total
> */
> set_memory_size(empty_zero_page, 0x3c00, totalram - 2048);
>
> I haven't checked the details on this, but based on the behavior I saw
> trying to load the initrd image, either you don't subtract the low 1MB
> or you don't point to the last MB.
You do pass the memory size less 1MB to the kernel. I don't know why
we are subtracting off 2MB here. This wouldn't be an artifact of bad
AGP window handling would it?
> To get the kernel to recognize that there is an initrd image you must
> set the loader type value in the "empty_zero_page" of kernel
> parameters. Does anyone know about getting a loader ID for linuxbios?
> This might be useful for some kernel paches that are linuxbios
> specific.
I hadn't thought in that direction and I'd like to avoid it. When you
start chaining boot loaders this information could be lost.
> Also, how does the loader ID relate to the kexec method of doing
> things? It was said that kexec allows for passing a command line, but
> can you adjust any of the other kernel parameters that are in the
> empty_zero_page?
Yes, and no. With the kexec stuff you don't have access to the
empty_zero_page directly. But yes in theory you should have access to
all of that stuff. In practice all that has been implemented is
setting the memory size.
I'm just entering the cleanup/documentation phase myself so I should
be able to help with this. Though I have a presentation to give
in a week and a half and I've been procrastinating getting it ready,
so that is at the top of the priority list.
I intend to implement the kexec stuff for the alpha, but except for
the actual jump to the loaded kernel it should be the same code for
x86.
Eric