Add generic functions for setting up aarch64 MMU translation tables

A table of memory regions and their attributes may be specified like:

	static const mmap_region our_memory_map[] = {
		{ TZROM_BASE,   TZROM_SIZE,   mt_memory | mt_ro | mt_secure },
		{ SRAM_BASE,    SRAM_SIZE,    mt_memory | mt_rw | mt_secure },
		{ DEVICES_BASE, DEVICES_SIZE, mt_device | mt_rw | mt_secure },
		{ DRAM_BASE,    DRAM_SIZE,    mt_memory | mt_rw | mt_ns },
		0
	};

These regions can then be added to system memory map array with:

	add_mmap(our_memory_map);

Regions may also be individually added like:

	add_mmap_region(mem->total_base, mem->total_size,
				mt_memory | mt_rw | mt_secure);

Once the memory map array has been fully initialised in these ways a
call to init_xlat_tables() will generate the translation tables required
to map all the specified regions. The top level translation table is
'l1_xlation_table' and the address of this must be then be used to
initialise the MMU's Translation Table Base Register (TTBR0).

A platform also needs define three constants used to initialise the
size of the pools used by the implementation's allocation schemes.

MAX_MMAP_REGIONS
  Upper limit of the number of memory regions that can be added with
  add_mmap() and add_mmap_region().

MAX_XLAT_TABLES
  Maximum number of translation tables that can be created in addition
  to the first level table. If the memory regions to be mapped require
  more than this number of tables then an assert will trigger.

ADDR_SPACE_SIZE
  Upper limit of the virtual addresses that the MMU will be programmed
  to map. Must be a multiple of 1GiB

Signed-off-by: Jon Medhurst <tixy@linaro.org>
Add debug prints to xlat_tables

Defining DEBUG_XLAT_TABLES=1 will generate console output showing the
memory map and the translation table contents generated from this.

The implementation doesn't make use of printf as the stack usage of that
call path is far too high for early stages of boot where we have a tiny
coherent stack. The code also assumes that console_init() and
console_putc() are safe to use at this early stage which may not always
be the case on all platforms. It is because of this caveat, and the
amount of output generated, that we use a separate macro to enabling
this feature rather the the general DEBUG macro.

Signed-off-by: Jon Medhurst <tixy@linaro.org>
fvp: Make use of the generic MMU translation table setup code

Signed-off-by: Jon Medhurst <tixy@linaro.org>