- Joined
- Mar 8, 2017
- Messages
- 758
- Motherboard
- Dell XPS 9700 4K (OpenCore)
- CPU
- i7-10875H
- Graphics
- UHD 630, 3840x2400
- Mobile Phone
@tyraenor
Happy to see that you want to learn about the topic. I can't say for sure that I know about all of your mistakes, since I haven't combed through all of your SSDT, but I can say the following:
Your renames look promising and correct. You seem to use a hex-editor like HexFiend (or similar), and all of the replaces start with 14 (OP-Code for Method). For some reason (and I don't know why, sadly) the GBTI rename (14454247 42544901) did not apply. Since the bytes after 14 are the method-signature and length, I guess that something changed around there. I couldn't compile your SystemDSDT because of errors, which is why I couldn't check if something changed. I just used another sequence (47425449 01700D45) which is basically unique, since it includes a part of the debug comment right after the method declaration.
Another mistake I've seen: You can't use B1B2 or B1B4 to assign variable values. You need to use WECB(offset, length-in-bits, value), one of RehabMans utility-methods.
Oh, and btw, you should not just copy the whole region and change up some of the fields. In an ideal situation, only the patched fields should go into the SSDT. This does require you to calculate the absolute offsets for all fields, and then put Offset-instructions where there are gaps.
I am currently working on a tool, which is far from being complete, but it is able to generate the Region-patch so far. Also used that on your case, since it saves time and provides helpful comments with former name and absolute offset.
Happy to see that you want to learn about the topic. I can't say for sure that I know about all of your mistakes, since I haven't combed through all of your SSDT, but I can say the following:
Your renames look promising and correct. You seem to use a hex-editor like HexFiend (or similar), and all of the replaces start with 14 (OP-Code for Method). For some reason (and I don't know why, sadly) the GBTI rename (14454247 42544901) did not apply. Since the bytes after 14 are the method-signature and length, I guess that something changed around there. I couldn't compile your SystemDSDT because of errors, which is why I couldn't check if something changed. I just used another sequence (47425449 01700D45) which is basically unique, since it includes a part of the debug comment right after the method declaration.
Another mistake I've seen: You can't use B1B2 or B1B4 to assign variable values. You need to use WECB(offset, length-in-bits, value), one of RehabMans utility-methods.
Oh, and btw, you should not just copy the whole region and change up some of the fields. In an ideal situation, only the patched fields should go into the SSDT. This does require you to calculate the absolute offsets for all fields, and then put Offset-instructions where there are gaps.
I am currently working on a tool, which is far from being complete, but it is able to generate the Region-patch so far. Also used that on your case, since it saves time and provides helpful comments with former name and absolute offset.
GitHub - BlvckBytes/ECPatcher: Tool to automatically patch the EmbeddedControl Operation-Regions in a DSDT to be macOS-compatible
Tool to automatically patch the EmbeddedControl Operation-Regions in a DSDT to be macOS-compatible - BlvckBytes/ECPatcher
github.com