| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Based on patch by Gerd Hoffmann <kraxel@redhat.com>.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
The scsi_init_drive() function has enough information to directly
register the drive there, so do the registration there. This
simplifies the calling code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Run vgabios during resume from S3 by default on QEMU. QEMU
still able to modify SeaBIOS behavior if it wishes so by providing
etc/s3-resume-vga-init file. With QEMU emulated vga cards this behaviour
is desirable otherwise console becomes unusable with Linux guests after
resume. Since we control vgabios source we can be sure that running it
on resume from S3 is safe.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a ".code16gcc" directive in src/code16gcc.s and use
-Wa,src/code16gcc.s to tell gcc to compile directly to 16bit code.
This eliminates the need to compile the C code to assembler and
include in romlayout.S and vgaentry.S. This also allows those two
assembler files to be compiled with debugging (-g) enabled.
Also, includes some Makefile cleanups.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Unlike basic_access, extended_access does not check for a zero
sector count. However, this is a problem because for example
it would be interpreted as 256 when processing an ATA request.
Based on patch from: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 1e749c85 removed the definition of process_usb_op(); let's remove
the declaration too.
The same commit added process_scsi_op(). The function has no declaration
that is also not a definition, and its only call site is in the same file
as the definition. Give the function internal linkage.
Build tested.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The Intel gfx VGA option ROM on certain platforms requires the 155f50 BIOS
function to be implemented (even if it does nothing), to work properly.
v2: Ignore the case where Option ROMs are pre-deployed.
Make vgahook_setup independent of wether the CB* variables are set.
VGA hooks can be enabled on non-coreboot and non-Xen configurations.
Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Introduce CONFIG_DEBUG_IO_PORT config option which allow user
to choose on which port to send debug on at configure time.
Bochs users are likely to use 0x402 (default) for debugging purposes,
whereas Xen uses 0xe9, as IO port address.
Signed-off-by: Julian Pidancet <julian.pidancet@citrix.com>
|
|
|
|
|
|
|
|
|
|
| |
i8259 clears interrupt mask on reset. Interrupt need to be
masked again before enabling interrupts on CPU. Since option
roms are called with interrupts enabled, resume should mask
interrupts in i8259 before calling vgabios.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Original patch from Rudolf Marek.
Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
| |
Enable SeaBIOS to work on 386/486 machines that don't have CPUID
instruction.
Based on patch by Rudolf Marek.
Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Place driver types in a "choice" selection - only one driver type
makes sense.
Only prompt the user for PCI Vendor/Device ids if they wish to
override the default choices. Otherwise, Kconfig wont know to use the
proper defaults when building autoconf.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
A BCV will (almost assuredly) be a hard drive, so it makes sense to
prioritize them the same as builtin hard drives when only the legacy
priority system is used.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
The BBS spec is unclear on multiple BEV entry points for a rom.
However, the LSI scsi rom has been seen to register a BEV followed by
multiple BCV entry points. Add support for it, as there's no harm in
it.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Nils Jacobs <njacobs8 at adsltotaal.nl>
|
|
|
|
| |
Signed-off-by: Nils Jacobs <njacobs8 at adsltotaal.nl>
|
|
|
|
| |
Signed-off-by: Nils Jacobs <njacobs8 at adsltotaal.nl>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although the VBE3 spec says there is 189 bytes of pad at the end of
the vbe_info struct, the spec also says the total struct size should
be 256 bytes. The VBE2 spec uses sufficient pad to get to 256 bytes.
So, assume the spec was off by one and make the pad 190 bytes.
Also, use u32 for capabilities and 'struct segoff_s' for
win_func_ptr.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GeodeLX support based on a patch sent by Chris Kindt on 20090825. The
patch provides basic support for running the vga bios on a Geode
device.
The original patch has been updated with the following:
* Updates to merge with the current code,
* geode specific timings are loaded at init time
* PCI code was dropped as the current code now supports pci
* Updates for Kconfig
* dropped redundant lxdprintf
* dropped geode_demo screen writing
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
|
|
|
|
| |
Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a configuration menu for the VGA ROM, it also allow
the creation of a PCI header so the ROM can be extracted from a PCI
device.
V2: Default Device IDs and Vendor IDs values for Cirrus and Bochs are now set
by Kconfig.
Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
|
|
|
|
|
|
| |
Create optionroms.h so the VGA rom can reuse the definitions.
Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
The RefOf() operator doesn't do what was expected (at least on Linux)
- issuing "Store(1, RefOf(PRQ0))" doesn't write to the PRQ0 Field
defined on the OperationRegion. Instead, it seems to redefine PRQ0 to
be an integer.
Fix this by defining the _DIS and _SRS methods as pre-processor
macros. This way the RefOf() operator isn't needed.
|
|
|
|
|
|
|
|
|
|
|
| |
The macro gen_pci_device is used to add _RMV
method to a slot device so it is no longer needed:
presence of _EJ0 now indicates that the slot is ejectable.
It is also placing two devices with the same _ADR
on the same bus, which isn't defined by the ACPI spec.
So let's remove it.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify ACPI to only supply _EJ0 methods for PCI slots that support hotplug.
This is done by runtime patching:
- Instrument SSDT ASL code with ACPI_EXTRACT directives
tagging _EJ0 and _ADR fields.
- At compile time, tools/acpi_extract.py looks for these methods
in ASL source finds the matching AML, and stores the offsets
of these methods in tables named aml_ej0_name and aml_adr_dword.
- At run time, go over aml_ej0_name, use aml_adr_dword
to get slot information and check which slots support hotplug.
If hotplug is disabled, we patch the _EJ0 NameString in ACPI table,
replacing _EJ0 with EJ0_.
Note that this has the same checksum, but is ignored by OSPM.
Note: the method used is robust in that we don't need
to change any offsets manually in case of ASL code changes.
As all parsing is done at compile time, any unexpected input causes
build failure, not a runtime failure.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The point of this split is to make runtime patching easier.
DSDT is required to supply: PCI0 - PCI root device object;
PCEJ - Method object to eject a PCI slot.
Additionally, SSDT is required to supply PCNT - Method object to notify
OSPM of a PCI slot event.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
|
|
|
| |
Include pci.h and pci_regs.h.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
|
|
|
|
|
|
|
| |
The fw paths for USB devices that SeaBIOS computes are off-by-one,
because QEMU builds those paths with a numbering that starts from one
(see usb_fill_port and usb_hub_initfn in QEMU). Fix that so that
the numbering agrees.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The EHCI controller writes to the TD after writing to the QH, so the
driver must wait for all the TDs to be complete before considering the
transfer completed. (The previous implementation was particularly bad
as it only checked that the last TD was in progress before considering
the transfer complete.)
Also, avoid writing to the qh.token field when starting a transfer to
eliminate a potential race. Place the qh.token in an available state
by default - that way only the qtd_next field needs to be updated to
start the transfer.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Another common bit that can be made generic.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
| |
Put together the common parts of all virtio device initialization.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
| |
Avoid ambiguity when virtio-scsi will be introduced.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
| |
The mode page is marked as obsolete, but QEMU can provide the information.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
|
| |
virtio-scsi's low-level dispatch code is exactly the same as USB's,
since in the end both are actually SCSI HBAs. Move it to common code.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
|
| |
Finally move the INQUIRY/TEST UNIT READY/READ CAPACITY sequence to
generic code, so that virtio-scsi will be able to use it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
|
| |
Add the wait loop that CDs are already using to usb-msc in the HD
case, to cope with a NOT READY or UNIT ATTENTION condition.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
| |
They are generic SCSI constants, rename them as such.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
| |
The two functions do not need anymore a disk_op_s.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Only leave the bootprio code in setup_drive_hd, like in setup_drive_cdrom.
This is a preparatory step; later, the SCSI code in usb_msc_init will
become entirely generic.
Also, the returned number of sectors is off by one. This will become
more important when CHS translation is added later.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
|
| |
Writes only require building the CDB and some care with the direction
in the USB packet.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
| |
This makes it a bit nicer to later introduce writes.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|