Geode vga: Use standard format read/write_mask register functions.

Rework the Geode code to use the same style register accessors as the
standard vga code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
bootsplash: Don't pass mode flags to VBE get_mode_info call.

The spec doesn't specify one can pass flags into the get_mode_info
call, so don't do that.

Also, use the VBE_MODE_LINEAR_FRAME_BUFFER name where appropriate.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
vgabios: Ignore mode flags in vbe get_mode_info call.

Ignore any mode flags a caller may have set on the vbe get_mode_info
call.  The spec doesn't require ignoring of flags, but it appears at
least some real-world vgabios vbe implementations do this.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
vgabios: Check for relocatable windows before advertising support for it.

Use the VBE_win_granularity field to determine if the memory windows
are relocatable.  (Bochs and Cirrus vga support relocatable windows
while the standard vga controller does not.)

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
vgabios: Add support for text and cga modes to vbe_104f01().

Attempt to handle cga and text modes in the vbe get_mode_info call.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Report stdvga modes in VBE via int10 (AX = 4F00h)

As all supported graphic adapters are supporting VGA we should
list them in int10 (AX = 4F00h). Also clext.c and bochsvga.c
are haveing a function named like is_XXX_mode() which checks
if its a default VGA mode or a VESA mode. If its a normal VGA
mode stdvga_set_mode() gets called.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
add acpi pmtimer support

This patch makes seabios use the acpi pmtimer instead of tsc for
timekeeping.  The pmtimer has a fixed frequency and doesn't need
calibration, thus it doesn't suffer from calibration errors due to a
loaded host machine.

[ v4: mask port ioport read ]
[ v2: add CONFIG_PMTIMER ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Fix 'union u64_u32_u' member names.

Use 'lo' to mean the low bits and 'hi' to mean the high bits of a
64bit value.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
geodevga: Access global variables using GET_GLOBAL/SET_VGA macros.

The vgabios runs in 16bit mode so all global variables must be
accessed via macros.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Set up the UC area of mtrr dynamically based on mtrr_base. This allows
the bios to work for other chipsets that might want to set the mtrr.
Since BUILD_MAX_HIGHMEM is no longer used we can remove the config parameter.

This change reverses the order of pci_setup() and smm_init() with
mtrr_setup().

Signed-off-by: Jason Baron <jbaron@redhat.com>
seabios: acpi: add mcfg table.

add mcfg table.
mcfg isn't populated at the moment. dev-q35 will use it later.

[jbaron@redhat.com: moved header from post.h -> acpi.h]
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jason Baron <jbaron@redhat.com>
seabios: acpi, fadt: make while fadt initialization chipset specific

make while fadt initialization chipset specific.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jason Baron <jbaron@redhat.com>
seabios: pci: enable SERR of normal device.

enable SERR of normal device for AER.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jason Baron <jbaron@redhat.com>
seabios: add q35 initialization functions.

add q35 initialization functions.

[jbaron@redhat.com: restructured to current seabios base, updated pci base to 0xb0000000]
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jason Baron <jbaron@redhat.com>
seabios: q35: add dsdt

add dsdt for q35 chipset of qemu.

[jbaron: remove suspd bits since they are now auto-generated, move pci window to 0xb0000000,
    add framework for auto generated pci windows]
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jason Baron <jbaron@redhat.com>
seabios: q35: Register PCI IRQs as active high in APIC mode

Seems important for Windows.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jason Baron <jbaron@redhat.com>
seabios: q35: add basic hotplug support

Add support for acpi hotplug to q35. Copied from the piix acpi table.

Signed-off-by: Jason Baron <jbaron@redhat.com>
seabios: Build the dsdt separately

This builds seabios such that the dsdt tables are no longer built into the
seabios binary. They must be passed to the seabios via fw_cfg. This saves
space in the seabios binary for unnecessary dsdt tables.

I suspect that this will make other users of Seabios, besides qemu unhappy,
but I'm not sure.

Signed-off-by: Jason Baron <jbaron@redhat.com>