Page MenuHomeFreeBSD

D39983.1777260900.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D39983.1777260900.diff

diff --git a/stand/efi/loader/conf.c b/stand/efi/loader/conf.c
--- a/stand/efi/loader/conf.c
+++ b/stand/efi/loader/conf.c
@@ -81,6 +81,10 @@
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 @@
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
--- a/stand/efi/loader/efiserialio.c
+++ b/stand/efi/loader/efiserialio.c
@@ -81,6 +81,20 @@
.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 @@
}
}
+#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)
{

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 27, 3:35 AM (11 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28436107
Default Alt Text
D39983.1777260900.diff (1 KB)

Event Timeline