Determine century during init and store in VARLOW mem during runtime.

Avoid reading/writing to cmos at runtime to get the QEMU century
information.  Instead, read it at startup and cache the info.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
No need to check both CONFIG_THREADS and CONFIG_THREAD_OPTIONROMS.

CONFIG_THREAD_OPTIONROMS depends on CONFIG_THREADS, so the code can
assume that the two are always on when CONFIG_THREAD_OPTIONROMS is on.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add runningOnQEMU() and runningOnXen() for runtime platform detection.

Introduce standard for performing and inspecting the run-time
detection of para-virtualized environments.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Consistently use CONFIG_COREBOOT, CONFIG_QEMU, and runningOnXen().

CONFIG_QEMU means compile to start from QEMU (and possibly
Xen/KVM/Bochs) and definitely running under QEMU (or Xen/KVM/Bochs).

CONFIG_COREBOOT means compile for coreboot and definitely running
under coreboot.  Places that used CONFIG_COREBOOT to mean "running on
real hardware" have been changed to use !CONFIG_QEMU.

CONFIG_QEMU_HARDWARE enables support for some virtual hardware devices
even if QEMU didn't start SeaBIOS.

usingXen() is replaced by runningOnXen().

runningOnQEMU() is added to hardware devices that are only safe to
access when we are sure we are running under QEMU (or Xen/KVM/Bochs).
Neither the coreboot nor the csm code currently enable runningOnQEMU,
but future patches may.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Convert kvm_para_available() to runningOnKVM().

Make the KVM detection code use the same format as the QEMU/Xen
detection code.

Also, log when KVM is detected.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Minor - move definitions to paravirt.c from paravirt.h.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Only perform SMP setup on QEMU.

The SMP setup initializes MTRRs on extra CPUs and populates the
CountCPUs variable.  On coreboot the CPUs should already be
initialized and the CountCPUs variable isn't used anywhere.

There have also been reports of the SIPI does not work on some real
machines.  So, it's best not to invoke one if it isn't needed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Start device_hardware_setup in mainint even with CONFIG_THREAD_OPTIONROMS.

There's no real gain to starting the device_hardware_setup in the
middle of the platform setup.  Always start it just prior to the VGA
rom.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The mathcp setup touches the PIC and thus move to the "setup" phase.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Update tools/acpi_extract.py to handle iasl 20130117 release.

The latest iasl release produces "lst" output with "number:  " instead
of "number....".  Update the tool to support both formats.

Reported-by: Bo Yang <boyang@suse.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>