From: Kevin O'Connor <kevin@koconnor.net>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: Anthony Perard <anthony.perard@citrix.com>,
xen-devel@lists.xensource.com, seabios@seabios.org
Subject: Re: [PATCH 2/2] Basic support for booting directly as Xen HVM firmware.
Date: Sat, 14 May 2011 10:02:56 -0400 [thread overview]
Message-ID: <20110514140256.GC7008@morn.localdomain> (raw)
In-Reply-To: <1305302364-18932-2-git-send-email-ian.campbell@citrix.com>
On Fri, May 13, 2011 at 04:59:24PM +0100, Ian Campbell wrote:
> This allows a guest to be booted using SeaBIOS directly as its
> firmware rather than being loaded indirectly via hvmloader. This is
> presented as a proof of concept since it's not obvious yet which the
> best approach will be from either Xen or SeaBIOS's point of view.
Thanks. See my comments below.
[...]
> --- /dev/null
> +++ b/src/xen.c
> @@ -0,0 +1,93 @@
[...]
> +/* Replace possibly erroneous memory-size CMOS fields with correct values. */
> +static void cmos_write_memory_size(u32 low_mem_pgend, u32 high_mem_pgend)
> +{
[...]
> + /* All BIOSes: conventional memory (CMOS *always* reports 640kB). */
> + outb_cmos((u8)(base_mem >> 0), 0x15);
> + outb_cmos((u8)(base_mem >> 8), 0x16);
> +
> + /* All BIOSes: extended memory (1kB chunks above 1MB). */
> + outb_cmos((u8)( ext_mem >> 0), CMOS_MEM_EXTMEM_LOW);
> + outb_cmos((u8)( ext_mem >> 8), CMOS_MEM_EXTMEM_HIGH);
[...]
These cmos variables (all of them) are just a communication mechanism
between Bochs and rombios - there's no need to set them. With
SeaBIOS, just set the global variables RamSize and RamSizeOver4G and
make sure the appropriate add_e820 calls are made.
[...]
> --- /dev/null
> +++ b/src/xen.h
> @@ -0,0 +1,26 @@
> +#ifndef __XEN_H
> +#define __XEN_H
> +
> +#ifdef CONFIG_XEN
Just a style note - I'd prefer to avoid #ifdefs in the code. Just
declare the variables/code unconditionally and add an "if
(!CONFIG_XEN) return;" to the top of any externally called functions.
SeaBIOS uses gcc's -fwhole-program and linker scripts to weed out
unneeded code and variables.
[...]
> --- /dev/null
> +++ b/src/xen/hvm/hvm_info_table.h
> @@ -0,0 +1,75 @@
> +/******************************************************************************
> + * hvm/hvm_info_table.h
> + *
> + * HVM parameter and information table, written into guest memory map.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a copy
> + * of this software and associated documentation files (the "Software"), to
[...]
That's a big copyright statement for one little struct.
-Kevin
next prev parent reply other threads:[~2011-05-14 14:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 15:59 [RFC] [PATCH 0/2] Basic SeaBIOS support for Xen HVM Ian Campbell
2011-05-13 15:59 ` [PATCH 1/2] Kconfig: Add option to enable support for running as a Xen HVM guests BIOS Ian Campbell
2011-05-13 15:59 ` [PATCH 2/2] Basic support for booting directly as Xen HVM firmware Ian Campbell
2011-05-14 14:02 ` Kevin O'Connor [this message]
2011-05-16 8:45 ` Ian Campbell
2011-05-14 13:36 ` [RFC] [PATCH 0/2] Basic SeaBIOS support for Xen HVM Kevin O'Connor
2011-05-16 8:44 ` [SeaBIOS] " Ian Campbell
2011-05-16 23:39 ` Kevin O'Connor
2011-05-17 15:59 ` Ian Campbell
2011-05-23 10:44 ` Re: [SeaBIOS] " Ian Campbell
2011-05-24 0:17 ` [Xen-devel] " Kevin O'Connor
2011-05-24 11:02 ` Ian Campbell
2011-05-24 12:38 ` [SeaBIOS] " Gerd Hoffmann
2011-05-25 2:44 ` Re: [SeaBIOS] " Kevin O'Connor
2011-05-26 15:13 ` [SeaBIOS] " Ian Campbell
2011-05-27 1:20 ` [Xen-devel] " Kevin O'Connor
2011-05-27 9:27 ` Ian Campbell
2011-05-30 14:43 ` Kevin O'Connor
2011-06-01 9:17 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110514140256.GC7008@morn.localdomain \
--to=kevin@koconnor.net \
--cc=anthony.perard@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=seabios@seabios.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).