Contribute
Register

dsdt advanced editing need help learning

Status
Not open for further replies.
Joined
Aug 24, 2010
Messages
50
Motherboard
self built
CPU
i5 3570K
Graphics
HD4000
Mac
  1. 0
Classic Mac
  1. 0
Mobile Phone
  1. 0
okies I know the info is somewhere out there but catch is that most of the info is A. scattered all over, B. Most of the tutorials really just tell you to use this or that patch someone has created or use this or that automated tool :(

for example my laptop no one has created a dsdt yet, at least not a fully functioning one.
It's the samsung princeton series 3 laptop.

I got lion installed on it with easybeast but in 64-bit mode it crashes during boot more often than not unless I boot -s first and then run fsck and mount and then exit into OSX

the following things I would like to do:
#1
fix the cpu kernel panic that happens a lot.
The original cpu code in the dsdt looks like this :
Code:
  Scope (\_PR)
    {
        Processor (CPU0, 0x01, 0x00000410, 0x06) {}
        Processor (CPU1, 0x02, 0x00000410, 0x06) {}
        Processor (CPU2, 0x03, 0x00000410, 0x06) {}
        Processor (CPU3, 0x04, 0x00000410, 0x06) {}
        Processor (CPU4, 0x05, 0x00000410, 0x06) {}
        Processor (CPU5, 0x06, 0x00000410, 0x06) {}
        Processor (CPU6, 0x07, 0x00000410, 0x06) {}
        Processor (CPU7, 0x08, 0x00000410, 0x06) {}
    }
Now the princeton series 3 laptop has only an i3 2cpu's with hyper threading, which means that it should only have 4 cpu's 0-3 or 1-4 I dunno which would be specifically for mac OSX I would have to extract the dsdt out of the mac firmware to see how it's exactly handled.

then there is the wake sad to say this one os quite a bit longer than usual and has a bunch if if clauses and well the zero zero fix I dunno if that is needed because in this dsdt it ends with a hex version.
Code:
    Method (_WAK, 1, Serialized)
    {
        P8XH (0x00, 0xAB)
        If (LEqual (Arg0, 0x04)) {}
        If (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04)))
        {
            If (LEqual (ECON, 0x01))
            {
                If (LOr (LEqual (And (\TRBO, 0x80), 0x80), LNotEqual (
                    \_SB.PCI0.LPCB.H_EC.TIST, 0x01)))
                {
                    If (LNotEqual (\_SB.PCI0.LPCB.H_EC.TIST, \TZON))
                    {
                        Store (0x01, \GSSR)
                        Store (\_SB.PCI0.LPCB.H_EC.TIST, \TZON)
                        CPRN ()
                    }
                }
            }

            If (LEqual (OSYS, 0x07D2))
            {
                If (And (CFGD, 0x01))
                {
                    If (LEqual (TZON, 0x02))
                    {
                        Store (TZON, Local0)
                        Store (0x01, TZON)
                        CPRN ()
                        Store (Local0, TZON)
                        CPRN ()
                    }
                    Else
                    {
                        Store (TZON, Local0)
                        Store (0x02, TZON)
                        CPRN ()
                        Store (Local0, TZON)
                        CPRN ()
                    }
                }
            }

            If (LEqual (\ECON, 0x01))
            {
                If (LNotEqual (LIDS, \_SB.PCI0.LPCB.H_EC.LSTE))
                {
                    Store (\_SB.PCI0.LPCB.H_EC.LSTE, LIDS)
                    If (IGDS)
                    {
                        If (\_SB.PCI0.GFX0.GLID (LIDS))
                        {
                            Or (0x80000000, \_SB.PCI0.GFX0.CLID, \_SB.PCI0.GFX0.CLID)
                        }
                    }

                    Notify (\_SB.LID0, 0x80)
                }

                If (LNotEqual (\_SB.PCI0.LPCB.H_EC.ACEX, PWRS))
                {
                    Store (\_SB.PCI0.LPCB.H_EC.ACEX, PWRS)
                    Store (\_SB.PCI0.LPCB.H_EC.ACEX, SPWR)
                    CCRN ()
                }
            }

            If (LEqual (RP1D, 0x00))
            {
                Notify (\_SB.PCI0.RP01, 0x00)
            }

            If (LEqual (Arg0, 0x03))
            {
                SECS (0xF1)
                If (LEqual (\RELT, 0xBA))
                {
                    Notify (\_SB.PWRB, 0x02)
                }
            }

            If (LEqual (Arg0, 0x04))
            {
                SECS (0xF1)
            }
        }

        If (LEqual (ECON, 0x01))
        {
            Store (\_SB.PCI0.LPCB.H_EC.B1AF, Local0)
            ShiftRight (Local0, 0x10, Local0)
            And (Local0, 0xFFFF, Local0)
            If (LNotEqual (Local0, \BFCC))
            {
                Notify (\_SB.BAT1, 0x01)
                Notify (\_SB.BAT1, 0x81)
            }
        }

        P8XH (0x00, 0xAC)
        Return (Package (0x02)
        {
         [color=#FF0000]   0x00, 
            0x00[/color]
        })
    }
now I would like to enable had audio but it's HDA however it's not in the 8xx it's ALC269 there should be a way to enable that with dsdt however I have no clue how and I dunno how that will effect dual boot situations. But on one hopeful part the original code does name it as hdef and not azalea so I dunno if there is even anything to fix here I might just have to patch the apple had audio though.
here's the code in the dsdt.
Code:
  Device (HDEF)
            {
                Name (_ADR, 0x001B0000)
                OperationRegion (HDAR, PCI_Config, 0x4C, 0x10)
                Field (HDAR, WordAcc, NoLock, Preserve)
                {
                    DCKA,   1, 
                            Offset (0x01), 
                    DCKM,   1, 
                        ,   6, 
                    DCKS,   1, 
                            Offset (0x08), 
                        ,   15, 
                    PMES,   1
                }
            }
Sorry for the long post but I really want to learn so I could use your input
terramir
 
i have the same laptop as u and to get past the kernel panic type "busratio=20 cpus=2" with out quotes in boot flag. Also are you able to boot from your HDD or do u have to boot from a CD?
This should help you out to create a custom audio kext: http://www.osx86.net/audio-sound/12784- ... eaker.html
 
voodooHDA is what I'm trying to avoid (it causes random kernel panics) and well that line I could do but it would disable hyper-threading what's the point in that. The only difference between an i3 and the i5 is that the i3 doesn't have turboboost. So it should not be a problem for macOS to run on, with native power-management.
Just need to get the DSDT CRP together.
I really want to learn how to do this from scratch, this is the point of my post.
terramir
 
lol the guy said it unfortunately the developer's rarely delve into why you patch this or that and what those patches do lol.
That my friends is exactly my problem.
Because this is the knowledge I need, because I'm a bit more ambitious then just editing my dsdt I want to be able to edit my dsdt in a way that will allow me to use one kext to make most of the stuff work and maybe depending on which computer I'm working on an audio enabler kext or a video efi string as well. If I could truly learn everything there is to know about apple's screwed up implementation and how it compares to the generic intel syntax I might be able to do miraculous things LOL.
But there is sooo many results on google and every link I have clicked get's me the same old do this and edit this this way and no explanation whatsoever.
Help
terramir
 
I know what u mean I am currently on the same boat my audio wifi and Ethernet do not work at the moment and i am currently figuring out how to do all this stuff I'll let u know what I learn as I go I'll try to help u as best as possible.
 
Status
Not open for further replies.
Back
Top