Commit Graph
181 Commits
Author SHA1 Message Date
Keir Fraser d62f502aaa hvm: TCGBIOS fixes
Fix IPL measurement of El Torito CD boot and some eventlog formats.

The TCG BIOS extensions are described here:
https://www.trustedcomputinggroup.org/specs/PCClient/TCG_PCClientImplementationforBIOS_1-20_1-00.pdf

- fix cdrom (El Torito) boot (8.2.5.6 El Torito, p63)
   tcpa_ipl() is modified to support various boot devices.
   move some measurement code into cdrom_boot() function.
- fix EV_IPL (0Dh) event (10.4.1 Event Types, p76)
   eventfield size should be zero
- fix EV_SEPARATOR event (3.2.2 Integrity Collection and Reporting,
   p32)
   change eventfield to -1 (0xFFFFFFFF)  from  "---------------"
- add "Returned INT 19h" event (8.2.3 Logging of Boot Events, p59)
   actually, tcgbios does not call int19h, but we extend this
   tentatively

Signed-off-by: Seiji Munetoh <seiji.munetoh@gmail.com>
2007-10-17 10:00:27 +01:00
Keir Fraser ebe41ed23d hvm: Improve tcgbios code for finding ACPI RSDP.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-09-26 09:14:33 +01:00
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
Keir Fraser d68181c014 vmxassist: Emulate HLT.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-22 09:39:18 +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 357caf631c hvm: Add rombios decoding of F11/F12 scancodes in support for
Microsoft's Remote Installation Services, which require F11/F12 keys

Signed-off-by: Ben Guthro <bguthro@virtualron.com>
Signed-off-by: Steve Ofsthun <sofsthun@virtualiron.com>
2007-08-29 15:02:41 +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
Tim Deegan 27cd0dbc62 [HVM] ROMBIOS: reboot when we see Ctrl+Alt+Del
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-07-06 11:17:01 +01:00
Tim Deegan 920201a996 [HVM] update Etherboot ROM: new version, stricter DHCP compliance.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-07-05 10:19:25 +01:00
kfraser@localhost.localdomain ef5a7ad739 vmxassist: Decode mov instruction in protected to real mode in vmxassist.
Also some clean up.
Signed-off-by: Xin Li <xin.b.li@intel.com>
2007-07-03 10:08:34 +01:00
Keir Fraser d0e4f15cfd Use 32bit operand and address during VMXAssist protected to real.
Signed-off-by: Xin Li <xin.b.li@intel.com>
2007-07-02 00:24:59 +01:00
Keir Fraser 883a5de1d2 Remove unused VMXAssist test code.
Signed-off-by: Xin Li <xin.b.li@intel.com>
2007-07-01 22:18:04 +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
kfraser@localhost.localdomain 3f0a8ce1d7 hvm: Respect irqbase set by protected mode in mode switching with VMXAssist.
RHEL4U4 PAE SMP guest currently crashes, and we found changeset 15214
introduced it. This patch fixes it.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2007-06-08 11:19:55 +01:00
Keir Fraser cbf6afa30d vmxassist: Include terminating 0xff byte in TSS I/O bitmap.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-20 19:05:10 +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 9d93b013ce hvm rombios: No need for SS prefix when EA base is %bp.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-24 13:49:11 +01:00
kfraser@localhost.localdomain 14b75336fa hvm rombios: Do not screw around with the PIT in the BIOS 32-bit
extensions. mdelay() can more easily be implemented by polling the
DRAM refresh bit in port 0x61. And this does not mess with state that
a guest may be relying on.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-24 12:14:57 +01:00
kfraser@localhost.localdomain 25ae564134 hvm rombios: Fix int15, func 0x86 (udelay).
Was reading argument from wrong stack location with recent versions of
bcc. Doing the access from [bp] rather than [sp] is safer as the
former does not change all the time.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-24 12:13:58 +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
Keir Fraser 93943bf038 Fix build when bcc is not installed. 2007-03-16 23:33:44 +00:00
kfraser@localhost.localdomain cdc48dd842 rombios: Simplify memory-size bios calls and derive all results from
the e820 map.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-16 18:59:55 +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 e18371883e TCGBIOS fixes and cleanups.
- Add a missing break into the switch statement
- Simplify the code that switches from protected mode into real mode
  by letting it spill eax; this also fixes the case where the stack is
  above 0xffff.
- reformat the source for 80 columns
- remove some comments that were relevant when the TCG extensions were
  direct part of the real-mode Bochs BIOS

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-03-15 10:36:10 +00:00
kfraser@localhost.localdomain de2105b78a hvm: Firmware build requires dev86 (bcc) >= 0.16.14.
Earlier versions (at least 0.16.0) generate incorrect code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-14 19:35:26 +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
Tim Deegan a63bbc175b [HVM] Remove debugging printout of BIOS boot vector
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-03-12 10:10:42 +00:00
Tim Deegan b67783e2f4 [HVM] Disallow soft resets in the BIOS.
They aren't safe if the guest has brought up PV device drivers.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-03-07 13:07:12 +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
kfraser@localhost.localdomain a917e6d478 Disable GCC stack protector for ROMBIOS.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2007-02-15 14:17:00 +00:00
kfraser@localhost.localdomain 09a4bf86cf [TPM] Set tcpa calls in the rombios and other fixes.
This patch places some tcpa calls into the rombios that had previously
not applied anymore or were not set.
Force the reads from MMIO memory locations that the compiler otherwise
optimizes away (-O2) if there was an immediate write to the same
memory location before.
Use #define'd constants wherever possible.
Fix all remaining compiler warnings.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2007-02-06 23:01:35 +00:00
kaf24@localhost.localdomain 64559068e4 Older versions of as86 (<=0.16.0) require macro arguments to be bracketed.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-30 14:20:00 +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 23791a54c2 [HVM] Fix some BIOS build warnings.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-26 16:56:26 +00:00