summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjasper <jasper@openbsd.org>2013-06-13 20:01:01 +0000
committerjasper <jasper@openbsd.org>2013-06-13 20:01:01 +0000
commite6f8dcc44ece85c4c0942edb4ed53c202c6cf438 (patch)
treecb90d2f3b6a4736d526f825aec3b5ad8f6cf4257
parentDocument correct interaction of -e flag with && and ||. OK jmc@ (diff)
downloadwireguard-openbsd-e6f8dcc44ece85c4c0942edb4ed53c202c6cf438.tar.xz
wireguard-openbsd-e6f8dcc44ece85c4c0942edb4ed53c202c6cf438.zip
- 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.
-rw-r--r--sys/arch/octeon/stand/boot/machdep.c14
-rw-r--r--sys/arch/octeon/stand/boot/uart.c4
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);
}