[EMULATORS] Add LAPIC emulators for Intel Systems.

SIPI and other SMP facilities are not supported yet.
LAPIC uses vector 16 to receive interrupts from
IOAPIC or 8259 Controller.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Add support to use LAPIC for x86

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Beautification changes for Guest register dump.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Avoid adding MEM-IO regions as RAM.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] x86 Instruction Decoder

Added infrastructure to decode x86 instructions. Right now
only some variations of mov instructions are supported that
can help in emulation of memory-mapped devices.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Use the instruction decode infrastructure

The hardcodings of existing crN read/write is removed to
use new instruction decoding infrastructure.
Page fault handlers adds the faults on IO regions and
emulates read/write to MEMIO regions by decoding the
faulting instruction.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[EMULATORS] Add PC PS/2 Keyboard/Mouse Emulator

Add support for Intel 8042 PS/2 Keyboard/Mouse emulator.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Enable PS/2 Keyboard/Mouse Emulator for x86 Guest.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>

Conflicts:
	arch/x86/configs/x86_64_generic-defconfig
[EMULATORS] Add support for PCI Scan for guest

o Add support for PCI Scan by guest.
o Change the lock mechanism to handle IO in faults.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Reverse source and destination order

Reverse the source and destination order in the
instruction RM/OP field.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Add only memory area marked as ISRAM in flags

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Add Brandstring More CPUID.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Add support to dump guest segment descriptors.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[EMULATORS] Return 0xffffffff for non-existant devices.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Add generic utility functions for guest intercept

o Generic function to read a guest virtual address.
o Handle GDT Read/Write if enabled.
o Handle HLT instrucion from guest.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Guest Page Fault: Map aliased regions as well.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Add support to handle debugIO in coreboot

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Use instruction decode framework for crN Write

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Handle CPUID Brandstring MORE

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Add BIOS and memory regions in guest DTS.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>