solaris: switch solaris atomics to a generic implementation based on C++11

Hopefully this will reduce porting efforts.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
build: move x64-specific modules into x64 subdirs

First step towards moving x64-specific stuff into arch
subdirectories:

move the submodules in external/ to external/x64/,

rename amd64->x64 in opensolaris,

rename x86_64->x64 in include/api,

adapt build.mk to reference the updated paths,
and improve detection of include dirs and libs in the
external submodules.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
trace: only allocate trace_log when tracepoints are enabled

The current code the trace_log - a 4MB array which stores tracepoint data -
is a global array. In other words, as explained in issue #96, it is part
of the BSS, which always adds 4MB memory usage to OSv - whether or not
tracepoints are actually enabled.

This patch changes trace_log to be a dynamically-allocated array, allocated
when the first tracepoint is enabled (e.g., with a --trace=...  boot
option).

This will also allow us (in the future) to choose the size of the trace log
at run time rather than compile time.

This patch reduces 4 MB of BSS (from 13MB to 9MB), and correspondly lowers
our minimum memory use by 4 MB. Whereas the minimum memory requirement of
the "rogue" image used to be 59 MB, now it is 55 MB.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Merge branch 'atomics'

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>

Conflicts:
	build.mk
	external/x64/acpica
	external/x64/gcc.bin
	external/x64/glibc-testsuite
	external/x64/glibc.bin
	external/x64/misc.bin
	external/x64/openjdk.bin
pci: add get_base_class_code() and get_sub_class_code() on pci-function

Add methods to get base_class and sub_class to find IDE device.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
pci: add enum pci class/sub_class code

Add enum for PCI class/subclass.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
x64: add insl outsl function

Adds insl and outsl to perform PIO on IDE driver.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
ide: add ide driver

Simple polling PIO IDE driver.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
ide: add ide driver on build.mk

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
ide: register ide driver

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
scripts: add ide on run.py

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
CODINGSTYLE.md updates

Some more coding style issues collected from reviews over the last few
days (mostly from Avi).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Coding style fix for pci-function.cc/hh

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Coding style fix for acpi.cc

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Coding style fix for device.cc/hh

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Coding style fix for driver.cc/hh

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Coding style fix for hpet.cc

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Coding style fix for isa-serial.cc

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Coding style fix for pci-bridge.cc/hh

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Coding style fix for pci-device.cc/hh

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>