diff options
author | Michal Simek <monstr@monstr.eu> | 2009-07-30 16:31:23 +0400 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2009-09-21 16:29:21 +0400 |
commit | 2622434ee0108c65808a63f067e72d0bbc75b372 (patch) | |
tree | c6f89cd62d636bbdc6e96c589481d79b7b67c3da /arch/microblaze/kernel/head.S | |
parent | 8cc11f5ab5384dad6c63905f71882e65cd70b7b7 (diff) | |
download | linux-2622434ee0108c65808a63f067e72d0bbc75b372.tar.xz |
microblaze: Add checking mechanism for MSR instruction
It was necessary to use fourth parameter(r8) in early_printk
to show messages on console.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/kernel/head.S')
-rw-r--r-- | arch/microblaze/kernel/head.S | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S index e41c6ce2a7be..bfc7ea801cc4 100644 --- a/arch/microblaze/kernel/head.S +++ b/arch/microblaze/kernel/head.S @@ -55,6 +55,19 @@ ENTRY(_start) andi r1, r1, ~2 mts rmsr, r1 +/* + * Here is checking mechanism which check if Microblaze has msr instructions + * We load msr and compare it with previous r1 value - if is the same, + * msr instructions works if not - cpu don't have them. + */ + or r8, r0, r0 /* 0 - I have msr instr, 1 - I don't have */ + or r12, r0, r0 + msrset r12, 0 /* set nothing - just read msr for test */ + cmpu r12, r12, r1 + beqi r12, 1f + ori r8, r0, 1 /* I don't have msr */ +1: + /* r7 may point to an FDT, or there may be one linked in. if it's in r7, we've got to save it away ASAP. We ensure r7 points to a valid FDT, just in case the bootloader @@ -209,8 +222,8 @@ start_here: * Please see $(ARCH)/mach-$(SUBARCH)/setup.c for * the function. */ - la r8, r0, machine_early_init - brald r15, r8 + la r9, r0, machine_early_init + brald r15, r9 nop #ifndef CONFIG_MMU |