summaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-11-30 12:21:34 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2014-12-01 14:57:44 +1100
commit9594a715b50c338f1261e88c12c120cf8e5b8bba (patch)
tree5e5a07267866843ae9b0077122300bc3396ee2e5 /asm
parent566f139cffdcef5d1ce679cc1a7cfd0c7cde3f78 (diff)
downloadtalos-skiboot-9594a715b50c338f1261e88c12c120cf8e5b8bba.tar.gz
talos-skiboot-9594a715b50c338f1261e88c12c120cf8e5b8bba.zip
Add tweaks to work in Mambo simulator
Mambo doesn't implement various things such as PBA SCOMs, LPC, ChipTOD, etc... It also provides a special console hook. This adds detection of Mambo via the /mambo node, and enables us to boot all the way to Linux. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'asm')
-rw-r--r--asm/misc.S19
1 files changed, 19 insertions, 0 deletions
diff --git a/asm/misc.S b/asm/misc.S
index 00c7f78e..bbabebc3 100644
--- a/asm/misc.S
+++ b/asm/misc.S
@@ -50,3 +50,22 @@ _mcount:
mflr %r4
b __mcount_stack_check
#endif
+
+.global mambo_read
+mambo_read:
+#define SIM_READ_CONSOLE_CODE 60
+ li %r3,SIM_READ_CONSOLE_CODE
+ .long 0x000eaeb0
+ extsw %r3,%r3
+ blr
+
+.global mambo_write
+mambo_write:
+#define SIM_WRITE_CONSOLE_CODE 0
+ li %r6,0
+ mr %r5,%r4
+ mr %r4,%r3
+ li %r3,SIM_WRITE_CONSOLE_CODE
+ .long 0x000eaeb0
+ blr
+
OpenPOWER on IntegriCloud