bsd/aarch64: improve inline assembly for atomic and endian ops

use %wn when referring to the non-extended register n,
and %n when referring to the extended register n,
emit the right memory barrier instructions, get the
semantics of atomic_store_rel hopefully right.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
bsd: add stubs for AArch64

virt_to_phys just returns the virtual address again
for AArch64 for now, while mmu_unmap will abort.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
arch.hh: introduce arch::halt_no_interrupts

rename processor::halt_no_interrupts to cli_hlt, which
logically matches existing processor::sti_hlt.

Make use of arch::halt_no_interrupts in core/power.cc,
enclose x64-specific code in ifdefs, as well as putting
code on AArch64.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
arch/aarch64: first implementation

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
drivers: move debug-console to arch-specific dir

Signed-off-by: Jani Kokkonen <jani.kokkonen@huawei.com>
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
include/api/aarch64: first implementation

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
debug: add debug_early functionality

the functions debug_early, debug_early_u64 and
debug_early_entry can be used very early, before premain.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
drivers/console: allowing building for AArch64

stub console_init for AArch64.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
include/osv/trace.hh: protect x64-specific code in ifdef

protect x64 machine code in #ifdef __x86_64__

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
elf: ifdef x64-specific code, add AArch64 dynamic rels

implementation includes only for the few rels that are actually
encountered during elf::get_init().

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
fs: add minimal stubs for AArch64

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
include: remove unused include file

include/api/x64/atomic.h is not used anywhere.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
core: add AArch64 stubs for mempool and mmio.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
core: add AArch64 stubs for sched.cc

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
loader, runtime: add stubs for AArch64

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
build.mk: enable first AArch64 stubbed support

This should build and reach end of premain.

See PORTING for some initial build instructions.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
aarch64: install simple vectors and get the cmdline

get the command line and elf header start, then try to
stay clear of apparent random limitations during boot
early stage with the model, and set up vectors as soon
as possible, to enable some minimal post-mortem info.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
aarch64: downcase regs in boot.S, do not set sctlr_el1 yet

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
aarch64: add first page tables

XXX todo Jani Kokkonen

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