-
Notifications
You must be signed in to change notification settings - Fork 40
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
Compiled on Sierra 10.12. System restarts on kextload #11
Comments
Sorry. I don't seem to get any notifications from Github. Ok so I guess that your system is booting up fine and then you try to load the kext with kextload but that fails. Correct? Did you compile the kext yourself or did you download it from some place? |
No problem. |
Ok. We need to find the code that fails. Have you tried to set logMSRs in the plist to false? |
I was able to use an early version before upgrading to Sierra. I recently upgraded my MacBook 2016 (Skylake Core m3) to Sierra and tried the latest AppleIntelInfo from GitHub. I was getting a kernel panic on kextload. After some debugging, and review of your commits over the last while it seems the issue is caused by: rdmsr64(MSR_THERM2_CTL). This was added in commit ce53c51. After removing this and subsequent THERM2 code everything seems fine. I'm not sure if this is what everyone else was hitting or not, but it's definitely a bug in the current codebase. I can't understand what this would have to do with upgrading to Sierra and is likely just coincidence. My brief read of the Intel docs suggest that perhaps you need a CPUID check before reading this MSR. Hope this helps. |
Excellent news. Can you please verify my latest commit |
Hi Piker-Alpha I turned off each of settings in Info.plist, one by one and on each load of the kext, it reboots the system. Could not see anything the Console logs that indicated the fault. The fault seems so catastrophic that nothing gets logged. I tried an older version 1.5 binary that I had, it is the same -- reboots the system. |
Please use my latest commit (AppleIntelInfo.kext v2.2) and disable the build settings (see new comment) because the kexts should load without crashing when all settings are zero. That is your first step. After that you can enable the build settings one by one. I think that your processor has some issues with MSR. |
Hi Piker-Alpha
Build was successful but on loading the kext, system reboots. Then I changed:
Ran kextlibs:
|
Setting WRITE_LOG_REPORT to 0 is currently still unsupported – the output of log show --predicate 'senderImagePath CONTAINS "AppleIntelInfo"' --info --last Xm is still a mess – but it should get fixed/be improved with a future update. Also. You should run sudo kextlibs with -unsupported The call to vfs_context_current(); should be replaced with vfs_context_create(NULL); and we should also add a few lines to stop()
Note: Note all MSR's are supported on all processors, and that is likely the cause of the crash. We need to figure out the problematic spots. The file: /tmp/AppleIntelInfo.dat will only be there if the kext loads without crashing/throwing out errors. This is not the case right now and thus we need to solve that first. |
Thx Piker-Alpha.
and
and now there are no kernlib errors. Of course, the system still reboots. I have two such systems (Dell Inspiron 530). One has the Xeon E5450 (Harpertown arch) and the other has Core-2-Quad Q9300 (Yorkfield arch) running El Capitan. Both run fine. I downloaded MacCPUID app from Intel. Could it be a platform issue as opposed to a CPU issue ? |
What is the lowest version number of the kext that worked for you? Also. I made some changes for AppleIntelInfo v1.6 and the RAPL MSR's are likely to trigger a reboot/crash. In short. Take the oldest version possible and work your way up from there. Please note that I have plans to take care of the RAPL MSR's in a next update, but I cannot say when that version will be released. I have to do all this in spare time at work. Edit: Version 2.3 is out and includes the RAPL compatibility checks. |
@Piker-Alpha The new version builds fine but has dependency issues and does not load at all.
I changed the Info.plist dependencies from 16.5 to 15.6 and it it's same as before -- reboots my system. So I tried it my laptop (Sandybridge i5-2410M CPU) after changing the dependencies in the Info.plist and it too reboots the laptop. The previous version (v2.2) worked fine on the same laptop. |
Sorry. My fault. I didn't pay enough attention to a question from a co-worker who compiled it in XCode. Changes undone in one of the latest commits. Thanks. |
@Piker-Alpha On the two desktops (Xeon E5450 and Q9300), they also reboot on load with this new v2.3.
but makes no difference -- still reboots the system. I can't remember running previous old versions on these desktops so cannot tell if the old version ran or not. EDIT:
For the Xeon E5450 and Q9300 CPUs, the model is
|
Thanks. By the way. Did you compile the source code for your copy of v2.2 yourself? |
Yes I built it my self. Used Xcode 8.2.1 |
AppleIntelInfo.kext v2.3 works on a i5-2500K and i7-2600K after taking out line 1005 in AppleIntelInfo.cpp compiled on 10.9.5 and Xcode Version 6.0 (6A215l) |
OK Thx. I commented out that line 1005 and now it loads on the laptop with i5-2410M CPU. Still no joy on the desktops (with Xeon E5450 & Q9300 CPUs). |
Ok cool. Thank you for this confirmation. One issue less to worry about, but solving the incompatibility issues for older processors is going to take some time – need to check all MSR's... Update: Checks for IA32_APERF and IA32_MPERF added. We also need to check for C6 (MSR_PKG_C6_RESIDENCY/MSR_PKGC6_IRTL) and C7 (MSR_PKG_C7_RESIDENCY/MSR_PKGC7_IRTL) compatibility – back in the old days you only had C1 and C3. Can you comment them out and see if that works? Update-2: I added a lot more checks and would love to hear from you if it still crashes. |
Thx for your perseverance. Made those changes you mentioned (hopefully) but no change -- still reboots.
Let me know how else I can help. |
Are you using the latest source code? I think that it should work with:
What we want, at first, it to stop it from crashing at launch. After that works, then we can try to locate the problematic spots in the source code. |
Yes I used your latest sources, changes the build settings as per your last msg above. I even commented out the previous four IOLOG statements but still reboots. Some access to the h/w is causing a fatal exception I guess but wouldn't know where to search. |
Ok. We may be running into another issue. Please boot with -cpuid and tell me what you see in the log. What we are looking for is the CPUID output. Please attach that here, or e-mail me. Thanks! |
I entered -cpuid into Clover's boot args option but do not see any log entries in Console.
Is that what you were looking for ? |
Unfortunately not. Please add debug=0x12a to your boot arguments and run debugMachKernel.sh |
I ran debugMackKernel.sh
Made no difference --- still no CPUID in any log file. |
Your boot arguments are fine, but I would add -s. This way you can see that the extra (long) output is there (after running debugMackKernel.sh). The next step is to run:
Search for "cpuid" and/or "cpuid_fn". Note that there is something weird going on with the output of the log command. The timezone appears to be way off. I need the --start "2017-02-27" arguments or the output of today isn't even there. Hope this helps. |
Yes it did. I used todays date it was fine:
I didn't save the whole log but just grep'ed for 'cpuid' |
Recently upgraded 10.9.5 to 10.12.
CPU is Xeon E5450 (4 cores/4 threads)
On kextload, the screen clears to black and restarts.
CPU may not be supported but panic ?
The text was updated successfully, but these errors were encountered: