[LIBS] Fix shift wrapping in bitmap for 64-bit systems

On 64-bit systems, a shift beyond 32-bits will cause
overflow and wrap around causing the lower 32-bit to
mirror the value that higher 32-bit should have.
(0x1 << more than 32-bits) will cause this problem.

The fix is to have like this:
(0x1UL << more than 32-bit)
On 32-bit system UL will still be 32-bit but on 64-bit systems
0x1UL will be 64-bit and mirroring will not happen.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] The Time of calling cpu_early_init and board_early_init is too late

The current call sequence inside vmm_init is:
vmm_host_aspace_init();
vmm_heap_init();
vmm_devtree_init();
vmm_host_irq_init();
vmm_percpu_init();
arch_cpu_early_init();

IMHO, this isn't the current sequence.
For example, calling arch_cpu_early_init after devtree, host irq, percpu init,
is totally useless! It doesn't solve any practical problems that early init was
supposed to solve.

In case of x86, for example, I can't do any of the above functions before I parse
the ACPI tables. ACPI table init is the best example of cpu_early_init. Only after
this I can init IRQs, init dev tree, init any per-cpu variables. So calling early
init after lots of other subsystems have initialize is worthless!

Board early init also moved just after cpu early init.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] Cleanup DTS for VExpress-A9 guest.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] Added DTS for VExpress-A9 guest on Realview-PB-A8 & BeagleBoard Hosts.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] arm32: Force non-shareable pages when running on UP host.

This patch is force use of local monitors in synchronization instructions because we dont have global monitors for SMP systems and shareable pages force use of global monitors.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Support for early boot logs gathering in vmm_stdio.

This patch is an alternate implementation of early boot logs.
Rather than have seperate module for maintaining early boot logs,
we can simply re-direct prints before stdio init to early log buffer and flush the buffer when stdio init is done.

Signed-off-by: Anup Patel <anup@brainfault.org>
Merge remote-tracking branch 'upstream/master'
[ARM] GIC: remove unused variable gic_cpu_base_addr

Signed-off-by: Anup Patel <anup@brainfault.org>
[TESTS] ARM V5: improve basic test implementation

Signed-off-by: Anup Patel <anup@brainfault.org>
[EMULATORS] PL031: fix module name

Signed-off-by: Anup Patel <anup@brainfault.org>
[EMULATORS] PL190: add emulator implementation

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Add a VMM_SIZE_TO_PAGE macro + other minor improvments

Signed-off-by: Anup Patel <anup@brainfault.org>
[EMULATORS] ARM_SYSREGS: Add VersatilePB SYS_ID

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] versatile: Fix DTS tree and add arm sys device.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] versatile: update Vesatile PB default config file

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] ARMv5: fix cache support functions

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] arm32: improve readibility for barrier file

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] ARMv5: improve wfi implementation

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] arm32: Add ARMv5 specific defines

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] arm32: implement missing ARM9 CP15 register features.

Signed-off-by: Anup Patel <anup@brainfault.org>