microblaze: Support loading of u-boot initrd images

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
microblaze: Respect the reset vector

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
xilinx_intc: Fix writes into MER register

The MER register only has two valid bits. This is now used by
the linux kernel to auto-detect endianness, and causes Linux 3.15-rc1
and later to hang when run under qemu-microblaze. Mask valid bits before
writing the register to solve the problem.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
[Edgar: Untabified]
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
xilinx_timer: Fix writes into TCSR register

The TCSR register has only 11 valid bits. This is now used by the
linux kernel to auto-detect endianness, and causes Linux 3.15-rc1
and later to hang when run under qemu-microblaze. Mask valid bits
before writing the register to solve the problem.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
microblaze: boot: Don't hack the elf entry point

There was some modulo logic to ensure that Microblaze always booted into
physical RAM regardless of the elf entry. Removed it, as QEMU should fail
gracefully when given a bad elf, rather than attempt to run it.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
rules.mak: Rewrite unnest-vars

The macro unnest-vars is the most important, complicated and hard to
trace magic in QEMU's build system.

Rewrite it in a (hopefully) clearer way, with comments, to make it
easier to maintain.

Remove DSO_CFLAGS and module-objs-m that are not used.

An improvement of this version is, per object variables are properly
protected in save-objs and load-objs, before including sub-dir
Makefile.objs, just as nested variables are. So the occasional same
object name from different directory levels won't step on each other's
foot.

Signed-off-by: Fam Zheng <famz@redhat.com>
rules.mak: Sort all expanded objects

With more objects modularized, some objects may show in both
common-obj-m and common-obj-y, and appear in $(expand-objs) for more
than one times. This will make non-modularized linking failed.

For example, ui/x_keymap.o is added to common-obj-X in ui/Makefile.objs
for twice.

    ui/Makefile.objs:12:common-obj-$(CONFIG_SDL) += sdl.o sdl_zoom.o
                        x_keymap.o sdl2.o
    ui/Makefile.objs:16:common-obj-$(CONFIG_GTK) += gtk.o x_keymap.o

Avoid it by sorting the objects from both variable and .mo-objs
expansions.

Signed-off-by: Fam Zheng <famz@redhat.com>
rules.mak: Add rule for %.mo

Generate this dummy target file to satisfy dependency when rerunning
make.

Signed-off-by: Fam Zheng <famz@redhat.com>