aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware
Commit message (Collapse)AuthorAgeFilesLines
...
* hvmloader: Move option ROM loading into a separate optionnal fileJulian Pidancet2012-02-137-228/+259
| | | | | | | | | | | | Make load_rom field in struct bios_config an optionnal callback rather than a boolean value. It allow BIOS specific code to implement it's own option ROM loading methods. Facilities to scan PCI devices, extract an deploy ROMs are moved into a separate file that can be compiled optionnaly. Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* firmware: Use mkhex from hvmloader directory for etherboot ROMsJulian Pidancet2012-02-133-15/+9
| | | | | | | | | | | | | To remain consistent with how other ROMs are built into hvmloader, call mkhex on etherboot ROMs from the hvmloader directory, instead of the etherboot directory. In other words, eb-roms.h is not used any more. Introduce ETHERBOOT_NICS config option to choose which ROMs should be built (kept rtl8139 and 8086100e per default as before). Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* hvmloader: Allow the mkhex command to take several file argumentsJulian Pidancet2012-02-131-1/+2
| | | | | Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* hvmloader: Only compile 32bitbios_support.c when rombios is enabledJulian Pidancet2012-02-131-2/+2
| | | | | | | | | 32bitbios_support.c only contains code specific to rombios, and should not be built-in when building hvmloader for SeaBIOS only (as for rombios.c). Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* Clone and build Seabios by default2012-01-243-2/+93
| | | | | | | | From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* ipxe: remove tarball on cleanIan Campbell2012-01-051-1/+1
| | | | | | | | This prevents us picking up a stale tarball when the tag changes. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* ipxe: update to upstream versionRoger Pau Monne2011-12-205-167/+11
| | | | | | | | | | | | | Updated ipxe to current tree, which is 540e5960dc6b49eacf367f7c319fd0546474b845: Provide PXENV_FILE_EXIT_HOOK only for ipxelinux.0 builds Removed all the backported patches and updated boot_prompt_option.patch to apply against current ipxe. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* hvmloader: Re-name xenstore key used to save VM generation ID buffer address.Paul Durrant2011-12-181-1/+1
| | | | Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
* tools/firmware: remove "_PS0/3" MethodXudong Hao2011-12-051-10/+0
| | | | | | | | | | | | | | | | Do not expose the ACPI power management "_PS0/3" Method to guest firmware. According to section 3.4 of the APCI specification 4.0, PCI device control the device power through its own specification but not through APCI. Qemu pushes "_PS0/3" to guest will cause a mess between ACPI PM and PCI PM as a result of incorrect ACPI table shipped with the guest BIOS, it may cause a failure of PCI device PM state transition(from PCI_UNKNOWN to PCI_D0). Signed-off-by: Xudong Hao <xudong.hao@intel.com> Signed-off-by: Haitao Shan <haitao.shan@intel.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Change VM Generation Id Device HID.Paul Durrant2011-12-021-1/+1
| | | | | | | | | Unfortunately a HID of PNP0A06 will not work for an existing client driver so this patch aims to choose something that's pretty certain not to class with anything else. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Write address of VM generation id buffer into xenstorePaul Durrant2011-11-301-0/+6
| | | | | Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Add xenstore-write supportPaul Durrant2011-11-302-16/+65
| | | | | Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Add snprintf()Paul Durrant2011-11-302-13/+60
| | | | | Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Allocate an 8 byte buffer to contain the VM generation idPaul Durrant2011-11-303-0/+92
| | | | | | | | | | | | | and populate it at boot time with a value read from "platform/generation_id". Also add code to libxl to populate this xenstore key with the value of a new 'generation_id' parameter in the VM config file. Populate the ADDR package of VM_Gen_Counter ACPI device such that the first integer evaluates to the low order 32 bits of the buffer address and the second integer evaluates to the high order 32 bits of the buffer address. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Add 'ctype' infrastructurePaul Durrant2011-11-305-3/+58
| | | | | Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Add an ACPI device exposing a package called ADDR,Paul Durrant2011-11-302-1/+28
| | | | | | | | evaluating to two integers, and with _CID and _DDN set to "VM_Gen_Counter". Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Intel GPU passthrough, reverse OpRegionJean Guyader2011-11-244-4/+45
| | | | | | | | | | | | | | The Intel GPU uses a two pages NVS region called OpRegion. In order to get full support for the driver in the guest we need to map this region. This patch reserves 2 pages on the top of the memory in the reserved area and mark this region as NVS in the e820. Then we write the address to the config space (offset 0xfc) so the device model can map the OpRegion at this address in the guest. Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Fix memory relocation loop.Keir Fraser2011-11-212-13/+18
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* hvmloader: Change memory relocation loop when overlap with PCI holeJean Guyader2011-11-181-6/+14
| | | | | | | | | | | | | | | | Change the way we relocate the memory page if they overlap with pci hole. Use new map space (XENMAPSPACE_gmfn_range) to move the loop into xen. This code usually get triggered when a device is pass through to a guest and the PCI hole has to be extended to have enough room to map the device BARs. The PCI hole will starts lower and it might overlap with some RAM that has been alocated for the guest. That usually happen if the guest has more than 4G of RAM. We have to relocate those pages in high mem otherwise they won't be accessible. Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Add configuration options to selectively disable S3 and S4 ACPI ↵Paul Durrant2011-11-185-20/+89
| | | | | | | | | | | power states. Introduce acpi_s3 and acpi_s4 configuration options (default=1). The S3 and S4 packages are moved into separate SSDTs and their inclusion is controlled by the new configuration options. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Move acpi_enabled out of hvm_info_table into xenstorePaul Durrant2011-11-181-1/+4
| | | | | | | | | Since hvmloader has a xentore client, use a platform key in xenstore to indicate whether ACPI is enabled or not rather than the shared hvm_info_table structure. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Move acpi_info structure out from low memory.Keir Fraser2011-11-146-54/+24
| | | | | | | | This avoids a conflict with SeaBIOS's memory management. Moreover there is no reason that acp_info must live below 1MB, and moving it out actually simplifies our code. Signed-off-by: Keir Fraser <keir@xen.org>
* hvmloader: Load DSDT table from parameterAnthony PERARD2011-10-284-20/+44
| | | | | | | | | In order to have two different DSDT tables for rombios and SeaBIOS, this patch introduce a new parameter to acpi_build_tables() which contain the DSDT table to load. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader/acpi/dsdt: Fix PCI hotplug with the new qemu-xen.Anthony PERARD2011-10-282-60/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ACPI PIIX4 device in QEMU upstream as not the same behavior to handle PCI hotplug. This patch introduce the necessary change to the DSDT ACPI table to behave as expceted by the new QEMU. To switch to this new DSDT table version, there is a new option --dm-version to mk_dsdt. Change are inspired by SeaBIOS DSDT source code. There is few things missing with the new QEMU: - QEMU provide the plugged/unplugged status only per slot (and not per func like qemu-xen-traditionnal. - I did not include the _STA ACPI method that give the status of a device (present, functionning properly) because qemu-xen does not handle it. - I did not include the _RMV method that say if the device can be removed, because the IO port of QEMU that give this status always return true. In SeaBIOS table, they have a specific _RMV method for VGA, ISA that return false. But I'm not sure that we can do the same in Xen. So, the only way to remove a device is from outside of the guest (like with xl pci-detatch), and can not be initiated from inside. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: In mk_dsdt, Use __attribute__ format.Anthony PERARD2011-10-281-1/+2
| | | | | | | | Use __attribute__((format(printf,..))) for the function _stmt to prevent any mistake. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader/acpi/dsdt: Move IO port range reservationAnthony PERARD2011-10-282-14/+13
| | | | | | | | | | This patch move the IO port range reservation from the dsdt.asl to mk_dsdt. This IO port range need to be generated by mk_dsdt, because qemu-xen use different port. The IO port for qemu-xen will be added in a later patch. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader/acpi: Introduce --maxcpu option to mk_dsdtAnthony PERARD2011-10-282-8/+47
| | | | | | | | With this new option, there is no need to compile mk_dsdt for each DSDT table that we want. The Makefile is a bit reorganize to handle this new option and to prepare more change in a coming patch. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
* hvmloader: Add the WAET since Microsoft are demanding it for Windows 8Andrew Cooper2011-10-143-0/+52
| | | | | | Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Don't set hpet->header.length twiceAndrew Cooper2011-10-141-2/+1
| | | | | Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* tools: Revert seabios and upstream qemu build changesIan Jackson2011-09-143-84/+2
| | | | | | | | | | | | | | | These have broken the build and it seems to be difficult to fix. So we will revert the whole lot for now, and await corrected patch(es). Revert "fix the build when CONFIG_QEMU is specified by the user" Revert "tools: fix permissions of git-checkout.sh" Revert "scripts/git-checkout.sh: Is not bash specific. Invoke with /bin/sh." Revert "Clone and build Seabios by default" Revert "Clone and build upstream Qemu by default" Revert "Rename ioemu-dir as qemu-xen-traditional-dir" Revert "Move the ioemu-dir-find shell script to an external file" Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Clone and build Seabios by defaultStefano Stabellini2011-09-133-2/+84
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* hvmloader: don't clear acpi_info after filling in some fieldsIan Campbell2011-09-131-1/+2
| | | | | | | | | | | In particular the madt_lapic0_addr and madt_csum_addr fields are filled in while building the tables. This fixes a bluescreen on shutdown with certain versions of Windows. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reported-by: Christoph Egger <Christoph.Egger@amd.com> Tested-and-acked-by: Christoph Egger <Christoph.Egger@amd.com>
* hvmloader: relicense hvmloader xenbus implementation under moreIan Campbell2011-08-101-11/+19
| | | | | | | | | | | | | | | liberal terms. This code is a great example of a simple xenbus implementation and we would like to reuse it in projects with non-GPLv2 license (specifically in this case SeaBIOS which is GPLv3). I picked the license from extras/mini-os/COPYING (A two clause BSD style license) since mini-os exists for much the same purpose. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Keir Fraser <keir@xen.org>
* hvmloader: Move init_vm86_tss() back into common code.Keir Fraser2011-08-094-24/+20
| | | | | | It is not BIOS specific. Signed-off-by: Keir Fraser <keir@xen.org>
* hvmloader: Enable SCI in QEMU has it disabled.Keir Fraser2011-07-283-1/+26
| | | | | | | | | | | | When booting a Windows guest, the OS report an issue with the ACPI (in a BSOD). The exact issue is "SCI_EN never becomes set in PM1 Control Register." (quoted from WinDbg help). So this patch enables the flags SCI_EN if it is not yet enabled. Reported-by: Tobias Geiger <tobias.geiger@vido.info> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Keir Fraser <keir@xen.org>
* hvmloader: Allow default response to be specified to xenstore_read().Keir Fraser2011-07-254-31/+27
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* hvmloader: Formatting cleanups.Keir Fraser2011-07-258-46/+56
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* hvmloader: Replace bios_relocate hook with bios_load hookKeir Fraser2011-07-254-13/+18
| | | | | | | Used by OVMF BIOS handler. Signed-off-by: Bei Guan <gbtju85@gmail.com> Signed-off-by: Keir Fraser <keir@xen.org>
* hvmloader: Declare get_hvm_info_table/get_shared_info as const funcs.Keir Fraser2011-07-231-2/+1
| | | | | | The compiler can perform CSE on their call sites. Signed-off-by: Keir Fraser <keir@xen.org>
* hvmloader: Remove bogus and unused RESERVED_MEMSIZE decl.Keir Fraser2011-07-231-2/+2
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* hvmloader: New functions mem_hole_alloc() and mem_hole_populate_ram().Keir Fraser2011-07-232-18/+39
| | | | | | | | | | | These can be used by BIOS-specific handlers to set up memory regions as required by their firmware payload. Use mem_hole_alloc() to allocate properly reserved space for the shared-info-page mapping. The old location conflicts with space required for the OVMF BIOS (support for which is work in progress). Signed-off-by: Keir Fraser <keir@xen.org>
* hvmloader: Switch to absolute addressing for calling hypercall stubs.Keir Fraser2011-07-201-68/+69
| | | | | | | | | This is clearer and less fragile than trying to make relative calls work. In particular, the old approach failed if _start was not == HVMLOADER_PHYSICAL_ADDRESS. This was the case for some modern toolchains which reorder functions. Signed-off-by: Keir Fraser <keir@xen.org>
* hvmloader: Remove hard tabs from source files.Keir Fraser2011-07-206-267/+267
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* hvmloader: add missing emacs local variables.Ian Campbell2011-06-0818-0/+179
| | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* hvmloader: reduce unnecessary e820 reservations for SeaBIOSIan Campbell2011-06-085-25/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | SeaBIOS will reserve memory in the e820 as necessary, including BIOS data structures such as the EBDA, any tables it creates or copies into pleace etc. Therefore arrange that the memory map provided by hvmloader to SeaBIOS reserves only things which HVMloader has created. Since ROMBIOS is more tightly coupled with hvmloader we retain the ability to reserve BIOS regions in the hvmloader produced e820 and use that from the ROMBIOS backend. The code for this could probably have been simpler but the existing code avoids overlapping e820 areas and so the new code does the same (many guest OSes sanitize the e820 map to handle this, but I wouldn't trust that all do, so I didn't take the risk) For ROMBIOS the resulting e820 map as seen by the guest is the same except the reserved regions at 0x9e000-0x9fc00,0x9fc00-0xa0000 are merged into a single region 0x9e000-0xa0000 (Linux guests sanitize the e820 to look like this anyway). For SeaBIOS the result is that the lowmem reserved region is from 0x9f000-0xa0000 rather than 0x9e000-0xa0000 which correctly reflects SeaBIOS's actual usage. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* hvmloader: reinstate datastructure shared with DSDT in SeaBIOS case.Ian Campbell2011-06-036-46/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I mistakenly thought that the "struct bios_info" was a ROMBIOS specific data structure and so caused it to be populated only in the ROMBIOS case. However it turns out that the majority of the struct's fields are actually referenced from the ACPI DSDT and hence are needed for SeaBIOS too. While in principal it might have been possible to continue to mix ROMBIOS and ACPI bits in this datastructure this is, evidently, confusing but also leads to header file dependencies from ROMBIOS->hvmloader which I had been hoping to avoid so as to head-off future accidental re-entanglement of ROMBIOS and hvmloader. So instead I have split the ACPI parts into a new "struct acpi_info" which is defined entirely within the acpi building code in hvmloader and which comes with a big comment pointing to the DSDT interaction. This new ACPI info is placed at 0x9F000 which is available under both ROMBIOS and SeaBIOS. This address is in a reserved region of the E820 and is just above the ROMBIOS stack. The resulting "struct rombios_info" is hardly worthy of its own structure but keep it anyway. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* hvmloader: allocate ACPI tables as we goIan Campbell2011-06-031-78/+72
| | | | | | | Rather than building the tables twice, once purely to figure out the size, just allocate each individual table as we go. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* hvmloader: removed unused/incorrect define.Ian Campbell2011-06-031-5/+0
| | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* hvmloader: reduce minimum allocation alignment from 1024 bytes to 16.Ian Campbell2011-06-032-7/+7
| | | | | | | | | | | | 1024 bytes create a lot of wastage when the majority of allocations are of BIOS table data structures which are generally happy with much lower alignment. I conservatively chose 16 bytes. Most callers pass 0 for the alignment anyway, for the rombios high code allocation I kept it 1024 byte aligned since it was the only case that didn't seem obviously ok with a smaller alignment. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* hvmloader: add code to generate a $PIR table.Ian Campbell2011-06-018-4/+145
| | | | | | | Does not replace the table hardcoded in ROMBIOS (it ain't broke) but is used for SeaBIOS. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>