diff --git a/stand/efi/loader/conf.c b/stand/efi/loader/conf.c index e9ae01d19270..e84d8b6c366d 100644 --- a/stand/efi/loader/conf.c +++ b/stand/efi/loader/conf.c @@ -81,6 +81,10 @@ struct netif_driver *netif_drivers[] = { extern struct console efi_console; extern struct console eficom; +#if defined(__aarch64__) && __FreeBSD_version < 1500000 +/* Hack for backward compatibility -- but only for a while */ +extern struct console comconsole; +#endif #if defined(__amd64__) || defined(__i386__) extern struct console comconsole; extern struct console nullconsole; @@ -90,6 +94,9 @@ extern struct console spinconsole; struct console *consoles[] = { &efi_console, &eficom, +#if defined(__aarch64__) && __FreeBSD_version < 1500000 + &comconsole, +#endif #if defined(__amd64__) || defined(__i386__) &comconsole, &nullconsole, diff --git a/stand/efi/loader/efiserialio.c b/stand/efi/loader/efiserialio.c index de4d6b3e34c1..16f28080f80e 100644 --- a/stand/efi/loader/efiserialio.c +++ b/stand/efi/loader/efiserialio.c @@ -81,6 +81,20 @@ struct console eficom = { .c_ready = comc_ischar, }; +#if defined(__aarch64__) && __FreeBSD_version < 1500000 +static void comc_probe_compat(struct console *); +struct console comconsole = { + .c_name = "comconsole", + .c_desc = "serial port", + .c_flags = 0, + .c_probe = comc_probe_compat, + .c_init = comc_init, + .c_out = comc_putchar, + .c_in = comc_getchar, + .c_ready = comc_ischar, +}; +#endif + static EFI_STATUS efi_serial_init(EFI_HANDLE **handlep, int *nhandles) { @@ -328,6 +342,17 @@ comc_probe(struct console *sc) } } +#if defined(__aarch64__) && __FreeBSD_version < 1500000 +static void +comc_probe_compat(struct console *sc) +{ + comc_probe(sc); + if (sc->c_flags & (C_PRESENTIN | C_PRESENTOUT)) { + printf("comconsole: comconsole device name is deprecated, switch to eficom\n"); + } +} +#endif + static int comc_init(int arg __unused) {