Page MenuHomeFreeBSD

D54504.diff
No OneTemporary

D54504.diff

diff --git a/usr.sbin/bhyve/aarch64/bhyverun_machdep.c b/usr.sbin/bhyve/aarch64/bhyverun_machdep.c
--- a/usr.sbin/bhyve/aarch64/bhyverun_machdep.c
+++ b/usr.sbin/bhyve/aarch64/bhyverun_machdep.c
@@ -270,7 +270,7 @@
return (0);
}
-static bool
+static int
init_mmio_uart(struct vmctx *ctx)
{
struct uart_pl011_softc *sc;
@@ -280,14 +280,14 @@
path = get_config_value("console");
if (path == NULL)
- return (false);
+ return (1);
sc = uart_pl011_init(mmio_uart_intr_assert, mmio_uart_intr_deassert,
ctx);
if (uart_pl011_tty_open(sc, path) != 0) {
EPRINTLN("Unable to initialize backend '%s' for mmio uart",
path);
- assert(0);
+ return (-1);
}
bzero(&mr, sizeof(struct mem_range));
@@ -301,7 +301,7 @@
error = register_mem(&mr);
assert(error == 0);
- return (true);
+ return (0);
}
static void
@@ -414,8 +414,11 @@
return (error);
}
- if (init_mmio_uart(ctx))
+ error = init_mmio_uart(ctx);
+ if (error == 0)
fdt_add_uart(UART_MMIO_BASE, UART_MMIO_SIZE, UART_INTR);
+ else if (error < 0)
+ return (error);
init_mmio_rtc(ctx);
fdt_add_rtc(RTC_MMIO_BASE, RTC_MMIO_SIZE, RTC_INTR);
fdt_add_timer();

File Metadata

Mime Type
text/plain
Expires
Thu, Aug 27, 10:51 AM (1 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37268353
Default Alt Text
D54504.diff (1 KB)

Event Timeline