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/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253915

--- 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 = bus_read_1(sc->tbar, PCHTHERM_REG_TSEL);
-                       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 = bus_read_1(sc->tbar, PCHTHERM_REG_TSC);
+       val = 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 into
kernel (device pchtherm) which doesn't work. It can only compiled as a kernel
module. 

Thanks,
Michal

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

home | help

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