patchsets: Publish subclass for GPUs

This commit is contained in:
Mykola Grymalyuk
2024-09-02 11:11:43 -06:00
parent a329e80082
commit 3585053633
16 changed files with 136 additions and 21 deletions

View File

@@ -295,7 +295,7 @@ class HardwarePatchsetDetection:
""" """
Check if Kernel Debug Kit is present Check if Kernel Debug Kit is present
""" """
return kdk_handler.KernelDebugKitObject(self._constants, self._os_build, self._os_version).kdk_already_installed return kdk_handler.KernelDebugKitObject(self._constants, self._os_build, self._os_version, passive=True).kdk_already_installed
def _is_cached_metallib_support_pkg_present(self) -> bool: def _is_cached_metallib_support_pkg_present(self) -> bool:

View File

@@ -24,6 +24,16 @@ class HardwareVariant(StrEnum):
MISCELLANEOUS: str = "Miscellaneous" MISCELLANEOUS: str = "Miscellaneous"
class HardwareVariantGraphicsSubclass(StrEnum):
"""
Graphics hardware variant subclass
"""
NON_METAL_GRAPHICS: str = "Non-Metal Graphics"
METAL_3802_GRAPHICS: str = "Metal 3802 Graphics"
METAL_31001_GRAPHICS: str = "Metal 31001 Graphics"
NOT_APPLICABLE: str = "N/A"
class BaseHardware(BasePatchset): class BaseHardware(BasePatchset):
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None: def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
@@ -65,6 +75,13 @@ class BaseHardware(BasePatchset):
raise NotImplementedError raise NotImplementedError
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
"""
What subclass of graphics
"""
return HardwareVariantGraphicsSubclass.NOT_APPLICABLE
def required_amfi_level(self) -> AmfiConfigDetectLevel: def required_amfi_level(self) -> AmfiConfigDetectLevel:
""" """
What level of AMFI configuration is required for this patch set What level of AMFI configuration is required for this patch set

View File

@@ -2,7 +2,7 @@
amd_legacy_gcn.py: AMD Legacy GCN detection amd_legacy_gcn.py: AMD Legacy GCN detection
""" """
from ..base import BaseHardware, HardwareVariant from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
from ...base import PatchType from ...base import PatchType
@@ -56,6 +56,13 @@ class AMDLegacyGCN(BaseHardware):
return HardwareVariant.GRAPHICS return HardwareVariant.GRAPHICS
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
"""
Type of hardware variant subclass
"""
return HardwareVariantGraphicsSubclass.METAL_31001_GRAPHICS
def requires_kernel_debug_kit(self) -> bool: def requires_kernel_debug_kit(self) -> bool:
""" """
Apple no longer provides standalone kexts in the base OS Apple no longer provides standalone kexts in the base OS

View File

@@ -4,7 +4,7 @@ amd_polaris.py: AMD Polaris detection
from .amd_legacy_gcn import AMDLegacyGCN from .amd_legacy_gcn import AMDLegacyGCN
from ..base import BaseHardware, HardwareVariant from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
from ...base import PatchType from ...base import PatchType
@@ -56,6 +56,13 @@ class AMDPolaris(BaseHardware):
return HardwareVariant.GRAPHICS return HardwareVariant.GRAPHICS
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
"""
Type of hardware variant subclass
"""
return HardwareVariantGraphicsSubclass.METAL_31001_GRAPHICS
def requires_kernel_debug_kit(self) -> bool: def requires_kernel_debug_kit(self) -> bool:
""" """
Apple no longer provides standalone kexts in the base OS Apple no longer provides standalone kexts in the base OS

View File

@@ -2,7 +2,7 @@
amd_terascale_1.py: AMD TeraScale 1 detection amd_terascale_1.py: AMD TeraScale 1 detection
""" """
from ..base import BaseHardware, HardwareVariant from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
from ...base import PatchType from ...base import PatchType
@@ -54,6 +54,13 @@ class AMDTeraScale1(BaseHardware):
return HardwareVariant.GRAPHICS return HardwareVariant.GRAPHICS
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
"""
Type of hardware variant subclass
"""
return HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS
def requires_kernel_debug_kit(self) -> bool: def requires_kernel_debug_kit(self) -> bool:
""" """
Apple no longer provides standalone kexts in the base OS Apple no longer provides standalone kexts in the base OS

View File

@@ -2,7 +2,7 @@
amd_terascale_2.py: AMD TeraScale 2 detection amd_terascale_2.py: AMD TeraScale 2 detection
""" """
from ..base import BaseHardware, HardwareVariant from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
from ...base import PatchType from ...base import PatchType
@@ -55,6 +55,13 @@ class AMDTeraScale2(BaseHardware):
return HardwareVariant.GRAPHICS return HardwareVariant.GRAPHICS
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
"""
Type of hardware variant subclass
"""
return HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS
def requires_kernel_debug_kit(self) -> bool: def requires_kernel_debug_kit(self) -> bool:
""" """
Apple no longer provides standalone kexts in the base OS Apple no longer provides standalone kexts in the base OS

View File

@@ -2,7 +2,7 @@
amd_vega.py: AMD Vega detection amd_vega.py: AMD Vega detection
""" """
from ..base import BaseHardware, HardwareVariant from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
from ...base import PatchType from ...base import PatchType
@@ -54,6 +54,13 @@ class AMDVega(BaseHardware):
return HardwareVariant.GRAPHICS return HardwareVariant.GRAPHICS
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
"""
Type of hardware variant subclass
"""
return HardwareVariantGraphicsSubclass.METAL_31001_GRAPHICS
def requires_kernel_debug_kit(self) -> bool: def requires_kernel_debug_kit(self) -> bool:
""" """
Apple no longer provides standalone kexts in the base OS Apple no longer provides standalone kexts in the base OS

View File

@@ -2,7 +2,7 @@
intel_broadwell.py: Intel Broadwell detection intel_broadwell.py: Intel Broadwell detection
""" """
from ..base import BaseHardware, HardwareVariant from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
from ...base import PatchType from ...base import PatchType
@@ -45,6 +45,13 @@ class IntelBroadwell(BaseHardware):
return HardwareVariant.GRAPHICS return HardwareVariant.GRAPHICS
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
"""
Type of hardware variant subclass
"""
return HardwareVariantGraphicsSubclass.METAL_31001_GRAPHICS
def native_os(self) -> bool: def native_os(self) -> bool:
""" """
Dropped support with macOS 13, Ventura Dropped support with macOS 13, Ventura

View File

@@ -2,7 +2,7 @@
intel_haswell.py: Intel Haswell detection intel_haswell.py: Intel Haswell detection
""" """
from ..base import BaseHardware, HardwareVariant from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
from ...base import PatchType from ...base import PatchType
@@ -54,6 +54,13 @@ class IntelHaswell(BaseHardware):
return HardwareVariant.GRAPHICS return HardwareVariant.GRAPHICS
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
"""
Type of hardware variant subclass
"""
return HardwareVariantGraphicsSubclass.METAL_3802_GRAPHICS
def requires_metallib_support_pkg(self) -> bool: def requires_metallib_support_pkg(self) -> bool:
""" """
New compiler format introduced in macOS 15, Sequoia New compiler format introduced in macOS 15, Sequoia

View File

@@ -2,7 +2,7 @@
intel_iron_lake.py: Intel Iron Lake detection intel_iron_lake.py: Intel Iron Lake detection
""" """
from ..base import BaseHardware, HardwareVariant from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
from ...base import PatchType from ...base import PatchType
@@ -53,6 +53,13 @@ class IntelIronLake(BaseHardware):
return HardwareVariant.GRAPHICS return HardwareVariant.GRAPHICS
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
"""
Type of hardware variant subclass
"""
return HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS
def requires_kernel_debug_kit(self) -> bool: def requires_kernel_debug_kit(self) -> bool:
""" """
Apple no longer provides standalone kexts in the base OS Apple no longer provides standalone kexts in the base OS

View File

@@ -2,7 +2,7 @@
intel_ivy_bridge.py: Intel Ivy Bridge detection intel_ivy_bridge.py: Intel Ivy Bridge detection
""" """
from ..base import BaseHardware, HardwareVariant from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
from ...base import PatchType from ...base import PatchType
@@ -56,6 +56,13 @@ class IntelIvyBridge(BaseHardware):
return HardwareVariant.GRAPHICS return HardwareVariant.GRAPHICS
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
"""
Type of hardware variant subclass
"""
return HardwareVariantGraphicsSubclass.METAL_3802_GRAPHICS
def requires_metallib_support_pkg(self) -> bool: def requires_metallib_support_pkg(self) -> bool:
""" """
New compiler format introduced in macOS 15, Sequoia New compiler format introduced in macOS 15, Sequoia

View File

@@ -2,7 +2,7 @@
intel_sandy_bridge.py: Intel Sandy Bridge detection intel_sandy_bridge.py: Intel Sandy Bridge detection
""" """
from ..base import BaseHardware, HardwareVariant from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
from ...base import PatchType from ...base import PatchType
@@ -54,6 +54,13 @@ class IntelSandyBridge(BaseHardware):
return HardwareVariant.GRAPHICS return HardwareVariant.GRAPHICS
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
"""
Type of hardware variant subclass
"""
return HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS
def requires_kernel_debug_kit(self) -> bool: def requires_kernel_debug_kit(self) -> bool:
""" """
Requires replacing a number of kexts in the BootKC Requires replacing a number of kexts in the BootKC

View File

@@ -2,7 +2,7 @@
intel_skylake.py: Intel Skylake detection intel_skylake.py: Intel Skylake detection
""" """
from ..base import BaseHardware, HardwareVariant from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
from ...base import PatchType from ...base import PatchType
@@ -52,6 +52,13 @@ class IntelSkylake(BaseHardware):
return HardwareVariant.GRAPHICS return HardwareVariant.GRAPHICS
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
"""
Type of hardware variant subclass
"""
return HardwareVariantGraphicsSubclass.METAL_31001_GRAPHICS
def _model_specific_patches(self) -> dict: def _model_specific_patches(self) -> dict:
""" """
Model specific patches Model specific patches

View File

@@ -2,7 +2,7 @@
nvidia_kepler.py: Nvidia Kepler detection nvidia_kepler.py: Nvidia Kepler detection
""" """
from ..base import BaseHardware, HardwareVariant from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
from ...base import PatchType from ...base import PatchType
@@ -65,6 +65,13 @@ class NvidiaKepler(BaseHardware):
return HardwareVariant.GRAPHICS return HardwareVariant.GRAPHICS
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
"""
Type of hardware variant subclass
"""
return HardwareVariantGraphicsSubclass.METAL_3802_GRAPHICS
def requires_metallib_support_pkg(self) -> bool: def requires_metallib_support_pkg(self) -> bool:
""" """
New compiler format introduced in macOS 15, Sequoia New compiler format introduced in macOS 15, Sequoia

View File

@@ -2,7 +2,7 @@
nvidia_tesla.py: Nvidia Tesla detection nvidia_tesla.py: Nvidia Tesla detection
""" """
from ..base import BaseHardware, HardwareVariant from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
from ...base import PatchType from ...base import PatchType
@@ -53,6 +53,13 @@ class NvidiaTesla(BaseHardware):
return HardwareVariant.GRAPHICS return HardwareVariant.GRAPHICS
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
"""
Type of hardware variant subclass
"""
return HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS
def requires_kernel_debug_kit(self) -> bool: def requires_kernel_debug_kit(self) -> bool:
""" """
Apple no longer provides standalone kexts in the base OS Apple no longer provides standalone kexts in the base OS

View File

@@ -2,7 +2,7 @@
nvidia_webdriver.py: Nvidia Web Driver detection nvidia_webdriver.py: Nvidia Web Driver detection
""" """
from ..base import BaseHardware, HardwareVariant from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
from ...base import PatchType from ...base import PatchType
@@ -59,6 +59,13 @@ class NvidiaWebDriver(BaseHardware):
return HardwareVariant.GRAPHICS return HardwareVariant.GRAPHICS
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
"""
Type of hardware variant subclass
"""
return HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS
def requires_kernel_debug_kit(self) -> bool: def requires_kernel_debug_kit(self) -> bool:
""" """
Apple no longer provides standalone kexts in the base OS Apple no longer provides standalone kexts in the base OS