Commit Graph
236 Commits
Author SHA1 Message Date
Keir Fraser b12217e141 vgabios: upgrade to CVS version
cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/vgabios
co vgabios

Patchs backported:
  - vgabios: Support VESA power management extensions. (cs 17692)
  - x86, hvm: Allow Cirrus VGA BIOS to clear framebuffer with minimal
    PIO writes. (cs 16242)

This patch fixes the bug with the IDR boot CD.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-07-04 13:02:31 +01:00
Keir Fraser da43e50cb3 hvm rombios: Move function calls out of 'post' function section
Through recent additions to the rombios the code section of the post
function has filled up considerably. When I enable the BX_TCGBIOS
compile time option the BIOS crashes since the post section code
(starts at $e05b) spills over into the nmi entry point (starts at
$e2c3). as86 doesn't cause an error when building.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-06-27 14:43:29 +01:00
Keir Fraser 9a5fd91e50 hvmloader: Set up any Intel ICH for legacy IDE.
Signed-off-by: Li Zhang <li.zhang@intel.com>
2008-06-27 14:15:11 +01:00
Keir Fraser 9efd150651 rombios: S3 resume fixes.
On AMD cpus, HVM S3 resume was hanging in the bios when trying
to load the x_firmware_waking_vector from absolute
address 0xEA01C (that is, a segment offset greater than 64kB).

This change also now uses 20-bits (instead of 16) from the FACS
standard firmware_waking_vector.

Signed-off-by: Juergen Keil <jk@tools.de>
2008-06-02 16:05:07 +01:00
Keir Fraser cc8cdb7e47 hvmloader: No need to map shared_info page into the legacy VGA MMIO
hole. We can access address 0xfffff000 from 32-bit protected mode.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-28 10:02:00 +01:00
Keir Fraser 67ea9d3b8c rombios: Remove annoying 3-second boot delay waiting for user to hit
F10 to select boot device. This will be rarely used, and it is
possible to hit F10 before the message is displayed and the keypress
will still register. So in practice it is quite possibel to use this
boot feature reliably without needing a multi-second delay.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-23 11:58:08 +01:00
Keir Fraser b6615aaac9 hvmloader: Fix pci_setup() to not skip BAR remapping for virtual VGA devices.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-22 11:04:02 +01:00
Keir Fraser e6b2e11c90 hvmloader: Lay out memory a bit differently -
* Cleanly define a scratch area for temporary storage
 * Raise Etherboot ROM out of the way of larger VGA BIOSes

Also detect virtual VGA adaptors more cleanly.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-21 11:23:03 +01:00
Keir Fraser e3bfa63c44 vgabios: Support VESA power management extensions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-21 11:19:41 +01:00
Keir Fraser 232cae0f1c hvm: rombios interface for HVM S3
- add S3 package in ACPI DSDT table. Guest OS will get S3 value from
   this package and write the value to PM1A control register to
   trigger S3 suspend.
 - Add S3 resume logic in rombios post code. the CMOS shutdown register
   is used to indicate if this is a S3 resume.
 - if it is s3 resume, rombios will get wakeup vector from ACPI FACS
   table and jump to wakeup vector. Per ACPI spec, the wakeup vector
   jumping must be the forms CS:IP, in which CS=3D(wakeup vector>>4)
   IP=3D(wakeup vector)&0xF, for example, for vector=3D0x12345,
   CS:IP=3D0x1234:0x5

Note: clobber_entry_point will clobber the post entry, which make S3
resume not work. We will directly jmp to POST Entry if it in S3
Resume path.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Ke Liping <liping.ke@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-20 14:36:05 +01:00
Keir Fraser a6a8223242 x86, hvm: Lots of MTRR/PAT emulation cleanup.
- Move MTRR MSR initialisation into hvmloader.
 - Simplify initialisation logic by overlaying UC on default WB rather
   than vice versa.
 - Clean up hypervisor HVM MTRR/PAE code's interface with rest of
   hypervisor.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-16 13:36:44 +01:00
Keir Fraser b42f8b07d1 hvmloader: Explicitly revert to text section after declaring bss fields.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-15 18:11:44 +01:00
Keir Fraser 1eaea3f0b6 hvmloader: Framework for multiprocessor initialisation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-15 16:39:00 +01:00
Keir Fraser f541851c79 hvmloader: Small cleanups.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-14 14:10:11 +01:00
Keir Fraser f342e8630c hvmloader: Fix build with gcc 4.1 and later.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-10 09:12:44 +01:00
Keir Fraser 656217ee9c hvmloader: Build with -Werror.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-09 13:52:52 +01:00
Keir Fraser 472f532c1d hvmloader: Fix parsing Etherboot roms to avoid an infinite loop.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-09 13:52:34 +01:00
Keir Fraser 68a232d6d9 hvmloader: Parse Etherboot option ROMs the conventional way.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-02 13:46:57 +01:00
Keir Fraser 0080a146fc x86 firmware: Consolidate firmware common build rules.
Also avoid overriding global optimisation default (-O1, -O2, etc.)

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-02 10:42:27 +01:00
Keir Fraser 467e5407fc hvmloader: Fix parallel build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-02 10:28:56 +01:00
Keir Fraser 75d2b7df30 hvmloader: Properly implement some more SMBIOS fields.
In particular:
 - BIOS release date
 - BIOS characteristics
 - BIOS extended characteristics (Targeted Content Distribution is
   required to be specified to pass WHQL).
 - CPU speed

Based on a patch by Kamala Narasimhan <kamala.narasimhan@citrix.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-01 17:21:05 +01:00
Keir Fraser 774a123b38 hvm acpi: Restrict to 15 Processor objects.
Some versions of Windows 2000 only support no more than 15 cpus in
ACPI table, otherwise it will cause a BSOD
KMODE_EXCEPTION_NOT_HANDLED. This patch decrease the cpu count in the
ACPI DSDT to 15.

Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>

At the same time, fix the ACPI processor IDs in the Processor objects.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-03-25 10:57:50 +00:00
Keir Fraser 6ab58a7ed9 tools build: Fix build after subdir rules cleanups.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-03-25 10:17:22 +00:00
Keir Fraser c3e57fa148 tools/firmware: Use generic subdirs rules.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-03-25 09:51:03 +00:00
Keir Fraser 79e5898480 hvm bios: Fix EDD pointer in int 13h, fn 48h BIOS call return buffer
I ran into this when I was reviewing what was outstanding to get
NetWare to run fully virtualized.

The BIOS emulator code has the segment and offset backward in the
returned buffer for the int 13h, fn 48h BIOS call.

Signed-off-by: Bruce Rogers <brogers@novell.com>
2008-03-17 11:16:08 +00:00
Keir Fraser 1fd66acbc7 hvmloader/acpi: Simplify Processor Object definitions.
No need to generate the correct number dynamically since
present/not-present can be determined from the MADT. What *is*
required is that we have a Processor Object for every present
processor. We statically declare 16 Objects, which should be plenty
for now.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-02-25 10:56:23 +00:00
Keir Fraser 3bbf83843c Enable HVM guest VT-d device hotplug via a simple ACPI hotplug device model.
** Currently only 2 virtual hotplug pci slots(6~7) are created so more
   than 2 vtd dev can't be hotplugged, but we can easily extend it in
   future.

Three new commands are added:
"xm pci-list domid" show the current assigned vtd device, like:
VSlt  domain   bus   slot   func
0x6      0x0  0x02   0x00    0x0

"xm pci-detach" hot remove the specified vtd device by the virtual
slot, like:
xm pci-detach EdwinHVMDomainVtd 6

"xm pci-attach DomainID dom bus dev func [vslot]" hot add a new vtd
device in the vslot. If no vslot specified, a free slot will be picked
up. e.g. to insert '0000:03:00.0':
xm pci-attach EdwinHVMDomainVtd 0 3 0 0

** guest pci hotplug
linux: pls. use 2.6.X and enable ACPI PCI hotplug ( Bus options=> PCI
hotplug => ACPI PCI hotplug driver )
windows: 2000/xp/2003/vista are all okay

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
2008-02-15 14:13:17 +00:00
Keir Fraser 1546fd3f23 hvm acpi: Expose \_S4 ACPI object, allowing suspend-to-disk.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-02-15 12:50:55 +00:00
Keir Fraser 3f8e22de79 x86 hvm: Allow HPET to be configured as a per-domain config option.
A new platform variable 'hpet' is added, which defaults to 0 for new
guests (that is, hpet disabled). Default is off (no hpet) because
hpet is currently less accurate in keeping time than PIT (because no
timer_mode adjustments).

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-02-11 14:45:29 +00:00
Keir Fraser 399874b1de hvmloader: Remove dead function check_amd().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-02-06 18:31:02 +00:00
Keir Fraser 50b12df836 x86 vmx: Remove vmxassist.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-02-06 12:07:55 +00:00
Keir Fraser e1781903c7 Fix hvmloader makefile dependencies, and do not recurse into
tools/firmware/etherboot by default (the dependency of eb_roms.h on
Config does not seem to always prevent the build from going ahead, for
some reason).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-02-02 13:40:43 +00:00
Keir Fraser abae89340b etherboot: Supply pre-built option ROMs to avoid needing to build
Etherboot from scratch in most situations.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-02-02 11:24:20 +00:00
Keir Fraser 2c16ce588c hvm: Etherboot for E100 NIC
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2008-01-31 16:23:35 +00:00
Keir Fraser 90aa975562 Remove unused find-gcc-3 script.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-31 14:14:23 +00:00
Keir Fraser 77d293d885 etherboot: Fix the build.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-31 14:01:59 +00:00
Ian Jackson 2d06b3f0df Build etherboot ROM from source.
We now include the source for Etherboot (5.4.2, obtained from git)
rather than a pre-built ROM.  This gives better traceability and GPL
licence compliance.  See tools/firmware/etherboot/README for details.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-30 18:39:04 +00:00
Keir Fraser b816828e04 firmware: Use new path to xen public headers.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-28 12:03:02 +00:00
Keir Fraser e3c8f36340 Remove auto-generated files in extboot/ directory. 2008-01-23 11:15:57 +00:00
Keir Fraser 83f34fdcdd Add BINDIR. Use it.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-22 14:31:10 +00:00
Keir Fraser 956eabb460 hvmloader: Expand iomem allocation pool to 0xf0000000-0xfc000000.
Check for exhaustion of allocation pool, warn user, and fail to
initialise the relevant PCI BAR.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-22 11:18:10 +00:00
Keir Fraser b126cbcb88 hvmloader: Assign PCI resources in descending order of size for better packing.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-22 10:54:00 +00:00
Keir Fraser c7ee45b34e hvm: Allow PCI high-memory resource to be decided by hvmloader at
HVM-guest boot time. Also make a few PCI0 resource ResourceProducer
type -- this seems to be specified by some randomly-sampled real ACPI
systems.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-21 14:39:33 +00:00
Keir Fraser 86f69d44ae hvm: Extboot support for Xen
This patch adds extboot to Xen.  It should be pretty harmless as the
moment because it's never enabled.  extboot allows arbitrary block
devices to be used to boot guests including SCSI and PV disks.  I've
tested it with both Windows and Linux guests in QEMU.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2008-01-17 16:39:14 +00:00
Keir Fraser 136beff178 hvm, x86: Add QEMU BIOS menu for choosing boot device.
The attached patch implements a mini BIOS menu for choosing a
non-default
boot device. When a guest starts it'll display

   'Press F10 to select boot device'

And wait 3 seconds, before continuing with the normal boot device. If
they press the F10 key, a menu is shown allowing a choice between
floppy, harddisk, cdrom and network (PXE).

I can't take credit for this originally - Jeremy Katz wrote it for
KVM, I merely re-diffed the patch to work against Xen's QEMU/BIOS code
tree. It has been tested in Fedora successfully against 3.1.x and 3.2.x

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
CC: Jeremy Katz <katzj@redhat.com>

If more than one boot device has been selected, the currently selected
number displayed in the menu is wrong.

Signed-off-by: Stefano Stabellini <stefano.stabellini@citrix.com>
2008-01-15 14:22:50 +00:00
Keir Fraser 9eb143df00 vmxassist: Emulate CLTS.
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-11 10:59:48 +00:00
Keir Fraser f8dc2a2051 x86, hvm, rombios: INT13 LBA48 support for disks bigger than 128GB.
The new limit should be 2TB.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
2007-12-27 13:00:40 +00:00
Keir Fraser 53f48ca221 Fix some build system error handling.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2007-12-20 13:16:21 +00:00
Keir Fraser 07847be650 x86, hvm: Config option to allow vmxassist to be disabled.
hvmloader is modified to dynamically detect this, allowing possibility
of optional full vmxassist replacement in 3.2 stable branch in future.
Currently 'vmxassist=y' is not much use since no replacement is
implemented.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2007-11-24 13:23:22 +00:00
Keir Fraser 3192c29b6a Fix non-portable grep usage. Solaris doesn't have -q option.
Signed-off-by: John Levon <john.levon@sun.com>
2007-11-13 19:26:55 +00:00