-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Substitute complicated PNLF _UID implementation #91
base: master
Are you sure you want to change the base?
Conversation
@@ -375,6 +376,47 @@ void WEG::processKext(KernelPatcher &patcher, size_t index, mach_vm_address_t ad | |||
return; | |||
} | |||
|
|||
uint32_t processUID(uint32_t deviceid) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it good to just replace it with CPUInfo::CpuGeneration
?
it's a great idea and I'm available to test over multiple generations in my hacks. |
is it support snow leopard and lion? |
Thanks!
|
The implementation should be compatible with older OS but currently I don't have such platforms for testing. Also @Lorys89 mentioned failure on his Haswell laptop. Will discuss it below.
I put it in I don't know how to figure out the class structure in IOKit, here is my best guess: And before the fix kicks in, ACPI driver will first evaluate every
I agree it's the correct way, but sometimes iGPUs like UHD620 might be wrongly classified. We to find a way out for some corner cases. However I suppose It could be deducted from current list? Or maybe by checking which Framebuffer is loaded?
The SSDT applies fixes for some early generations. However, the variant targeting CFL does nothing while we also have a fix in WEG. I also doubt if the extra work is needed for SKL+. It's better to keep the fix in a single place for less interference in further debugging. If only the This new feature should do nothing with old SSDT that has no |
Current
SSDT-PNLF
relies on PCI and MMIO access from ACPI space. However, only proper_UID
is required for most cases. Workarounds likeBacklightRegistersFix
are also available in WhateverGreen.By moving
_UID
identification to WhateverGreen, it's possible to makePNLF
device a simple stub matched byAppleIntelPanel
. Purposed solution is to use a ACPI methodSUID
that accepts desired_UID
from WhateverGreen. It might need extra work to replace it by patchingAppleIntelPanel::start
which evaluates_UID
.Sample DSDT attached in the commit but will remove later.
Tested on 8086:9b41 (CML, faked to 3e9b) and 8086:5927 (KBL-R, faked to 5926).