Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Mar 2021 14:53:59 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 253915] pchtherm0: Sensor enable failed
Message-ID:  <bug-253915-227-5YJHuiC6h5@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-253915-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-253915-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253915

--- Comment #4 from michal@microwave.sk ---
Hi,

I found another bug regarding the "SMI on alert" value. Value is read from
wrong register. Here is the patch fixing both bugs:

diff --git a/sys/dev/intel/pchtherm.c b/sys/dev/intel/pchtherm.c
index 13f0abc54b6..31d06a1bc26 100644
--- a/sys/dev/intel/pchtherm.c
+++ b/sys/dev/intel/pchtherm.c
@@ -163,7 +163,7 @@ static int pchtherm_attach(device_t dev)
                        bus_write_1(sc->tbar, PCHTHERM_REG_TSEL,
                                    PCHTHERM_GEN_ENABLE);
                        sc->enable =3D bus_read_1(sc->tbar, PCHTHERM_REG_TS=
EL);
-                       if (!(sc->enable & PCHTHERM_REG_TSEL)){
+                       if (!(sc->enable & PCHTHERM_GEN_ENABLE)) {
                                device_printf(dev, "Sensor enable failed\n"=
);
                                return 0;
                        }
@@ -178,7 +178,7 @@ static int pchtherm_attach(device_t dev)
        if (bootverbose) {
                FLAG_PRINT(dev, "SMBus report", val);
        }
-       val =3D bus_read_1(sc->tbar, PCHTHERM_REG_TSC);
+       val =3D bus_read_1(sc->tbar, PCHTHERM_REG_TSMIC);
        if (bootverbose) {
                FLAG_PRINT(dev, "SMI on alert", val);
        }

Honestly, I think this driver is pretty unfinished as of now.

If you decide to commit this, please use "Michal Vanco
<michal.vanco@gmail.com>" in the commit message.

There is another issue. pchtherm(4) man page says that it can be compiled i=
nto
kernel (device pchtherm) which doesn't work. It can only compiled as a kern=
el
module.=20

Thanks,
Michal

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-253915-227-5YJHuiC6h5>