Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367238
b: refs/heads/master
c: 0492f72
h: refs/heads/master
v: v3
  • Loading branch information
Marc Zyngier authored and Catalin Marinas committed Mar 20, 2013
1 parent 72c6c5c commit 98cddf1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d9c1951f400942bbdb41e75a73d151e4a9d5469e
refs/heads/master: 0492f72508184d451101564e235b0c32edf9acd3
12 changes: 12 additions & 0 deletions trunk/arch/arm64/kernel/early_printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,25 @@ 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);
};

static const struct earlycon_match earlycon_match[] __initconst = {
{ .name = "pl011", .printch = pl011_printch, },
{ .name = "smh", .printch = smh_printch, },
{}
};

Expand Down

0 comments on commit 98cddf1

Please sign in to comment.