Patchwork [U-Boot,RFC,10/10] MIPS: start.S: emulate REVISION register for qemu-malta

login
register
mail settings
Submitter Gabor Juhos
Date Jan. 19, 2013, 3:19 p.m.
Message ID <1358608777-7270-11-git-send-email-juhosg@openwrt.org>
Download mbox | patch
Permalink /patch/213874/
State Superseded
Delegated to: Daniel Schwierzeck
Headers show

Comments

Gabor Juhos - Jan. 19, 2013, 3:19 p.m.
On the origial Malta boards the REVISION register is
accessible at the 0x1fc00010 address. The contents of
this register gives information about the revision
of the Malta and Core Boards.

This register is used by the Linux kernel to identify
the actual board it is running on. However the register
is not emulated properly by Qemu, so put a hardcoded
value into the flash to make Linux work.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
---
 arch/mips/cpu/mips32/start.S |    6 ++++++
 1 file changed, 6 insertions(+)

Patch

diff --git a/arch/mips/cpu/mips32/start.S b/arch/mips/cpu/mips32/start.S
index 9c1b2f7..7b42716 100644
--- a/arch/mips/cpu/mips32/start.S
+++ b/arch/mips/cpu/mips32/start.S
@@ -78,6 +78,12 @@  _start:
 	 */
 	.word CONFIG_SYS_XWAY_EBU_BOOTCFG
 	.word 0x00000000
+#elif defined(CONFIG_QEMU_MALTA)
+	/*
+	 * Linux expects the Board ID here.
+	 */
+	.word 0x00000420	# 0x420 (Malta Board with CoreLV)
+	.word 0x00000000
 #else
 	RVECENT(romReserved,2)
 #endif