assert: fix __assert_fail()

This patch changes the definition of __assert_fail() in api/assert.h which
would allow it and other header files which include it (such as debug.hh) to
be used in mgmt submodules. Fixes conflict with declaration of
__assert_fail() in external/x64/glibc.bin/usr/include/assert.h

Signed-off-by: Jaspal Singh Dhillon <jaspal.iiith@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
aarch64: mmu: remove spurious include

remove a spurious include <osv/prio.hh> which seems to be
a merge artifact.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
VFS: cleanup readdir() and friends

Our readdir_r() and friends were implemented in libc/dir.cc, calling
a function "ll_readdir()" from fs/vfs/main.cc. The name of this function
was confusing ("ll_" seemed to imply lock-less, which it isn't), and the way
it was "extern"ed was ugly, as a comment even admitted.

Moreover, when we want to implement more missing functions like rewinddir()
(see issue #77), we need to write more of these silly "ll_*" wrapper functions.

Instead, let's just move the few dir.cc functions into main.cc. The latter
already defines most of our filesystem system calls, so feels the right
place anyway. This change allows us to get rid of the silly ll_readdir()
layer, and makes implementing rewinddir() trivial (see next patch).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
VFS: implement rewinddir(), telldir(), seekdir()

Implement three of the Linux functions we're still missing (see issue #77
for a list of more things to do).

These are pretty easy to add, because we just need to correctly call the
lower layer functions, sys_*, which already exist.

This patch also adds tests for the three functions to tst-readdir.cc.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
aarch64: mmu: add include to the proper place

add include <osv/prio.hh>, this time at the beginning of the file.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.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>