Booting questions ....
Willem Jan Withagen
wjw at withagen.nl
Thu Nov 4 15:08:14 PST 2004
Julian Elischer wrote:
>> I'm looking for a place to sensibly insert memorytest routines....
>>
>> Currently I'd like to do that not in the loader, but in the kernel
>> where memory is already setup to be one flat address space. This makes
>> programming a lot simpler.
>
>
>
> I'd argue that it should just be a program that can be loadd by the
> loader and executed.
>
> memtest86 could just be loaded and run.
Fair argument, and something that I've been contemplating as well.
However, this is complicated by the fact that there are several architectures
that then need to be addressed in their native mode with all the platform quirks.
Memtest86 is not for the faint of heart to look at. The routines are straight
forward, but getting it there and run them is not so easy. And show obvious
why it is rather x86 specific.
That's why it is really a seperate entity. Getting it to boot is clumsy, you
need to put it on a floppy or CD and (re)boot.
The next step would be to "imitate" a kernel booting to the point where I got
and do the memory test. This then would be the seperate module/program to
load. And you can do:
unload
load memtest
boot -m 6 /* or something like this */
And get the first 6 tests on run your memory.
Whether the other modules of the kernel are there or not is rather not
essential then. After completing the tests we "reboot".
I would need some of the kernel, but as little as possible to get to 1 working
processor, the flat memory addressspace and at least printf working.
The advantage of this aproach is that it is (more) architecture independant,
unless routines are again written in ASM for speed. But that I consider a
second stage optimisation.
--WjW
More information about the freebsd-arch
mailing list