Jump to content

CPU fan speed cannot be displayed, how to add H_ EC patch


Devon..
 Share

13 posts in this topic

Recommended Posts

CPU fan speed cannot be displayed, how to add H_ EC patch

 

                Device (H_EC)
                {
                    Name (ACST, One)
                    Name (_HID, EisaId ("PNP0C09") /* Embedded Controller Device */)  // _HID: Hardware ID
                    Name (_UID, One)  // _UID: Unique ID
                    Name (BAON, Zero)
                    Name (WBON, Zero)
                    Method (BEEP, 1, NotSerialized)
                    {
                        If ((Arg0 == 0x02))
                        {
                            WBON = Zero
                        }

                        Local2 = WBON /* \_SB_.PCI0.LPCB.H_EC.WBON */
                        If (BAON)
                        {
                            If ((Arg0 == Zero))
                            {
                                BAON = Zero
                                If (WBON)
                                {
                                    Local0 = 0x03
                                    Local1 = 0x08
                                }
                                Else
                                {
                                    Local0 = Zero
                                    Local1 = Zero
                                }
                            }
                            Else
                            {
                                Local0 = 0xFF
                                Local1 = 0xFF
                                If ((Arg0 == 0x11))
                                {
                                    WBON = Zero
                                }

                                If ((Arg0 == 0x10))
                                {
                                    WBON = One
                                }
                            }
                        }
                        Else
                        {
                            Local0 = Arg0
                            Local1 = 0xFF
                            If ((Arg0 == 0x0F))
                            {
                                Local0 = Arg0
                                Local1 = 0x08
                                BAON = One
                            }

                            If ((Arg0 == 0x11))
                            {
                                Local0 = Zero
                                Local1 = Zero
                                WBON = Zero
                            }

                            If ((Arg0 == 0x10))
                            {
                                Local0 = 0x03
                                Local1 = 0x08
                                WBON = One
                            }
                        }

                        If ((Arg0 == 0x02))
                        {
                            WBON = Zero
                            If (Local2)
                            {
                                Local0 = 0x06
                                If (((SPS == 0x03) || (SPS == 0x04)))
                                {
                                    Local2 = Zero
                                    Local0 = 0xFF
                                    Local1 = 0xFF
                                }
                            }
                        }

                        If ((Arg0 == 0x06))
                        {
                            If (Local2)
                            {
                                Local2 = Zero
                                Local0 = 0xFF
                                Local1 = 0xFF
                            }
                        }

                        If (H8DR)
                        {
                            If ((Local2 && !WBON))
                            {
                                HSUN = Zero
                                Sleep (0x64)
                            }

                            If ((Local1 != 0xFF)){}
                            If ((Local0 != 0xFF))
                            {
                                HSUN = Local0
                            }
                        }
                        Else
                        {
                            If ((Local2 && !WBON))
                            {
                                WBEC (0xBE, Zero)
                                Sleep (0x64)
                            }

                            If ((Local1 != 0xFF)){}
                            If ((Local0 != 0xFF))
                            {
                                WBEC (0xBE, Local0)
                            }
                        }

                        If ((Arg0 == 0x02))
                        {
                            Sleep (0x012C)
                        }

                        If ((Arg0 == 0x06))
                        {
                            Sleep (0x01F4)
                        }
                    }

                    Method (LED, 1, NotSerialized)
                    {
                        If (H8DR)
                        {
                            MLED = Arg0
                        }
                        Else
                        {
                            Local0 = (RBEC (0x0B) & 0xFD)
                            Local0 |= Arg0
                            WBEC (0x0B, Local0)
                        }
                    }

                    Method (SYSC, 1, NotSerialized)
                    {
                        If (H8DR)
                        {
                            HLCL = Arg0
                        }
                        Else
                        {
                            WBEC (0x76, Arg0)
                        }
                    }

                    Method (_Q4C, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        If (HB0A)
                        {
                            Notify (BAT0, 0x80) // Status Change
                        }
                    }

                    Method (_Q40, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        Notify (BAT0, 0x81) // Information Change
                    }

                    Method (_Q41, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        Notify (BAT0, 0x81) // Information Change
                    }

                    Method (_Q48, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        Notify (BAT0, 0x80) // Status Change
                    }

                    Method (_Q24, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        Notify (BAT0, 0x80) // Status Change
                    }

                    OperationRegion (ECOR, EmbeddedControl, Zero, 0x0100)
                    Field (ECOR, ByteAcc, NoLock, Preserve)
                    {
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                        Offset (0x01), 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                        Offset (0x02), 
                        HIID,   8, 
                            ,   5, 
                            ,   2, 
                        Offset (0x05), 
                            ,   1, 
                        Offset (0x06), 
                        Offset (0x07), 
                        Offset (0x08), 
                        Offset (0x0B), 
                        MLED,   2, 
                        Offset (0x0C), 
                        Offset (0x0D), 
                        Offset (0x0E), 
                            ,   2, 
                        Offset (0x0F), 
                            ,   6, 
                            ,   1, 
                        Offset (0x10), 
                        SCI1,   1, 
                        SCI2,   1, 
                        Offset (0x11), 
                        Offset (0x12), 
                        Offset (0x13), 
                        Offset (0x14), 
                        Offset (0x15), 
                        Offset (0x16), 
                        Offset (0x17), 
                        Offset (0x18), 
                        HMPR,   8, 
                        Offset (0x1A), 
                        Offset (0x1B), 
                        Offset (0x1C), 
                        Offset (0x1D), 
                        Offset (0x1E), 
                        Offset (0x1F), 
                        Offset (0x20), 
                        Offset (0x23), 
                        Offset (0x24), 
                        Offset (0x26), 
                            ,   2, 
                            ,   2, 
                        Offset (0x27), 
                        Offset (0x2A), 
                        Offset (0x2B), 
                        Offset (0x2C), 
                        Offset (0x2D), 
                        Offset (0x2E), 
                        Offset (0x2F), 
                        Offset (0x30), 
                            ,   6, 
                            ,   1, 
                        Offset (0x31), 
                            ,   2, 
                            ,   1, 
                        Offset (0x32), 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                        Offset (0x33), 
                            ,   1, 
                        Offset (0x34), 
                            ,   7, 
                        Offset (0x35), 
                        Offset (0x36), 
                        Offset (0x38), 
                            ,   7, 
                        Offset (0x39), 
                            ,   7, 
                        Offset (0x3A), 
                            ,   1, 
                            ,   2, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                        Offset (0x3B), 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                        Offset (0x3C), 
                        Offset (0x46), 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                        Offset (0x47), 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                            ,   3, 
                            ,   1, 
                        Offset (0x48), 
                            ,   1, 
                            ,   1, 
                            ,   2, 
                            ,   1, 
                            ,   1, 
                            ,   1, 
                        Offset (0x4E), 
                        Offset (0x50), 
                            ,   3, 
                        HWLO,   1, 
                        Offset (0x51), 
                        HFNE,   1, 
                        SNLK,   1, 
                            ,   1, 
                        HWFN,   1, 
                            ,   1, 
                        NULS,   1, 
                            ,   1, 
                        HMDN,   1, 
                        DCWL,   1, 
                        DCBD,   1, 
                        DCWW,   1, 
                            ,   4, 
                        OVRQ,   1, 
                        HFNS,   2, 
                        Offset (0x58), 
                        PWML,   8, 
                        PWMH,   8, 
                        Offset (0x5B), 
                            ,   2, 
                        HUBS,   1, 
                        Offset (0x70), 
                            ,   1, 
                        HPLD,   1, 
                            ,   3, 
                        HPAC,   1, 
                        Offset (0x71), 
                        Offset (0x76), 
                        HLCL,   8, 
                        Offset (0x78), 
                        Offset (0x79), 
                        Offset (0x80), 
                        Offset (0x81), 
                        Offset (0x82), 
                        Offset (0x83), 
                        Offset (0x84), 
                        Offset (0x86), 
                        Offset (0x88), 
                        HB0S,   7, 
                        HB0A,   1, 
                            ,   7, 
                        Offset (0x8A), 
                            ,   7, 
                        Offset (0x8B), 
                            ,   7, 
                        Offset (0x8C), 
                        DBG0,   8, 
                            ,   3, 
                            ,   3, 
                        Offset (0x8E), 
                        Offset (0x92), 
                        CSSK,   1, 
                        CTTK,   1, 
                        DTTK,   1, 
                        OSDK,   1, 
                        VTPK,   1, 
                        Offset (0x93), 
                        Offset (0x95), 
                        FSP1,   8, 
                        Offset (0xA8), 
                        TMP0,   8, 
                        Offset (0xB0), 
                        Offset (0xB4), 
                        Offset (0xB8), 
                        Offset (0xB9), 
                        Offset (0xBA), 
                        Offset (0xBE), 
                        HSUN,   4, 
                        Offset (0xBF), 
                            ,   3, 
                        HSPA,   1, 
                        Offset (0xC0), 
                            ,   4, 
                        KBDL,   1, 
                        Offset (0xC1), 
                        APSL,   1, 
                        TPDS,   1, 
                        Offset (0xC8), 
                        Offset (0xC9), 
                        Offset (0xCA), 
                        Offset (0xCC), 
                        Offset (0xCD), 
                        Offset (0xCE), 
                        Offset (0xED), 
                            ,   4, 
                            ,   1
                    }

                    OperationRegion (ECMB, SystemMemory, 0xFE802000, 0x0200)
                    Field (ECMB, ByteAcc, Lock, Preserve)
                    {
                        Offset (0x02), 
                            ,   1, 
                        KLID,   1, 
                            ,   3, 
                        KACS,   1, 
                        BMBA,   1, 
                        BSBA,   1, 
                        Offset (0x08), 
                        NB0S,   8, 
                        NB1S,   8, 
                        Offset (0x58), 
                        BMAV,   8, 
                        BMIV,   8, 
                        BFSS,   8, 
                        WADA,   8, 
                        BACF,   1, 
                        AADN,   1, 
                        BFDV,   1, 
                        BCPM,   1, 
                        BTER,   1, 
                        BTCC,   1, 
                        Offset (0x5F), 
                        BSLB,   8, 
                        Offset (0x80), 
                        BRC1,   8, 
                        BRC2,   8, 
                        LFC1,   8, 
                        LFC2,   8, 
                        BSC1,   8, 
                        BSC2,   8, 
                        BAC1,   8, 
                        BAC2,   8, 
                        BVT1,   8, 
                        BVT2,   8, 
                        BTM1,   8, 
                        BTM2,   8, 
                        BCU1,   8, 
                        BCU2,   8, 
                        BTV1,   8, 
                        BTV2,   8, 
                        BDC1,   8, 
                        BDC2,   8, 
                        BDV1,   8, 
                        BDV2,   8, 
                        BSN1,   8, 
                        BSN2,   8, 
                        BMA1,   8, 
                        BMA2,   8, 
                        Offset (0x9A), 
                        Offset (0x9C), 
                        BST1,   8, 
                        BST2,   8, 
                        CYC1,   8, 
                        CYC2,   8, 
                        Offset (0xA8), 
                        CGV1,   8, 
                        CGV2,   8, 
                        BMD1,   8, 
                        BMD2,   8, 
                        CGC1,   8, 
                        CGC2,   8, 
                        BMX1,   8, 
                        BMX2,   8, 
                        RTE1,   8, 
                        RTE2,   8, 
                        ATE1,   8, 
                        ATE2,   8, 
                        ATF1,   8, 
                        ATF2,   8, 
                        MF11,   8, 
                        MF12,   8, 
                        MF21,   8, 
                        MF22,   8, 
                        Offset (0xBC), 
                        Offset (0xBE), 
                        BSI1,   8, 
                        BSI2,   8, 
                        BMN0,   8, 
                        BMN1,   8, 
                        BMN2,   8, 
                        BMN3,   8, 
                        BMN4,   8, 
                        BMN5,   8, 
                        BMN6,   8, 
                        BMN7,   8, 
                        BMN8,   8, 
                        BMN9,   8, 
                        BMNA,   8, 
                        BMNB,   8, 
                        BMNC,   8, 
                        BMND,   8, 
                        BMNE,   8, 
                        BMNF,   8, 
                        BDN0,   8, 
                        BDN1,   8, 
                        BDN2,   8, 
                        BDN3,   8, 
                        BDN4,   8, 
                        BDN5,   8, 
                        BDN6,   8, 
                        BDN7,   8, 
                        BDN8,   8, 
                        BDN9,   8, 
                        BDNA,   8, 
                        BDNB,   8, 
                        BDNC,   8, 
                        BDND,   8, 
                        BDNE,   8, 
                        BDNF,   8, 
                        BDNX,   128, 
                        BCH0,   8, 
                        BCH1,   8, 
                        BCH2,   8, 
                        BCH3,   8, 
                        BCH4,   8, 
                        BCH5,   8, 
                        BCH6,   8, 
                        BCH7,   8, 
                        BCH8,   8, 
                        BCH9,   8, 
                        BCHA,   8, 
                        BCHB,   8, 
                        BCHC,   8, 
                        BCHD,   8, 
                        BCHE,   8, 
                        BCHF,   8, 
                        MFD0,   8, 
                        MFD1,   8, 
                        MFD2,   8, 
                        MFD3,   8, 
                        MFD4,   8, 
                        MFD5,   8, 
                        MFD6,   8, 
                        MFD7,   8, 
                        MFD8,   8, 
                        MFD9,   8, 
                        MFDA,   8, 
                        MFDB,   8, 
                        MFDC,   8, 
                        Offset (0x110), 
                        BUC0,   8, 
                        BUC1,   8, 
                        BUC2,   8, 
                        BUC3,   8, 
                        BUC4,   8, 
                        BUC5,   8, 
                        BUC6,   8, 
                        BUC7,   8, 
                        BUC8,   8, 
                        BUC9,   8, 
                        FUS1,   8, 
                        FUS2,   8, 
                        Offset (0x120), 
                        Offset (0x122), 
                        MFG0,   8, 
                        MFG1,   8, 
                        MFG2,   8, 
                        MFG3,   8, 
                        MFG4,   8, 
                        MFG5,   8, 
                        MFG6,   8, 
                        MFG7,   8, 
                        MFG8,   8, 
                        MFG9,   8, 
                        MFGA,   8, 
                        MFGB,   8, 
                        MFGC,   8, 
                        MFGD,   8, 
                        BBI0,   8, 
                        BBI1,   8, 
                        BBI2,   8, 
                        BBI3,   8, 
                        BBI4,   8, 
                        BBI5,   8, 
                        BBI6,   8, 
                        BBI7,   8, 
                        BWP1,   8, 
                        BWP2,   8, 
                        FET1,   8, 
                        FET2,   8, 
                        BAUI,   8
                    }

                    Field (ECMB, ByteAcc, Lock, Preserve)
                    {
                        Offset (0x80), 
                        BSRC,   16, 
                        BSFC,   16, 
                        BSPE,   16, 
                        BSAC,   16, 
                        BSVO,   16, 
                            ,   15, 
                        BSCM,   1, 
                        BSCU,   16, 
                        BSTV,   16, 
                        BSDC,   16, 
                        BSDV,   16, 
                        BSSN,   16, 
                        Offset (0xC0), 
                        BSMN,   128, 
                        BSDN,   256, 
                        BSCH,   128
                    }

                    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
                    {
                        Name (BFFR, ResourceTemplate ()
                        {
                            IO (Decode16,
                                0x0062,             // Range Minimum
                                0x0062,             // Range Maximum
                                0x00,               // Alignment
                                0x01,               // Length
                                )
                            IO (Decode16,
                                0x0066,             // Range Minimum
                                0x0066,             // Range Maximum
                                0x00,               // Alignment
                                0x01,               // Length
                                )
                        })
                        Return (BFFR) /* \_SB_.PCI0.LPCB.H_EC._CRS.BFFR */
                    }

                    Method (_STA, 0, NotSerialized)  // _STA: Status
                    {
                        If ((ECON == One))
                        {
                            Return (0x0F)
                        }

                        Return (Zero)
                    }

                    Method (GBIF, 3, NotSerialized)
                    {
                        If (Arg2)
                        {
                            Arg1 [One] = Ones
                            Arg1 [0x02] = Ones
                            Arg1 [0x04] = Ones
                            Arg1 [0x05] = Zero
                            Arg1 [0x06] = Zero
                        }
                        Else
                        {
                            Local0 = BSCM /* \_SB_.PCI0.LPCB.H_EC.BSCM */
                            Arg1 [Zero] = (Local0 ^ One)
                            If (Local0)
                            {
                                Local1 = (BSDC * 0x0A)
                            }
                            Else
                            {
                                Local1 = BSDC /* \_SB_.PCI0.LPCB.H_EC.BSDC */
                            }

                            Arg1 [One] = Local1
                            If (Local0)
                            {
                                Local2 = (BSFC * 0x0A)
                            }
                            Else
                            {
                                Local2 = BSFC /* \_SB_.PCI0.LPCB.H_EC.BSFC */
                            }

                            Arg1 [0x02] = Local2
                            Arg1 [0x04] = BSDV /* \_SB_.PCI0.LPCB.H_EC.BSDV */
                            Divide (Local2, 0x64, Local7, Local6)
                            Local3 = (Local6 * 0x05)
                            Arg1 [0x05] = Local3
                            Local4 = (0x03 * 0x02)
                            Local4 += One
                            Local4 *= Local6
                            Divide (Local4, 0x02, Local7, Local4)
                            Arg1 [0x06] = Local4
                            Arg1 [0x07] = (Local3 - Local4)
                            Arg1 [0x08] = (Local2 - Local3)
                            Local7 = BSSN /* \_SB_.PCI0.LPCB.H_EC.BSSN */
                            Name (SERN, Buffer (0x06)
                            {
                                "     "
                            })
                            Local6 = 0x04
                            While (Local7)
                            {
                                Divide (Local7, 0x0A, Local5, Local7)
                                SERN [Local6] = (Local5 + 0x30)
                                Local6--
                            }

                            Arg1 [0x0A] = SERN /* \_SB_.PCI0.LPCB.H_EC.GBIF.SERN */
                            Arg1 [0x09] = BSDN /* \_SB_.PCI0.LPCB.H_EC.BSDN */
                            Arg1 [0x0B] = BSCH /* \_SB_.PCI0.LPCB.H_EC.BSCH */
                            Arg1 [0x0C] = BSMN /* \_SB_.PCI0.LPCB.H_EC.BSMN */
                        }

                        Return (Arg1)
                    }

                    Method (GBST, 4, NotSerialized)
                    {
                        If ((Arg1 & 0x02))
                        {
                            Local0 = 0x02
                            If ((Arg1 & 0x20))
                            {
                                Local0 = Zero
                            }
                        }
                        ElseIf ((Arg1 & 0x04))
                        {
                            Local0 = One
                        }
                        Else
                        {
                            Local0 = Zero
                        }

                        If ((Arg1 & 0x10))
                        {
                            Local0 |= 0x04
                        }

                        If ((Arg1 & One))
                        {
                            Local1 = BSAC /* \_SB_.PCI0.LPCB.H_EC.BSAC */
                            Local2 = BSRC /* \_SB_.PCI0.LPCB.H_EC.BSRC */
                            If (ACST)
                            {
                                If ((Arg1 & 0x20))
                                {
                                    Local2 = BSFC /* \_SB_.PCI0.LPCB.H_EC.BSFC */
                                }
                            }

                            If (Arg2)
                            {
                                Local2 *= 0x0A
                            }

                            Local3 = BSVO /* \_SB_.PCI0.LPCB.H_EC.BSVO */
                            If ((Local1 >= 0x8000))
                            {
                                If ((Local0 & One))
                                {
                                    Local1 = (0x00010000 - Local1)
                                }
                                Else
                                {
                                    Local1 = Zero
                                }
                            }
                            ElseIf (((Local0 & 0x02) == Zero))
                            {
                                Local1 = Zero
                            }

                            If (Arg2)
                            {
                                Local1 *= Local3
                                Divide (Local1, 0x03E8, Local7, Local1)
                            }
                        }
                        Else
                        {
                            Local0 = Zero
                            Local1 = Ones
                            Local2 = Ones
                            Local3 = Ones
                        }

                        Arg3 [Zero] = Local0
                        Arg3 [One] = Local1
                        Arg3 [0x02] = Local2
                        Arg3 [0x03] = Local3
                        Return (Arg3)
                    }

                    Method (CHKS, 0, NotSerialized)
                    {
                        Local0 = 0x03E8
                        While (HMPR)
                        {
                            Sleep (One)
                            Local0--
                            If (!Local0)
                            {
                                Return (0x8080)
                            }
                        }

                        If (HMDN)
                        {
                            Return (Zero)
                        }

                        Return (0x8081)
                    }

 

DSDT-722.aml

Edited by ben liu
Link to comment
Share on other sites

22 hours ago, miliuco said:

Please complete your signature (user >> profile).

 

OpenCore or Clover? macOS version? Boot loader installed kexts? Where do you miss CPU fan speed?

 

OpenCore0.69 Big sur 11.4   Loading virtualsmc.kext YogaSMC.kext or fakesmc.kext cannot display the fan speed, 
In windows, you need to use “TP-FC 062E” to display and control the fan speed.

 

FD622A1A-FD1E-4D4B-97E3-991877D02500.thumb.png.e1bca1328f090c0e127db44b4dcc870b.png

QQ20210723-174517.png

Link to comment
Share on other sites

1 hour ago, Slice said:

There are no ready-to-use kext to see FAN on such laptop. Nor with VirtualSMC neither with FakeSMC.

I may propose the way to learn a logic in your DSDT and write SSDT-monitor.aml to use with ACPIMonitor.kext from FakeSMC project.

See here

[HOWTO] ACPI access for monitoring 

thanks,
I'll try adding SSDT monitor patch again
However, I can't see the support for EC controller on my motherboard in smcsuperio and acpimonitor,

IMG_1324.JPG

  • Thanks 1
Link to comment
Share on other sites

49 minutes ago, Devon.. said:

thanks,
I'll try adding SSDT monitor patch again
However, I can't see the support for EC controller on my motherboard in smcsuperio and acpimonitor,

IMG_1324.JPG

This is multifunctional microcontroller working under OEM specific firmware which we can't know.

So there is no kexts for this chip monitoring.

There is only way if you carefully read about ACPImonitor at the link I provided. Don't hurry! You have to understand my english or no way.

Link to comment
Share on other sites

9 hours ago, Slice said:

This is multifunctional microcontroller working under OEM specific firmware which we can't know.

So there is no kexts for this chip monitoring.

There is only way if you carefully read about ACPImonitor at the link I provided. Don't hurry! You have to understand my english or no way.

yes,I see,
But I don't know how to add SSDT monitor.aml,
Can you help me?

Link to comment
Share on other sites

Put your SSDT.aml into /EFI/CLOVER/ACPI/patched and it will be added to your system.

But the question is "How to write such SSDT". Don't expect dortania will help you.

Link to comment
Share on other sites

On 7/26/2021 at 2:03 PM, Slice said:

Put your SSDT.aml into /EFI/CLOVER/ACPI/patched and it will be added to your system.

But the question is "How to write such SSDT". Don't expect dortania will help you.

I changed it many times and couldn't solve it,
 

DefinitionBlock ("SSDT-10.aml", "SSDT", 2, "APPLE ", "Monitor", 0x00001000)
{
    External (\_SB.PCI0.LPCB.EC, DeviceObj)
    External (\_SB_.LID0, DeviceObj)
    External (\_SB_.LID0._LID, MethodObj)
    External (\_TZ.THM._TMP, MethodObj)
    External (\_TZ.C2K, MethodObj)
    External (\_SB.PCI0.LPCB.H_EC.TSC0, MethodObj)
    External (\_SB.PCI0.LPCB.H_EC.THS0, MethodObj)

	Scope (\_SB.PCI0.LPCB.EC)
	{	
                    Name (_HID, EisaId ("APP0111"))
                    Name (_CID, "monitor")
                    Name (TCRK, Zero)
                    Method (TCRR, 0, NotSerialized)
                    {
                        Return (TCRK)
                    }

                    Method (TCRW, 1, NotSerialized)
                    {
                        Store (Arg0, TCRK)
                        Return (TCRK)
                    }	
	}
    Scope (_TZ)
    {
        ThermalZone (THM)
        {
            Method (_CRT, 0, NotSerialized)
            {
                Store (\_TZ.C2K (\_SB.PCI0.LPCB.H_EC.TSC0), Local0)
                Return (Local0)
            }

            Method (_TMP, 0, NotSerialized)
            {
                Store (\_TZ.C2K (\_SB.PCI0.LPCB.H_EC.THS0), Local0)
                Return (Local0)
            }
        }
    }
}

 

Link to comment
Share on other sites

 

Thermal zone code in DSDT,

    Scope (_SB.PCI0.LPCB.H_EC)
    {
        Field (ECMB, ByteAcc, Lock, Preserve)
        {
            Offset (0x20), 
            THS0,   8, 
            THS1,   8, 
            THS2,   8, 
            THS3,   8, 
            THS4,   8, 
            THS5,   8, 
            THS6,   8, 
            THS7,   8, 
            Offset (0x53), 
            KCSS,   1, 
            KCTT,   1, 
            KDTT,   1, 
            KOSD,   1, 
            KVTP,   1, 
            Offset (0x54), 
            TSP0,   8, 
            TSC0,   8, 
            TSP1,   8, 
            TSC1,   8
        }
    }

    Scope (_TZ)
    {
        Name (TBSE, 0x0AAC)
        Name (CRT0, Zero)
        Name (PSV0, Zero)
        ThermalZone (TZS0)
        {
            Method (_TMP, 0, NotSerialized)  // _TMP: Temperature
            {
                Local0 = \_SB.PCI0.LPCB.H_EC.THS0
                Local1 = \_SB.PCI0.LPCB.H_EC.KCSS
                Local2 = \_SB.PCI0.LPCB.H_EC.KOSD
                If (Local2)
                {
                    If ((Local0 <= CRT0))
                    {
                        TSDL ()
                        Local0 = (CRT0 + 0x02)
                    }
                }

                Return (C2K (Local0))
            }

            Method (_CRT, 0, NotSerialized)  // _CRT: Critical Temperature
            {
                Local0 = \_SB.PCI0.LPCB.H_EC.TSC0
                If (((Local0 >= 0x80) || (Local0 < 0x1E)))
                {
                    Local0 = 0x78
                }

                CRT0 = Local0
                Return (C2K (Local0))
            }
        }

        ThermalZone (TZS1)
        {
            Method (_TMP, 0, NotSerialized)  // _TMP: Temperature
            {
                Local0 = \_SB.PCI0.LPCB.H_EC.THS1
                Return (C2K (Local0))
            }

            Method (_CRT, 0, NotSerialized)  // _CRT: Critical Temperature
            {
                Local0 = \_SB.PCI0.LPCB.H_EC.TSC1
                If (((Local0 >= 0x80) || (Local0 < 0x1E)))
                {
                    Local0 = 0x78
                }

                Return (C2K (Local0))
            }
        }

        Method (C2K, 1, NotSerialized)
        {
            Local0 = Arg0
            If ((Local0 <= 0x10))
            {
                Local0 = 0x1E
            }

            If ((Local0 >= 0x7F))
            {
                Local0 = 0x1E
            }

            Local0 = ((Local0 * 0x0A) + TBSE) /* \_TZ_.TBSE */
            Return (Local0)
        }
    }

 

Link to comment
Share on other sites

On 7/31/2021 at 5:47 PM, Devon.. said:

 

Thermal zone code in DSDT,


    Scope (_SB.PCI0.LPCB.H_EC)
    {
        Field (ECMB, ByteAcc, Lock, Preserve)
        {
            Offset (0x20), 
            THS0,   8, 
            THS1,   8, 
            THS2,   8, 
            THS3,   8, 
            THS4,   8, 
            THS5,   8, 
            THS6,   8, 
            THS7,   8, 
            Offset (0x53), 
            KCSS,   1, 
            KCTT,   1, 
            KDTT,   1, 
            KOSD,   1, 
            KVTP,   1, 
            Offset (0x54), 
            TSP0,   8, 
            TSC0,   8, 
            TSP1,   8, 
            TSC1,   8
        }
    }

    Scope (_TZ)
    {
        Name (TBSE, 0x0AAC)
        Name (CRT0, Zero)
        Name (PSV0, Zero)
        ThermalZone (TZS0)
        {
            Method (_TMP, 0, NotSerialized)  // _TMP: Temperature
            {
                Local0 = \_SB.PCI0.LPCB.H_EC.THS0
                Local1 = \_SB.PCI0.LPCB.H_EC.KCSS
                Local2 = \_SB.PCI0.LPCB.H_EC.KOSD
                If (Local2)
                {
                    If ((Local0 <= CRT0))
                    {
                        TSDL ()
                        Local0 = (CRT0 + 0x02)
                    }
                }

                Return (C2K (Local0))
            }

            Method (_CRT, 0, NotSerialized)  // _CRT: Critical Temperature
            {
                Local0 = \_SB.PCI0.LPCB.H_EC.TSC0
                If (((Local0 >= 0x80) || (Local0 < 0x1E)))
                {
                    Local0 = 0x78
                }

                CRT0 = Local0
                Return (C2K (Local0))
            }
        }

        ThermalZone (TZS1)
        {
            Method (_TMP, 0, NotSerialized)  // _TMP: Temperature
            {
                Local0 = \_SB.PCI0.LPCB.H_EC.THS1
                Return (C2K (Local0))
            }

            Method (_CRT, 0, NotSerialized)  // _CRT: Critical Temperature
            {
                Local0 = \_SB.PCI0.LPCB.H_EC.TSC1
                If (((Local0 >= 0x80) || (Local0 < 0x1E)))
                {
                    Local0 = 0x78
                }

                Return (C2K (Local0))
            }
        }

        Method (C2K, 1, NotSerialized)
        {
            Local0 = Arg0
            If ((Local0 <= 0x10))
            {
                Local0 = 0x1E
            }

            If ((Local0 >= 0x7F))
            {
                Local0 = 0x1E
            }

            Local0 = ((Local0 * 0x0A) + TBSE) /* \_TZ_.TBSE */
            Return (Local0)
        }
    }

 

You are on the right way.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...