Kevin O'Connor [Sat, 24 Aug 2013 17:43:09 +0000 (13:43 -0400)]
Update kconfig to latest version.
Update kconfig (from Linux v2.6.38-rc2) to the latest version (from
Linux v3.11-rc6).
This is a copy of kconfig from Linux with only the changes necessary
to work with the SeaBIOS build (the equivalent of the earlier SeaBIOS 0da7bfdf commit) and the changes necessary to always emit symbols
(SeaBIOS b623e7c5 commit).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'Connor [Sat, 17 Aug 2013 14:13:14 +0000 (10:13 -0400)]
Rename tools/ directory to scripts/ directory.
It's common for other projects (eg, QEMU, Linux) to put build scripts
into a "scripts/" directory. There's no reason for SeaBIOS to be
different, so rename the "tools/" directory to "scripts/".
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'Connor [Thu, 8 Aug 2013 03:03:47 +0000 (23:03 -0400)]
Add config option to support memory allocations in 9-segment.
Internal "low memory" allocations are currently placed in the UMB
region (0xc0000-0xf0000). However, there have been reports of some
real machines that do not support DMA to this area of memory. So, add
a compile time config option (off by default) to support placing all
internal low-memory allocations at the end of the 640K real-memory
area (0x90000-0xa0000).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Qemu commit 9ee59f3 removed the bochs bios apm interface emulation at
port 0x8900. That broke poweroff via APM. Fix it by powering off the
machine using the acpi pm control register.
Old code is left in, so seabios wil try both poweroff methods. Cleaning
that eventually up is left for another patch, after checking it isn't
needed. Qemu never implemented "Standby" and "Suspend", only
"Shutdown", so it looks like there might be non-qemu use cases (bochs
probably).
Easiest way to test this is the syslinux poweroff module; modern linux
distros usually have CONFIG_APM turned off.
Reported-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
commit 2b568ebb20b08c7881d976b5bc9f59a425bae5e6
acpi_extract: detect DeviceOp
added new directives to acpi_extract.py, but didn't
document them.
Add documentation at top of file.
Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Kevin O'Connor [Fri, 2 Aug 2013 18:13:50 +0000 (14:13 -0400)]
Support custom boot menu prompt and custom boot menu key.
Allow configuration of the boot menu prompt and boot menu key (via the
romfile interface). Some machines don't have an F12 key, so make this
configurable.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'Connor [Mon, 22 Jul 2013 00:01:07 +0000 (20:01 -0400)]
Add missing mathcp_setup() call to CSM code.
It looks like when mathcp_setup() got moved from interface_init() to
platform_hardware_setup() in 3a735baa the corresponding change was not
made to the CSM code. Update it now.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'Connor [Sun, 21 Jul 2013 20:38:18 +0000 (16:38 -0400)]
Default unused UMB areas to be read-only.
It looks like MSDOS 6 wants the UMB area to be read-only in order for
it to use it. FreeDOS doesn't care, but it always maps a page from
high mem when it does use the area. So, add an option to control
whether unused UMB ram is marked read-only and default it to read-only
as that seems to be more compatible.
This also fixes an off-by-one bug in the shadow range checking code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'Connor [Sat, 20 Jul 2013 17:06:35 +0000 (13:06 -0400)]
Improve accuracy of internal timers.
The TICKS_PER_DAY setting is a bios standard and needs to be 1573040
for compatibility. However, there are actually ~1573042.24 ticks in a
day. So, only use TICKS_PER_DAY when working with the BDA
timer_counter - not when calculating any internal times.
The PIT hz is actually 143181800 / 12 (~1193181.667). This can be
accurately encoded as PMTIMER hz / 3. Because the PIT hz is usually
multiplied and divided by other numbers, we can use the PMTIMER hz and
defer the division by 3 to improve accuracy.
When doing division for delay time calculations, always round up the
division so the delay is never less than the requested time.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Q35 support was originally written before these commits in seabios, PIIX
got updated, Q35 didn't. QEMU uses the same clock for both so there's
no reason for these bits to differ. Sync them up.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Gerd Hoffmann [Mon, 24 Jun 2013 09:24:57 +0000 (11:24 +0200)]
coreboot: add cbmem console support
Add support for logging to the coreboot cbmem console.
Limitation: only supported in 32bit mode. Use 'cbmem -c'
to see the logs (coreboot and seabios) after bootup.
Kevin O'Connor [Fri, 14 Jun 2013 01:24:14 +0000 (21:24 -0400)]
Another fix for hlist_for_each_entry_safe.
Although the previous patch does fix hlist_for_each_entry_safe for the
common case, it doesn't work correctly when deleting the current
node. To fix this, introduce two macros - hlist_for_each_entry_safe
for iterating through a list that can be modified, and
hlist_for_each_entry_pprev for those users that only need access to
the "pprev" pointer.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Gerd Hoffmann [Thu, 13 Jun 2013 05:42:58 +0000 (07:42 +0200)]
tweak coreboot qemu detection
I have patches for coreboot in the queue adding q35 support there,
which will change the mainboard names (adding the detected chipset).
Make SeaBIOS check the mainboard name starts with "QEMU" instead of
doing a full string match to handle this.
Kevin O'Connor [Sat, 23 Mar 2013 15:38:45 +0000 (11:38 -0400)]
Cleanup QEMU_CFG_NUMA fw_cfg processing - split into two romfile entries.
The QEMU_CFG_NUMA fw_cfg entry is actually two separate tables in one
fw_cfg entry - a table for cpu affinity and a table for the memory
map. Create two romfile entries to make that more clear.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Since commit f7e4dd6c18ccfbaf6cd2f5eaaed2b77cabc8a406 QEMU loads its
own copy of DSDT, so let's not build in PIIX. This makes building in
the DSDT an option, default to on (built-in). If no one complains for a
while, we'll be able to switch it off and then maybe remove altogether.
With CONFIG_ACPI_DSDT = y
Total size: 127348 Fixed: 58892 Free: 3724 (used 97.2% of 128KiB rom)
With CONFIG_ACPI_DSDT = n
Total size: 122844 Fixed: 58884 Free: 8228 (used 93.7% of 128KiB rom)
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Alex Williamson [Wed, 20 Mar 2013 16:58:47 +0000 (10:58 -0600)]
pciinit: Enable default VGA device
As QEMU gains PCI bridge and PCIe root port support, we won't always
find the VGA device on the root bus. We therefore need to add support
to find and enable a VGA device and the path to it through the VGA
Enable support in the PCI bridge control register.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Kevin O'Connor [Tue, 19 Mar 2013 00:26:54 +0000 (20:26 -0400)]
mptable: Use same PCI irqs as ACPI code.
The ACPI code has a hardcoded list of PCI interrupts. Use that same
list in the mptable code generation. This will ensure that both
tables are in synch - it may also make the mptable easier to generate
from QEMU.
Also, move the irq0_override lookup outside of the irq loop.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'Connor [Tue, 19 Mar 2013 00:14:21 +0000 (20:14 -0400)]
mptable: Don't describe pci-to-pci bridges.
It should not be necessary to describe PCI-to-PCI bridges in the
mptable. (The mptable was designed to fit in ROM, so it seems
unlikely that it would be used for bridges that could be dynamically
added.) Describing only the root bus should make it easier to port
this content into QEMU.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'Connor [Sun, 17 Mar 2013 14:32:05 +0000 (10:32 -0400)]
Set ZF prior to keyboard read call in check_for_keystroke().
Set the ZF flag to make sure the keyboard interrupt is actively
clearing it on a key event. This fixes a hang when CONFIG_BOOTMENU is
on and CONFIG_KEYBOARD is off.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'Connor [Sat, 9 Mar 2013 18:04:47 +0000 (13:04 -0500)]
vgabios: Fix cirrus memory clear on mode switch.
The cirrus_clear_vram() code wasn't actually doing anything because of
a u8 overflow. Fix that.
Fill with 0xff when performing a legacy cirrus mode switch (WinXP has
been observed to incorrectly render dialog boxes if the memory is
filled to 0). This was the behavior of the original LGPL vgabios
code. To support this, add mechanism (MF_LEGACY) to allow vga drivers
to detect if the mode switch is from vesa or int10.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'Connor [Sat, 9 Mar 2013 00:39:49 +0000 (19:39 -0500)]
Use VARVERIFY32INIT on global variables that point to "tmp" memory.
Enable the recently added build check on global variables that are (or
contain) pointers to memory allocated by malloc_tmp(). This helps
detect cases where temporary memory is accessed after POST.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'Connor [Sat, 9 Mar 2013 00:36:28 +0000 (19:36 -0500)]
Add VARVERIFY32INIT attribute for variables only available during "init".
Add a build check to verify certain variables are only reachable via
the 32bit "init" code. This can be used as a mechanism to enforce
certain data (and code that accesses that data) as only available
during POST.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'Connor [Sat, 9 Mar 2013 00:33:39 +0000 (19:33 -0500)]
smm: Don't use PCIDevices list in smm_setup().
The smm_setup() call is invoked from resume. The PCIDevices list is
only valid during POST. Cache the necessary PCI BDF ids so that
PCIDevices isn't needed.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'Connor [Sat, 9 Mar 2013 00:31:14 +0000 (19:31 -0500)]
shadow: Don't use PCIDevices list in make_bios_readonly().
The make_bios_readonly() call is invoked from resume. The PCIDevices
list is only valid during POST. Cache the necessary PCI BDF ids so
that PCIDevices isn't needed.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Kevin O'Connor [Tue, 5 Mar 2013 09:52:21 +0000 (17:52 +0800)]
Cache boot-fail-wait to avoid romfile access after POST.
Memory allocated with malloc_tmp() can't be used after the POST phase.
So, access boot-fail-wait in post phase and store it for the boot
phase to use. This fixes the regression introduced by commit 59d6ca52.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net> Signed-off-by: Amos Kong <akong@redhat.com>