Hi

I wrote some code that initializes a x86 system as if it was booted by a 
Multiboot compliant bootloader, but I'm not sure how to put it into gem5 
without messing with existing code. A nice way to do it would be to add a new 
class MultibootX86System which inherits from X86System. In it's initState() 
method it should call X86System::initState() and then do all the Multiboot 
specific stuff (this is how it is down with Linux).
But as it appears the code in X86System::initState is already very specific. It 
initializes the system in long mode using long mode segments and enables 
paging. But the Multiboot specification says that the kernel has to be loaded 
in protected mode with paging disabled. The kernel's bootstrapper then 
initializes the system as needed by the kernel.
So what would be the best way to do this? As it appears to me I could move the 
biggest part of the code to LinuxX86System::initState() or I could try to 
parameterize X86System::initState() for instance like this: 
X86System::initState(mode, bool pagingEnabled)

Thanks
Christian
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to