Jump to content

How to make SSDT, If (_OSI ("Darwin")) to a specific version of MacOS?


12 posts in this topic

Recommended Posts

For that to work, _OSI() would need to return different values for different versions of the OS. This does not appear to be how the specification intends _OSI to behave, and only Windows does it, to some extent (which possibly underlines that a version-dependent answer to the question "what's the OS?"  is NOT a good design…).

 

@ThriftLover , may I ask why you're trying to make a version-dependent SSDT? Maybe we could find another way to solve your problem.

  • Like 2
7 hours ago, etorix said:

For that to work, _OSI() would need to return different values for different versions of the OS. This does not appear to be how the specification intends _OSI to behave, and only Windows does it, to some extent (which possibly underlines that a version-dependent answer to the question "what's the OS?"  is NOT a good design…).

 

@ThriftLover , may I ask why you're trying to make a version-dependent SSDT? Maybe we could find another way to solve your problem.

Thanks. Jus trying to disable a device in PCIE slot that works in older version of macOS but causes kernel panic in Ventura.  I wish there was somehow an option to limit min and max for Mac OS versions for device property or ACPI injection like how we can for KEXTs.   

This is indeed a case for a version-dependent SSDT…

I fear that the solution is to have two EFI folders and to choose the right one with BootloaderChooser, or simply by selecting the boot drive in BIOS.

 

Out of curiosity, what is the offending device?

For OpenCore: you just create an SSDT and enable/disable it as needed before rebooting. Done

For Clover: Since clover allows switching configs from the boot menu, just create a duplicate of your config. And then you just add the SSDT to the "Disabled AML" list in one of the configs and switch them from the boot menu as needed. Done.

Bootloader Chooser: use OpenCore with the disabled device on newer versions of macOS and Clover for older macOS with the SSDT enables and then you can easily switch back an forth between both. Because handling 2 versions of OpenCore would require 2 "OC" and "OC1" (or whatever name) folder which gives you an error when trying to boot from the "OC1" folder, iirc.

Edited by cankiulascmnfye
  • 9 months later...
On 1/15/2023 at 7:33 PM, Slice said:

You can make binary patch for kext AppleACPIPlatform то report "BigSur" instead of "Darwin".

I am not sure.

 

I confirmed it worked for me!

 

I created a repo to explain this method. I hope it helps someone.

https://github.com/b00t0x/opencore-macos-version-specific-dp

  • Like 3
5 hours ago, ccx4700 said:

 

I confirmed it worked for me!

 

I created a repo to explain this method. I hope it helps someone.

https://github.com/b00t0x/opencore-macos-version-specific-dp

 

Thanks for sharing. This would be interesting for SSDT-PLUG as well, since it's not required for Darwin Kernel 21 and newer. But from the look of things it's not possible to define kernel ranges bu only ONE specific Kernel version.

  • Like 1
1 hour ago, cankiulascmnfye said:

 

Thanks for sharing. This would be interesting for SSDT-PLUG as well, since it's not required for Darwin Kernel 21 and newer. But from the look of things it's not possible to define kernel ranges bu only ONE specific Kernel version.

 

I think it is possible to support multiple kernel versions by defining multiple patches with different MinKernel / MaxKernel.

 

Also, although it is not a beautiful way to write it, by writing it as follows, you should be able to control the applicable kernel version in detail with SSDT.

If (_OSI("DarwXX") || _OSI("DarwYY") || ...)

"DarwXX" is an arbitrary format of my choice, so you can use any format you like, such as "21to23". Preferably 6 characters.

キャプチャ 2023-11-11 23.42.55.png

  • Like 1
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...