-
Notifications
You must be signed in to change notification settings - Fork 45
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
M.2 BCM4350 ASPM #794
Comments
You write about AirportBrcmFixup? |
Regarding CC @lvs1974 |
@mishurov, did you try to inject property pci-aspm-default=0? |
@Andrey1970AppleLife, yes, this is about AirportBrcmFixup. Excuse me, please, it slipped my mind that it was a dedicated repo for bugs while I was writing the test. @vit9696 I couldn't figure out how to link the class. I've read the docstrings in LegacyIOService.h and I've analysed the actual implementation in AirportBrcmFixup. If something crosses you mind, can you provide an example code in those projects that use Lilu? |
@lvs1974 that is basically what's the issue about. Without pin masking and with |
Link? Well, you just update Info.plist to contain the kext exporting it in OSBundleLibraries, and then cast a pointer to the class instance pointer?.. |
@vit9696 it is interesting, I've just rebooted to MacOS with the masked pin, and |
What's the problem being reported? If you need to disable CLKREQ and keep L0s or L1 ASPM, you can do so by passing the correct option bits via
|
@07151129 Thanks, you're right. Passing It doesn't solve my problem with Linux though. The Linux driver enables |
You can force disable ASPM on Linux globally via pcie_aspm kernel parameter. |
@07151129 I've already tried, it has no effect. Probably Debian's kernel is compiled without CONFIG_PCIEASPM. https://patchwork.kernel.org/patch/11175639/ Anyway, it is weird that every ASPM feature works except the clock power management in MacOS. All one has to do is to don't disjunct I don't know if this is related cos I don't know how it works but there's also an interesting patch regarding LPO and bluetooth. May be related to this #715 |
All in all. Setting |
Well, sounds good to me as a workaround. Anybody who knows a better route can reply to the closed issue. |
CLKREQ control is a part of the open-source platform-independent layer of brcm80211, which is also what AirPortBrcm uses. You can read the source of |
@07151129 yep, brcmsmac to be more precise as I was able to guess, I tried to patch some methods but without any success |
Hi everybody. |
I tried to set pci-aspm-default=67 in boot arg, with AirportBrcmFixup 2.0.9. However I am not getting ASPM. lspci shows that "LnkCtl: ASPM Disabled;". Do I have to mask the pin in order to get ASPM working? Or is there something else I am missing? |
@buyddy: AirportBrcmFixup disables ASPM for dw1820a (0x14e4:0x43a3) by default. |
Thanks for the information! Does masking the pin do anything under Windows that I should be aware of? |
@buyddy when I had the masked pin, Windows hanged on boot during warm reboots from Linux, I had to turn off the laptop and turn it on again. Also Windows hanged during driver installation for this card. |
So what is your current setup now? Do you have ASPM? |
@buyddy I rarely boot to MacOS, only when I need to debug a mobile app in the iOS simulator, I don't need power saving features there, I just disabled it and use normal ASPM with CLQREQ under Linux. |
I've got problems after warm reboot from Linux to MacOS. I mainly work in Linux and occasionally use MacOS to compile and debug something for iOS. The problem is with ASPM, I gather.
Initially I had been using pin masking
The masked pin is 53. According to the PCI-E M.2 specification it is being used for CLKREQ#
After removing the tape and using
pci-aspm-default
, it works fine if the system initially was powered off. But after rebooting from Linux card is inactive, without settingpci-aspm-default
system hangs with something like "couldn't bring the core back after reset" or something.lspci -vvv -s 0.0X.00
in Linux shows that ASPM L0s and L1 are enabled regardless of the kernel parameters etc. MacOS pciutils from homebrew always show that ASPM is disabled.lspci -xxx -s 0.0X.00
also shows that corresponding register is set either to0x43
or0x40
in Linux and MacOS accordingly.setpci
doesn't help. It looks like Linux puts the card into L1 state and MacOS can't bring the card back because it thinks that ASPM is not supported, although I've enabled it everywhere in configs.I tried to override in this driver the method
_pcie_clkreq
, it has no effect. The other symbols such as__ZN15AirPort_BrcmNIC18overrideASPMDeviceEbb
make no sense for me, I can't guess what these two booleans in the arguments stand for. And I don't know how to callIOPCIDevice::setASPMState
in this Lilu environment.From the practical point, I rolled back to using the pin masking. But just for the sake of perfectionism, can it be solved, can this driver utilise the ASPM features of the card and do not conflict with the Linux driver?
The text was updated successfully, but these errors were encountered: