Skip to content
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

IOSkywalk blocking >> kernel panic, Clover 5155 latest commit 0ea0020 #634

Closed
perez987 opened this issue Sep 26, 2023 · 29 comments
Closed

Comments

@perez987
Copy link

perez987 commented Sep 26, 2023

Good night, when trying to set Clover to get back Broadcom wifi on Sonoma, every time IOSkywalk is blocked I get a KP.

In the DEBUG file, I see that the 3 required kexts are properly injected:

->Extra kext: Other\IOSkywalkFamily.kext (v.1.0)
->Extra kext: Other\Lilu.kext (v.1.6.6)
->Extra kext: Other\AppleALC.kext (v.1.8.3)
->Extra kext: Other\IntelMausi.kext (v.1.0.8)
->Extra kext: Other\WhateverGreen.kext (v.1.6.5)
->Extra kext: Other\IO80211FamilyLegacy.kext (v.1200.12.2b1)
    |-- PlugIn kext: Other\IO80211FamilyLegacy.kext\Contents\PlugIns\AirPortBrcmNIC.kext (v.1400.1.1)
->Extra kext: Other\FakeSMC.kext (v.3.5.5)

And IOSkyWalk is blocked but AFTER the addition of the 3 kexts:

OCAK: Patching invalid size 2EFF8 with 1456000 for com.apple.iokit.IOSkywalkFamily
OCAK: com.apple.iokit.IOSkywalkFamily got KXLD 0 0
OCAK: Excluding com.apple.iokit.IOSkywalkFamily - VirtualBase FFFFFF80027FE000, MaxSize 40000
OCAK: Found kext com.apple.iokit.IOSkywalkFamily (2C377398) from link 2C3773A0 to drop
OCAK: Erasing com.apple.iokit.IOSkywalkFamily from prelinked kext under dict index 3, plist 2CB8CE98, plist index 167
OC: Prelinked blocker (Exclude) result 0 for com.apple.iokit.IOSkywalkFamily () - Success

Maybe the block must happen before the addition?
My skills are low so maybe I'm asking something meaningless. But users who are testing this with Clover have KP when blocking IOSkywalk.
Thank you!!!

@etyel
Copy link

etyel commented Oct 2, 2023

Have you followed these instructions? From dortania/OpenCore-Legacy-Patcher#1077 (comment)

While the project (OpenCore legacy patcher) is designed for legacy Mac hardware, we know the community is quite interested in our development of Broadcom patches. For those who wish to use the Broadcom patches on non-standard machines such as Hackintoshes, see below:

Enabling Patching support for modern Broadcom Cards
To use our current patches, you'll need to ensure the following:

System Integrity Protection is set to 0x803
csr-active-config | data | 03080000
Reset NVRAM or add csr-active-config to Delete to ensure the new variable is set

AMFI is disabled
boot-args | string | amfi=0x80
Secure Boot Model is set to Disabled

Following kexts are blocked:
com.apple.iokit.IOSkywalkFamily
Set MinKernel to 23.0.0 to ensure patches only apply on Sonoma

Following kexts are injected:
IOSkywalk.kext
IO80211FamilyLegacy.kext

Kext has a child, AirPortBrcmNIC.kext, ensure this is injected as well
Set MinKernel to 23.0.0 to ensure patches only apply on Sonoma

Once these are injected, you can run OpenCore-Patcher's Post-Install option and root patch. You need to use the latest version of OCLP. On reboot, Wireless support should be restored assuming your machine was configured correctly to the above.

@perez987
Copy link
Author

perez987 commented Oct 2, 2023

@etyel
Of course I know OCLP sonoma guidelines, successful applied in my 2 hacks.
But they are for OpenCore. And this is Clover.
Out of curiosity, I tried to do the same thing that works in OpenCore (my usual bootloader) but with Clover. And I have found (like other users) the problem that I am not able to achieve the same result. This is the reason for publishing this issue.

@dateno1
Copy link

dateno1 commented Oct 6, 2023

Same Problem

Install Sonoma with lastest Clover All work well exclude WLan

I can't boot with 'KernelAndKextPatches - BlockSkywalk'

No root patch (i Can't boot yet)

With&Without
IO80211FamilyLegacy.kext
IOSkywalkFamily.kext

AMFIPass.kext
or
amfi=0x80

with&without
ECM-Override.kext

All same (can't boot)

GA-Z390-M-EFI-Ventura-231006.zip
EFI Attatched


Harware
CPU : i7-9700
RAM : 32G*2
Board : GA-Z390-M
VGA : RX5700XT
WLan : BCM94360CS2
with Titan Ridge

@jonasw8
Copy link

jonasw8 commented Oct 8, 2023

Same Problem

Install Sonoma with lastest Clover All work well exclude WLan

I can't boot with 'KernelAndKextPatches - BlockSkywalk'

No root patch (i Can't boot yet)

With&Without IO80211FamilyLegacy.kext IOSkywalkFamily.kext

AMFIPass.kext or amfi=0x80

with&without ECM-Override.kext

All same (can't boot)

GA-Z390-M-EFI-Ventura-231006.zip EFI Attatched

Harware CPU : i7-9700 RAM : 32G*2 Board : GA-Z390-M VGA : RX5700XT WLan : BCM94360CS2 with Titan Ridge

Same problem

@SergeySlice
Copy link
Collaborator

Good night, when trying to set Clover to get back Broadcom wifi on Sonoma, every time IOSkywalk is blocked I get a KP.

In the DEBUG file, I see that the 3 required kexts are properly injected:

->Extra kext: Other\IOSkywalkFamily.kext (v.1.0)
->Extra kext: Other\Lilu.kext (v.1.6.6)
->Extra kext: Other\AppleALC.kext (v.1.8.3)
->Extra kext: Other\IntelMausi.kext (v.1.0.8)
->Extra kext: Other\WhateverGreen.kext (v.1.6.5)
->Extra kext: Other\IO80211FamilyLegacy.kext (v.1200.12.2b1)
    |-- PlugIn kext: Other\IO80211FamilyLegacy.kext\Contents\PlugIns\AirPortBrcmNIC.kext (v.1400.1.1)
->Extra kext: Other\FakeSMC.kext (v.3.5.5)

Bridge kext to OC : Path=Lilu.kext
info plist path: Kexts\Other\Lilu.kext\Contents\Info.plist
InfoPlistPath=Kexts\Other\Lilu.kext\Contents\Info.plist
assign executable as 'Contents\MacOS\Lilu'
Bridge kext to OC : Path=FakeSMC.kext
info plist path: Kexts\Other\FakeSMC.kext\Contents\Info.plist
InfoPlistPath=Kexts\Other\FakeSMC.kext\Contents\Info.plist
assign executable as 'Contents\MacOS\FakeSMC'
Bridge kext to OC : Path=IOSkywalkFamily.kext
info plist path: Kexts\Other\IOSkywalkFamily.kext\Contents\Info.plist
InfoPlistPath=Kexts\Other\IOSkywalkFamily.kext\Contents\Info.plist
assign executable as 'Contents\MacOS\IOSkywalkFamily'
Bridge kext to OC : Path=WhateverGreen.kext
info plist path: Kexts\Other\WhateverGreen.kext\Contents\Info.plist
InfoPlistPath=Kexts\Other\WhateverGreen.kext\Contents\Info.plist
assign executable as 'Contents\MacOS\WhateverGreen'
Bridge kext to OC : Path=AppleALC.kext
info plist path: Kexts\Other\AppleALC.kext\Contents\Info.plist
InfoPlistPath=Kexts\Other\AppleALC.kext\Contents\Info.plist
assign executable as 'Contents\MacOS\AppleALC'
Bridge kext to OC : Path=IntelMausi.kext
info plist path: Kexts\Other\IntelMausi.kext\Contents\Info.plist
InfoPlistPath=Kexts\Other\IntelMausi.kext\Contents\Info.plist
assign executable as 'Contents\MacOS\IntelMausi'
Bridge kext to OC : Path=IO80211FamilyLegacy.kext
info plist path: Kexts\Other\IO80211FamilyLegacy.kext\Contents\Info.plist
InfoPlistPath=Kexts\Other\IO80211FamilyLegacy.kext\Contents\Info.plist
assign executable as 'Contents\MacOS\IO80211FamilyLegacy'
Bridge kext to OC : Path=AirPortBrcmNIC.kext
info plist path: Kexts\Other\IO80211FamilyLegacy.kext\Contents\PlugIns\AirPortBrcmNIC.kext\Contents\Info.plist
InfoPlistPath=Kexts\Other\IO80211FamilyLegacy.kext\Contents\PlugIns\AirPortBrcmNIC.kext\Contents\Info.plist
assign executable as 'Contents\MacOS\AirPortBrcmNIC'

And IOSkyWalk is blocked but AFTER the addition of the 3 kexts:

OCAK: Patching invalid size 2EFF8 with 1456000 for com.apple.iokit.IOSkywalkFamily
OCAK: com.apple.iokit.IOSkywalkFamily got KXLD 0 0
OCAK: Excluding com.apple.iokit.IOSkywalkFamily - VirtualBase FFFFFF80027FE000, MaxSize 40000
OCAK: Found kext com.apple.iokit.IOSkywalkFamily (2C377398) from link 2C3773A0 to drop
OCAK: Erasing com.apple.iokit.IOSkywalkFamily from prelinked kext under dict index 3, plist 2CB8CE98, plist index 167
OC: Prelinked blocker (Exclude) result 0 for com.apple.iokit.IOSkywalkFamily () - Success

Maybe the block must happen before the addition? My skills are low so maybe I'm asking something meaningless. But users who are testing this with Clover have KP when blocking IOSkywalk. Thank you!!!

Yes, blocking must happen before the addition. I just wonder why it is not the case.

@Striker770
Copy link

Yes, blocking must happen before the addition. I just wonder why it is not the case.

So, how can it be fixed?

@perez987
Copy link
Author

Yes @SergeySlice can you fix this?
I’ve tried acting over rEFIt_UEFI/refit/main.cpp to put the block before the addition but, as you know, I’m not a coder and got errors when compiling.
Thanks.

@SergeySlice
Copy link
Collaborator

SergeySlice commented Oct 18, 2023

I looked into sources and see


  OcKernelBlockKexts (Config, DarwinVersion, Is32Bit, CacheTypeCacheless, Context);

  OcKernelInjectKexts (Config, CacheTypeCacheless, Context, DarwinVersion, Is32Bit, 0, 0);

  OcKernelApplyPatches (Config, mOcCpuInfo, DarwinVersion, Is32Bit, CacheTypeCacheless, Context, NULL, 0);

So it does block first and inject second as it should be.

@perez987
Copy link
Author

perez987 commented Oct 18, 2023

Indeed, this is the expected order in OpenCore, as in Configuration.pdf:

Kernel and kext changes apply with the following effective order:

  • Block is processed.
  • Add and Force are processed.
  • Emulate and Quirks are processed.
  • Patch is processed.

This need further investigation.
Thanks and good night.

@Striker770
Copy link

@SergeySlice Is it possible to add a functionality like OC's Blocking Method in the Clover? It would be really helpful and that way it can be bit more future proof and would not need blocking option for each kext like now. I know its not easy but i can think it would be really worth it.

Thanks

@SergeySlice
Copy link
Collaborator

Is there Quirks->KernelCache->Auto?
What if you change it to
Quirks->KernelCache->Prelinked?

@perez987
Copy link
Author

perez987 commented Oct 21, 2023

@SergeySlice
Quirks->KernelCache exists, it was Auto, changed to Prelinked but no success.
Blocking and adding kexts (in the right order) are working and blocking happens before adding. However, I have early KP, the same as before.

21:694  0:040  OCAK: Patching invalid size 2EFF8 with 1456000 for com.apple.iokit.IOSkywalkFamily
21:701  0:006  OCAK: com.apple.iokit.IOSkywalkFamily got KXLD 0 0
21:708  0:007  OCAK: Excluding com.apple.iokit.IOSkywalkFamily - VirtualBase FFFFFF80027FE000, MaxSize 40000
21:716  0:008  OCAK: Found kext com.apple.iokit.IOSkywalkFamily (2ED2D218) from link 2ED2D220 to drop
21:726  0:009  OCAK: Erasing com.apple.iokit.IOSkywalkFamily from prelinked kext under dict index 3, plist 2F543498, plist index 167
21:733  0:007  OC: Prelinked blocker (Exclude) result 0 for com.apple.iokit.IOSkywalkFamily () - Success


22:125  0:007  OCAK: com.apple.iokit.IOSkywalkFamily got KXLD 0 0
...
22:252  0:013  OC: Prelinked injection Kexts\Other\IOSkywalkFamily.kext () - Success


22:389  0:006  OCAK: Requesting __LINKEDIT for com.apple.iokit.IO80211FamilyLegacy - 277C6520 at 3EE1000
...
22:754  0:013  OC: Prelinked injection Kexts\Other\IO80211FamilyLegacy.kext () - Success


22:762  0:008  OCAK: com.apple.driver.AirPort.BrcmNIC got KXLD 0 0
...
22:861  0:010  OC: Prelinked injection Kexts\Other\IO80211FamilyLegacy.kext\Contents\PlugIns\AirPortBrcmNIC.kext () - Success

@perez987
Copy link
Author

@SergeySlice
Quirks->KernelCache=Cacheless also early KP but this time IOSkywalkFamily is not blocked.
Quirks->KernelCache=Auto or Prelinked -> early KP but the kexts are well blocked and added.
This is the few lines I can see on screen at boot:

kp

@b1t0y
Copy link

b1t0y commented Oct 22, 2023

@perez987 > @SergeySlice Quirks->KernelCache=Cacheless also early KP but this time IOSkywalkFamily is not blocked. Quirks->KernelCache=Auto or Prelinked -> early KP but the kexts are well blocked and added. This is the few lines I can see on screen at boot:

kp

Hi,
I just wondrering if you need to put the min kernel to 23.0.0 to work on ioskywalkfamily and other kext. I dont know if min kernel exist in clover though. Coz in OC i get KP when i dont set the min kernel to 23.0.0.

Do you mind sharing how did you put the patches in clover? I want to try it on one of my hackintosh with clover and broadcom 94352hmb. Thanks.

@perez987
Copy link
Author

perez987 commented Oct 22, 2023

@b1t0y
I don't know how to set min kernel to a kext on Clover. But we can put kexts into the macOS related folder, e.g. EFI/Clover/Kexts/14 to be loaded only on Sonoma.

Changes I make to Clover are:

  • copy IOSkywalkFamily.kext and IO80211FamilyLegacy.kext into EFI/Clover/Kexts/14
  • KernelAndKextPatches >> BlockSkywalk=True
  • CsrActiveConfig=0x03080000 (also tried 0x0A87)
  • amfi=0x80 in boot-args.

But so far I don't know of any user having success recovering Broadcom wifi with Clover.

If you try so, comment here the result.

@SergeySlice
Copy link
Collaborator

SergeySlice commented Oct 23, 2023

Yes, BlockSkywalk assumes minkernel=23 and Policy=Exclude.

@perez987
Copy link
Author

perez987 commented Oct 23, 2023

Good morning. I give up for now.
In the debug log It is evident that blocking, loading and ordering kexts is ok. But I still have early KP and I don't know why.
Anyway, it has helped me reconnect with Clover and recover partially forgotten knowledge.

Note: code with cuts.

0:106  0:001  === [ Starting Clover ] =========================
0:106  0:000  Starting Clover revision: 5155 (master, commit 0ea0020c4) on American Megatrends EFI
0:106  0:000  Build id: 20230906192706-0ea0020-5155-dirty

# kexts added from the right folders
16:694  0:008  AddKextsInArray from Other
16:702  0:007  ->Extra kext: Other\Lilu.kext (v.1.6.7)
16:713  0:010  ->Extra kext: Other\AppleALC.kext (v.1.8.4)
16:721  0:008  ->Extra kext: Other\IntelMausi.kext (v.1.0.8)
16:729  0:008  ->Extra kext: Other\USBToolBox.kext (v.1.1.1)
16:745  0:008  ->Extra kext: Other\WhateverGreen.kext (v.1.6.6)
16:753  0:008  ->Extra kext: Other\IntelCPUMonitor.kext (v.1.2.6)
16:761  0:008  ->Extra kext: Other\FakeSMC.kext (v.3.5.5)
16:769  0:007  ->Extra kext: Other\UTBMap.kext (v.1.1)
16:780  0:010  ->Extra kext: Other\RadeonMonitor.kext (v.1.3.5)
16:790  0:009  AddKextsInArray from Off
16:798  0:008  AddKextsInArray from 14
16:806  0:008  ->Extra kext: 14\IOSkywalkFamily.kext (v.1.0)
16:814  0:007  ->Extra kext: 14\IO80211FamilyLegacy.kext (v.1200.12.2b1)
16:822  0:007      |-- PlugIn kext: 14\IO80211FamilyLegacy.kext\Contents\PlugIns\AirPortBrcmNIC.kext (v.1400.1.1)

# IOSkywalkFamily blocked
24:239  0:042  OCAK: Patching invalid size 2EFF8 with 1456000 for com.apple.iokit.IOSkywalkFamily
24:248  0:008  OCAK: com.apple.iokit.IOSkywalkFamily got KXLD 0 0
24:258  0:010  OCAK: Excluding com.apple.iokit.IOSkywalkFamily - VirtualBase FFFFFF80027FE000, MaxSize 40000
24:267  0:008  OCAK: Found kext com.apple.iokit.IOSkywalkFamily (2ED44498) from link 2ED444A0 to drop
24:275  0:008  OCAK: Erasing com.apple.iokit.IOSkywalkFamily from prelinked kext under dict index 3, plist 2F559B98, plist index 167
24:283  0:008  OC: Prelinked blocker (Exclude) result 0 for com.apple.iokit.IOSkywalkFamily () - Success

# kexts loaded AFTER blocking IOSkywalkFamily
24:292  0:008  OCAK: as.vit9696.Lilu got KXLD 0 0
24:369  0:008  OC: Prelinked injection Kexts\Other\Lilu.kext () - Success

24:377  0:008  OCAK: org.netkas.FakeSMC got KXLD 0 0
24:459  0:009  OC: Prelinked injection Kexts\Other\FakeSMC.kext () - Success

24:468  0:008  OCAK: as.vit9696.WhateverGreen got KXLD 0 0
24:557  0:009  OC: Prelinked injection Kexts\Other\WhateverGreen.kext () - Success

24:570  0:012  OCAK: as.vit9696.AppleALC got KXLD 0 0
24:624  0:021  OC: Prelinked injection Kexts\Other\AppleALC.kext () - Success

24:633  0:008  OCAK: as.acidanthera.mieze.IntelMausi got KXLD 0 0
24:714  0:008  OC: Prelinked injection Kexts\Other\IntelMausi.kext () - Success

24:724  0:010  OCAK: com.dhinakg.USBToolBox.kext got KXLD 0 0
24:798  0:008  OC: Prelinked injection Kexts\Other\USBToolBox.kext () - Success

24:856  0:007  OCAK: org.slice.IntelCPUMonitor got KXLD 0 0
24:904  0:011  OC: Prelinked injection Kexts\Other\IntelCPUMonitor.kext () - Success

24:913  0:008  OC: Prelinked injection Kexts\Other\UTBMap.kext () - Success

24:921  0:008  OCAK: org.slice.RadeonMonitor got KXLD 0 0
24:958  0:008  OC: Prelinked injection Kexts\Other\RadeonMonitor.kext () - Success

24:970  0:011  OCAK: com.apple.iokit.IOSkywalkFamily got KXLD 0 0
25:110  0:014  OC: Prelinked injection Kexts\14\IOSkywalkFamily.kext () - Success

25:119  0:008  OCAK: com.apple.iokit.IO80211FamilyLegacy got KXLD 0 0
25:521  0:014  OC: Prelinked injection Kexts\14\IO80211FamilyLegacy.kext () - Success

25:531  0:009  OCAK: com.apple.driver.AirPort.BrcmNIC got KXLD 0 0
25:635  0:012  OC: Prelinked injection Kexts\14\IO80211FamilyLegacy.kext\Contents\PlugIns\AirPortBrcmNIC.kext () - Success

25:643  0:008  OC: Prelink size 77262848 kext offset 62218240 reserved 15044608
25:651  0:008  OCAK: KC TEXT is 65536 bytes with 62104 Mach-O headers need 960

@b1t0y
Copy link

b1t0y commented Oct 23, 2023

@SergeySlice

Yes, BlockSkywalk assumes minkernel=23 and Policy=Exclude.

Does this also set the IO80211FamilyLegacy.kext and its sub kext to min kernel 23? Just askin because all 3 kext needed min kernel to be 23 in OC to work. Thanks.

@perez987
Copy link
Author

@b1t0y
I think that putting these kexts inside Kexts/14 folder they are loaded only on Sonoma. Not sure if it’s the same as min kernel.

@SergeySlice
Copy link
Collaborator

SergeySlice commented Oct 24, 2023

@SergeySlice

Yes, BlockSkywalk assumes minkernel=23 and Policy=Exclude.

Does this also set the IO80211FamilyLegacy.kext and its sub kext to min kernel 23? Just askin because all 3 kext needed min kernel to be 23 in OC to work. Thanks.

Does it mean that if you boot Sonoma and not set min kernel the Sonoma will crash?
Do you need to set min kernel=23.0.0.0 or just 23?

@b1t0y
Copy link

b1t0y commented Oct 24, 2023

@SergeySlice

Does it mean that if you boot Sonoma and not set min kernel the Sonoma will crash? Do you need to set min kernel=23.0.0.0 or just 23?

Yes from my experience the oc kernel crashed that it says refusing new kext com.apple.iokit.ioskywalkfamily when it was not set to Minkernel=23.0.0 in OC. Image below is how it was setup on OC.

266771484-ca04bf6f-71ee-47ed-b7b4-15359b88c17e

@perez987
Copy link
Author

perez987 commented Oct 24, 2023

@b1t0y @SergeySlice
I've tried OpenCore and Sonoma boots fine without MinKernel=23.0.0 (MinKernel=23 would be also valid) in the 3 added kexts.

@b1t0y
Copy link

b1t0y commented Oct 24, 2023

@perez987

@b1t0y @SergeySlice I've tried OpenCore and Sonoma boots fine without MinKernel=23.0.0 (MinKernel=23 would be also valid) in the 3 added kexts.

Hmm. Have you tried resetting nvram on oc and see if iit still works. Im thinking that min kermel still on nvram. Coz mine did not work without it for some reason. Will try again on OC.

@perez987
Copy link
Author

@b1t0y
I’ll try and comment.

@perez987
Copy link
Author

@b1t0y
Tried resetting NVRAM in the OpenCore picker, Sonoma boots fine without MinKernel in the 3 kexts.

@b1t0y
Copy link

b1t0y commented Oct 27, 2023

@perez987

@b1t0y Tried resetting NVRAM in the OpenCore picker, Sonoma boots fine without MinKernel in the 3 kexts.

Do you have any success making it to work?

@perez987
Copy link
Author

@b1t0y
Nope. I stopped trying tests 3 days ago, without success. If @SergeySlice has anything new, I'll try it again. But so far it hasn't worked.

@perez987
Copy link
Author

@SergeySlice
Closing the issue, when there are news it can be discussed again.

@perez987
Copy link
Author

@b1t0y @Striker770 @etyel @dateno1 @jonasw8

Clover release 5157 has fixed this issue, now you can have Broadcom wifi on Sonoma if:

  • IOSkywalk is blocked
  • IOSkywalkFamily, IO80211FamilyLegacy and AirPortBrcmNIC are added
  • CsrActiveConfig=0x803

Thank you @SergeySlice and @jief666

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants