[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Re: define BOOT_TRAMPOLINE and stack based on result of probing EBDA area by INT12

  • To: Keir Fraser <keir@xxxxxxx>
  • From: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
  • Date: Wed, 31 Aug 2011 20:25:18 +0100
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Lin-bao Zhang <zhang.linbao@xxxxxxxxx>
  • Delivery-date: Wed, 31 Aug 2011 12:26:59 -0700
  • Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEWysKsSBQMIAwIZCwj///8wIhxoRDXH9QHCAAABeUlEQVQ4jaXTvW7DIBAAYCQTzz2hdq+rdg494ZmBeE5KYHZjm/d/hJ6NfzBJpp5kRb5PHJwvMPMk2L9As5Y9AmYRBL+HAyJKeOU5aHRhsAAvORQ+UEgAvgddj/lwAXndw2laEDqA4x6KEBhjYRCg9tBFCOuJFxg2OKegbWjbsRTk8PPhKPD7HcRxB7cqhgBRp9Dcqs+B8v4CQvFdqeot3Kov6hBUn0AJitrzY+sgUuiA8i0r7+B3AfqKcN6t8M6HtqQ+AOoELCikgQSbgabKaJW3kn5lBs47JSGDhhLKDUh1UMipwwinMYPTBuIBjEclSaGZUk9hDlTb5sUTYN2SFFQuPe4Gox1X0FZOufjgBiV1Vls7b+GvK3SU4wfmcGo9rPPQzgIabfj4TYQo15k3bTHX9RIw/kniir5YbtJF4jkFG+dsDK1IgE413zAthU/vR2HVMmFUPIHTvF6jWCpFaGw/A3qWgnbxpSm9MSmY5b3pM1gvNc/gQfwBsGwF0VCtxZgAAAAASUVORK5CYII=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

On Wed, 31 Aug 2011 09:55:10 +0100
Keir Fraser <keir@xxxxxxx> wrote:

> On 31/08/2011 09:47, "Lin-bao Zhang" <zhang.linbao@xxxxxxxxx> wrote:
> > 1,define a variable named "EBDA_bottom".
> > 2, get EBDA_bottom by above method.
> > 3, stack should equals EBDA_bottom (or EBDA_bottom -1 safely)
> > 4, mov     $(EBDA_bottom -1),%esp
> > in most case , EBDA area is 1K,but we define 0x7c000(this is absolutely
> > safe),but we will waste too much memory space.
> > 
> > I did test, it can work .Certainly, I am familiar with assembler code, I 
> > just
> > hard code to test:mov     0x903ff , %espÂthanks for your corrections , I 
> > have
> > not read over all histories and stories about them, if I am wrong , I am 
> > sorry
> > first.
> If you actually tried to implement it you'd realise you're stuck.

Re-read the original. The EBDA is accessible at BIOS segment offset 0E.
You don't need to make a BIOS call to read it, just load the location and
check it against 0.W in which case one isn't present.

At that point you know where to put your bits.

Obviously once you get into the world of EFI and the like there are
different ways all this should occur, but for good old BIOS stuff it
works fine.

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.