aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-03-11Update version to 1.6.3.2rel-1.6.3.21.6.3-stableKevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-03-05Use "#!/bin/sh" instead of ":" in tools/gen-offsets.sh.Kevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-03-05Fix missing NULL pointer checks causing boot failure on 1meg machines.Kevin O'Connor1-1/+2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-03-05BCVs should inherrit the legacy harddrive priority.Kevin O'Connor1-1/+1
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>
2012-02-22Permit .rodata.__PRETTY_FUNCTION__. sections in roms.Kevin O'Connor1-4/+8
Some versions of gcc appear to define these sections even though they aren't used in the code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit 805ede2bd35243a4298bc64bd81be6db7cf57f58) Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2012-02-22Add PYTHON definition to Makefile.Kevin O'Connor1-3/+4
Add PYTHON definition to Makefile so users can override it. This allows users to specify an exact python executable name to use during the build. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> (backported from 97f1ffcfac4ca382b5008a7aabfc2c300131f978)
2011-11-24Update version to 1.6.3.1rel-1.6.3.1Kevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-11-24usb: fix boot pathsPaolo Bonzini1-2/+2
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.
2011-10-04Update version to 1.6.3rel-1.6.3Kevin O'Connor1-1/+1
2011-10-04Update README file.Kevin O'Connor1-26/+9
2011-10-01Fix alignment bug in pci_bios_init_root_regions().Kevin O'Connor1-1/+1
If there are no memory allocations for a given type then the "max" bar size is zero. However, ALIGN_DOWN does not handle an alignment of zero properly. Catch and handle the zero case. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-10-01Reorder build objects to work around gcc bug with -combine.Kevin O'Connor1-1/+1
Some versions of gcc have difficulties with externally visible variables that are used before they are declared. Now that pmm.c contains only 32bit code and has a reference to CanPreempt, make sure the declaration of CanPreempt (in stacks.c) is compiled first. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-10-01Probe PCI existenceJan Kiszka3-4/+20
This prevents lockups when trying to allocate PCI resources on an ISA-only system like QEMU can emulate. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2011-09-20Define handle_post as VISIBLE32FLAT as work around for QEmu memory layout.Kevin O'Connor1-11/+20
QEmu only copies the top 128K of the BIOS image to low memory (0xe0000-0xfffff). Images over 128K are only fully mapped in high memory (0xfff00000). However, the SeaBIOS shadow functions (make_bios_writable_intel) will copy up to 256K to low memory. SeaBIOS generally works with 256K roms because they are automatically copied to low memory during the BIOS init. However, this only works if the shadow function code is itself part of the bios image that is placed in low memory by QEmu. Defining handle_post() as VISIBLE32FLAT will make the linker scripts more likely to place the initial shadow code in the last 128K of the image. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-09-20Minor - move ACPI_HPET_ADDRESS definition to config.h.Kevin O'Connor2-11/+9
Move ACPI_HPET_ADDRESS to BUILD_HPET_ADDRESS in config.h so that it is listed with similar hardcoded addresses. Also, organize the BUILD_*_ADDRESS definitions in config.h. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-09-02Minor formatting and comment updates to acpi.c.Kevin O'Connor1-16/+13
2011-09-02Probe HPET existenceJan Kiszka1-1/+13
QEMU does not provide a HPET block if it was configured with -no-hpet, other machines SeaBIOS runs on may lack a HPET as well. Perform basic checks the ID register for a reasonable vendor ID and a clock period within the valid range, do not build the HPET table if that fails. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2011-08-28Use coreboot smbios table if found.Kevin O'Connor4-3/+12
The coreboot init code now looks for an existing smbios table and will use it. A locally generated smbios table will only be created if no coreboot table is found.
2011-08-09pci: re-add isa bridge setupGerd Hoffmann1-0/+5
The switch to the two-pass pci initialization dropped the isa bridge initialization by accident. That broke interrupts on FreeBSD 4.4 and maybe also other older guests which don't use ACPI for IRQ routing setup. Add the bits back in. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Bjørn Mork <bjorn@mork.no>
2011-08-06ahci: enable by defaultGerd Hoffmann1-1/+1
Lack of real hardware testing was the main reason to turn it off by default. The AHCI has been fixed to work on both qemu and real hardware, so lets flip the switch now. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-06ahci: use malloc_tmp memory for probing portsGerd Hoffmann1-3/+11
Also allocate the ahci port struct itself from tmp memory for probing, then copy to fseg memory in case we detected some device. This way we don't waste fseg memory for unused ports. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-06ahci: move device registrationGerd Hoffmann2-13/+16
Stick description and boot priority into the port struct, so it holds everything needed to register the device, so we can do the registration after ahci_port_init returned. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-06ahci: ignore atapi devices which are not cdromsGerd Hoffmann1-7/+8
Also simplify the code a bit further down the road as we know iscd must be true ;) Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-06ahci: probe each port in its own threadGerd Hoffmann1-21/+20
Instead if creating a single thread which probes all ports one after another kick one thread per port, so ports are probed in parallel. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-06ahci/cdrom: shared bounce bufferGerd Hoffmann4-10/+23
This patch creates a common bounce buffer in block.c which is shared by the cdrom and ahci drivers. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-08-03Allow allocation of SMBIOS table in f-segment if it is small.Kevin O'Connor2-2/+11
If the SMBIOS is small (less than 600 bytes) allow it to be allocated in the f-segment. This works around a bug in JunOS - it crashes on SMBIOS tables located in high memory.
2011-08-03Allow free space in f-segment to be used by malloc_fseg().Kevin O'Connor2-1/+8
2011-07-29Warn if not enough space in smp_mtrr array.Kevin O'Connor1-1/+3
2011-07-29seabios: increase smp_mtrr array sizeMarcelo Tosatti1-1/+1
Windows Server 2008 checked build complains about lack of consistency between MTRR MSRs in SMP guests. Problem is the smp_mtrr array is not large enough to hold all MSRs (31 entries with current qemu/kvm implementations). Increase it to 32. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-07-24ahci: bootprio supportGerd Hoffmann2-6/+12
Wind up bootprio support in the ahci driver so boot device ordering works for ahci disks too. No extra work needed on qemu side. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-24ahci: rework init workflow & fix timeout handlingGerd Hoffmann1-62/+127
Rework init workflow to match suggestions in the ahci specs better, especially remove the shortcut which tries to detect drives without enabling FIS receiving. This makes memory allocation a bit complicated as we are using malloc_tmp() allocated memory now to probe the devices so we can free it when no drive is present. In case we detect a drive we have to free and realloc the memory with malloc_low() so it is available after POST when the boot loader wants read stuff via int13. Also use TSC to calculate timeout instead of delays and loop counts. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-24ahci: don't expect ATA_CB_STAT_DRQ being clearGerd Hoffmann1-3/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-24ahci: handle unaligned buffers.Scott Duplichan1-2/+51
This change allows unaligned buffers to be used for reads or writes to non-atapi devices. Currently only MS-DOS boot is known to need unaligned buffer support. Signed-off-by: Scott Duplichan <scott@notabs.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-24ahci: add error recovery codeGerd Hoffmann1-3/+47
By Scott Duplichan. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-24ahci: use interrupt status registerGerd Hoffmann1-15/+28
Poll interrupt status register to figure when the device has updated the status and possibly finished the request, continue polling until BSY is clear as we might see multiple status updates per request. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-24ahci/sata: Fix FIS setup.Gerd Hoffmann1-4/+3
FIS setup does't follow the SATA specs, fix it. Credits go to Jonathan Kollasch and Scott Duplichan for finding those. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-20xen: actually setup hypercalls.Ian Campbell1-0/+3
This was somehow dropped during the iterations of the original Xen patches. It's actually harmless at the moment since there are no users of hypercalls but patches are being written to support Xen PV block devices which need this. It's not clear exactly how early this needs to be but I think it needs to be at least before init_hw() (since that would detect disk devices). Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2011-07-16Remove 16bit wrappers from PMM code.Kevin O'Connor1-76/+55
Now that the PMM code is only run in 32bit mode, remove the GET/SET_PMMVAR macros and other 16bit wrappers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-07-16Run option rom visible PMM code in 32bit mode instead of 16bit mode.Kevin O'Connor5-14/+50
Use call32() to jump into handle_pmm(). This reduces the amount of 16bit code needed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-07-12pci: set BUILD_PCIMEM_START to 0xe0000000Gerd Hoffmann1-1/+1
... and make it match with the declarations in acpi-dsdt.dsl. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-12pci: cleanup config.hGerd Hoffmann2-15/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-12pci: remove old pci initilaization codeGerd Hoffmann4-304/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-12pci: activate two-pass pci initialization codeGerd Hoffmann1-4/+34
This patch actually enables the two-pass pci initialization and deactivates the old pci initialization bits. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-12pci: add two-pass pci initialization codeGerd Hoffmann2-3/+319
This patch adds a second device scan to the pci initialization, which counts the memory bars of the various sizes and types. Then it calculates the sizes and the packing of the prefetchable and non-prefetchable pci memory windows and prints the results. The patch doesn't actually map the devices to make debugging easier. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-12Updates to TODO list.Kevin O'Connor1-8/+0
2011-07-12Fix compile error - remove bmp.c from being compiled twice.Kevin O'Connor1-1/+1
2011-07-10Rename the apm, pcibios, and elf entry points.Kevin O'Connor4-20/+20
Use a more consistent naming that matches entry_xxx to handle_xxx where possible. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-07-10Simplify POST entry code by moving reboot logic from post.c to resume.c.Kevin O'Connor5-146/+113
Detect a resume/reboot by inspecting HaveRunPost instead of inspecting the cmos reset code. Inspecting a global variable is both simpler and safer. Move the reboot logic from post.c to resume.c - this makes the code in post.c simpler as it is now only called once on machine startup. This also makes it easier to ensure all POST initialization code resides in the relocatable "init" sections. Also, rename _start() to handle_post() so that it is more in keeping with the entry_xxx() and handle_xxx() function naming. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-07-10Minor fix - check for malloc failure in USB cntl allocation.Kevin O'Connor3-0/+12
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-07-10Minor fix - make sure not to call ohci/uhci_init from irq handler.Kevin O'Connor1-0/+4
When CONFIG_THREAD_OPTIONROMS is enabled, accessing the PCI config space from a thread could potentially race with an option rom. Make sure the ohci/uhci_init() functions (which access PCI config space) are never run while an optionrom could also be running. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>