[TOOLS] Add compile rules for .data files in build directory

We might have generated .data files in build directory which will
be converted into .c files at compile time hence we add compile
time rules for such generated .data files.

Signed-off-by: Anup Patel <anup@brainfault.org>
[LIBS] Add support for a default user for libauth.

In case the filesystem is not present and libauth is
enabled, a default user can be added to the user. The
default username is admin. Password to supplied in menuconfig
is clear text. At compile time hash of the password
is generated and linked in the data.

Default password is EQuiN0X

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
Signed-off-by: Anup Patel <anup@brainfault.org>
[x86] Add default user to x86

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[CORE] vmm_guest_aspace: Provide more debug info for overlapping regions

Currently, we dont print both overlapping regions at guest creation
time. This patch extends guest aspace creation to print info about
both overlapping regions instead of just one.

Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand-wesolowski@openwide.fr>
Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Correcting the 'vmm_printf' macro.

The 'vmm_printf' macro was defined with an ending semi-column. It has been
removed, and a resulting missing semi-column was added to the printing in the
main C function.

Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand-wesolowski@openwide.fr>
[ARM] Board information printing implemented.

The board information printing is done by checking the generic board name, and
retrieving its own specific information printing function, and calling it, if
any.

Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand-wesolowski@openwide.fr>
[MAKEFILE] Improve the device tree dependency generation.

This patch allow a generation of device tree file dependency information, so
that the device tree binary is also rebuilt everytime an included file is
modified.

Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand-wesolowski@openwide.fr>
Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] Sabrelite board support improved.

The Sabrelite can now be selected in the menuconfig, and the specific board
initialization source skeleton is done.
It also adds the clock management for the i.MX6Q, which is from the Linux
kernel and can be largely improved and split as drivers ; and simplified GPC,
timers, PM, and all clock management functions.

The i.MX6Q GPT driver is specific to the i.MX6Q. The device tree GPT definition
compatibility is set to with "fsl,imx6q-gpt", instead of "freescale,gpt-timer".

The SOC name and revision will be displayed when asking for the board
information through the Xvisor command line.

Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand-wesolowski@openwide.fr>
[DRIVERS] Allow using i.MX6 UART without prior bootloader initialization.

This patch configures and enables the UART FIFO, ignore the RTS, and set the
UART mode to 8N1.

Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand-wesolowski@openwide.fr>
[CORE] Avoid the "always_inline function might not be inlinable" warning.

GCC displays a warning about the fact a function may not be inlined even if
told so, if no optimization is asked for. To avoid this, as explained in the
GCC manual :
Generally, functions are not inlined unless optimization is specified. For
functions declared inline, this attribute inlines the function even if no
optimization level is specified.

Adding "inline" correct this warning.

Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand-wesolowski@openwide.fr>
[MAKEFILE] Override the V environment variable.

If the Xvisor makefile is called by another script or makefile defining V, it
breaks the verbosity option of the build system, concatenating its value in
front of each command.

Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand-wesolowski@openwide.fr>
[MAKEFILE] Use a CC preprocessor on device tree files.

Using a CC preprocessor on device tree files allows to add C header include
directives in device tree files.
Also, the device tree compiler is now set as a dependency of the dependency
file generation as it is used to create them.

Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand-wesolowski@openwide.fr>
Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] Adding MXC GPIO driver.

As the Generic GPIO driver is already ported on Xvisor, using it will help the
port of the i.MX GPIO driver, especially the mapping between the IRQ and the
GPIO pin indexing.

Xvisor device tree format is slightly different from Linux's one.
The IRQ should be written as plain number, and not without specifying the
sharing flag nor the interrupt type.
This although can be written with these specifiers (modifying the driver
accordingly), but it would break Xvisor device tree format.

Also, the IRQ number is the IRQ line, without the 32 base IRQ offset.

Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand-wesolowski@openwide.fr>
Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] vmm_devdrv: Add API to find class device using match function

Linux driver frameworks such as SPI, require API to find class device
using some match function hence this patch.

Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand-wesolowski@openwide.fr>
Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Add VMM_EREMOTEIO and VMM_EINPROGRESS error codes

Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand-wesolowski@openwide.fr>
Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] Added SPI driver framework

This patch adds SPI device driver framework ported from Linux kernel sources.

Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand-wesolowski@openwide.fr>
Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] vmm_delay: Add new API vmm_ndelay

This patch adds new API vmm_ndelay() for soft-delay in-terms
of nanoseconds.

Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand-wesolowski@openwide.fr>
Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] i.MX and GPIO bitbanging SPI drivers

This patch adds i.MX SPI driver and GPI bitbanging SPI driver to
Xvisor ported from Linux kernel sources.

Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand-wesolowski@openwide.fr>
Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] i.MX6: move ARCH_MXC to CONFIG_ARCH_MXC

To be consistent with other xvisor CONFIG parameters

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] Calling the udiv64 function, instead of using the division operator.

Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand-wesolowski@openwide.fr>