NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: kern/58374: X stopped working
The following reply was made to PR kern/58374; it has been noted by GNATS.
From: matthew green <mrg%eterna23.net@localhost>
To: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost, martin%NetBSD.org@localhost, gnats-bugs%netbsd.org@localhost
Cc:
Subject: re: kern/58374: X stopped working
Date: Sun, 30 Jun 2024 08:34:58 +1000
matthew green writes:
> hmm, i notice that in 2019 there were some changes to the vesa
> driver to "Refuse to run on UEFI machines running older kernels".
OK, it's almost certainly this. we should already be skipping
devices with a drm driver present, but this case has genfb and
no drm driver.
can you test this with the vesa driver back in place?
thanks.
.mrg.
xf86-video-vesa(4): Refuse to run on NetBSD UEFI systems.
Index: src/vesa.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/xsrc/external/mit/xf86-video-vesa/dist/src/vesa.c,v
retrieving revision 1.12
diff -p -u -r1.12 vesa.c
--- src/vesa.c 8 Jan 2023 21:34:50 -0000 1.12
+++ src/vesa.c 29 Jun 2024 22:33:00 -0000
@@ -64,6 +64,10 @@
#endif
#include "compat-api.h"
=
+#if defined(__NetBSD__)
+#include <sys/sysctl.h>
+#endif
+
/* Mandatory functions */
static const OptionInfoRec * VESAAvailableOptions(int chipid, int busid);
static void VESAIdentify(int flags);
@@ -485,6 +489,18 @@ VESAPciProbe(DriverPtr drv, int entity_n
return FALSE;
}
#endif
+#if defined(__NetBSD__)
+ {
+ char method[10];
+ size_t len =3D sizeof(method);
+
+ if (sysctlbyname("machdep.bootmethod", &method, &len, NULL, 0) =3D=
=3D 0 &&
+ strcmp(method, "UEFI") =3D=3D 0) {
+ ErrorF("vesa: Refusing to run, UEFI booted\n");
+ return FALSE;
+ }
+ }
+#endif
=
pScrn =3D xf86ConfigPciEntity(NULL, 0, entity_num, NULL, =
NULL, NULL, NULL, NULL, NULL);
Home |
Main Index |
Thread Index |
Old Index