Royce Mitchell III wrote:
I was in a strange mood and decided to try to implement something Alex wanted.
=)
I've done the leg-work on this, but need someone familiar with boot-up and particularly smp to review this patch. I do not have access to smp, and do not wish to break it.
This patch implements the /3G switch from within multiboot.S, which is necessary in order to configure the page tables correctly.
I noticed some code in _main() that was processing a 3G switch on the command-line, and I can't understand how it could possibly work because it's not readjusting the page tables, nor does it transition to the 0xC0000000 address space that I can see, so I don't think that code actually works. If it does, I'm glad to be proved wrong.
I added it, simply to see how ntoskrnl would work with dynamic address.
The patch I've written makes an assumption that lowmem is available when application processors execute the code. I can't seem to figure out how or where the application processor(s) actually get told to start executing, so I don't know if this assumption is true. However, if it's not true, if someone could point me to the code that inits the application processors, I can configure them to pass the needed info via %ebp or something.
Finally, I haven't actually tried booting this code. I wanted someone to review it first for obvious blunders, or to tell me, if necessary, that I've wasted my time ;) If I'm on the right track then, when I'm feeling motivated enough again, I will actually try booting it.
I'll test it on qemu...can't vouch for smp though.
If it works I'll get to work on relocation when I get back home.
Best regards, Alex Ionescu