aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware
Commit message (Collapse)AuthorAgeFilesLines
* tools: Update to SeaBIOS 1.7.1Ian Campbell2013-01-171-2/+19
| | | | | | | | | | | | | | Only lightly tested with a Linux HVM guest PXE boot. Accept the defaults for the config options. Many of them are not relevant to Xen but this matches what others (at least the Debian SeaBIOS packages and the binary shipped by Qemu) are doing. The Debian Xen packages are built against Debian's SeaBIOS package so there is value in being similar. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* hvmloader: Allocate 3 pages for Intel GPU OpRegion passthrough.Keir Fraser2013-01-103-3/+5
| | | | | | | The 8kB region may not be page aligned, hence requiring 3 pages to be mapped through. Signed-off-by: Keir Fraser <keir@xen.org>
* HVM firmware passthrough ACPI processingRoss Philipson2013-01-101-1/+53
| | | | | | | | | ACPI table passthrough support allowing additional static tables and SSDTs (AML code) to be loaded. These additional tables are added at the end of the secondary table list in the RSDT/XSDT tables. Signed-off-by: Ross Philipson <ross.philipson@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* HVM firmware passthrough SMBIOS processingRoss Philipson2013-01-102-25/+363
| | | | | | | | | | | | Passthrough support for the SMBIOS structures including three new DMTF defined types and support for OEM defined tables. Passed in SMBIOS types override the default internal values. Default values can be enabled for the new type 22 portable battery using a xenstore flag. All other new DMTF defined and OEM structures will only be added to the SMBIOS table if passthrough values are present. Signed-off-by: Ross Philipson <ross.philipson@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* autoconf: check for wget and ftpRoger Pau Monne2012-10-301-1/+1
| | | | | | | | | | | | | Some OSes don't come with wget by default, so ftp should be choosen on those. Add an autoconf check to check for wget and ftp, and replace the usage of hardcoded wget in tools. [ Stubdom builds still use wget unconditionally. -iwj ] Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* hvmloader: Reserve FE700000-FE800000 in physical memory map for guest use.Keir Fraser2012-10-252-11/+22
| | | | | | | | | | | Xen platform promises never to use this physical address region, and will always mark it as reserved in the physical memory map presented to the OS (preventing its use by generic OS services such as BAR remapping). Linux will use this region for mapping the shared-info page. Signed-off-by: Keir Fraser <keir@xen.org>
* hvmloader: Add 64 bits big bar supportXiantao Zhang2012-10-014-25/+80
| | | | | | | | | | | Currently it is assumed PCI device BAR access < 4G memory. If there is such a device whose BAR size is larger than 4G, it must access > 4G memory address. This patch enable the 64bits big BAR support on hvmloader. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Xudong Hao <xudong.hao@intel.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Do not zero the wallclock fields in shared-info.Keir Fraser2012-09-141-1/+5
| | | | | | | | | | | | | These fields need to be valid at all times. Hypervisor ensures this even across 32/64-bit guest transitions. This fixes a bug where wallclock time is incorrect for booting 32-bit HVM guests. This should be backported to Xen 4.1 and 4.2. Signed-off-by: Keir Fraser <keir@xen.org> Tested-and-Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* hvm: Remove VM genearation ID device and incr_generationid from build_info.Paul Durrant2012-08-221-25/+0
| | | | | | | | | | | | | | | | Microsoft have now published their VM generation ID specification at https://www.microsoft.com/en-us/download/details.aspx?id=30707. It differs from the original specification upon which I based my implementation in several key areas. Particularly, it is no longer an incrementing 64-bit counter and so this patch is to remove the incr_generationid field from the build_info and also disable the ACPI device before 4.2 is released. I will follow up with further patches to implement the VM generation ID to the new specification. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* etherboot: Build fixes for gcc 4.7.Keir Fraser2012-08-154-0/+92
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* tools: pass EXTRA_CFLAGS via environmentOlaf Hering2012-06-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently qemu-xen will be compiled with CFLAGS only if CFLAGS was already in the environment during make invocation. If CFLAGS is in environment then make will append all of the various flags specified in xen Makefiles to this environment variable, which is then used in qemu configure. Since qemu-xen is not ready for compiler flags like "-std=gnu99" compilation will fail. If CFLAGS is not in environment, then configure will use just its own "-O2 -g" because make does not export its own CFLAGS variable. >From a distro perspective, it is required to build libraries and binaries with certain global cflags (arbitrary gcc options). Up to the point when qemu-xen was imported it worked as expected by exporting CFLAGS before 'make tools'. Now qemu-upstream reuses these CFLAGS, but it cant deal with the result. This patch extends the tools Makefiles so that three new environment variables are recognized: EXTRA_CFLAGS_XEN_TOOLS= specifies CFLAGS for the tools build. EXTRA_CFLAGS_QEMU_TRADITIONAL= specifies CFLAGS for old qemu. EXTRA_CFLAGS_QEMU_XEN= specifies CFLAGS for new qemu. Special care needs to be taken in tools/firmware because the resulting binaries are not linked with the hosts runtime libraries. These binaries run in guest context. To avoid build errors from gcc options like -fstack-protector, reuse existing practice to unset the new EXTRA_CFLAGS_XEN_TOOLS for the firmware dirs. The new feature can be used like this in a rpm xen.spec file: export EXTRA_CFLAGS_XEN_TOOLS="${RPM_OPT_FLAGS}" export EXTRA_CFLAGS_QEMU_TRADITIONAL="${RPM_OPT_FLAGS}" export EXTRA_CFLAGS_QEMU_XEN="${RPM_OPT_FLAGS}" ./configure \ --libdir=%{_libdir} \ --prefix=/usr make Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* vgabios: Make Windows 8 support greater resolutionsFrediano Ziglio2012-05-071-3/+3
| | | | | | | Apparently Windows 8 refuse to use any mode if has more than one page. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* vgabios: Check if mode is currently supported as vesa specificationsFrediano Ziglio2012-05-071-0/+12
| | | | | | | | | Vesa specification require that mode information return if a given mode is supported or not so test if we can support it checking required memory and set correctly supported bit. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* vgabios: Reduce stack usage getting mode informationsFrediano Ziglio2012-05-071-8/+5
| | | | | | | | | | | Informations are stored in a structure that is smaller than final one. Previous code copy this structure to stack extending with zeroes then update it and copy to caller while now the not-extended version is copied into stack and then is extended during copy reducing stack usage. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* vgabios: Report mode not supported getting mode informationsFrediano Ziglio2012-05-071-2/+2
| | | | | | | | | If you try to get mode information for an unsupported mode interrupt should return error but not that the function is not supported. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* vgabios: Fix size computation overflowFrediano Ziglio2012-05-071-2/+28
| | | | | | | | | Remove an overflow computing width x height x bit which does not fit into a 16 bits. I wrote a routine to multiple these value and get the size required for framebuffer in segment unit (64k). Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* rombios: remove sdtint.h dependencyRoger Pau Monne2012-05-011-1/+4
| | | | | | | | | | Hardcode uint8_t, uint16_t and uint32_t typedefs, so we no longer need stdint.h Resolves problem reported by Wang Zhihao on 64bit Ubuntu systems. Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* tools/firmware: pass PYTHON as an env var to sub-makes in this subtreeChristoph Egger2012-04-251-1/+1
| | | | | | | | | This fixes the Seabios build on platforms where just "python" is not correct, which includes NetBSD. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Fetch the OVMF repository from specific git mirror and enable itAttilio Rao2012-03-222-0/+48
| | | | | Signed-off-by: Attilio Rao <attilio.rao@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* tools: Add explicit clean rule for SeaBIOSIan Campbell2012-03-141-0/+5
| | | | | | | | | | | | | Since seabios-dir is cloned during build we need to check that it exists before recursing into it for clean, following the pattern used for qemu-*-dir etc. Also remove usage of "buildmakevars2shellvars" except when used to poopulate the environment for qemu-xen-traditional's xen-setup script, which is the only user. 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>
* hvmloader: drop the ovmf32 support and rename ovmf64 -> ovmf.Attilio Rao2012-02-294-52/+18
| | | | | | | | | - Remove the 15cpus hack from ovmf because it should be unnecessary on nowadays windows/EFI supported. Signed-off-by: Attilio Rao <attilio.rao@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* hvmloader: Add OVMF UEFI support and directly use itAttilio Rao2012-02-234-1/+179
| | | | | | | | | | | | | | | | | | | | | | | ...when specified in the guest configuration file. This work is somewhat based on Bei Guan effort during the SoC 2011 and relies on upstream edk2/ovmf Tianocore ROM to be built separately and manually copied as: Build/OvmfX64/DEBUG_GCC44/FV/OVMF.fd -> tools/firmware/ovmf/ovmf-x64.bin Build/OvmfIa32/DEBUG_GCC44/FV/OVMF.fd -> toolf/firmware/ovmf/ovmf-ia32.bin A way to integrate OVMF build directly into XEN has still be discussed on the mailing list appropriately. Signed-off-by: Attilio Rao <attilio.rao@citrix.com> Disable CONFIG_OVMF by default as ovmf is not integrated into the build. Signed-off-by: Keir Fraser <keir@xen.org> Committed-by: Keir Fraser <keir@xen.org>
* firmware: Introduce CONFIG_ROMBIOS and CONFIG_SEABIOS optionsJulian Pidancet2012-02-132-21/+29
| | | | | | | | | | | | | | | | | | | This patch introduces configuration options allowing to built either a rombios only or a seabios only hvmloader. Building option ROMs like vgabios or etherboot is only enabled for a rombios hvmloader, since SeaBIOS takes care or extracting option ROMs itself from the PCI devices (these option ROMs are provided by the device model and do not need to be built in hvmloader). The Makefile in tools/firmware/ now only checks for bcc if rombios is enabled. These two configuration options are left on by default to remain compatible. Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* 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>