aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware/rombios
Commit message (Collapse)AuthorAgeFilesLines
* rombios/debug: Reduce verbosity of rombiosAndrew Cooper2013-08-081-1/+2
| | | | | | | | Default builds of Qemu have the Bochs debug port logging #ifdef'd out, so remove all the completely wasted VMExits Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* rombios/ata Remove another needless trap from the int 0x13 hotpathAndrew Cooper2013-08-081-19/+13
| | | | | | | | | | | The return value from await_ide() is always ignored, and most calls to await_ide() immediately reread the status register. Therefore, making await_ide() return the last value of the status register removes a further two traps on the int 0x13 path. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* rombios/ata: Reading this status register has no relevant side effectsAndrew Cooper2013-08-081-1/+0
| | | | | | | | So taking two traps when one will do is pointless. This removes 1 of 13 VMExits on the int 0x13 hotpath. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* rombios/ata: Do not wait for BSY to be setAndrew Cooper2013-08-081-2/+2
| | | | | | | | | | | | | | | | | | After issuing a reset, the BSY bit is expected to be set. This is not the case for Qemu. In SeaBIOS.git: 580e33293244fee4556e56ecc67b8bd877f3c496 this check was even replaced with a udelay(5), as enough real hardware ignored the BSY bit as well. As rombios does not have an equivalent udelay(), replace the wait with a write to port 0x80 which is whitelisted by Xen for 'a small delay'. This causes 42k fewer IO traps to Qemu. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* rombios/keyboard: Don't needlessly poll the status registerAndrew Cooper2013-08-081-2/+2
| | | | | | | | Repeated polling of the status register is not going to change its value, so don't needlessly take 8192 traps to Qemu when 1 will do. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-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>
* hvmloader: reinstate datastructure shared with DSDT in SeaBIOS case.Ian Campbell2011-06-031-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* tools: hvmloader: split scratch and hypercall addressing from ROMBIOS low heap.Ian Campbell2011-04-122-5/+6
| | | | | | | | | | Although happen to live at the same physical address their lifespans do not overlap. The scratch and hypercall spaces are used only within hvmloader and the same area is reused as a heap within ROMBIOS. But each is free to make its own decisions about where to place things. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* tools: hvmloader: pass SMBIOS location as a runtime parameter.Ian Campbell2011-04-121-1/+2
| | | | | | | | | Instead of hardcoding in a header. Reduces the cross talk between ROMBIOS and hvmloader. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* tools: hvmloader: split e820 support into its own code module.Ian Campbell2011-04-123-1/+22
| | | | | | | | | | | | | | | | Pass the table address as a paramter to the build function and cause it to return the number of entries. Pass both base and offset as parameters to the dump function. This adds a duplicated e820.h header to ROMBIOS. Since the e820 data structure is well defined by existing BIOS implementations I think this is OK and simplifies the cross talk between hvmloader and ROMBIOS. Reduces the cross talk between ROMBIOS and hvmloader. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* tools: hvmloader: move ROMBIOS configuration into tools/firmware/rombios/Ian Campbell2011-04-123-2/+41
| | | | | | | | | Currently rombios and hvmloader are rather intertwined. Separate the ROMBIOS configuration options out into a ROMBIOS provided file so that the dependency can become strictly from hvmloader to rombios. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* tools: consistently use $(CFLAGS_xeninclude) instead of open coding.Ian Campbell2011-03-212-2/+2
| | | | | | | | Renamed from the slightly ambiguous CFLAGS_include. 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>
* build: Make XEN_ROOT an absolute path.Keir Fraser2011-03-173-3/+3
| | | | | | | | Otherwise make can search the path relative to certain standard paths such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in Config.mk suffers from this). Signed-off-by: Keir Fraser <keir@xen.org>
* Update my email address to long-term stable address.Keir Fraser2011-01-071-1/+1
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* rombios: use explicit SS prefix for calculated on-stack array accesses.Keir Fraser2010-07-081-2/+2
| | | | | | | 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>
* rombios: move the stack to 0x9e000 and protect it with an e820 entryKeir Fraser2010-07-081-8/+8
| | | | | | | | | | 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>
* rombios: wait 30s after a failed bootKeir Fraser2010-07-081-15/+6
| | | | | | | Prevents waiting forever for a keypress that may never come if boot is unattended. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* rombios: fix implicit assumption that DS == SSKeir Fraser2010-07-061-7/+5
| | | | | | by passing boot device info by value, not by reference. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* rombios: pause for a keypress after a failed bootKeir Fraser2010-07-061-1/+21
| | | | | | | 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>
* rombios: don't busy-wait for keystrokesKeir Fraser2009-11-231-1/+1
| | | | | | | Spinning waiting for the keyboard is a bit rude on a virtual machine. Wait for an interrupt instead. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* Extend the max vcpu number for HVM guest.Keir Fraser2009-10-291-37/+10
| | | | | | | | | | | | - Originally the max vcpu number for HVM guest is 32, this patch extend the number to 128 on x86_64 hypervisor. (For i386 hypervisor, the max vcpu number is still 32). - This patch extends the mp-table size to fit more vcpus. - HVM PV driver should call VCPUOP_register_vcpu_info hypercall to initialize the vcpu info if the vcpu number is more than 32. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* rombios: compute checksum for roms bigger than a segmentKeir Fraser2009-06-041-6/+28
| | | | | | From: Glauber Costa <glommer@redhat.com> From: "Sebastian Herbszt" <herbszt@gmx.de> Ported by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* rombios: fix trying to boot from next deviceKeir Fraser2009-05-271-2/+2
| | | | | | | | If boot="ndc", rombios cannot try to boot next device. Because rombios jump to the boot vector without pushing return address, gPXE code and so on cannot return if it fail to boot. Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* hvmloader: ROMBIOS must POST in big real mode, since it supports PMM,Keir Fraser2009-03-311-2/+2
| | | | | | and hence Option ROMs can expect noi segment limit checks. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Disable xen platform PCI device when xen_platform_pci=0 is specifiedKeir Fraser2009-03-181-12/+2
| | | | | | | | | | - Change guest firmware to use new fixed byte port 0x10. - Add "xen_platform_pci" option into guest config file and APIs. xen_platform_pci=0: Disable xen platform device. xen_platform_pci=1: Enable xen platform device. (default) - Add "disable_pf" entry into xenstore. Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
* rombios: __STRING() is Linux-specificKeir Fraser2009-03-121-1/+4
| | | | Signed-off-by: John Levon <john.levon@sun.com>
* rombios: fix int15/86h (wait for microseconds)Keir Fraser2009-02-121-7/+8
| | | | | | | | | The bcc compiler generates wrong stack pointer offset of a local variable within ASM code if another local variable is declared later. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com> Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* rombios: fix pointer argument to PMMKeir Fraser2009-01-261-8/+24
| | | | | | | The pointer to PMM function arguments must be flattened for protected mode with zero-based segments. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* rombios: fix wrong stack segment return in 32-bit gatewayKeir Fraser2009-01-261-1/+1
| | | | Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* rombios: Indirect through 32-bit jump table from within the 32-bit bios.Keir Fraser2009-01-235-54/+24
| | | | | | | | | This gets rid of shenanigans with relocating the jump table around the place. Also clean up bios_info table while we are updating it. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* hvm bios: add PMM (a memory manager during POST)Keir Fraser2009-01-234-2/+565
| | | | | | | | | | | | | | | | | | | | | The PMM (POST Memory Manager) offers malloc/free functionality for PCI option ROMs during POST (Power On Self Test). This patch adds a PMM functionality to the guest BIOS. For example, the option ROM on LSI Logic SAS card uses PMM and failed to initialize the device without PMM. Thus, the HVM can't boot up directly from the passthroughed SCSI disk. gPXE also uses PMM (I don't know what happens without PMM). With this patch, we succeeded in SAS boot of HVM. For further information about PMM: http://www.phoenix.com/en/OEM-ODM/Customer+Services/White+Papers-Specs/PC+Industry+Specifications.htm http://www.phoenix.com/NR/rdonlyres/873A00CF-33AC-4775-B77E-08E7B9754993/0/specspmm101.pdf Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com> Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* rombios: Simplify 32-bit gateway interface definitions.Keir Fraser2009-01-227-254/+46
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* rombios: Simplify 32-bit gateway and avoid need for EBDA space.Keir Fraser2009-01-223-349/+109
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* rombios: remove unnecessary function calls.Keir Fraser2009-01-151-8/+3
| | | | | | | The rombios always becomes read-only after using 32bit gateway. That is not handy for using the gateway. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* rombios: Protect the ax register before calling the TCG BIOS extensions ↵Keir Fraser2009-01-151-0/+2
| | | | | | function. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
* Use -MMD -MF in tools/* rather than -Wp,-M...Keir Fraser2009-01-123-2/+9
| | | | | | | | | | | | | | | | | | | | | | If you use -MMD -MF then the correct .o filename is written to the .*.d file as the compiler driver arranges everything. This was done in 19010:275abe1c5d24 for the hypervisor. In this patch we do the same elsewhere in the xen-unstable tree, particularly tools/. Specifically: * Change tools/Rules.mk to add -MMD -MF ... to CFLAGS and set DEPS. * Remove -Wp,-MD... from every other Makefile * Remove setting of DEPS from every other Makefile * Ensure that every Makefile says -include $(DEPS) * Ensure that every Makefile's clean target removes $(DEPS) Some Makefiles were already halfway there, but often for a different variable name eg PROG_DEP. The variable name is now standardised in Rules.mk as DEPS. I have done a test build with this change, on Debian etch. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* rombios: Get rid of annoying delay at F12 boot menu.Keir Fraser2009-01-061-48/+46
| | | | | | Instead require the F12 to be pressed before the menu prompt appears. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* rombios: Allow option ROMs to extend up to 0xEA000.Keir Fraser2009-01-061-24/+20
| | | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* rombios: Do not initialise PCI devices after hvmloader.Keir Fraser2009-01-061-2/+2
| | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* rombios: disable DEBUG_ROMBIOS by default.Keir Fraser2008-12-291-1/+1
| | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* rombios: pass BDF correctly during option ROM scanKeir Fraser2008-12-291-2/+0
| | | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com> Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* rombios: enabling option ROM write access during initialisation.Keir Fraser2008-12-291-1/+4
| | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* rombios: Update to Bochs latestKeir Fraser2008-12-182-1484/+2109
| | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* rombios: fix references to EBDAKeir Fraser2008-12-151-26/+35
| | | | | | | | Extended Bios Data Area (EBDA) can be relocated by the initialization of PCI option ROM. The IPL boot table is also. EBDA must be accessed via 0x40E after the initialization. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* rombios: fix rom_scan (ja->jmp)Keir Fraser2008-12-111-1/+1
| | | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com> Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* rombios: support BCVKeir Fraser2008-12-091-0/+24
| | | | | Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com> Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* hvmloader: Pass BDF to PCI option ROMs.Keir Fraser2008-11-241-4/+19
| | | | | Signed-off-by: Shan Haitao <Haitao.shan@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* rombios: fix int13h for floppy diskKeir Fraser2008-10-301-2/+2
| | | | | | | A floppy on HVM can't be read correctly. This fix is taken from upstream bochs-2.3.7. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* firmware: Fix build dependencies.Keir Fraser2008-07-312-4/+6
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* firmware: Fix CFLAGS -I directives.Keir Fraser2008-07-302-2/+2
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>