Commit Graph
373 Commits
Author SHA1 Message Date
Keir Fraser 23b4cad2cd hvmloader: Fixes to printf() implementation.
1. Remove unportable O and D format specifiers
2. Fix X format specifier to print upper-case hex characters
3. Fix d format specifier to print -ve numbers
4. Fix handling of int vs. long (although not actually an issue
   for the i386 compile target)
5. Don't use the antiquated C 'register' type attribute.

Signed-off-by: Keir Fraser <keir@xen.org>
2011-01-14 15:21:24 +00:00
Keir Fraser 94feecc881 Update my email address to long-term stable address.
Signed-off-by: Keir Fraser <keir@xen.org>
2011-01-07 13:30:04 +00:00
Keir Fraser df402317ce etherboot: Download ipxe from XEN_EXTFILES_URL
Allows us to build even if the ipxe git server is down. We still fall
back to the git server if we cannot download a suitably named tarball
from our own URL.

Signed-off-by: Keir Fraser <keir@xen.org>
2010-12-10 19:38:30 +00:00
Keir Fraser 57f1362319 hvmloader: Fix 22383:cba667fb80cf iterating over defns 0..255
We need to declare devfn as wider than 8 bits for a loop 0<devfn<256
to terminate.

Signed-off-by: Keir Fraser <keir@xen.org>
2010-11-10 14:15:23 +00:00
Keir Fraser cf17821447 hvmloader: fix off-by-one-bit error when initialising PCI devices
hvmloader is responsible for - amoungst other things - initialising
the PCI device BARs prior to loading the guest BIOS.  The previous
code only probed for devfn up to 128.  The lower 3 bits are function
IDs so this meant that only devices in slots 0-15 were actually being
initialized.

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
Acked-by: Gianni Tedesco <gianni.tedesco@citrix.com>
2010-11-10 13:58:16 +00:00
Keir Fraser e0dbccc8fe hvmloader: Fix acpi static tables for new ACPI ioports location.
This change some fadt values -- the address of the acpi ioports -- and
the pm1a_evt_address value wrote for the pci bus.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
2010-11-09 20:37:46 +00:00
Anthony Perard 8fe49db6bd firmware, qemu: Change ACPI IO values to match QEMU BIOS
As part of the QEMU/Xen merge, this patch comes to change the value of
sleep states and add some information in the PCI registers to match the
implementation of the BIOS of QEMU.

It also does a hypercall (HVM_PARAM_ACPI_IOPORTS_LOCATION) that tell the
Xen to use the new Port I/O instead of the old one.

[ Also, in this patch, update QEMU_TAG to the qemu-xen revision
  with the corresponding qemu change. -iwj ]

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-11-09 18:03:55 +00:00
Keir Fraser e9cc934b59 hvmloader: Fix e820 printing routine -- addresses are 64-bit
Signed-off-by: Keir Fraser <keir@xen.org>
2010-11-09 10:34:43 +00:00
Keir Fraser f3eb58ef29 hvmloader: Use ipxe 1.0.0 final rather than a release candidate.
Signed-off-by: Keir Fraser <keir@xen.org>
2010-11-08 15:32:55 +00:00
Keir Fraser 0806f13b3e hvmloader: Replace gPXE with iPXE for ethernet boot ROM
It is actively maintained.

From: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Keir Fraser <keir@xen.org>
2010-11-04 16:38:13 +00:00
Keir Fraser 708261e496 hvmloader: Configure gPXE to use serial console
Sometimes we would rather connect to an HVM's serial console than it's
VGA display. In this case we cannot see or interact with the ethernet
booting process. This is a bit annoying so let's just enable it.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
2010-10-29 10:17:07 +01:00
Keir Fraser d47f1a444a hvmloader: reduce iasl verbosity
I don't think anyone really needs iasl's banner displayed during the
build process.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-10-24 13:18:26 +01:00
Keir Fraser da7abb1417 hvmloader: Properly block on xenstore daemon rather than merely yielding.
Signed-off-by: Keir Fraser <keir@xen.org>
2010-10-20 16:36:32 +01:00
Keir Fraser 55a2e36cbc x86: Add -fno-exceptions to list of possibly-supported CFLAGS for embedded targets.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-25 22:20:47 +01:00
Keir Fraser 9365b5518a hvmloader: clear the whole shared-info page when shutting down xenbus
since the contents might be in the wrong word-size for later users.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-22 15:19:25 +01:00
Keir Fraser afb0532ff0 build: Make all GIT download URLs depend correctly on GIT_HTTP={y,n}
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-21 09:02:10 +01:00
Keir Fraser ff556f73a0 hvmloader/gpxe: Add a couple of bug-fix patches from upstream gpxe
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-20 16:09:50 +01:00
Keir Fraser 8bced86016 hvmloader: clear the xenbus event-channel when we're done with it.
Otherwise a later xenbus client that naively waits for the rising edge
could get stuck.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-20 13:42:17 +01:00
Keir Fraser bfb32dde4f tools: Update distclean target to remove auto-gen'ed tarballs.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-20 11:18:39 +01:00
Keir Fraser e3c0ad6c82 hvmloader: Download gpxe bits via HTTP rather than GIT protocol.
Latter is faster but won't work through all firewall setups.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-20 11:09:21 +01:00
Keir Fraser 762599eddf hvmloader: Build GPXE from upstream git repo, latest release tag.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-20 10:58:04 +01:00
Keir Fraser ba01489a10 tools: gpxe build fix for NetBSD
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-07-19 15:10:20 +01:00
Keir Fraser 0e0a3eacbc hvmloader: customize the SMBIOS strings based on xenstore keys
...written at domain creation time by xapi.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-09 12:34:40 +01:00
Keir Fraser dc6c53ebb6 hvmloader: Add a xenbus frontend so it can read values from xenstore
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-09 12:33:57 +01:00
Keir Fraser f3e5b69ec8 rombios: use explicit SS prefix for calculated on-stack array accesses.
The bcc compiler gets constant array offsets right but does all
calculated array offsets via DS.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-08 09:52:01 +01:00
Keir Fraser 6456803dab rombios: move the stack to 0x9e000 and protect it with an e820 entry
so that we don't corrupt E820_RAM memory with stack ops in S3 wakeup.
It has to move up so the lowest contiguous RAM area is >= 512MiB.

This relies on the previous fix to let DS != SS

Signed-off-by: Paul Durrant <Paul.Durrant@citrix.com>
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-08 09:51:40 +01:00
Keir Fraser b825e251d2 rombios: wait 30s after a failed boot
Prevents waiting forever for a keypress that may never come if boot is
unattended.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-08 09:46:09 +01:00
Keir Fraser 9e3ba38157 rombios: fix implicit assumption that DS == SS
by passing boot device info by value, not by reference.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-06 16:51:54 +01:00
Keir Fraser 5bcc7775a7 rombios: pause for a keypress after a failed boot
rombios: inform the user and pause for a keypress after a failed boot
rather than powering off immediately.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-07-06 16:49:59 +01:00
Keir Fraser d9edd37387 gpxe: Add eb-roms.h to hgignore list and build ROMs serially.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-29 13:43:18 +01:00
Keir Fraser 98ed7531a4 gpxe: Build e1000 ROM with PCI-ID matching that advertised by qemu-dm.
Also build gpxe without -Werror and require it always to be built (do
not include a pre-built binary in our source repo).

Portions of this patch are from Gianni Tedesco <gianni.tedesco@citrix.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-29 13:33:37 +01:00
Keir Fraser a6e99ed7e7 Add the USE_PLATFORM_TIMER flag to the FADT, to make w2k3 use the PMTIMER
...because the default timesource (TSC) drifts under load.

The flag is only defined in ACPI 3.0, and we provide ACPI 2.0 tables,
but Windows seems happy enough to obey it anyway.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2010-06-04 10:06:23 +01:00
Keir Fraser 022cf55cf1 hvmloader: Replace unportable usage of GNU head with portable awk.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-22 18:42:50 +00:00
Keir Fraser b0e6d9b53a hvmloader: fix vgatype detecting issue
When graphics card is assigned to a guest as a secondary VGA,
without gfx_passthru and emulated VGA is the primary VGA,
hvmloader misreads gfx_passthru is specified if VGA device is
found after the emulated VGA.

This patch fix this issue. If emulated VGA is found, hvmloader
preserves it and loads vgabios of the emulated VGA.

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
2010-02-22 10:04:22 +00:00
Keir Fraser 819de76727 hvmloader: Fix an ACPI asl bug.
Fix an ACPI asl bug by explicitly convert PRS to buffer, otherwise PRS
would be parsed as integer if less than 32/64 bits (according to ACPI
1.0 or 2.0).

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
2010-02-15 08:14:21 +00:00
Keir Fraser 5f5e014566 Vcpu hotplug: Move ACPI processor from \_PR to \_SB
Move processor from \_PR to \_SB. ACPI processor can be defined
under \_PR or \_SB. However, recently os like linux 2.6.30/32 support
cpu hotplug better for \_SB processor object.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-15 08:13:26 +00:00
Keir Fraser 98650e12c1 hvmloader: Fix parallel build of ACPI tables.
Make build.c dependency on ssdt_{pm,tpm}.h explicit, else they can be
built in the wrong order.

Also, improve naming of target DSDT structures, and specify -p option
to iasl so that all generated files for a given target have
target-unique names, hence build can proceed safely in parallel.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-12 09:16:10 +00:00
Keir Fraser 1ffced4c92 hvmloader: Fix comment style in ssdt_tpm.asl
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-12 09:14:16 +00:00
Keir Fraser 11c76718f8 hvmloader: Build a compatibility DSDT with only 15 processor objects.
Deploy this smaller DSDT where possible: this is required to boot
Windows 2000, which only supports up to 15 processors and will blue
screen if it sees more processor objects than that (even inactive
ones).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-11 22:42:18 +00:00
Keir Fraser 5f6338c27e hvmloader: Remove checked-in ready-compiled SSDT_PM and SSDT_TPM.
These can be built at the same time as the DSDT.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-11 21:49:47 +00:00
Keir Fraser e5a69893b2 hvmloader: Do not leave compiled DSDT checked in to tree.
It's big and small changes generate huge diffs. People building the
firmware will have to ensure they have iasl installed.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-11 21:21:41 +00:00
Keir Fraser e5dc62c4d4 hvmloader: Fix CPU hotplug notify handler in ACPI DSDT.
By merging PRSC and NTFY methods we simplify the code, improve
efficiency, and fix a bug where PRSC iterated 0-255 but NTDY could
only handle CPU numbers 0-127.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-03 09:16:11 +00:00
Keir Fraser 9e2b86f486 hvm: Add ACPI fixed sleep button
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
2010-01-20 20:34:19 +00:00
Keir Fraser 4bce6df7bd hvmloader: mp table fix
The bug causes noapic PAE Windows 2k3 boot failure.

Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
2009-12-30 12:49:10 +00:00
Keir Fraser 16d3c5de3c hvmloader: Fix Windows XP standby with cirrus VGA
Fix it by telling OSPM don't power down vga card on entering S3
state. The trick works for XP and Windows2003, but Vista still refuse
to allow S3.

It is picked from kvm-userdapce.git commit 60e85d, author "Gleb
Natapov".

Signed-off-by: Yu Ke <ke.yu@intel.com>
2009-12-28 09:38:34 +00:00
Keir Fraser 37fddaa5fe hvmloader: Only mark LTP1 present in ACPI DSDT if parport really is there.
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
2009-12-24 09:10:25 +00:00
Keir Fraser cf75018188 HVM vcpu add/remove: parse 'vcpu_avail' to firmware and set up madt
accordingly

-- currently firmware has got 'vcpus' from xend, this patch add parse
   'vcpu_avail' to firmware;
-- setup madt 'lapic' subitems of processors accoring to vcpus and
   vcpu_avail which finally come from config;

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-12-14 09:25:47 +00:00
Keir Fraser c70ad37a1f HVM vcpu add/remove: setup dsdt infrastructure by mk_dsdt.c for vcpu add/remove
In order to support HVM vcpu add/remove, we need set dsdt
infrastructure.
-- By using mk_dsdt.c, it auto-produce related asl code when
compiling.
-- It define processor related objects and control methods (_MAT,
_EJ0, _STA, etc).
-- It also define GPE _L02 and Notify control method for SCI
interrupt, which will trigger HVM acpi driver to add/remove cpu.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-12-14 09:14:26 +00:00
Keir Fraser 0dfc46719e hvmloader: Fix bug in 20510:749b5d46e7a9 (GPE notifications)
The GPE notification decision tree was inverted.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-12-01 14:08:27 +00:00
Keir Fraser dd14c75ad4 build: Execute mk_dsdt with path
Signed-off-by: Simon Horman <horms@verge.net.au>
2009-11-27 07:56:38 +00:00