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

Suggestion: Add "Fix PCI bus enumeration" kernel patches #92

Open
5T33Z0 opened this issue Jan 2, 2025 · 8 comments
Open

Suggestion: Add "Fix PCI bus enumeration" kernel patches #92

5T33Z0 opened this issue Jan 2, 2025 · 8 comments

Comments

@5T33Z0
Copy link

5T33Z0 commented Jan 2, 2025

Congrats to your very interesting project and Happy New Year. I've tested it on 3 differen systems so far and I am impressed how well this works (almost) out of the box (will report about my experiencs in the "Discussion" section later).

Anyway, I've noticed is that there is room for improvement. For macOS Ventura and newer, you could add the following Kernel Patches from the OCLP config by CaseySJ:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Kernel</key>
	<dict>
		<key>Patch</key>
		<array>
			<dict>
				<key>Arch</key>
				<string>x86_64</string>
				<key>Base</key>
				<string>__ZN17IOPCIConfigurator18IOPCIIsHotplugPortEP16IOPCIConfigEntry</string>
				<key>Comment</key>
				<string>Fix PCI bus enumeration (Ventura)</string>
				<key>Count</key>
				<integer>1</integer>
				<key>Enabled</key>
				<false/>
				<key>Find</key>
				<data>hNt1S0GLVzg=</data>
				<key>Identifier</key>
				<string>com.apple.iokit.IOPCIFamily</string>
				<key>Limit</key>
				<integer>0</integer>
				<key>Mask</key>
				<data></data>
				<key>MaxKernel</key>
				<string>22.99.99</string>
				<key>MinKernel</key>
				<string>22.0.0</string>
				<key>Replace</key>
				<data>hNvrS0GLVzg=</data>
				<key>ReplaceMask</key>
				<data></data>
				<key>Skip</key>
				<integer>0</integer>
			</dict>
			<dict>
				<key>Arch</key>
				<string>x86_64</string>
				<key>Base</key>
				<string>__ZN17IOPCIConfigurator18IOPCIIsHotplugPortEP16IOPCIConfigEntry</string>
				<key>Comment</key>
				<string>Fix PCI bus enumeration (Sonoma)</string>
				<key>Count</key>
				<integer>1</integer>
				<key>Enabled</key>
				<false/>
				<key>Find</key>
				<data>RYTkdUs=</data>
				<key>Identifier</key>
				<string>com.apple.iokit.IOPCIFamily</string>
				<key>Limit</key>
				<integer>0</integer>
				<key>Mask</key>
				<data></data>
				<key>MaxKernel</key>
				<string></string>
				<key>MinKernel</key>
				<string>23.0.0</string>
				<key>Replace</key>
				<data>RYTk60s=</data>
				<key>ReplaceMask</key>
				<data></data>
				<key>Skip</key>
				<integer>0</integer>
			</dict>
		</array>
	</dict>
</dict>
</plist>

This removes the menubar entry for ejecting/disabling PCI devices (even though they are not removable):

@lzhoang2801
Copy link
Owner

It's purely cosmetic, and I don't have any concrete indication of which devices specifically might be affected. Adding it wouldn't be difficult for me, but I'm trying to minimize cosmetic patches to avoid excessive nitpicking from others.

There's an additional patch for AM5 motherboards: https://github.com/AMD-OSX/AMD_Vanilla/blob/master/patches.plist#L549C4-L578C11

@fabiosun
Copy link

fabiosun commented Jan 8, 2025

There's an additional patch for AM5 motherboards: https://github.com/AMD-OSX/AMD_Vanilla/blob/master/patches.plist#L549C4-L578C11

Hi and thanks for your scrips they seems very interesting to help people to build a proper EFI
This patch you are quoting is mandatory for AM5 system and in my case it is disabled when your script produces a "working" EFI for my build
How to help you to improve AM5 part of your applications?

@fabiosun
Copy link

fabiosun commented Jan 9, 2025

@lzhoang2801 if you are interested to see that for AM5 is not a cosmetic problem have that patch disabled you could read here the job done to understand and then to create that patch:
https://forum.amd-osx.com/threads/ryzen-7000-testing.3318/post-27578

@lzhoang2801
Copy link
Owner

@fabiosun I've updated it (https://github.com/lzhoang2801/OpCore-Simplify/commit/ca3d86c069d288cb53f40b3b7d97937b2858666b). Thank you. However, OpCore Simplify still doesn't fully support the AM5 series. This is limited by the Hardware Sniffer's ability to collect MMIO devirt information. Hopefully, someone who understands the logic OpenCore Debug uses to obtain these values can help.

@lzhoang2801

This comment has been minimized.

@lzhoang2801

This comment has been minimized.

@fabiosun

This comment has been minimized.

@lzhoang2801

This comment has been minimized.

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

3 participants