Contribute
Register

(DSDTSE) Compil error 255 : Method (_DSM, 4, Serialized)

Status
Not open for further replies.
Joined
Oct 25, 2010
Messages
76
Motherboard
Asus Rampage V Extreme Edition 10
CPU
5820K
Graphics
Radeon RX5700
(DSDTSE) Compil error 1088/1081 : Method (_DSM, 4, Serialized)

Hey,

Every time i try to compil my dsdt.dsl with a device injection, it returns this same error :



/Users/Nicolas/Library/Application Support/EvOSoftware/DSDT/DSDTFiles/dsdt.dsl 9384: Method (_DSM, 4, Serialized)
Error 4057 - Name already exists in scope ^ (_DSM)





If anyone have a clue or lead.


Thank you.




Original errors when .dsl is compiled and untouched :


/Users/Nicolas/Library/Application Support/EvOSoftware/DSDT/DSDTFiles/dsdt.dsl 9372: Method (_DSM, 4, Serialized)
Warning 1088 - Not all control paths return a value ^ (_DSM)

/Users/Nicolas/Library/Application Support/EvOSoftware/DSDT/DSDTFiles/dsdt.dsl 9372: Method (_DSM, 4, Serialized)
Warning 1081 - Reserved method must return a value ^ (_DSM)


How to fix this please ?
 
Code:
            Method (_DSM, 4, Serialized)
            {
                Name (DRET, Buffer (0x04)
                {
                    0x00
                })
                If (LEqual (Arg0, Buffer (0x10)
                        {
                            /* 0000 */    0xE1, 0x75, 0x39, 0x6F, 0x82, 0x7A, 0x67, 0x4F,
                            /* 0008 */    0x8B, 0x97, 0x15, 0xBE, 0xE0, 0x60, 0xBE, 0xDF
                        }))
                {
                    If (LEqual (Arg2, Zero))
                    {
                        CreateWordField (DRET, Zero, F0SS)
                        Store (0x02, F0SS)
                        Return (DRET)
                    }
                    If (LEqual (Arg2, One))
                    {
                        If (LEqual (^^PEG0.PEGP.LNKV, 0x03))
                        {
                            Return (Zero)
                        }
                        Return (One)
                    }
                }
            }
        }
    }
    Scope (_PR)
 
Hey, try if this fixes your 1088/1081 warnings:

Code:
Method (_DSM, 4, Serialized)
{
    Name (DRET, Buffer (0x04)
    {
        0x00
    })
    If (LEqual (Arg0, Buffer (0x10)
            {
                /* 0000 */    0xE1, 0x75, 0x39, 0x6F, 0x82, 0x7A, 0x67, 0x4F,
                /* 0008 */    0x8B, 0x97, 0x15, 0xBE, 0xE0, 0x60, 0xBE, 0xDF
            }))
    {
        If (LEqual (Arg2, Zero))
        {
            CreateWordField (DRET, Zero, F0SS)
            Store (0x02, F0SS)
            Return (DRET)
        }
        If (LEqual (Arg2, One))
        {
            If (LEqual (^^PEG0.PEGP.LNKV, 0x03))
            {
                Return (Zero)
            }
            Return (One)
        }
    }
    Return (Zero)
}

Your "Error 4057 - Name already exists in scope ^ (_DSM)" is because you are trying to insert another DSM method. I also encountered this issue and solved it by using the serialized DSM method to inject the necessary code. It works but it isn't a perfect way to do it.
 
Thank you :)

It works, and with a space before too :

Code:
            Method (_DSM, 4, Serialized)
            {
                Name (DRET, Buffer (0x04)
                {
                    0x00
                })
                If (LEqual (Arg0, Buffer (0x10)
                        {
                            /* 0000 */    0xE1, 0x75, 0x39, 0x6F, 0x82, 0x7A, 0x67, 0x4F, 
                            /* 0008 */    0x8B, 0x97, 0x15, 0xBE, 0xE0, 0x60, 0xBE, 0xDF
                        }))
                {
                    If (LEqual (Arg2, Zero))
                    {
                        CreateWordField (DRET, Zero, F0SS)
                        Store (0x02, F0SS)
                        Return (DRET)
                    }

                    If (LEqual (Arg2, One))
                    {
                        If (LEqual (^^PEG0.PEGP.LNKV, 0x03))
                        {
                            Return (Zero)
                        }

                        Return (One)
                    }
                }

            Return (Zero)
            }


Does it makes a difference ?


and i don't get it :


"and solved it by using the serialized DSM method to inject the necessary code"

What do you mean ?


EDIT :


I still can't compil my dsdt when i try to inject a device :

Code:
/Users/Nicolas/Library/Application Support/EvOSoftware/DSDT/DSDTFiles/dsdt.dsl 9384: Method (_DSM, 4, Serialized)
Error 4057 - Name already exists in scope ^ (_DSM)


I am swimming..
 
It'd help if you uploaded the DSDT, both before you injected stuff and after, to let someone compare and see where you made the mistake. Without that information it is not easy to help.:)
 
Hi minihack,

My DSDT seems clean, look :


Code:
Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 39 Optimizations


It's not the first time i inject a device into a dsdt (something like four builds before this one) ; but in this one in particular, i struggle ; it's the first time i meet this compilation error :


Code:
/Users/Nicolas/Library/Application Support/EvOSoftware/DSDT/DSDTFiles/dsdt.dsl 9384: Method (_DSM, 4, Serialized)
Error 4057 - Name already exists in scope ^ (_DSM)


I tried to inject my HD 3000, ALC898 method (_DSM, 4.......)... same result ; and this code is present in the vanilla dsdt at 4 or 5 places.


I attach my dsdt.dsl



The code i'd like to insert @ 0x00020000 (device GFX0)

Code:
                Method (_DSM, 4, NotSerialized)
                {
                    Store (Package (0x02)
                        {
                            "device-id", 
                            Buffer (0x04)
                            {
                                0x26, 0x01, 0x00, 0x00
                            }
                        }, Local0)
                    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                    Return (Local0)
                }


Best regards
 

Attachments

  • dsdt.zip
    35.8 KB · Views: 156
Okay, I see it is a bit strange. It is because within Scope (_SB.PCI0) Device (GFX0) is declared but there is Scope (_SB.PCI0) does not have a closing bracket on it "}" and it continues into Scope (^^PCI0) and various other devices and methods including another Method (_DSM, 4, Serialized) at line 9405 before the whole scope finally finishes at line 9438. So the existing method inside conflicts with the one you are trying to insert.
I think there is maybe a syntax error in the DSDT. I'll do a little research and see if I can come up with a suggestion. It seems there is an odd use of these supposed "device specific methods" in your DSDT.....
 
DSDTse will spot syntax errors so if a bracket is not closed it will signal a problem, but if for instance a bracket that should not be there does have a closing bracket somewhere else (that possibly also is there in error) then as long as all the other different bits make sense to the compiler then it will still compile okay. Two wrongs could make a right as far as a compiler goes.
Sometimes though I think the original programmer might take shortcuts in terms of putting something into the DSDT that will get the job done without thinking about whether it makes a hackers job easy.....(why would they?). It's probably more likely a programmer thing as I see that your DSDT is littered with those long DSM methods. I find it strange though that in the syntax the Device (GFX0) seems to include a great deal of other devices including a Device (Mem) somewhere before the closing "}".
 
I have attached something you may want to try, but I am a bit unhappy about the process I followed so it could be "KP" time. I went through the scope in question and actually removed the long existing DSM method at the end and then placed your device id injection where it should be. I have no idea what removing the conflicting method will do to your system so use this DSDT with caution.:banghead:

If this doesn't work I am not sure what to try.
 

Attachments

  • dsdtTheRealDeal.aml.zip
    18.9 KB · Views: 162
Status
Not open for further replies.
Back
Top