WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] Re: define BOOT_TRAMPOLINE and stack based on result of

To: "Keir Fraser" <keir@xxxxxxx>, "Lin-bao Zhang" <zhang.linbao@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] Re: define BOOT_TRAMPOLINE and stack based on result of probing EBDA area by INT12
From: <djmagee@xxxxxxxxxxxx>
Date: Wed, 31 Aug 2011 12:09:22 -0400
Cc:
Delivery-date: Wed, 31 Aug 2011 09:10:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CA83B57E.30D53%keir@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1314780430.48326.YahooMailNeo@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <CA83B57E.30D53%keir@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acxnu7A5+NGScMgAYkCeAgnARcTAXQAPBRsg
Thread-topic: [Xen-devel] Re: define BOOT_TRAMPOLINE and stack based on result of probing EBDA area by INT12
I haven't looked at any of the relevant code, so forgive me if there's some 
obvious reason this wouldn't work, but shouldn't the 'mem_lower' field in the 
multiboot data structure tell us the upper bound for that first 640KB of 
memory?  That would avoid needing a real-mode BIOS call to determine a safe 
location for the stack.

-----Original Message-----
From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Keir Fraser
Sent: Wednesday, August 31, 2011 4:55 AM
To: Lin-bao Zhang; xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Re: define BOOT_TRAMPOLINE and stack based on result of 
probing EBDA area by INT12

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. Because
you start off in protected mode and can't make the BIOS call, until you are
in real mode, which requires the trampoline to be set up.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel