diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2013-06-13 20:01:02 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2013-06-13 20:01:02 +0000 |
commit | 3f47c7d6162e02ac76a20e1cf5cc0a5711ac556b (patch) | |
tree | c645048c1d0d4769b22fb878510a726e3e4784cc /sys/arch/octeon/stand | |
parent | 7b9cbdc585215100702879688c12365d35f2af9c (diff) |
- fix devboot() to properly retrieve octcf0a and add a comment for later
- call boot() so we get to play with the prompt; turns out there's an issue
where the first 2-3 readline reads from the uart result in no data...to be
investigated.
Diffstat (limited to 'sys/arch/octeon/stand')
-rw-r--r-- | sys/arch/octeon/stand/boot/machdep.c | 14 | ||||
-rw-r--r-- | sys/arch/octeon/stand/boot/uart.c | 4 |
2 files changed, 12 insertions, 6 deletions
diff --git a/sys/arch/octeon/stand/boot/machdep.c b/sys/arch/octeon/stand/boot/machdep.c index c509904615f..15c7482e908 100644 --- a/sys/arch/octeon/stand/boot/machdep.c +++ b/sys/arch/octeon/stand/boot/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.1 2013/06/05 01:02:29 jasper Exp $ */ +/* $OpenBSD: machdep.c,v 1.2 2013/06/13 20:01:01 jasper Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. @@ -53,7 +53,7 @@ int main() { - cninit(); + boot(0); return (0); } @@ -133,7 +133,11 @@ ttydev(char *name) void devboot(dev_t dev, char *path) { - strlcpy(path, "octcf0a", 7); + /* XXX: + * Assumes we booted from CF as this is currently the only supported + * disk. We may need to dig deeper to figure out the real root device. + */ + strlcpy(path, "octcf0a", BOOTDEVLEN); } time_t @@ -144,7 +148,9 @@ getsecs() void machdep() -{} +{ + cninit(); +} __dead void _rtt() diff --git a/sys/arch/octeon/stand/boot/uart.c b/sys/arch/octeon/stand/boot/uart.c index b208c4603ef..151a7267b80 100644 --- a/sys/arch/octeon/stand/boot/uart.c +++ b/sys/arch/octeon/stand/boot/uart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uart.c,v 1.3 2013/06/05 02:45:37 jasper Exp $ */ +/* $OpenBSD: uart.c,v 1.4 2013/06/13 20:01:01 jasper Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -72,7 +72,7 @@ void cn30xxuart_wait_txhr_empty(int d) { while (((*(uint64_t*)OCTEON_MIO_UART0_LSR & LSR_TXRDY) == 0) && - ((*(uint64_t*)OCTEON_MIO_UART0_USR & USR_TXFIFO_NOTFULL) == 0)) + ((*(uint64_t*)OCTEON_MIO_UART0_USR & USR_TXFIFO_NOTFULL) == 0)) delay(d); } |