Contribute
Register

How to build your own iMac Pro [Successful Build/Extended Guide]

Status
Not open for further replies.
Playing with DSDT injection.
Could anyone confirm if I'm doing the right thing?

With this injection, the Vega is properly described in About You Mac, though my 2nd screen is no longer working.

Code:
DefinitionBlock ("", "SSDT", 2, "hack", "Wake", 0x00000000)
{
    External (_SB_.PC02.BR2A, DeviceObj)    // (from opcode)
    External (_SB_.PC02.BR2A.GFX0, DeviceObj)    // (from opcode)
    External (GPRW, MethodObj)    // 2 Arguments (from opcode)

    Scope (_SB.PC02.BR2A.GFX0)
    {
        OperationRegion (PCIS, PCI_Config, Zero, 0x0100)
        Field (PCIS, AnyAcc, NoLock, Preserve)
        {
            PVID,   16,
            PDID,   16
        }

        Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
        {
            Return (GPRW (0x69, 0x04))
        }

        Device (GFXA)
        {
            Name (_ADR, Zero)  // _ADR: Address
            Device (GFX0)
            {
                Name (_ADR, Zero)  // _ADR: Address
                OperationRegion (PCIB, PCI_Config, Zero, 0x0100)
                Field (PCIB, AnyAcc, NoLock, Preserve)
                {
                    Offset (0x10),
                    BAR0,   32,
                    BAR1,   32,
                    BAR2,   64,
                    BAR4,   32,
                    BAR5,   32
                }

                Method (_INI, 0, NotSerialized)  // _INI: Initialize
                {
                    If (LEqual (BAR5, Zero))
                    {
                        Store (BAR2, Local0)
                    }
                    Else
                    {
                        Store (BAR5, Local0)
                    }

                    OperationRegion (GREG, SystemMemory, And (Local0, 0xFFFFFFF0), 0x8000)
                    Field (GREG, AnyAcc, NoLock, Preserve)
                    {
                        Offset (0x6800),
                        GENA,   32,
                        GCTL,   32,
                        LTBC,   32,
                        Offset (0x6810),
                        PSBL,   32,
                        SSBL,   32,
                        PTCH,   32,
                        PSBH,   32,
                        SSBH,   32,
                        Offset (0x6848),
                        FCTL,   32,
                        Offset (0x6EF8),
                        MUMD,   32
                    }

                    Store (Zero, FCTL)
                    Store (Zero, PSBH)
                    Store (Zero, SSBH)
                    Store (Zero, LTBC)
                    Store (One, GENA)
                    Store (Zero, MUMD)
                }

                Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                {
                    Store (Package (0x16)
                        {
                            "AAPL,slot-name",
                            Buffer (0x07)
                            {
                                "Slot-1"
                            },

                            "CFG,CFG_USE_AGDC",
                            Buffer (One)
                            {
                                 0x00
                            },

                            "PP,PP_DisableAutoWattman",
                            Buffer (One)
                            {
                                 0x00
                            },

                            "ATY,Part#",
                            Buffer (0x0C)
                            {
                                "113-3E366DU"
                            },

                            "@0,AAPL,boot-display",
                            Buffer (One)
                            {
                                 0x00
                            },

                            "@0,name",
                            Buffer (0x0D)
                            {
                                "ATY,Kamarang"
                            },

                            "@1,name",
                            Buffer (0x0D)
                            {
                                "ATY,Kamarang"
                            },

                            "@2,name",
                            Buffer (0x0D)
                            {
                                "ATY,Kamarang"
                            },

                            "@3,name",
                            Buffer (0x0D)
                            {
                                "ATY,Kamarang"
                            },

                            "model",
                            Buffer (0x13)
                            {
                                "AMD Radeon Vega 64"
                            },

                            "hda-gfx",
                            Buffer (0x0A)
                            {
                                "onboard-2"
                            }
                        }, Local0)
                    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                    Return (Local0)
                }
            }

            Device (HDAU)
            {
                Name (_ADR, One)  // _ADR: Address
                Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                {
                    Store (Package (0x0C)
                        {
                            "built-in",
                            Buffer (One)
                            {
                                 0x00
                            },

                            "AAPL,slot-name",
                            Buffer (0x07)
                            {
                                "Slot-1"
                            },

                            "layout-id",
                            Buffer (0x04)
                            {
                                 0x01, 0x00, 0x00, 0x00
                            },

                            "name",
                            Buffer (0x0D)
                            {
                                "AMD HD-Audio"
                            },

                            "model",
                            Buffer (0x0D)
                            {
                                "AMD HD-Audio"
                            },

                            "hda-gfx",
                            Buffer (0x0A)
                            {
                                "onboard-2"
                            }
                        }, Local0)
                    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                    Return (Local0)
                }
            }
        }
    }

    Method (DTGP, 5, NotSerialized)
    {
        If (LEqual (Arg0, ToUUID ("a0b5b7c6-1318-441c-b0c9-fe695eaf949b")))
        {
            If (LEqual (Arg1, One))
            {
                If (LEqual (Arg2, Zero))
                {
                    Store (Buffer (One)
                        {
                             0x03                                           
                        }, Arg4)
                    Return (One)
                }

                If (LEqual (Arg2, One))
                {
                    Return (One)
                }
            }
        }

        Store (Buffer (One)
            {
                 0x00                                           
            }, Arg4)
        Return (Zero)
    }
 }

with this, in the PCI section of the "AMD Radeon Vega 64" appears as:
ATY,Kamarang

While without it it would show as:
ATY,AMD,RadeonFramebuffer

No idea if one is preferred over the other.
In IORegistryExplorer the GFXO card will now show in:
PCI02.BR2A.GFX0.GFXA.GFX0

sounds rather complicated to me, would make sense in dual GPU setup, but not single one...
 
The value supposed to be returned RDMSR to check if MSR 0xE2 is unlocked.

The value I get isn't what you described (it returns 0x402, just like bdmesg)

Because you do not have a ASUS board! What the guide states is only valid for ASUS boards! So please do not state that the RDSMR value of the guide is wrong!
 
Because you do not have a ASUS board! What the guide states is only valid for ASUS boards! So please do not state that the RDSMR value of the guide is wrong!
I don't have an ASUS board *now*, but I did have an asus board before (same as yours). And just like the poster reported before, I thought I didn't have the MSR bit patched when in fact I did.

With the Asus board, when running RDMSR I didn't get
Code:
RDMSR e2 returns value 0x7e000003
I got:
Code:
RDMSR e2 returns value 0x402
 
I don't have an ASUS board *now*, but I did have an asus board before (same as yours). And just like the poster reported before, I thought I didn't have the MSR bit patched when in fact I did.

With the Asus board, when running RDMSR I didn't get
Code:
RDMSR e2 returns value 0x7e000003
I got:
Code:
RDMSR e2 returns value 0x402

Which is simply not correct. VoltageShift should yield: RDMSR e2 returns value 0x7e000003
 
Which is simply not correct. VoltageShift should yield: RDMSR e2 returns value 0x7e000003
well, it never showed that for me (nor for the other user), and MSR was unlocked. Maybe different board revisions...

On another topic, I installed the HWSensors kernel modules (compiled from source) and it shows different value that yours for my 7980xe:
Screen Shot 2018-02-23 at 9.25.33 am.png

macOS does see 18 cores:
Code:
$ sysctl hw.physicalcpu
hw.physicalcpu: 18

Wonder what the difference could be...
 
well, it never showed that for me (nor for the other user), and MSR was unlocked. Maybe different board revisions...

On another topic, I installed the HWSensors kernel modules (compiled from source) and it shows different value that yours for my 7980xe:
View attachment 315163

macOS does see 18 cores:
Code:
$ sysctl hw.physicalcpu
hw.physicalcpu: 18

Wonder what the difference could be...

Again you don‘t do what I suggested to do! No surprise that in your csse results are totally different and notjing works as expected. If you refuse the information I provide I am not able to further help or support you, sorry.

Good luck,

KGP
 
Again you don‘t do what I suggested to do! No surprise that in your csse results are totally different and notjing works as expected. If you refuse the information I provide I am not able to further help or support you, sorry.
KGP

I didn't not refuse any information you suggested, nor not do what you said I should do. I you had, I apologise.
Which information did I refuse? Or what didnt I do that you suggested I do?

Are you referring to me using a GB board in place of an Asus?
Processor temperatures and speed reading are totally independent of the board used (and I contributed code to the coretemp linux kernel module)

So it seems to me that I must have missed a post of yours, I've Re-read carefully what you have posted in regards to HWSensors, and I've followed every single steps.

I did change today the SMBIOS from imacpro to macpro6,1, without that my Vega doesn't work properly with my 5K screen (and doesn't support hotplugging a screen)
 
Which is simply not correct. VoltageShift should yield: RDMSR e2 returns value 0x7e000003
kgp
how else can I verify if my motherboard is unlocked? I did follow your procedure and I am also getting this:
RDMSR e2 returns value 0x402
 
kgp
how else can I verify if my motherboard is unlocked? I did follow your procedure and I am also getting this:
RDMSR e2 returns value 0x402

With the most recent patches provided by @interference, voltageshift must yield: RDMSR e2 returns value 0x7e000003.

No idea what you are doing or where you are doing something wrong..
 
I didn't not refuse any information you suggested, nor not do what you said I should do. I you had, I apologise.
Which information did I refuse? Or what didnt I do that you suggested I do?

Are you referring to me using a GB board in place of an Asus?
Processor temperatures and speed reading are totally independent of the board used (and I contributed code to the coretemp linux kernel module)

So it seems to me that I must have missed a post of yours, I've Re-read carefully what you have posted in regards to HWSensors, and I've followed every single steps.

I did change today the SMBIOS from imacpro to macpro6,1, without that my Vega doesn't work properly with my 5K screen (and doesn't support hotplugging a screen)

Nothing to do with the fact that you are using a Gigabyte board now..

But you still use HWMonitor instead of iStatmenus and I don't know if you use the Sensor kexts of @interference also as suggested..

Please don't say that you followed every single step, if obviously you didn't.. I mean how can you run HWMonitor and wonder that nothing works as expected, when you should use iStatMenus beta instead as clearly indicated?

The same likely states to your BIOS patching remarks, which are simply misleading for all other readers..
 
Status
Not open for further replies.
Back
Top