Commit Graph
73 Commits
Author SHA1 Message Date
Keir Fraser f3f2e4ef69 firmware: fix romimage generation for *bsd
- portability fix in Makefile: mkhex is not bash specific
 - GNU od separates column with one blank, BSD od uses eight blanks.
   Change sed to deal with this.
 - Add a fourth sed to fix a build error on NetBSD

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-26 09:10:41 +01:00
kfraser@localhost.localdomain 07c60e81f0 hvmloader: ACPI DSDT dynamically indicates presence of COM1/COM2 ports
according to qemu emulation.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-11 16:48:02 +01:00
kfraser@localhost.localdomain 22f2674542 hvmloader: Clarify relationship between xen_domain_handle_t and SMBIOS uuid field.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-08-24 16:32:56 +01:00
Tim Deegan 617f360651 [HVM] Store Etherboot ROM as hexdump, not binary
for ease of patch management
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-08-06 15:33:42 +01:00
kfraser@localhost.localdomain d169d9d572 hvmloader: Avoid bogus use of NULL pointer.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-31 15:09:45 +01:00
kfraser@localhost.localdomain ffc3f3c3db hvm: Re-introduce LPT1 device in ACPI tables.
Once the presence of LPT1 is baked into a Windows guest, it gets upset
if it is subsequently removed. Hence we add the 'LTP1' device object
back into the ACPI DSDT, and remove IRQ 7 from the list of IRQs usable
by the PCI-ISA links.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-11 13:49:11 +01:00
kfraser@localhost.localdomain ea511d357e tools: Clean up usage of const type qualifier.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-12 11:26:51 +01:00
Keir Fraser ebb19b1cc8 hvm: e820 public header cleanup.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-10 19:49:44 +01:00
Keir Fraser 8665aa44c3 hvm: Fix ACPI shutdown, broken by my previous changeset.
It turns out that although PIIX4 hardware defines the S5 type code to
be 000, all OSes will discover the correct code by evlauating an \_Sx
object in the ACPI DSDT. And we set the type code in that object to be
111.

So this patch keeps the other cleanups made to the piix4acpi.c file,
but switches back to checking for code 111. It also makes it clearer
in both the ioemu code and in the dsdt source code where these magic
numbers come from.

Let's hope noone actually has the true PIIX4 type codes hardcoded
(it's highly doubtful that anyone would).

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-12 16:24:50 +01:00
kfraser@localhost.localdomain 56d126ace6 hvmloader: Place SMBIOS tables at 0xE9000. Previous location was lower
than nay native system would place them.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-26 16:45:06 +01:00
kfraser@localhost.localdomain 7f804c918c hvmloader: Fix e820_collapse() to not lose E820 entries.
Fixes bugzilla bug #971.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-24 10:34:47 +01:00
Keir Fraser f7ffac81ac hvmloader: Fix ROMBIOS highmem relocation. Only SHF_ALLOC sections
should be relocated. SHT_NOBITS must be handled properly (space
explicitly allocated and zeroed).
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-19 21:06:29 +01:00
Keir Fraser e5baa1aa0c hvmloader: Simplify e820_malloc() interface and improve
implementation. Strip unnecessary sections from the highmem bios
extension elf image.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-19 19:22:12 +01:00
Keir Fraser a331230ece hvmloader: Tiny comment clarification. 2007-04-19 18:13:09 +01:00
Keir Fraser 36200329b1 hvmloader: More simplification of highmem bios relocation code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-16 23:56:26 +00:00
Keir Fraser b54ada182d General hvmloader cleanups and write memory fields of CMOS with
correct values.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-16 23:34:24 +00:00
kfraser@localhost.localdomain 11f0262cf2 hvmloader: Simplify 32bit-bios relocator.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-03-15 10:38:06 +00:00
kfraser@localhost.localdomain 8ff2288a9a hvm: Add a revision 1 FADT in ACPI, and link the original revision-4
FADT only to XSDT. It avoids a buffer overflow in the initialization
of Window 2000 ACPI HAL (pre ACPI 2.0 OS), and thus enables the
installation and boot. This compatibility practice is also used in
hardware, please refer to:
 http://www.acpi.info/presentations/S01USMOBS169_OS%20new.ppt

Signed-off-by: Qing He <qing.he@intel.com>
2007-03-14 11:38:26 +00:00
kfraser@localhost.localdomain bc510c7fd5 AMD HVM: Fix enter-realmode stub to initialise 32-bit GPRs.
This fixes booting Ubuntu live ISO, which assumes the upper half of
%esp is zero on entry.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-14 11:09:13 +00:00
kfraser@localhost.localdomain 1babae4d0c hvmloader: Avoid compile warnings char vs. unsigned char.
Avoid 'magic number' hardcoded string lengths.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-13 10:32:52 +00:00
kfraser@localhost.localdomain 506e6d7f53 AMD HVM: Exit hvmloader via a normal jump-to-realmode code sequence.
Strip out all SVM-special hypercall code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-12 11:15:56 +00:00
kfraser@localhost.localdomain 2765521399 Remap PCI-ISA IRQ 6 to IRQ 7. Disable LPT1 by default and remove its
definition from the ACPI DSDT. This avoids conflict with FDC on IRQ6
(it is a bit more likely that someone will want to connect a floppy
image to a guest than it is that anyone will ever care about
parallel-port functionality).
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-02-26 11:53:35 +00:00
kfraser@localhost.localdomain 2d420d93a6 hvm: Processor Objects require unique IDs.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-02-16 15:50:02 +00:00
kfraser@localhost.localdomain 938d51e10e hvm: Dynamically generate the correct number of ACPI Processor Objects
in an SSDT.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-02-16 15:33:51 +00:00
kfraser@localhost.localdomain 8d0689ddbe hvm: Fix acpi processor id in MADT LAPIC entries.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-02-15 19:03:09 +00:00
kaf24@localhost.localdomain 6696b4ae89 Fix firmware compile on Solaris.
Use $(LD) not ld. Include right headers for x86 ELF bits.

Signed-off-by: John Levon <john.levon@sun.com>
2007-01-28 18:45:04 +00:00
kaf24@localhost.localdomain dd59dfdfb1 This patch adds a 32bit gateway to the Bochs BIOS. The 32 bit code is
compiled with gcc and linked into the hvmloader as a byte-array.
Hvmloader allocates memory (rounded up to next 64kb) from the e820
table
below 4GB, copies and relocates the 32bit code in the allocated area
and
copies a jumptable (located in a section '.biosjumptable') pointing to
the 'exported' functions into the Bochs BIOS's memory area to link the
two code sections. The memory area has been reserved and can be
identified with the signature '___JMPT'.

In the Bochs BIOS only stub functions are provided. These load the
index
of a particular function in the jump table, switch to protected mode
and
call the function in the high memory area.  The stack is prepared such
that functions compiled by gcc can just pick the parameters from the
stack as usual - this means that the 16bit real-mode return address is
taken off the stack. The stub functions should have the same signature
as those in 32bit space. For ABI compatibility reasons parameters
inside
the Bochs BIOS stubs should all be 32bit wide.

This patch includes a test function that calls three gcc-compiled
functions in the high memory area and displays their success status.
Simple tests are done doing multiplication and addition of 32-bit
numbers and reading and modification of a static variable. These
functions test the interface and the relocation code. The test code is
removed in patch part 3.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-01-26 16:30:48 +00:00
kaf24@localhost.localdomain c21d85bf59 [HVM] Change VCPU->LAPIC_ID mapping so that VCPU0 has ID0.
This fixes booting of older x86/64 Linux kernels.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-31 12:26:42 +00:00
kaf24@localhost.localdomain b8ca0e6839 [HVM] Rationalise OEM and Creator IDs and Table Revisions.
Create virtualised IDs and use them consistently.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-30 15:45:13 +00:00
kaf24@localhost.localdomain 175eac1a6d [HVM] Route ISA IRQ 0 to IOAPIC GSI 2, just like 99% of native systems.
This is a built-in assumption of HPET 'legacy' IRQ routing, which is
why we have changed to this routing strategy now.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-26 19:49:11 +00:00
kfraser@localhost.localdomain e4caeac504 [HVM] Emulates HPET in hypervisor and extend ACPI tables.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
2006-12-21 12:05:34 +00:00
Tim Deegan 6f7ff73d57 [HVM] Add Etherboot option ROM, for network-booting HVM guests.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2006-12-20 11:59:54 +00:00
kfraser@localhost.localdomain 72941f1998 [HVMLOADER] Clean up makefile, change TPM detection.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-29 12:41:30 +00:00
kfraser@localhost.localdomain f46695b45b [HVMLOADER] Fix CFLAGS.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-29 11:38:17 +00:00
kfraser@localhost.localdomain db08b83ada [HVMLOADER][ACPI] Move SSDT initialisation to acpi/ dir.
This kills off a few hundred lines of unnecessary code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-28 15:47:52 +00:00
kfraser@localhost.localdomain d8dfab4a35 [HVMLOADER] acpi: Implement an acpi_rsdp_get() function that searches
for the RSDP in memory (up to the BIOS) rather than calculating its
start address. Recent changes seem to have moved the RSDP to another
location in memory so that I received 'BAD RSPD signature' messages.
I have also fixed some other possible issues related to return codes
and alignment of ACPI entries.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-11-28 13:53:12 +00:00
kfraser@localhost.localdomain da38d1f64b [HVM] Re-introduce the 'apic' configuration option, default to 1.
Also simplify the HVM builder interface by doing more work in
the python wrapper, and fix mapping of shared_info page after the
change to map foreign pages by GMFN rather than MFN.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-27 17:49:41 +00:00
kfraser@localhost.localdomain a41ba620b1 [HVM] Move IOAPIC ID back to 0x00. Shift LAPIC IDs to 0x01 upwards.
Actually the conflict between LAPIC ID 0x00 and IOAPIC ID 0x00
really doesn't matter even in a native system but we can avoid
any risk of a warning by shifting the LAPIC ID space by one.

Also the changeset fixes construction of the MADT (LAPIC info
was overwriting the IOAPIC info) so we can now boot with ACPI
MADT again.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-27 12:00:01 +00:00
kaf24@localhost.localdomain 938cee9d41 [HVM] Dynamically build ACPI-table data block.
Only emit MP tables and MADT for multi-processor guests.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-26 17:37:28 +00:00
kaf24@localhost.localdomain 00a70f44a6 [HVM] Update VPIC device model for new interrupt delivery code.
Move BSP VLAPIC initialisation to hvmloader.
Remove callback_irq update hack from Linux unmodified drivers.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-26 13:37:27 +00:00
kfraser@localhost.localdomain 3af4730c8d [HVM] Update ACPI tables to reflect new PIRQ routing:
1. Override ISA IRQs 5,6,10,11 as active-low level-triggered.
    These are 'wired' to PCI devices.
 2. Limit PCI-ISA link routers to route to 5,6,10,11. Others
    are active-high edge-triggered and so invalid to use for
    PCI devices. In any case, four ISA IRQs is sufficient to
    avoid unnecessary aliasing among four links.
Also remove PCI device 0 IRQ info. It's an embedded host bridge with
no interrupt sources.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-22 18:36:48 +00:00
kfraser@localhost.localdomain bbfa22f8c9 [HVM] Move PCI and PCI-ISA bridge setup to hvmloader.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-22 17:50:20 +00:00
kfraser@localhost.localdomain facdf41917 [HVM] Set VIOAPIC ID to a value that does not conflict with LAPIC IDs.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-22 11:52:46 +00:00
kfraser@localhost.localdomain d46c9ce0d7 [HVM] Reworked interrupt distribution logic.
TODO:
 1. Fix IO-APIC ID to not conflict with LAPIC IDS.
 2. Fix i8259 device model (seems to work already though!).
 3. Add INTSRC overrides in MPBIOS and ACPI tables so
    that PCI legacy IRQ routing always ends up at an
    IO-APIC input with level trigger. Restricting link
    routing to {5,6,10,11} and setting overrides for all
    four of those would work.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-21 19:22:25 +00:00
kfraser@localhost.localdomain 9fd9787b0e [HVMLOADER][VTPM] Add support for a TCG ACPI table.
The ACPI table is generated if the probing for the TIS interface
succeeds. I cleaned up the ACPI signatures in acpi2_0.h to be more
readable.

The specification for the layout of these ACPI tables can be found here:
https://www.trustedcomputinggroup.org/groups/server/TCG_ACPIGeneralSpecification_1-00_1-00_FINAL.pdf

Extensions to the Bochs BIOS that use these ACPI extensions will follow.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-11-17 10:24:22 +00:00
kfraser@localhost.localdomain de6e26cec4 [HVMLOADEr] Reserve MMIO 0xa0000 to 0xc0000 in ACPI dsdt.
Avoids possible vga driver loading problem in HVM Windows guest.
Also fixes a Makefile bug in hvmloader directory.

Signed-off-by: Qing He <qing.he@intel.com>
2006-11-17 10:02:54 +00:00
Steven Smith 5c445c2f6d [HVM] Be sure to nul terminate uuids in HVM SMBIOS tables.
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-11-06 09:46:13 +00:00
kaf24@localhost.localdomain 6bc01e4efd [XEN] Replace hvm_setup_platform() with hvm_domain_initialise()
and extra code in hvm_vcpu_initialise(). Remove 'apic' config
option -- HVM CPUs will always have an APIC (which should be
set up in virtual wire mode for backward compatibility, just as
in a real system).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-05 20:17:40 +00:00
kfraser@localhost.localdomain 883236e49a [HVM] ACPI: Clean up table definitions, move under hvmloader/
directory pending tighter integration of table generation
into hvmloader. This patch also includes the TPM TIS SSDT
generator from Stefan Berger at IBM.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-31 12:42:50 +00:00
kfraser@localhost.localdomain f9038804d6 Replace test-gcc-flag with Linux-style cc-option.
Improve on Linux implementation by looking for any output
on stdout/stderr. This indicates badness.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-18 19:14:34 +01:00