[ros-dev] multiboot.S patch in need of review, please

Royce Mitchell III royce3 at ev1.net
Thu Jan 27 00:09:10 CET 2005


Hartmut Birr wrote:

> Hi,
>
> I think your patch will never work. There are used some offsets which 
> based on the '/3GB' switch and other ones are hard coded by 
> KERNEL_BASE. IMHO, the boot code should not search for the '/3GB' 
> option. The kernel base address must be send by freeldr. The boot code 
> must not contain any KERNEL_BASE value. I've add your patch to my 
> source tree. On the smp machine, ros reboots in the very early boot 
> phase. It is before the call to _main.
>
> - Hartmut

FWIW, I found a bug in the patch where I was using a MOVL that should 
have been a LEA. I have stepped through the code in bochs, and it is 
setting up the page tables correctly. I'm positive we could get this to 
work if we wanted to. At the moment I'm a bit stuck, because I can't 
seem to find the freeldr Options string in memory where I think it 
should be. There's also what appears to be some corrupted pointers or 
strings in the module list when accessed from _main(). I was tracking it 
down, but I'm going to put it on hold for reasons I mention below.

Furthermore, at the moment _main() immediately accesses global 
variables. ntoskrnl would have to reloc itself before we can access any 
global variables, so the patch will not work as-is.

Finally, there seems to be quite a bit of disagreement about who should 
relocate ntoskrnl, so I might be wasting my effort trying to get this to 
actually work, except for the learning value of it all.

Peace,

Royce Mitchell III



More information about the Ros-dev mailing list