[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: 64-bit bootloaders
On Mon, Jul 09, 2012 at 10:51:36AM +0100, Dave Scott wrote: > Hi, > > > On Thu, Jul 05, 2012 at 10:07:59PM +0100, Dave Scott wrote: > > > Hi, > > > > > > I downloaded the pre-prepared disk image and this worked just fine. I > > > think my misunderstanding was that boot16b.bin (bootsector on > > bootable > > > partition) loads pure64.sys from the FAT16 fs and then this reads > > > pure64.cfg which tells it to load kernel64.sys, switch to 64-bit and > > > jump. > > > > I didn't quite manage to parse this sentence. Is the above the correct > > state of affairs, or the result of your misunderstanding? :-) > > :) The current state is: (I think) > > 1. MBR loads bootsector of active partition (1) > 2. pure64's bootsector reads and executes pure64.sys from FAT16 > 3. pure64.sys reads pure64.cfg, reads and executes kernel64.sys from FAT16 > > My kernel64.sys is a mirage guest whose linker script just says, "write raw > binary output, putting the .text at 0x100000". I've arranged that > my new HVM startup function is right there. The mirage guest then: > > 1. uses CPUID to detect xen > 2. writes to the special MSR to have the hypercall page copied in > -- it then memcpy's this into the hypercall_page[] used by miniOS > -- hypercalls now work > 3. uses HVM_GET_PARAM to fetch the xenstore evtchn and pfn > 4. uses XENMEM_add_to_physmap to map the shared_info page > -- this allows event channel masking, time, vcpu info > > Plenty of debug console printing verifies that this is all working. (It's > quite fun to manipulate raw framebuffers -- I've not done that for years) > > So far so good. The next step is to set up the xen PCI device that is used > for event channel interrupt delivery. After that I've got to figure out how > best to handle interrupts. In an ideal world I would be able to bind all > interrupts (including those from the emulated hardware) to event channels and > then use the existing mirage Lwt/event channel loop. I don't know if this > is possible. That should be fine; just need to set flags for each of the devices, and then poll them from the Lwt main loop (just as we do with Xen evtchns). Incidentally, I've just ordered the serial UART to try out uBoot/RaspberryPi. It looks like a bare metal kernel on there is also fairly straightforward! http://kernelnomicon.org/?p=133 -- Anil Madhavapeddy http://anil.recoil.org
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |