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: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: define BOOT_TRAMPOLINE and stack based on result of probing EBDA area by INT12
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Wed, 31 Aug 2011 21:14:25 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Lin-bao Zhang <zhang.linbao@xxxxxxxxx>
Delivery-date: Wed, 31 Aug 2011 13:15:31 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=ebCiFaXbJ+EIuDzDb1bC1HnulVaZtp2NBm5dW2V8FP0=; b=qcOSoYseqVUhsLL5isPr0qU2DgrVwRoY8ijwV9XHe0MgJ3sEgjpgLBlr1CBRLaarTS xCPaPRy2bqBbKCv05EmTUO1H6ljUyoA4Q5tkB0Tg0kEUPkM3KXCc3tqptVk4hZ01wzFU osSUdK3z/ihVflAFRMg9KtIhh6OI86WglWXLo=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CA8450CE.20119%keir.xen@xxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcxoGEMHrun1tm8WmU+sJhvmmm/MYAAAlEQm
Thread-topic: [Xen-devel] Re: define BOOT_TRAMPOLINE and stack based on result of probing EBDA area by INT12
User-agent: Microsoft-Entourage/12.30.0.110427
On 31/08/2011 20:57, "Keir Fraser" <keir.xen@xxxxxxxxx> wrote:

> On 31/08/2011 20:25, "Alan Cox" <alan@xxxxxxxxxxxxxxxxxxx> wrote:
> 
>> 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.
> 
> Ah, makes sense. And our real-mode code is now relocatable, which was
> implemented as part of support for EFI. That could be used to dynamically
> relocate below EBDA for legacy BIOS too.

That said the original bug was in a very old version of Xen, and we have
since statically moved our real-mode code below 0x80000 which is apparently
below even the largest possible EBDA. So arguably we should leave it alone
now.

 -- Keir

>  -- Keir
> 
> 



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