Mac OS X on x86 Hardware 2008–2024 Technical Archive
InfiniteMac OSx86 › OSx86 Core & 10.X › Device (TPM), help with removing its code from DSDT
8,611 reads · 2010-08-22 – 2010-08-31
Dossier 10.X Core DSDT

Device (TPM), help with removing its code from DSDT

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…

Primary Author
@Drule Published 2010-08-22
Collection
OSx86 Core & 10.X
Archival Footprint
8,611 historical reads · 4 curated field notes (from 13 dispatches) · 2010-08-22 – 2010-08-31
Credited Voices (3)
@Drule (8)@scififan68 (4)@kirasir

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.

                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.

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:

Author Updates & Technical Revisions

Follow-up dispatches by @Drule

Author Update #1 @Drule 2010-08-28 ↳ Re: @scififan68
@scififan68There'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.

Author Update #2 @Drule 2010-08-28

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.

Author Update #3 @Drule 2010-08-28

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

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.

Author Update #4 @Drule 2010-08-28

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.

Author Update #5 @Drule 2010-08-31

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

Thanks for the info.

Synthesized Community Field Notes

4 technical responses curated from 13 original dispatches

Field Note #1 @scififan68 2010-08-28

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.

Field Note #2 @scififan68 2010-08-28

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.

Field Note #3 @scififan68 2010-08-28

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

Field Note #4 @scififan68 2010-08-28

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

Corroborated & Participated: @kirasir
Sources & Contributor Provenance (3 credited usernames · Thread #6503)
UsernameDossier ContributionDispatchesActive Window
@DrulePrimary Author82010-08-22 → 2010-08-31
@scififan68Core Contributor42010-08-28
@kirasirContributor12010-08-30