Changeset View
Changeset View
Standalone View
Standalone View
stand/efi/loader/efiserialio.c
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | struct console eficom = { | ||||
.c_flags = 0, | .c_flags = 0, | ||||
.c_probe = comc_probe, | .c_probe = comc_probe, | ||||
.c_init = comc_init, | .c_init = comc_init, | ||||
.c_out = comc_putchar, | .c_out = comc_putchar, | ||||
.c_in = comc_getchar, | .c_in = comc_getchar, | ||||
.c_ready = comc_ischar, | .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 | static EFI_STATUS | ||||
efi_serial_init(EFI_HANDLE **handlep, int *nhandles) | efi_serial_init(EFI_HANDLE **handlep, int *nhandles) | ||||
{ | { | ||||
UINTN bufsz = 0; | UINTN bufsz = 0; | ||||
EFI_STATUS status; | EFI_STATUS status; | ||||
EFI_HANDLE *handles; | EFI_HANDLE *handles; | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 230 Lines • ▼ Show 20 Lines | comc_probe(struct console *sc) | ||||
env_setenv("efi_com_speed", EV_VOLATILE, value, | env_setenv("efi_com_speed", EV_VOLATILE, value, | ||||
comc_speed_set, env_nounset); | comc_speed_set, env_nounset); | ||||
eficom.c_flags = 0; | eficom.c_flags = 0; | ||||
if (comc_setup()) { | if (comc_setup()) { | ||||
sc->c_flags = C_PRESENTIN | C_PRESENTOUT; | sc->c_flags = C_PRESENTIN | C_PRESENTOUT; | ||||
} | } | ||||
} | } | ||||
#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"); | |||||
rpokala: "comconsole: \"comconsole\" device name is deprecated, switch to \"eficom\"\n" | |||||
} | |||||
} | |||||
#endif | |||||
static int | static int | ||||
comc_init(int arg __unused) | comc_init(int arg __unused) | ||||
{ | { | ||||
if (comc_setup()) | if (comc_setup()) | ||||
return (CMD_OK); | return (CMD_OK); | ||||
▲ Show 20 Lines • Show All 204 Lines • Show Last 20 Lines |
"comconsole: \"comconsole\" device name is deprecated, switch to \"eficom\"\n"