Contribute
Register

[Guide] Patching LAPTOP DSDT/SSDTs

[QUOTE =“RehabMan,post:1541146,member:429483”]没有文件附加。不知道。
阅读帖子#1,“问题报告”。[/ QUOTE]
可以补丁吗?
可以如图所示,ssdt-6到ssdt-3,重命名为ssdt-7。Ssdt-4还是应该保留原来的号码?
 

Attachments

  • remove.png
    remove.png
    82.8 KB · Views: 93
I have a bug, and it's slow to start and turn off the computer each time. Normal access to the system still pop-up error messages!

Anonymous UUID: F2E02C8E-793C-440B-AA13-DB7EDA1CC69E

Wed Jul 19 03:26:58 2017

*** Panic Report ***
panic(cpu 2 caller 0xffffff80003ff2dd): Kernel trap at 0xffffff7f81982f51, type 14=page fault, registers:
CR0: 0x000000008001003b, CR2: 0x0000000000000110, CR3: 0x0000000009455000, CR4: 0x00000000001627e0
RAX: 0x0000000000000010, RBX: 0xffffff80a3cb5000, RCX: 0xffffff801619f3e0, RDX: 0x0000000000000010
RSP: 0xffffff80a388bcb8, RBP: 0xffffff80a388bd70, RSI: 0x0000000000000100, RDI: 0xffffff8016786000
R8: 0xffffff8000a6a400, R9: 0x029f17e9f78d0020, R10: 0x0000000000001000, R11: 0xffffff80a3cd3000
R12: 0x0000000000000000, R13: 0xffffff8016786000, R14: 0xffffff80a3cb5000, R15: 0x0000000000000010
RFL: 0x0000000000010202, RIP: 0xffffff7f81982f51, CS: 0x0000000000000008, SS: 0x0000000000000000
Fault CR2: 0x0000000000000110, Error code: 0x0000000000000000, Fault CPU: 0x2, PL: 0, VF: 1

Backtrace (CPU 2), Frame : Return Address
0xffffff80a388b940 : 0xffffff80002ea53c
0xffffff80a388b9c0 : 0xffffff80003ff2dd
0xffffff80a388bba0 : 0xffffff800029b593
0xffffff80a388bbc0 : 0xffffff7f81982f51
0xffffff80a388bd70 : 0xffffff7f8197ddd7
0xffffff80a388bdf0 : 0xffffff7f81984aae
0xffffff80a388be40 : 0xffffff800089752d
0xffffff80a388be80 : 0xffffff800089727e
0xffffff80a388bf10 : 0xffffff8000896836
0xffffff80a388bf60 : 0xffffff800089824e
0xffffff80a388bfb0 : 0xffffff80002988f7
Kernel Extensions in backtrace:
com.apple.driver.usb.AppleUSBXHCIPCI(1.1)[7874F3C0-5B5D-30B4-A03E-ECE1564D7F2B]@0xffffff7f8197c000->0xffffff7f819a2fff
dependency: com.apple.iokit.IOACPIFamily(1.4)[4F7FB6AD-2498-3F71-827C-ED7AA4BF2511]@0xffffff7f80f51000
dependency: com.apple.iokit.IOPCIFamily(2.9)[BD9FCDEF-30CB-3911-B247-EE51DD069C76]@0xffffff7f80b32000
dependency: com.apple.iokit.IOUSBHostFamily(1.1)[B9C17AFF-13E0-3070-9024-C74ABABBFBE9]@0xffffff7f816b5000
dependency: com.apple.driver.usb.AppleUSBXHCI(1.1)[6DAC5154-5BED-3F49-993A-0A25DFE7E135]@0xffffff7f81935000

BSD process name corresponding to current thread: kernel_task
Boot args: -v kext-dev-mode=1 -x

Mac OS version:
Not yet set

Kernel version:
Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64
Kernel UUID: FB2170A8-257D-3C64-B14D-BC06CC94E34C
__HIB text base: 0xffffff8000100000
System model name: MacBookPro11,2 (Mac-3CBD00234E554E41)

System uptime in nanoseconds: 2938631236
last loaded kext at 2478509581: com.apple.driver.usb.AppleUSBHostPacketFilter 1.0 (addr 0xffffff7f81a6d000, size 20480)
last unloaded kext at 2019107227: com.Asus.driver.AppleACPIPS2Nub 1.0.0d1 (addr 0xffffff7f82b28000, size 24576)
loaded kexts:
org.emlydinesh.driver.ApplePS2Keyboard 4.6.5
org.hwsensors.driver.GPUSensors 1426
org.hwsensors.driver.LPCSensors 1426
org.rehabman.driver.FakePCIID 1.3.8
com.insanelymac.RealtekRTL8111 2.2.1
org.hwsensors.driver.ACPISensors 1426
org.emlydinesh.driver.ApplePS2Controller 4.6.5
org.voodoo.driver.VoodooTSCSync 1.1
org.hwsensors.driver.CPUSensors 1426
org.rehabman.driver.AppleSmartBatteryManager 1.70.2
org.netkas.driver.FakeSMC 1426
com.rehabman.driver.USBInjectAll 0.6.1
com.apple.driver.AirPort.Brcm4331 800.20.24
com.apple.iokit.IOAHCIBlockStorage 295.20.1
com.apple.driver.AppleAHCIPort 326.60.1
com.apple.driver.AppleACPIButtons 5.0
com.apple.driver.AppleRTC 2.0
com.apple.driver.AppleHPET 1.8
com.apple.driver.AppleSMBIOS 2.1
com.apple.driver.AppleACPIEC 5.0
com.apple.driver.AppleAPIC 1.7
com.apple.nke.applicationfirewall 172
com.apple.security.quarantine 3
com.apple.security.TMSafetyNet 8
com.apple.driver.AppleIntelCPUPowerManagementInfo 1
com.apple.driver.usb.AppleUSBHostPacketFilter 1.0
com.apple.iokit.IOUSBFamily 900.4.1
com.apple.driver.AppleXsanScheme 3
com.apple.iokit.IO80211Family 1200.12.2
com.apple.driver.corecapture 1.0.4
com.apple.iokit.IOAHCIFamily 288
com.apple.iokit.IONetworkingFamily 3.2
com.apple.driver.usb.AppleUSBEHCIPCI 1.1
com.apple.driver.usb.AppleUSBEHCI 1.1
com.apple.driver.AppleIntelLpssGspi 3.0.60
com.apple.driver.usb.AppleUSBXHCIPCI 1.1
com.apple.driver.usb.AppleUSBXHCI 1.1
com.apple.driver.AppleEFINVRAM 2.1
com.apple.driver.AppleEFIRuntime 2.1
com.apple.iokit.IOHIDFamily 2.0.0
com.apple.iokit.IOSMBusFamily 1.1
com.apple.security.sandbox 300.0
com.apple.kext.AppleMatch 1.0.0d1
com.apple.driver.AppleKeyStore 2
com.apple.driver.AppleMobileFileIntegrity 1.0.5
com.apple.driver.AppleCredentialManager 1.0
com.apple.driver.KernelRelayHost 1
com.apple.iokit.IOUSBHostFamily 1.1
com.apple.driver.AppleBusPowerController 1.0
com.apple.driver.DiskImages 444.50.16
com.apple.iokit.IOStorageFamily 2.1
com.apple.iokit.IOReportFamily 31
com.apple.driver.AppleFDEKeyStore 28.30
com.apple.driver.AppleACPIPlatform 5.0
com.apple.iokit.IOPCIFamily 2.9
com.apple.iokit.IOACPIFamily 1.4
com.apple.kec.pthread 1
com.apple.kec.corecrypto 1.0
Model: MacBookPro11,2, BootROM MBP112.0138.B02, 2 processors, Intel Core i7, 1.90 GHz, 8 GB, SMC 2.18f15
Graphics: Intel HD Graphics 4400, Intel HD Graphics 4400, Built-In
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1600 MHz, Samsung, -
Memory Module: BANK 0/DIMM2, 4 GB, DDR3, 1600 MHz, Samsung, M471B5273DH0-YK0
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x134), Broadcom BCM43xx 1.0 (5.106.98.100.24)
Network Service: Wi-Fi, AirPort, en1
Serial ATA Device: SanDisk SDSSDA120G, 120.03 GB
Serial ATA Device: HGST HTS545050A7E680, 500.11 GB
USB Device: USB 2.0 Bus
USB Device: Hub
USB Device: USB 3.0 Bus
USB Device: USB2.0-CRW
USB Device: USB2.0 VGA UVC WebCam
USB Device: USB Receiver
USB Device: Teclast CoolFlash
Thunderbolt Bus:

I can see you didn't follow the guides here.
My suggestion: start over.

Follow the Clover guide linked from the FAQ.
http://www.tonymacx86.com/el-capita...faq-read-first-laptop-frequent-questions.html

Although you should read the FAQ for an overview of issues, the Clover guide is linked from the first question: "Q. Where do I start?", just after the bold face "Clover Guide".
Here is a direct link, just to be clear:
https://www.tonymacx86.com/threads/guide-booting-the-os-x-installer-on-laptops-with-clover.148093/
 
I can see you didn't follow the guides here.
My suggestion: start over.

Follow the Clover guide linked from the FAQ.
http://www.tonymacx86.com/el-capita...faq-read-first-laptop-frequent-questions.html

Although you should read the FAQ for an overview of issues, the Clover guide is linked from the first question: "Q. Where do I start?", just after the bold face "Clover Guide".
Here is a direct link, just to be clear:
https://www.tonymacx86.com/threads/guide-booting-the-os-x-installer-on-laptops-with-clover.148093/
No! I know where to start hackintosh, just don't know where to end and fix the errors and bugs in the logs! This is the status of my current laptop Memory usage is high 5.2 GB / 8GB
 

Attachments

  • nian的MacBook Pro.ioreg
    6.6 MB · Views: 111
  • extract.zip
    64.8 KB · Views: 81
  • nvram.plist
    7.3 KB · Views: 246
  • cloverefi.zip
    22.8 MB · Views: 170
  • kext.png
    kext.png
    229.5 KB · Views: 91
  • cpu.png
    cpu.png
    306.4 KB · Views: 105
  • 未命名.png
    未命名.png
    298.9 KB · Views: 238
Last edited:
No! I know where to start hackintosh, just don't know where to end and fix the errors and bugs in the logs! This is the status of my current laptop Memory usage is high 5.2 GB / 8GB

Your files indicate you didn't follow the guides here...
Hence my suggestion to start over.
 
Your files indicate you didn't follow the guides here...
Hence my suggestion to start over.
Then I choose SMBIOS air6,2 or pro11,1 or pro11,2. I have a Haswell ULT i3 4030U CPU Socket 1168BGA
 
Then I choose SMBIOS air6,2 or pro11,1 or pro11,2. I have a Haswell ULT i3 4030U CPU Socket 1168BGA

I would recommend MacBookAir6,2.
 
RehabMan -

Great intro, and thanks!

I'm getting started with DSDT disassembly for my ThinkPad T-61 (I actually have 5 of them), and have found three different packages of the un-modded Intel iASL to do this (dated 2012-04-20, 2015-12-18, 2017-06-29). Admittedly, these are dated with standard BIOS (well, almost - they have the Middleton Mod which eliminated the WiFi Card "whitelist" and "unlocked" the SATA restriction so it will run at SATA 2).

As start, I found a "pre-packaged" Yosemite 10.10.1 (now 10.10.5) with Chameleon 2.3svn r2838, and yes, it works, kind of... It is enough of a jump-start that I can do it the "right" way.

So far, I have tried the three PC iASL.exe disassemblers to get the gist of what the DSDT is. The results of dis-assembling the DSDT are:

1. 2012-04-20 - it worked, throwing 3 warnings
9169 Warning Not all control paths return a value (WMAB) Method (WMAB, 3, NotSerialized)
12707 Warning Not all control paths return a value (_Q15) Method (_Q15, 0, NotSerialized)
12717 Warning Reserved method should not return a value (_Q15) Return (0x00)

2. 2015-12-18 - it worked, throwing the same 3 warnings, plus an "1 external control methods found"

3. 2017-06-29 - it immediately threw an unpaired brackets error - clearing that, the same 3 warnings plus the same "1 external control methods found" message

4. In several areas, it appears that pointers to objects are made explicit in different iASLs. e.g.

Device PCI0; Device LPC; Scope \_SB.PCI0.LPC; Device LECP
CreateWordField (EPBF, \_SB.PCI0.LPC.LECP._Y21._MIN, ECN0)
CreateWordField (EPBF, \_SB.PCI0.LPC.LECP._Y21._MAX, ECX0)

becomes:

CreateWordField (EPBF, 0x02, ECN0)
CreateWordField (EPBF, 0x04, ECX0)

is one form preferred? Does it matter?

Looking at these more closely, it is clear that this is supposed to be a hierarchical "tree" model extending through the various "Scopes". However, it appears that the tree looks somewhat "scrambled" (e.g. Scope \SB_ appears several places as does Scope \_SB.PCI0.LPC.EC, etc.). I might assume that in a "perfect" world, that these would be strictly hierarchical by ASCII characters, but over time, snippets of code, were inserted and removed, not entirely in the "right place". (this is something I often do when starting a coding project to get the "feel" of where this is going.)

When looking at two files at once with Notepad++ in Compare mode, there is clearly more material in 2015 and 2017 versions that 2012. Both 2015 and 2017 have "shifts" in "alignment" towards the end of the files, and the 2017 file with an unpaired bracket somewhere. (This looks suspiciously like de-compiling parsing errors that seem to vary from one release of iASL to another, and may not get fully corrected.)

I would suppose that somewhere the compiler should spit out roughly "correct" .aml regardless.

So my questions are:
1. For older an BIOS (2011-03-18), to what level of ACPI specs does the DSDT (and SSDT which I haven't looked at yet) near to adhere to work with a given MacOS.
2. Now that I have the "overview", I take it next step is use your version of MacIASL do to the decompile edits, and recompile. Is this something you revise periodically and where is the best repo? https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads/ ? https://code.google.com/archive/p/os-x-maciasl-patchmatic/downloads for older? Is there a version I should be using?
3. You provided a list of common re-names elsewhere:
GFX0 -> IGPU
SAT0 -> SATA
EHC1 -> EH01
EHC2 -> EH02
XHCI -> XHC
HECI -> IMEI
MEI -> IMEI
LPC -> LPCB
HDAS -> HDEF
AZAL -> HDEF
Is this something to do proactively, or is this a situation for a patch?

Thanks in advance!

-----------
Quick addendum - I did try both your and the other fork of MaciASL. Yours appears to to have 2016-12-13 iASL, the other 2010-03-31. They behave like the others I tried. The earlier de-compiles cleanly, the later not. I notice that both have the ability to choose between ACPI 4, 5.0, and 5.1, but no differences in e-compiling. Is this only for compiling? Also, I see no way, other than running iASL by a command line to but in the switches to bring in the various SSDT's to help with external references. Am I missing out on something, and is this something that is easier to run with the Windows with .bat file to pass parameters along? (My old few UNIX command line and makefile skills are really rusty, my apologies.)



ThinkPad T-61 (x5)
BIOS - 2.29 (Middleton mod - 2011-03-18)
CPU - Intel Core 2 Duo T-9500
Graphics - nVidia FX-570-M, nVidia NVS-140-M
LCDs - 1440x900. 1600x1200, 1920x1200
Northbridge - Intel PM-965
ATA Controller - Intel 82801-HBM ICH-8-M
Audio - Intel PM-965
USB Controllers - Intel ICH-8 USB, Intel ICH-8 USB2
Ethernet - intel 82566-MM Gigabyte Ethernet
PS/2 TouchStick/Touchpad - Lenovo/Synaptics
Bluetooth - Lenovo - Broadcom?
DVD - Matsushita UJDA-775
PCMCIA/media Controller - Ricoh R-5-C-476 ii
Modem - Conexant HDA CX-11254
RAM - 8 GB
SSD - Samsung Evo/Pro 850 500 GB
 
Last edited:
Even minor differences in hardware configuration (BIOS version, amount of memory installed, BIOS options selected, and other hardware differences such as which WiFi card is installed) can make for differences that cause instability and weird bugs if you use foreign ACPI files. Differences such as BIOS version, amount of memory installed, BIOS options selected, and other hardware differences such as which WiFi card is installed, can make various OperationRegion addresses different, which makes a patched DSDT for one system incompatible with another. It is also not uncommon for the same laptop model to be produced in different runs with different motherboards, and potentially incompatible ACPI files.
Just courious that if I change BIOS options selected, amount of memory installed, or other hardware (such as WiFi card) on my laptop, with the specific BIOS version, can cause extracted ACPI files difference or can make various OperationRegion addresses different?
 
Last edited:
RehabMan -

Great intro, and thanks!

I'm getting started with DSDT disassembly for my ThinkPad T-61 (I actually have 5 of them), and have found three different packages of the un-modded Intel iASL to do this (dated 2012-04-20, 2015-12-18, 2017-06-29).

Use the tools linked by post #1.
 
Just courious that if I change BIOS options selected, amount of memory installed, or other hardware (such as WiFi card) on my laptop, with the specific BIOS version, can cause extracted ACPI files difference or can make various OperationRegion addresses different?

Yes.
 
Back
Top