From: "Jan Beulich" Subject: Re: [PATCH] xen: find a better location for the real-mode trampoline Date: Mon, 10 Dec 2012 09:34:36 +0000 Message-ID: <50C5BABC02000078000AF4F7@nat28.tlf.novell.com> References: <1354210461-9739-1-git-send-email-pbonzini@redhat.com> <50B87D6E02000078000ACBF2@nat28.tlf.novell.com> <20121207212336.GD9664@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20121207212336.GD9664@phenom.dumpdata.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: Paolo Bonzini , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 07.12.12 at 22:23, Konrad Rzeszutek Wilk wrote: > On Fri, Nov 30, 2012 at 08:33:34AM +0000, Jan Beulich wrote: >> >>> On 29.11.12 at 18:34, Paolo Bonzini wrote: >> > On some machines, the location at 0x40e does not point to the beginning >> > of the EBDA. Rather, it points to the beginning of the BIOS-reserved >> > area of the EBDA, while the option ROMs place their data below that >> > segment. >> > >> > For this reason, 0x413 is actually a better source than 0x40e to get >> > the location of the real-mode trampoline. But it is even better to >> > fetch the information from the multiboot structure, where the boot >> > loader has placed the data for us already. >> >> I think if anything we really should make this a minimum calculation >> of all three (sanity checked) values, rather than throwing the other >> sources out. It's just not certain enough that we can trust all >> multiboot implementations. >> >> Of course, ideally we'd consult the memory map, but the E820 one >> is unavailable at that point (and getting at it would create a >> chicken-and-egg problem). > > Can we scan the memory for the possible EBDA regions? There is an > "EBDA" type header in those regions, if I recall? I don't think there are any signatures - the value at (real mode) 0040:000e has to be relied upon. Jan