fixup.h: Use the full path

The common.h header name is generic enough that we want to be a bit more
precise in which header we're going to use.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
fixup: Fix a const warning for the atags pointer

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
main: Fix warning on start_kernel cast

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Update the DTSI as of 3.18-rc3

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
entry: Fake a zImage Header

A zImage is not a raw executable but has a header located at the offset 0x24,
which contains a magic, start and end addresses, and some endianness
information.

If this header is missing, bootloader might get confused, defeating the goal of
having babelfish running in any cases, and behaving like a real kernel.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Makefile: Rename babelfish.bin as zImage

Since the final binary really is a zImage now, rename it as such.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Makefile: Allow to override the load address from the command line

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
babelfish: Allow the binary to be position independant

So far, the binary was generated with the assumption that it was going to be
run at the address 0x40008000.

This was convenient because quite simple to do, but wasn't really pratical,
since for a number of reasons (u-boot would not relocate our kernel,
Allwinner's bootloader would load us at a different address, the A80 seems to
have a different RAM base address, etc.) we might not be running from there.

Implement PIC in several steps:
  - Remove the text section address assignment
  - Discard the .data* sections, since any r/w data will generate a GOT based
    relocation, which won't work for us. This will also trigger a link
    error any time we will actually use one, which is good.
  - Remove the global variables that were used before, mostly the malloc_base
    variable, and create a new section for the heap instead, that will be used
    to hold our allocated memory. Since we can't use C global variables, the
    global heap_base variable will be set from the assembly code.
  - Convert fdt_strerror to a dumber but global-free code in order to
    accomodate with the above constraints

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
head: Initialize the stack pointer

If we've just been booted in non-secure, we're running without any stack.
Make sure we have one.

To do so, create a new section in our binary so that we know no-one will step
on our foot, yet without providing any absolute address that might not apply to
our case.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>