git: 9b1de7e4844d - main - vt/sc: retire logic to select vt(4) by default for UEFI boot
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 25 May 2024 15:00:50 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=9b1de7e4844d951a7d7335cbde75a86a2380e220
commit 9b1de7e4844d951a7d7335cbde75a86a2380e220
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-05-24 21:36:09 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-05-25 15:00:35 +0000
vt/sc: retire logic to select vt(4) by default for UEFI boot
We previously defaulted to using sc(4) with a special case to prefer
vt(4) when booted via UEFI. As vt(4) is now always the default we can
simplify this.
Reviewed by: imp, kevans
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45356
---
sys/amd64/amd64/machdep.c | 9 ---------
sys/kern/kern_cons.c | 18 ------------------
sys/sys/cons.h | 1 -
3 files changed, 28 deletions(-)
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index c8539b7b189d..c509dcc2f7dd 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -1464,15 +1464,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
r_idt.rd_base = (long) idt;
lidt(&r_idt);
- /*
- * Use vt(4) by default for UEFI boot (during the sc(4)/vt(4)
- * transition).
- * Once bootblocks have updated, we can test directly for
- * efi_systbl != NULL here...
- */
- if (efi_boot)
- vty_set_preferred(VTY_VT);
-
TUNABLE_INT_FETCH("hw.ibrs_disable", &hw_ibrs_disable);
TUNABLE_INT_FETCH("machdep.mitigations.ibrs.disable", &hw_ibrs_disable);
diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c
index 040aa3932a1a..2ab86d5905a9 100644
--- a/sys/kern/kern_cons.c
+++ b/sys/kern/kern_cons.c
@@ -737,7 +737,6 @@ sysbeep(int pitch __unused, sbintime_t duration __unused)
/*
* Temporary support for sc(4) to vt(4) transition.
*/
-static unsigned vty_prefer;
static char vty_name[16];
SYSCTL_STRING(_kern, OID_AUTO, vty, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, vty_name,
0, "Console vty driver");
@@ -762,10 +761,6 @@ vty_enabled(unsigned vty)
break;
}
#endif
- if (vty_prefer != 0) {
- vty_selected = vty_prefer;
- break;
- }
#if defined(DEV_VT)
vty_selected = VTY_VT;
#elif defined(DEV_SC)
@@ -780,16 +775,3 @@ vty_enabled(unsigned vty)
}
return ((vty_selected & vty) != 0);
}
-
-void
-vty_set_preferred(unsigned vty)
-{
-
- vty_prefer = vty;
-#if !defined(DEV_SC)
- vty_prefer &= ~VTY_SC;
-#endif
-#if !defined(DEV_VT)
- vty_prefer &= ~VTY_VT;
-#endif
-}
diff --git a/sys/sys/cons.h b/sys/sys/cons.h
index 78df26858376..c7110a7c8c17 100644
--- a/sys/sys/cons.h
+++ b/sys/sys/cons.h
@@ -145,7 +145,6 @@ int constty_clear(struct tty *tp);
#define VTY_SC 0x01
#define VTY_VT 0x02
int vty_enabled(unsigned int);
-void vty_set_preferred(unsigned int);
#endif /* _KERNEL */