Pavo Posted July 22, 2018 Share Posted July 22, 2018 Ok I have been having issues with making SSDTs for injecting _DSM method for devices that already exist in the DSDT. This only has issues with devices that are in the DSDT with a ADR already assigned. Anyone have any suggestions? Here is an example of a SSDT to inject _DSM method for the HDEF device. DefinitionBlock ("", "SSDT", 2, "Pavo", "HDEF", 0x00000000) { External (_SB_.PCI0.HDEF, DeviceObj) // (from opcode) Scope (\_SB.PCI0.HDEF) { Name (_ADR, 0x001B0000) Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method { Return (Package (0x10) { "AAPL,slot-name", "Built In", "name", "Audio Controller", "model", Buffer (0x27) { "Apple High Definition Audio Controller" }, "device_type", Buffer (0x11) { "Audio Controller" }, "layout-id", Buffer (0x04) { 0x07, 0x00, 0x00, 0x00 }, "MaximumBootBeepVolume", Buffer (One) { 0x01 }, "PinConfigurations", Buffer (Zero){}, "hda-gfx", Buffer (0x0A) { "onboard-1" } }) } } } This gives ACPI errors in kernel log and will not inject the _DSM information 2018-07-22 13:41:50.645853-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) ACPI Error: 2018-07-22 13:41:50.645854-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) ACPI Error: 2018-07-22 13:41:50.645855-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) [HDEF] 2018-07-22 13:41:50.645856-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) [HDEF] 2018-07-22 13:41:50.645857-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) Namespace lookup failure, AE_ALREADY_EXISTS 2018-07-22 13:41:50.645858-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) Namespace lookup failure, AE_ALREADY_EXISTS 2018-07-22 13:41:50.645860-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) (20160930/dswload-462) 2018-07-22 13:41:50.645860-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) (20160930/dswload-462) 2018-07-22 13:41:50.645862-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) ACPI Exception: AE_ALREADY_EXISTS, 2018-07-22 13:41:50.645862-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) ACPI Exception: AE_ALREADY_EXISTS, 2018-07-22 13:41:50.645863-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) During name lookup/catalog 2018-07-22 13:41:50.645864-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) During name lookup/catalog 2018-07-22 13:41:50.645865-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) (20160930/psobject-310) 2018-07-22 13:41:50.645866-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) (20160930/psobject-310) 2018-07-22 13:41:50.645886-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) ACPI Exception: AE_ALREADY_EXISTS, 2018-07-22 13:41:50.645886-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) ACPI Exception: AE_ALREADY_EXISTS, 2018-07-22 13:41:50.645888-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) (SSDT: HDEF) while loading table 2018-07-22 13:41:50.645889-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) (SSDT: HDEF) while loading table 2018-07-22 13:41:50.645890-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) (20160930/tbxfload-319) 2018-07-22 13:41:50.645891-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) (20160930/tbxfload-319) 2018-07-22 13:41:50.647286-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) ACPI Error: 2018-07-22 13:41:50.647286-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) ACPI Error: 2018-07-22 13:41:50.647287-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) 1 table load failures, 13 successful 2018-07-22 13:41:50.647288-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) 1 table load failures, 13 successful 2018-07-22 13:41:50.647290-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) (20160930/tbxfload-342) 2018-07-22 13:41:50.647290-0400 0x71 Default 0x0 0 0 kernel: (AppleACPIPlatform) (20160930/tbxfload-342) Link to comment https://www.insanelymac.com/forum/topic/334960-ssdts-creation-help/ Share on other sites More sharing options...
WinstonAce Posted July 22, 2018 Share Posted July 22, 2018 Try something like this DefinitionBlock ("", "SSDT", 1, "toleda", "ami9hdm1", 0x00003000) { External (_SB_.PCI0, DeviceObj) // (from opcode) Method (_SB.PCI0.HDEF._DSM, 4, NotSerialized) // _DSM: Device-Specific Method { If (LEqual (Arg2, Zero)) { Return (Buffer (One) { 0x03 }) } Return (Package (0x04) { "layout-id", Buffer (0x04) { 0x01, 0x00, 0x00, 0x00 }, "PinConfigurations", Buffer (Zero){} }) } } Link to comment https://www.insanelymac.com/forum/topic/334960-ssdts-creation-help/#findComment-2627037 Share on other sites More sharing options...
Pavo Posted July 22, 2018 Author Share Posted July 22, 2018 3 hours ago, WinstonAce said: Try something like this DefinitionBlock ("", "SSDT", 1, "toleda", "ami9hdm1", 0x00003000) { External (_SB_.PCI0, DeviceObj) // (from opcode) Method (_SB.PCI0.HDEF._DSM, 4, NotSerialized) // _DSM: Device-Specific Method { If (LEqual (Arg2, Zero)) { Return (Buffer (One) { 0x03 }) } Return (Package (0x04) { "layout-id", Buffer (0x04) { 0x01, 0x00, 0x00, 0x00 }, "PinConfigurations", Buffer (Zero){} }) } } Awesome, this method works thank you. Link to comment https://www.insanelymac.com/forum/topic/334960-ssdts-creation-help/#findComment-2627095 Share on other sites More sharing options...
Recommended Posts