InfiniteMac OSx86

InfiniteMac OSx86 (http://infinitemac.com/forum.php)
-   10.X (http://infinitemac.com/forumdisplay.php?f=36)
-   -   Device (TPM), help with removing its code from DSDT (http://infinitemac.com/showthread.php?t=6503)

Drule 08-22-2010 11:41 AM

Device (TPM), help with removing its code from DSDT
 
1 Attachment(s)
Just found out that the TPM device is a rarely used security feature that is part of some Intel chipsets, and doesn't seem to be used at all by OSX/Apple.

TPMM and TPMA look to be directly related to TPM, so I see no problem in removing them as they only appear in the code below.

Code:

                OperationRegion (TPMM, SystemMemory, 0xFED40000, One)
                Field (TPMM, AnyAcc, NoLock, Preserve)
                {
                    TPMA,  8
                }

                Scope (\_SB.PCI0.LPCB)
                {
                    Device (TPM)
                    {
                        Name (_HID, EisaId ("PNP0C31"))
                        Name (_UID, One)
                        Name (_CRS, ResourceTemplate ()
                        {
                            Memory32Fixed (ReadOnly,
                                0xFED40000,        // Address Base
                                0x00005000,        // Address Length
                                )
                        })
                        Method (_STA, 0, NotSerialized)
                        {
                            If (LEqual (TPMA, 0xFF))
                            {
                                Return (Zero)
                            }
                            Else
                            {
                                If (TPME)
                                {
                                    Return (0x0F)
                                }
                                Else
                                {
                                    Return (0x0B)
                                }
                            }
                        }
                    }

But TPME is used in an IndexField declaration (see below), but is only used in the TPM Device code above.

Code:

IndexField (CMSI, CMSD, ByteAcc, NoLock, Preserve)
    {
                Offset (0x6E),
        WAS4,  8,
        OSTY,  7,
        OSEF,  1,
                Offset (0x7D),
        HPEE,  1,
                Offset (0x7E),
            ,  2,
        MSEP,  1,
            ,  1,
        TPME,  1,
            ,  1,
        KBEP,  1,
        MSAR,  1
    }

So what I would like to know is whether to just leave TPME in the above IndexField, and delete all the other TPM related stuff. Or should I remove TPME completely, perhaps replacing it with some type of place holder?

What do the experts suggest, and has anyone else come across the TMP device in their DSDT and removed it?

Here is my DSDT file, for those interested:

Drule 08-25-2010 12:04 PM

No advice at all?

Drule 08-28-2010 01:33 PM

Anybody out there? :)

scififan68 08-28-2010 06:24 PM

I think it would be easier to leave it alone, there could be stuff else where so when you remove any tpm related stuff those your dsdt won't compile.

Drule 08-28-2010 07:36 PM

Quote:

Originally Posted by scififan68 (Post 50369)
There's no need to remove it, it doesn't nothing. Just make sure it's disabled in your bios and remake the dsdt and it should gone then.

I did a thorough search of the DSDT, and only the above code and variable/constant is referenced by it. Unfortunately, my BIOS does not have an option to disable it.

I'm really trying to remove all the excess code from my DSDT, and TPM is not used by OSX, so I'd like to take it out.

scififan68 08-28-2010 08:08 PM

1 Attachment(s)
Well i just took a look at your dsdt and I i removed "TPME, 1," and the whole "Device (TPM)" and it came out with no errors:

ASL Input: dsdt.dsl - 4574 lines, 153953 bytes, 1456 keywords
AML Output: DSDT.aml - 13901 bytes, 458 named objects, 998 executable opcodes

Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 9 Optimizations

But when i removed
"TPMA, 8"
I got 65 errors
fixed dsdt attached.

Drule 08-28-2010 08:29 PM

Thanks for the effort, but I've already done that to test it out. What I would like to know is what effect leaving the TPME value in IndexField may have down the road. But it would be nice to know why the OperationRegion(TPMM...) needs to be left in, so as not to generate all the errors ...

Thanks again for all the help.

scififan68 08-28-2010 08:38 PM

I figured it out, you remove the entire
"

OperationRegion (TPMM, SystemMemory, 0xFED40000, One)
Field (TPMM, AnyAcc, NoLock, Preserve)
{
TPMA, 8
}"
and it compiles

ASL Input: dsdt.dsl - 4568 lines, 153761 bytes, 1454 keywords
AML Output: DSDT.aml - 13875 bytes, 456 named objects, 998 executable opcodes

Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 9 Optimizations

Drule 08-28-2010 08:48 PM

I completely missed the part in your post where you removed the TPME from IndexField :D

Thanks again, this is nice to know. But I would really like to know more info about the IndexField code, as it seems that removing a value from the middle of a declaration, without replacing it with some sort of place holder, will only result in trouble down the line.

scififan68 08-28-2010 08:56 PM

Too me it looks like IndexField has to stay in there.

Drule 08-28-2010 09:18 PM

I would definitely say it has to remain, as the other values are referenced throughout the DSDT. What I'm worried about is with the removal of TPME, the KBEP and MSAR references will not point to their proper values.

kirasir 08-30-2010 10:08 PM

Code:

IndexField (CMSI, CMSD, ByteAcc, NoLock, Preserve)
    {
                Offset (0x6E),
        WAS4,  8,
        OSTY,  7,
        OSEF,  1,
                Offset (0x7D),
        HPEE,  1,
                Offset (0x7E),
                ,  2,
        MSEP,  1,
                ,  1,
                ,  1,
                ,  1,
        KBEP,  1,
        MSAR,  1
    }

and remove TRM

Drule 08-31-2010 04:40 AM

Ok, so just so long as I leave the comma in place, everything will be alright.

Thanks for the info.