loader: poweroff() if cpus.size()>max_cpus

This patch fixes the case of silently hanging of OSv when >64 cpus are
provided.

Signed-off-by: Jaspal Singh Dhillon <jaspal.iiith@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
mgmt: update to latest

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: fix default backtrace formatter construction

That formatter is used for ad-hoc printing of samples, eg.
in error messages.

This fixes the following error message:

Traceback (most recent call last):
  File "scripts/trace.py", line 576, in <module>
    args.func(args)
  File "scripts/trace.py", line 244, in prof_lock
    show_profile(args, get_profile)
  File "scripts/trace.py", line 208, in show_profile
    max_levels=args.max_levels)
  File "/home/tgrabiec/src/osv/scripts/osv/prof.py", line 170, in print_profile
    for sample in samples:
  File "/home/tgrabiec/src/osv/scripts/osv/prof.py", line 108, in get_duration_profile
    raise Exception('Double entry:\n%s\n%s\n' % (str(old), str(trace)))
  File "/home/tgrabiec/src/osv/scripts/osv/trace.py", line 125, in __str__
    return self.format()
  File "/home/tgrabiec/src/osv/scripts/osv/trace.py", line 122, in format
    bt_formatter(self.backtrace))
  File "/home/tgrabiec/src/osv/scripts/osv/trace.py", line 32, in __call__
    frames = list(debug.resolve_all(self.resolver, (x - 1 for x in backtrace if x)))
  File "/home/tgrabiec/src/osv/scripts/osv/debug.py", line 107, in resolve_all
    return itertools.chain.from_iterable(map(resolver, raw_addresses))
TypeError: __init__() takes exactly 1 argument (2 given)

When this should actually be printed:

Traceback (most recent call last):
  File "scripts/trace.py", line 576, in <module>
    args.func(args)
  File "scripts/trace.py", line 244, in prof_lock
    show_profile(args, get_profile)
  File "scripts/trace.py", line 208, in show_profile
    max_levels=args.max_levels)
  File "/data/tgrabiec/osv/scripts/osv/prof.py", line 170, in print_profile
    for sample in samples:
  File "/data/tgrabiec/osv/scripts/osv/prof.py", line 108, in get_duration_profile
    raise Exception('Double entry:\n%s\n%s\n' % (str(old), str(trace)))
Exception: Double entry:
0xffffc00017668010                  3 1399542568.505835772 mutex_lock_wait (...)
0xffffc00017668010                  1 1399542574.668642044 mutex_lock_wait (...)

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
aarch64: mmu: distinguish between device and normal memory

we need to do that because load/store instructions
behave differently with Device-nGnRnE memory.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
aarch64: exceptions: implement interrupt table

implement a simple interrupt table with descriptors
which record interrupt IDs, handlers and interrupt type.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
aarch64: smp: prepare GIC initialization per cpu

arch::init_on_cpu should initialize the gic cpu interface,
but not for the boot CPU, for which this has already been
done.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
aarch64: smp: do not forget to create incoming_wakeups

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
aarch64: implement basic General Timers infrastructure

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
aarch64: implement exception entry and exit

generate exception frame

Signed-off-by: Jani Kokkonen <jani.kokkonen@huawei.com>
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
exceptions: print string on interrupt

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
page fault
fixup fault
elf changes for s_program for demangle
backtrace

XXX Jani
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
thread switch to first

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
XXX some forward