projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9c1951
)
arm64: early_printk: add support for FastModel console output
author
Marc Zyngier
<
[email protected]
>
Wed, 27 Feb 2013 18:06:00 +0000
(18:06 +0000)
committer
Catalin Marinas
<
[email protected]
>
Wed, 20 Mar 2013 16:46:42 +0000
(16:46 +0000)
Enable early_printk to use the FastModel semihosting to output
the early kernel messages. Works both for host and guest kernels.
To use this feature, pass "early_printk=smh" to the kernel.
Signed-off-by: Marc Zyngier <
[email protected]
>
Signed-off-by: Catalin Marinas <
[email protected]
>
arch/arm64/kernel/early_printk.c
patch
|
blob
|
history
diff --git
a/arch/arm64/kernel/early_printk.c
b/arch/arm64/kernel/early_printk.c
index 7e320a2edb9b2970039733e8e638d39d9615092b..0bb7436c57dce90421e97bd773cf65feb9405800 100644
(file)
--- a/
arch/arm64/kernel/early_printk.c
+++ b/
arch/arm64/kernel/early_printk.c
@@
-40,6
+40,17
@@
static void pl011_printch(char ch)
;
}
+/*
+ * Semihosting-based debug console
+ */
+static void smh_printch(char ch)
+{
+ asm volatile("mov x1, %0\n"
+ "mov x0, #3\n"
+ "hlt 0xf000\n"
+ : : "r" (&ch) : "x0", "x1", "memory");
+}
+
struct earlycon_match {
const char *name;
void (*printch)(char ch);
@@
-47,6
+58,7
@@
struct earlycon_match {
static const struct earlycon_match earlycon_match[] __initconst = {
{ .name = "pl011", .printch = pl011_printch, },
+ { .name = "smh", .printch = smh_printch, },
{}
};