Page 1 of 1

Problem loading OS image with Grub2

Posted: Wed Feb 29, 2012 5:42 am
by chauhanjpr
Hi,

I am working on a open source type 2 bare metal hypervisor for Intel 64. I am currently writing the bootstrapper for it. I am successfully able to kick into 64-bit mode with paging enabled. But I am seeing a problem. I am seeing wrong data in the section I have linked by 64-bit code. I am linking the image at 0xC0109000 but the load address is 0x109000. While attached to GDB when I dump address 0x109000, I see wrong data which is not code of the function linked at this address.

I also did a pmemsave from qemu to dump the physical memory (guest physical for qemu), I see the same wrong data in the dump as well. I am wondering if Grub is actually loading all the data.

If you want to take a look at the code its lying at:

https://github.com/hschauhan/xvisor-x86 ... cpu/x86_64

Any pointers will be helpful.

Thanks
= Himanshu =

Re: Problem loading OS image with Grub2

Posted: Wed Feb 29, 2012 5:54 am
by chauhanjpr
[correction] Its a Type 1 (as I said bare metal) hypervisor.

Re: Problem loading OS image with Grub2

Posted: Wed Feb 29, 2012 11:20 am
by chauhanjpr
Hi,

My grub header had a problem which caused Grub to load my image incompletely (as I expected).

Thanks, anyways,

= Himanshu =