(CCing kvm-ppc list.)

Great, so you've managed to get Linux running under KVM on e500?

On Wednesday 01 April 2009 13:58:00 Rahul Kulkarni wrote:
> Liu/Hollis, I have just started digging into the kvm/qemu code..dont have 
specific questions yet..but for a head-start ..I'd appreciate you give me any 
pointers on  places in the code to look which are linux specific which could 
potentially need to reworked for netbsd..

I guess step 1 is to get NetBSD loaded. You have two options:
1. load your bootloader/firmware and have it load your kernel.
2. bypass the bootloader/firmware and have qemu load your kernel directly.

Option 1 requires emulating enough system hardware in qemu to make your 
bootloader/firmware happy. If your firmware expects a lot of IO devices to 
exist that qemu doesn't yet emulate, or doesn't emulate completely, you will 
have IO emulation development to do. (If your firmware offers runtime services 
to your kernel, this is really your only option, but most embedded firmwares 
don't.)

Option 2 requires that qemu set up the initial VM state exactly how firmware 
would have. That means loading the same kernel executable into the same memory 
location, same initial register state, initial TLB mappings, same (emulated) 
system hardware state, etc.

For Linux, we used option 2. After loading the ELF file into guest memory, 
qemu creates the device tree (hierarchical data structure describing the 
physical system) and passes its address to Linux in a GPR, which is a job 
usually performed by u-boot. The decision really depends on the functionality 
and complexity of your firmware.

-- 
Hollis Blanchard
IBM Linux Technology Center
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to