On Sat, Oct 19, 2019 at 12:22:42AM +0200, 4sale$99 wrote:
> To: [email protected]
> Subject: Regression after upgrade to 6.6 via sysupgrade
> From: root
> Cc: [email protected]
> Reply-To: [email protected]
>
> >Synopsis: Regression -- X.org doesn't start, touching the track point
> >freezes machine
> >Category:amd64 kernel
> >Environment:
> System : OpenBSD 6.6
> Details : OpenBSD 6.6 (GENERIC.MP) #372: Sat Oct 12 10:56:27 MDT
> 2019
>
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>
> Architecture: OpenBSD.amd64
> Machine : amd64
> >Description:
> I upgraded my GPD pocket machine from 6.5-stable to 6.6 via sysupgrade.
> The upgrade process proceeded without any apparent problems.
> After the upgrade was completed, I experienced the following
> regressions:
> 1. console doesn't switch to landscape mode anymore, but stays in
> portrait mode.
> 2. X.org doesn't start, neither via xenodm nor via startx.
> 3. The machine freezes when I touch the track point (mouse
> substitute).
> All item used to work under 6.5.,
> >How-To-Repeat:
> # sysupgrade
> >Fix:
> N/A
>
>
> dmesg:
> OpenBSD 6.6 (GENERIC.MP) #372: Sat Oct 12 10:56:27 MDT 2019
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 8477282304 (8084MB)
> avail mem = 8207638528 (7827MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x7b8de000 (51 entries)
> bios0: vendor American Megatrends Inc. version "5.11" date 08/07/2017
> bios0: Default string Default string
For this system it appears the smbios 'system information' vendor is
'Default string' but the 'base board information' vendor is
'AMI Corporation'. For the quirk to match we need to explicitly use
the board string (and handle DMI_BOARD_SERIAL).
}, { /*
* GPD Pocket, note that the the DMI data is less generic then
* it seems, devices with a board-vendor of "AMI Corporation"
* are quite rare, as are devices which have both board- *and*
* product-id set to "Default String"
*/
.matches = {
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
},
.driver_data = (void *)&gpd_pocket,
This should fix the panel orientation, if not install sysutils/dmidecode
and provide the output. You'll have to temporarily enable
kern.allowkmem=1 for it to work.
Index: sys/arch/amd64/amd64/bios.c
===================================================================
RCS file: /cvs/src/sys/arch/amd64/amd64/bios.c,v
retrieving revision 1.40
diff -u -p -r1.40 bios.c
--- sys/arch/amd64/amd64/bios.c 4 Aug 2019 14:28:58 -0000 1.40
+++ sys/arch/amd64/amd64/bios.c 19 Oct 2019 04:24:44 -0000
@@ -68,6 +68,9 @@ const char *smbios_uninfo[] = {
};
char smbios_bios_date[64];
+char smbios_board_vendor[64];
+char smbios_board_name[64];
+char smbios_board_serial[64];
int
bios_match(struct device *parent, void *match , void *aux)
@@ -384,8 +387,33 @@ smbios_info(char *str)
havebb = smbios_find_table(SMBIOS_TYPE_BASEBOARD, &btbl);
sys = (struct smbios_sys *)stbl.tblhdr;
- if (havebb)
+ if (havebb) {
board = (struct smbios_board *)btbl.tblhdr;
+
+ sminfop = NULL;
+ if ((p = smbios_get_string(&btbl, board->vendor,
+ sminfo, sizeof(sminfo))) != NULL)
+ sminfop = fixstring(p);
+ if (sminfop)
+ strlcpy(smbios_board_vendor, sminfop,
+ sizeof(smbios_board_vendor));
+
+ sminfop = NULL;
+ if ((p = smbios_get_string(&btbl, board->product,
+ sminfo, sizeof(sminfo))) != NULL)
+ sminfop = fixstring(p);
+ if (sminfop)
+ strlcpy(smbios_board_name, sminfop,
+ sizeof(smbios_board_name));
+
+ sminfop = NULL;
+ if ((p = smbios_get_string(&btbl, board->serial,
+ sminfo, sizeof(sminfo))) != NULL)
+ sminfop = fixstring(p);
+ if (sminfop)
+ strlcpy(smbios_board_serial, sminfop,
+ sizeof(smbios_board_serial));
+ }
/*
* Some smbios implementations have no system vendor or
* product strings, some have very uninformative data which is
Index: sys/arch/i386/i386/bios.c
===================================================================
RCS file: /cvs/src/sys/arch/i386/i386/bios.c,v
retrieving revision 1.123
diff -u -p -r1.123 bios.c
--- sys/arch/i386/i386/bios.c 4 Aug 2019 14:28:58 -0000 1.123
+++ sys/arch/i386/i386/bios.c 19 Oct 2019 04:27:00 -0000
@@ -141,6 +141,9 @@ const char *smbios_uninfo[] = {
char smbios_bios_date[64];
+char smbios_board_vendor[64];
+char smbios_board_name[64];
+char smbios_board_serial[64];
int
biosprobe(struct device *parent, void *match, void *aux)
@@ -962,8 +965,34 @@ smbios_info(char *str)
havebb = smbios_find_table(SMBIOS_TYPE_BASEBOARD, &btbl);
sys = (struct smbios_sys *)stbl.tblhdr;
- if (havebb)
+ if (havebb) {
board = (struct smbios_board *)btbl.tblhdr;
+
+ sminfop = NULL;
+ if ((p = smbios_get_string(&btbl, board->vendor,
+ sminfo, sizeof(sminfo))) != NULL)
+ sminfop = fixstring(p);
+ if (sminfop)
+ strlcpy(smbios_board_vendor, sminfop,
+ sizeof(smbios_board_vendor));
+
+ sminfop = NULL;
+ if ((p = smbios_get_string(&btbl, board->product,
+ sminfo, sizeof(sminfo))) != NULL)
+ sminfop = fixstring(p);
+ if (sminfop)
+ strlcpy(smbios_board_name, sminfop,
+ sizeof(smbios_board_name));
+
+ sminfop = NULL;
+ if ((p = smbios_get_string(&btbl, board->serial,
+ sminfo, sizeof(sminfo))) != NULL)
+ sminfop = fixstring(p);
+ if (sminfop)
+ strlcpy(smbios_board_serial, sminfop,
+ sizeof(smbios_board_serial));
+ }
+
/*
* Some smbios implementations have no system vendor or
* product strings, some have very uninformative data which is
Index: sys/dev/pci/drm/drm_linux.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/drm_linux.c,v
retrieving revision 1.49
diff -u -p -r1.49 drm_linux.c
--- sys/dev/pci/drm/drm_linux.c 27 Aug 2019 11:46:07 -0000 1.49
+++ sys/dev/pci/drm/drm_linux.c 19 Oct 2019 04:21:27 -0000
@@ -352,28 +352,56 @@ timeval_to_us(const struct timeval *tv)
extern char *hw_vendor, *hw_prod, *hw_ver;
+#if NBIOS > 0
+extern char smbios_board_vendor[];
+extern char smbios_board_name[];
+extern char smbios_board_serial[];
+#endif
+
bool
dmi_match(int slot, const char *str)
{
switch (slot) {
case DMI_SYS_VENDOR:
- case DMI_BOARD_VENDOR:
if (hw_vendor != NULL &&
!strcmp(hw_vendor, str))
return true;
break;
case DMI_PRODUCT_NAME:
- case DMI_BOARD_NAME:
if (hw_prod != NULL &&
!strcmp(hw_prod, str))
return true;
break;
case DMI_PRODUCT_VERSION:
- case DMI_BOARD_VERSION:
if (hw_ver != NULL &&
!strcmp(hw_ver, str))
return true;
break;
+#if NBIOS > 0
+ case DMI_BOARD_VENDOR:
+ if (strcmp(smbios_board_vendor, str) == 0)
+ return true;
+ break;
+ case DMI_BOARD_NAME:
+ if (strcmp(smbios_board_name, str) == 0)
+ return true;
+ break;
+ case DMI_BOARD_SERIAL:
+ if (strcmp(smbios_board_serial, str) == 0)
+ return true;
+ break;
+#else
+ case DMI_BOARD_VENDOR:
+ if (hw_vendor != NULL &&
+ !strcmp(hw_vendor, str))
+ return true;
+ break;
+ case DMI_BOARD_NAME:
+ if (hw_prod != NULL &&
+ !strcmp(hw_prod, str))
+ return true;
+ break;
+#endif
case DMI_NONE:
default:
return false;