OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
CommonPatches.c File Reference
#include <Base.h>
#include <IndustryStandard/AppleIntelCpuInfo.h>
#include <Library/BaseMemoryLib.h>
#include <Library/OcDebugLogLib.h>
#include <Library/OcAppleKernelLib.h>
#include <Library/PrintLib.h>
#include <Library/OcFileLib.h>
#include <Library/OcStringLib.h>
#include <Library/UefiLib.h>
#include "LegacyBcopy.h"

Go to the source code of this file.

Data Structures

struct  XCPM_MSR_RECORD_
 
struct  COMMPAGE_DESCRIPTOR
 
struct  COMMPAGE_DESCRIPTOR_64
 
union  COMMPAGE_DESCRIPTOR_ANY
 

Macros

#define COMM_PAGE_BCOPY   0xFFFF0780
 
#define kHasSupplementalSSE3   0x00000100
 

Typedefs

typedef struct XCPM_MSR_RECORD_ XCPM_MSR_RECORD
 

Functions

 STATIC_ASSERT (sizeof(mMovEcxE2)==5, "Unsupported mMovEcxE2")
 
 STATIC_ASSERT (sizeof(mMovCxE2)==4, "Unsupported mMovCxE2")
 
 STATIC_ASSERT (sizeof(mWrmsr)==2, "Unsupported mWrmsr")
 
STATIC EFI_STATUS PatchAppleCpuPmCfgLock (IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchAppleXcpmCfgLock (IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchAppleXcpmExtraMsrs (IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchAppleXcpmForceBoost (IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchUsbXhciPortLimit1 (IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchUsbXhciPortLimit2 (IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchUsbXhciPortLimit3 (IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchThirdPartyDriveSupport (IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchForceInternalDiskIcons (IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchAppleIoMapperSupport (IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchAppleIoMapperMapping (IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchDummyPowerManagement (IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchIncreasePciBarSize (IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 
VOID PatchSetPciSerialDevice (IN UINTN RegisterBase, IN UINT32 RegisterStride)
 
STATIC EFI_STATUS PatchCustomPciSerialPmio (IN OUT PATCHER_CONTEXT *Patcher)
 
STATIC EFI_STATUS PatchCustomPciSerialDevice (IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchCustomSmbiosGuid (IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchPanicKextDump (IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchLapicKernel (IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchLapicKernelLegacy (IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchLapicKernelPanic (IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchPowerStateTimeout (IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchAppleRtcChecksum (IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchSegmentJettison (IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchBTFeatureFlags (IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchLegacyCommpage (IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchAquantiaEthernet (IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 
STATIC EFI_STATUS PatchForceSecureBootScheme (IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 
 STATIC_ASSERT (sizeof(mApfsTimeoutFind)==6, "Unsupported mApfsTimeoutFind")
 
 STATIC_ASSERT (sizeof(mApfsTimeoutReplace)==6, "Unsupported mApfsTimeoutReplace")
 
VOID PatchSetApfsTimeout (IN UINT32 Timeout)
 
STATIC EFI_STATUS PatchSetApfsTrimTimeout (IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 
EFI_STATUS KernelApplyQuirk (IN KERNEL_QUIRK_NAME Name, IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
 

Variables

STATIC CONST UINT8 mMovEcxE2 []
 
STATIC CONST UINT8 mMovCxE2 []
 
STATIC CONST UINT8 mWrmsr []
 
STATIC CONST UINTN mWrmsrMaxDistance = 32
 
STATIC CONST UINT8 mXcpmCfgLockRelFind []
 
STATIC CONST UINT8 mXcpmCfgLockRelReplace []
 
STATIC PATCHER_GENERIC_PATCH mXcpmCfgLockRelPatch
 
STATIC CONST UINT8 mXcpmCfgLockDbgFind []
 
STATIC CONST UINT8 mXcpmCfgLockDbgReplace []
 
STATIC PATCHER_GENERIC_PATCH mXcpmCfgLockDbgPatch
 
STATIC CONST UINT8 mMiscPwrMgmtRelFind []
 
STATIC CONST UINT8 mMiscPwrMgmtRelReplace []
 
STATIC PATCHER_GENERIC_PATCH mMiscPwrMgmtRelPatch
 
STATIC CONST UINT8 mMiscPwrMgmtRelFind15 []
 
STATIC CONST UINT8 mMiscPwrMgmtRelMask15 []
 
STATIC CONST UINT8 mMiscPwrMgmtRelReplace15 []
 
STATIC CONST UINT8 mMiscPwrMgmtRelReplaceMask15 []
 
STATIC PATCHER_GENERIC_PATCH mMiscPwrMgmtRel15Patch
 
STATIC CONST UINT8 mMiscPwrMgmtDbgFind []
 
STATIC CONST UINT8 mMiscPwrMgmtDbgReplace []
 
STATIC PATCHER_GENERIC_PATCH mMiscPwrMgmtDbgPatch
 
STATIC CONST UINT8 mPerfCtrlFind1 []
 
STATIC CONST UINT8 mPerfCtrlFind2 []
 
STATIC CONST UINT8 mPerfCtrlFind3 []
 
STATIC CONST UINT8 mPerfCtrlFind4 []
 
STATIC CONST UINT8 mPerfCtrlMax []
 
STATIC CONST UINT8 mRemoveUsbLimitV1Find []
 
STATIC CONST UINT8 mRemoveUsbLimitV1Replace []
 
STATIC PATCHER_GENERIC_PATCH mRemoveUsbLimitV1Patch
 
STATIC CONST UINT8 mRemoveUsbLimitV2Find []
 
STATIC CONST UINT8 mRemoveUsbLimitV2Replace []
 
STATIC PATCHER_GENERIC_PATCH mRemoveUsbLimitV2Patch
 
STATIC CONST UINT8 mRemoveUsbLimitIoP1Find1 []
 
STATIC CONST UINT8 mRemoveUsbLimitIoP1Replace1 []
 
STATIC PATCHER_GENERIC_PATCH mRemoveUsbLimitIoP1Patch1
 
STATIC CONST UINT8 mRemoveUsbLimitIoP1Find2 []
 
STATIC CONST UINT8 mRemoveUsbLimitIoP1Mask2 []
 
STATIC CONST UINT8 mRemoveUsbLimitIoP1Replace2 []
 
STATIC CONST UINT8 mRemoveUsbLimitIoP1ReplaceMask2 []
 
STATIC PATCHER_GENERIC_PATCH mRemoveUsbLimitIoP1Patch2
 
STATIC CONST UINT8 mIOAHCIBlockStoragePatchV1Find []
 
STATIC CONST UINT8 mIOAHCIBlockStoragePatchV1Replace []
 
STATIC PATCHER_GENERIC_PATCH mIOAHCIBlockStoragePatchV1
 
STATIC CONST UINT8 mIOAHCIBlockStoragePatchV2Find []
 
STATIC CONST UINT8 mIOAHCIBlockStoragePatchV2Replace []
 
STATIC PATCHER_GENERIC_PATCH mIOAHCIBlockStoragePatchV2
 
STATIC CONST UINT8 mIOAHCIBlockStoragePatch133Find1 []
 
STATIC CONST UINT8 mIOAHCIBlockStoragePatch133Find2 []
 
STATIC CONST UINT8 mIOAHCIBlockStoragePatch133FindMask []
 
STATIC CONST UINT8 mIOAHCIBlockStoragePatch133Replace []
 
STATIC CONST UINT8 mIOAHCIBlockStoragePatch133ReplaceMask []
 
STATIC PATCHER_GENERIC_PATCH mIOAHCIBlockStoragePatch133Part1
 
STATIC PATCHER_GENERIC_PATCH mIOAHCIBlockStoragePatch133Part2
 
STATIC CONST UINT8 mIOAHCIBlockStoragePatch144Find []
 
STATIC CONST UINT8 mIOAHCIBlockStoragePatch144FindMask []
 
STATIC CONST UINT8 mIOAHCIBlockStoragePatch144Replace []
 
STATIC CONST UINT8 mIOAHCIBlockStoragePatch144ReplaceMask []
 
STATIC PATCHER_GENERIC_PATCH mIOAHCIBlockStoragePatch144
 
STATIC CONST UINT8 mIOAHCIPortPatchFind []
 
STATIC CONST UINT8 mIOAHCIPortPatchReplace []
 
STATIC PATCHER_GENERIC_PATCH mIOAHCIPortPatch
 
STATIC CONST UINT8 mAppleIoMapperPatchFind []
 
STATIC CONST UINT8 mAppleIoMapperPatchReplace []
 
STATIC PATCHER_GENERIC_PATCH mAppleIoMapperPatch
 
STATIC CONST UINT8 mAppleIoMapperMappingPatchReplace []
 
STATIC PATCHER_GENERIC_PATCH mAppleIoMapperMappingPatch
 
STATIC CONST UINT8 mAppleDummyCpuPmPatchReplace []
 
STATIC PATCHER_GENERIC_PATCH mAppleDummyCpuPmPatch
 
STATIC CONST UINT8 mIncreasePciBarSizePatchFind []
 
STATIC CONST UINT8 mIncreasePciBarSizePatchReplace []
 
STATIC PATCHER_GENERIC_PATCH mIncreasePciBarSizePatch
 
STATIC CONST UINT8 mIncreasePciBarSizePatchLegacyFind []
 
STATIC CONST UINT8 mIncreasePciBarSizePatchLegacyReplace []
 
STATIC PATCHER_GENERIC_PATCH mIncreasePciBarSizeLegacyPatch
 
STATIC CONST UINT8 mSerialDevicePmioFind []
 
STATIC UINTN mPmioRegisterBase = 0
 To be set by PatchSetPciSerialDevice()
 
STATIC UINT32 mPmioRegisterStride = 1
 To be set by PatchSetPciSerialDevice()
 
STATIC CONST UINTN mInOutMaxDistance = 64
 
STATIC CONST UINT8 mCustomSmbiosGuidPatchFind []
 
STATIC CONST UINT8 mCustomSmbiosGuidPatchReplace []
 
STATIC PATCHER_GENERIC_PATCH mCustomSmbiosGuidPatch
 
STATIC CONST UINT8 mPanicKextDumpPatchFind []
 
STATIC CONST UINT8 mPanicKextDumpPatchReplace []
 
STATIC PATCHER_GENERIC_PATCH mPanicKextDumpPatch
 
STATIC CONST UINT8 mLapicKernelPanicPatchFind []
 
STATIC CONST UINT8 mLapicKernelPanicPatchMask []
 
STATIC CONST UINT8 mLapicKernelPanicPatchReplace []
 
STATIC PATCHER_GENERIC_PATCH mLapicKernelPanicPatch
 
STATIC CONST UINT8 mLapicKernelPanicMasterPatchFind []
 
STATIC CONST UINT8 mLapicKernelPanicMasterPatchMask []
 
STATIC CONST UINT8 mLapicKernelPanicMasterPatchReplace []
 
STATIC PATCHER_GENERIC_PATCH mLapicKernelPanicMasterPatch
 
STATIC CONST UINT8 mLapicKernelPanicPatchLegacyFind []
 
STATIC CONST UINT8 mLapicKernelPanicPatchLegacyMask []
 
STATIC CONST UINT8 mLapicKernelPanicPatchLegacyReplace []
 
STATIC PATCHER_GENERIC_PATCH mLapicKernelPanicLegacyPatch
 
STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyFind1 []
 
STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyMask1 []
 
STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyReplace1 []
 
STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyReplaceMask1 []
 
STATIC PATCHER_GENERIC_PATCH mLapicKernelPanicMasterLegacyPatch1
 
STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyFind2 []
 
STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyMask2 []
 
STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyReplace2 []
 
STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyReplaceMask2 []
 
STATIC PATCHER_GENERIC_PATCH mLapicKernelPanicMasterLegacyPatch2
 
STATIC CONST UINT8 mPowerStateTimeoutPanicFind []
 
STATIC CONST UINT8 mPowerStateTimeoutPanicReplace []
 
STATIC PATCHER_GENERIC_PATCH mPowerStateTimeoutPanicMasterPatch
 
STATIC CONST UINT8 mPowerStateTimeoutPanicInlineFind []
 
STATIC CONST UINT8 mPowerStateTimeoutPanicInlineMask []
 
STATIC CONST UINT8 mPowerStateTimeoutPanicInlineReplace []
 
STATIC PATCHER_GENERIC_PATCH mPowerStateTimeoutPanicInlinePatch
 
STATIC CONST UINT8 mAppleRtcChecksumPatchFind32 []
 
STATIC CONST UINT8 mAppleRtcChecksumPatchMask32 []
 
STATIC CONST UINT8 mAppleRtcChecksumPatchReplace32 []
 
STATIC CONST UINT8 mAppleRtcChecksumPatchFind64 []
 
STATIC CONST UINT8 mAppleRtcChecksumPatchMask64 []
 
STATIC CONST UINT8 mAppleRtcChecksumPatchReplace64 []
 
STATIC PATCHER_GENERIC_PATCH mAppleRtcChecksumPatch32
 
STATIC PATCHER_GENERIC_PATCH mAppleRtcChecksumPatch64
 
STATIC CONST UINT8 mBTFeatureFlagsReplace []
 
STATIC PATCHER_GENERIC_PATCH mBTFeatureFlagsPatchV1
 
STATIC PATCHER_GENERIC_PATCH mBTFeatureFlagsPatchV2
 
STATIC PATCHER_GENERIC_PATCH mBTFeatureFlagsPatchV3
 
STATIC CONST UINT8 mAsmLegacyBcopy64 []
 
STATIC CONST UINT8 mAquantiaEthernetPatchFindShikumo []
 
STATIC CONST UINT8 mAquantiaEthernetPatchFindMaskShikumo []
 
STATIC CONST UINT8 mAquantiaEthernetPatchReplaceShikumo []
 
STATIC CONST UINT8 mAquantiaEthernetPatchReplaceMaskShikumo []
 
STATIC PATCHER_GENERIC_PATCH mAquantiaEthernetPatchShikumo
 
STATIC CONST UINT8 mAquantiaEthernetPatchFindMieze []
 
STATIC CONST UINT8 mAquantiaEthernetPatchReplaceMieze []
 
STATIC CONST UINT8 mAquantiaEthernetPatchMaskMieze []
 
STATIC PATCHER_GENERIC_PATCH mAquantiaEthernetPatchMieze
 
STATIC UINT8 mApfsTimeoutFind []
 
STATIC UINT8 mApfsTimeoutReplace []
 
STATIC PATCHER_GENERIC_PATCH mApfsTimeoutPatch
 
STATIC UINT8 mApfsDisableTrimReplace []
 
STATIC PATCHER_GENERIC_PATCH mApfsDisableTrimPatch
 
KERNEL_QUIRK gKernelQuirks []
 

Detailed Description

Commonly used kext and kernel patches.

Copyright (c) 2018, vit9696. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file CommonPatches.c.

Macro Definition Documentation

◆ COMM_PAGE_BCOPY

#define COMM_PAGE_BCOPY   0xFFFF0780

Definition at line 2530 of file CommonPatches.c.

◆ kHasSupplementalSSE3

#define kHasSupplementalSSE3   0x00000100

Definition at line 2531 of file CommonPatches.c.

Typedef Documentation

◆ XCPM_MSR_RECORD

Function Documentation

◆ KernelApplyQuirk()

EFI_STATUS KernelApplyQuirk ( IN KERNEL_QUIRK_NAME Name,
IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

Applies the specified quirk.

Parameters
[in]NameKERNEL_QUIRK_NAME specifying the quirk name.
[in,out]PatcherPATCHER_CONTEXT instance. Only optional for kext patching.
[in]KernelVersionCurrent kernel version.
Returns
EFI_SUCCESS on success.

Definition at line 2981 of file CommonPatches.c.

◆ PatchAppleCpuPmCfgLock()

STATIC EFI_STATUS PatchAppleCpuPmCfgLock ( IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

< leave; ret

< pop rbp; ret

< mov ecx, 00000xxxxh

< mov cx, 00xxh

Definition at line 53 of file CommonPatches.c.

◆ PatchAppleIoMapperMapping()

STATIC EFI_STATUS PatchAppleIoMapperMapping ( IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

Definition at line 1325 of file CommonPatches.c.

◆ PatchAppleIoMapperSupport()

STATIC EFI_STATUS PatchAppleIoMapperSupport ( IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

Definition at line 1276 of file CommonPatches.c.

◆ PatchAppleRtcChecksum()

STATIC EFI_STATUS PatchAppleRtcChecksum ( IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

Definition at line 2265 of file CommonPatches.c.

◆ PatchAppleXcpmCfgLock()

STATIC EFI_STATUS PatchAppleXcpmCfgLock ( IN OUT PATCHER_CONTEXT * Patcher,
IN UINT32 KernelVersion )

Definition at line 234 of file CommonPatches.c.

◆ PatchAppleXcpmExtraMsrs()

STATIC EFI_STATUS PatchAppleXcpmExtraMsrs ( IN OUT PATCHER_CONTEXT * Patcher,
IN UINT32 KernelVersion )

Definition at line 423 of file CommonPatches.c.

◆ PatchAppleXcpmForceBoost()

STATIC EFI_STATUS PatchAppleXcpmForceBoost ( IN OUT PATCHER_CONTEXT * Patcher,
IN UINT32 KernelVersion )

Definition at line 576 of file CommonPatches.c.

◆ PatchAquantiaEthernet()

STATIC EFI_STATUS PatchAquantiaEthernet ( IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

Definition at line 2725 of file CommonPatches.c.

◆ PatchBTFeatureFlags()

STATIC EFI_STATUS PatchBTFeatureFlags ( IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

Definition at line 2434 of file CommonPatches.c.

◆ PatchCustomPciSerialDevice()

STATIC EFI_STATUS PatchCustomPciSerialDevice ( IN OUT PATCHER_CONTEXT * Patcher,
IN UINT32 KernelVersion )

Definition at line 1621 of file CommonPatches.c.

◆ PatchCustomPciSerialPmio()

STATIC EFI_STATUS PatchCustomPciSerialPmio ( IN OUT PATCHER_CONTEXT * Patcher)

Definition at line 1538 of file CommonPatches.c.

◆ PatchCustomSmbiosGuid()

STATIC EFI_STATUS PatchCustomSmbiosGuid ( IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

Definition at line 1681 of file CommonPatches.c.

◆ PatchDummyPowerManagement()

STATIC EFI_STATUS PatchDummyPowerManagement ( IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

Definition at line 1378 of file CommonPatches.c.

◆ PatchForceInternalDiskIcons()

STATIC EFI_STATUS PatchForceInternalDiskIcons ( IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

Definition at line 1217 of file CommonPatches.c.

◆ PatchForceSecureBootScheme()

STATIC EFI_STATUS PatchForceSecureBootScheme ( IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

Definition at line 2771 of file CommonPatches.c.

◆ PatchIncreasePciBarSize()

STATIC EFI_STATUS PatchIncreasePciBarSize ( IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

Definition at line 1461 of file CommonPatches.c.

◆ PatchLapicKernel()

STATIC EFI_STATUS PatchLapicKernel ( IN OUT PATCHER_CONTEXT * Patcher,
IN UINT32 KernelVersion )

Definition at line 1854 of file CommonPatches.c.

◆ PatchLapicKernelLegacy()

STATIC EFI_STATUS PatchLapicKernelLegacy ( IN OUT PATCHER_CONTEXT * Patcher,
IN UINT32 KernelVersion )

Definition at line 2018 of file CommonPatches.c.

◆ PatchLapicKernelPanic()

STATIC EFI_STATUS PatchLapicKernelPanic ( IN OUT PATCHER_CONTEXT * Patcher,
IN UINT32 KernelVersion )

Definition at line 2055 of file CommonPatches.c.

◆ PatchLegacyCommpage()

STATIC EFI_STATUS PatchLegacyCommpage ( IN OUT PATCHER_CONTEXT * Patcher,
IN UINT32 KernelVersion )

Definition at line 2541 of file CommonPatches.c.

◆ PatchPanicKextDump()

STATIC EFI_STATUS PatchPanicKextDump ( IN OUT PATCHER_CONTEXT * Patcher,
IN UINT32 KernelVersion )

< ret

Definition at line 1731 of file CommonPatches.c.

◆ PatchPowerStateTimeout()

STATIC EFI_STATUS PatchPowerStateTimeout ( IN OUT PATCHER_CONTEXT * Patcher,
IN UINT32 KernelVersion )

Definition at line 2148 of file CommonPatches.c.

◆ PatchSegmentJettison()

STATIC EFI_STATUS PatchSegmentJettison ( IN OUT PATCHER_CONTEXT * Patcher,
IN UINT32 KernelVersion )

< call

Definition at line 2289 of file CommonPatches.c.

◆ PatchSetApfsTimeout()

VOID PatchSetApfsTimeout ( IN UINT32 Timeout)

Set timeout value in microseconds for KernelQuirkSetApfsTrimTimeout quirk.

Parameters
[in]TimeoutTimeout in microseconds.

Definition at line 2863 of file CommonPatches.c.

◆ PatchSetApfsTrimTimeout()

STATIC EFI_STATUS PatchSetApfsTrimTimeout ( IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

Definition at line 2898 of file CommonPatches.c.

◆ PatchSetPciSerialDevice()

VOID PatchSetPciSerialDevice ( IN UINTN RegisterBase,
IN UINT32 RegisterStride )

Set PCI serial device properties for KernelQuirkCustomPciSerialDevice quirk.

Parameters
[in]RegisterBasePCI serial device regiser base.
[in]RegisterStridePCI serial device regiser stride.

Definition at line 1513 of file CommonPatches.c.

◆ PatchThirdPartyDriveSupport()

STATIC EFI_STATUS PatchThirdPartyDriveSupport ( IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

Definition at line 1109 of file CommonPatches.c.

◆ PatchUsbXhciPortLimit1()

STATIC EFI_STATUS PatchUsbXhciPortLimit1 ( IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

Definition at line 787 of file CommonPatches.c.

◆ PatchUsbXhciPortLimit2()

STATIC EFI_STATUS PatchUsbXhciPortLimit2 ( IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

Definition at line 835 of file CommonPatches.c.

◆ PatchUsbXhciPortLimit3()

STATIC EFI_STATUS PatchUsbXhciPortLimit3 ( IN OUT PATCHER_CONTEXT *Patcher OPTIONAL,
IN UINT32 KernelVersion )

Definition at line 899 of file CommonPatches.c.

◆ STATIC_ASSERT() [1/5]

STATIC_ASSERT ( sizeof(mApfsTimeoutFind) = =6,
"Unsupported mApfsTimeoutFind"  )

◆ STATIC_ASSERT() [2/5]

STATIC_ASSERT ( sizeof(mApfsTimeoutReplace) = =6,
"Unsupported mApfsTimeoutReplace"  )

◆ STATIC_ASSERT() [3/5]

STATIC_ASSERT ( sizeof(mMovCxE2) = =4,
"Unsupported mMovCxE2"  )

◆ STATIC_ASSERT() [4/5]

STATIC_ASSERT ( sizeof(mMovEcxE2) = =5,
"Unsupported mMovEcxE2"  )

◆ STATIC_ASSERT() [5/5]

STATIC_ASSERT ( sizeof(mWrmsr) = =2,
"Unsupported mWrmsr"  )

Variable Documentation

◆ gKernelQuirks

KERNEL_QUIRK gKernelQuirks[]
Initial value:
= {
[KernelQuirkAppleCpuPmCfgLock] = { "com.apple.driver.AppleIntelCPUPowerManagement", PatchAppleCpuPmCfgLock },
[KernelQuirkCustomSmbiosGuid1] = { "com.apple.driver.AppleSMBIOS", PatchCustomSmbiosGuid },
[KernelQuirkCustomSmbiosGuid2] = { "com.apple.driver.AppleACPIPlatform", PatchCustomSmbiosGuid },
[KernelQuirkDisableIoMapper] = { "com.apple.iokit.IOPCIFamily", PatchAppleIoMapperSupport },
[KernelQuirkDisableIoMapperMapping] = { "com.apple.iokit.IOPCIFamily", PatchAppleIoMapperMapping },
[KernelQuirkDisableRtcChecksum] = { "com.apple.driver.AppleRTC", PatchAppleRtcChecksum },
[KernelQuirkDummyPowerManagement] = { "com.apple.driver.AppleIntelCPUPowerManagement", PatchDummyPowerManagement },
[KernelQuirkExtendBTFeatureFlags] = { "com.apple.iokit.IOBluetoothFamily", PatchBTFeatureFlags },
[KernelQuirkExternalDiskIcons] = { "com.apple.driver.AppleAHCIPort", PatchForceInternalDiskIcons },
[KernelQuirkForceAquantiaEthernet] = { "com.apple.driver.AppleEthernetAquantiaAqtion", PatchAquantiaEthernet },
[KernelQuirkForceSecureBootScheme] = { "com.apple.security.AppleImage4", PatchForceSecureBootScheme },
[KernelQuirkIncreasePciBarSize] = { "com.apple.iokit.IOPCIFamily", PatchIncreasePciBarSize },
[KernelQuirkSetApfsTrimTimeout] = { "com.apple.filesystems.apfs", PatchSetApfsTrimTimeout },
[KernelQuirkThirdPartyDrives] = { "com.apple.iokit.IOAHCIBlockStorage", PatchThirdPartyDriveSupport },
[KernelQuirkXhciPortLimit1] = { "com.apple.iokit.IOUSBHostFamily", PatchUsbXhciPortLimit1 },
[KernelQuirkXhciPortLimit2] = { "com.apple.driver.usb.AppleUSBXHCI", PatchUsbXhciPortLimit2 },
[KernelQuirkXhciPortLimit3] = { "com.apple.driver.usb.AppleUSBXHCIPCI", PatchUsbXhciPortLimit3 },
}
STATIC EFI_STATUS PatchBTFeatureFlags(IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchAppleRtcChecksum(IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchSegmentJettison(IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchAppleXcpmCfgLock(IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchUsbXhciPortLimit3(IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchAppleIoMapperMapping(IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchIncreasePciBarSize(IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchUsbXhciPortLimit1(IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchForceSecureBootScheme(IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchAppleIoMapperSupport(IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchSetApfsTrimTimeout(IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchCustomSmbiosGuid(IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchAppleCpuPmCfgLock(IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchPanicKextDump(IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchThirdPartyDriveSupport(IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchAquantiaEthernet(IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchForceInternalDiskIcons(IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchLapicKernelPanic(IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchLegacyCommpage(IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchCustomPciSerialDevice(IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchAppleXcpmExtraMsrs(IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchUsbXhciPortLimit2(IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchPowerStateTimeout(IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchAppleXcpmForceBoost(IN OUT PATCHER_CONTEXT *Patcher, IN UINT32 KernelVersion)
STATIC EFI_STATUS PatchDummyPowerManagement(IN OUT PATCHER_CONTEXT *Patcher OPTIONAL, IN UINT32 KernelVersion)
@ KernelQuirkDisableRtcChecksum
@ KernelQuirkPanicNoKextDump
@ KernelQuirkCustomSmbiosGuid1
@ KernelQuirkForceSecureBootScheme
@ KernelQuirkPowerTimeoutKernelPanic
@ KernelQuirkLapicKernelPanic
@ KernelQuirkCustomSmbiosGuid2
@ KernelQuirkAppleCpuPmCfgLock
@ KernelQuirkAppleXcpmExtraMsrs
@ KernelQuirkAppleXcpmForceBoost
@ KernelQuirkXhciPortLimit2
@ KernelQuirkSetApfsTrimTimeout
@ KernelQuirkThirdPartyDrives
@ KernelQuirkDisableIoMapperMapping
@ KernelQuirkAppleXcpmCfgLock
@ KernelQuirkDummyPowerManagement
@ KernelQuirkDisableIoMapper
@ KernelQuirkLegacyCommpage
@ KernelQuirkExternalDiskIcons
@ KernelQuirkXhciPortLimit1
@ KernelQuirkExtendBTFeatureFlags
@ KernelQuirkForceAquantiaEthernet
@ KernelQuirkXhciPortLimit3
@ KernelQuirkSegmentJettison
@ KernelQuirkIncreasePciBarSize
@ KernelQuirkCustomPciSerialDevice

Definition at line 2951 of file CommonPatches.c.

◆ mApfsDisableTrimPatch

STATIC PATCHER_GENERIC_PATCH mApfsDisableTrimPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("ApfsTimeout disable trim"),
.Base = "_spaceman_iterate_free_extents_internal",
.Find = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mApfsDisableTrimReplace),
.Count = 1,
.Skip = 0,
.Limit = 0
}
STATIC UINT8 mApfsDisableTrimReplace[]

Definition at line 2883 of file CommonPatches.c.

◆ mApfsDisableTrimReplace

STATIC UINT8 mApfsDisableTrimReplace[]
Initial value:
= {
0x31, 0xC0,
0xC3
}

Definition at line 2876 of file CommonPatches.c.

◆ mApfsTimeoutFind

STATIC UINT8 mApfsTimeoutFind[]
Initial value:
= {
0x48, 0x3D, 0x7F, 0x96, 0x98, 0x00
}

Definition at line 2835 of file CommonPatches.c.

◆ mApfsTimeoutPatch

STATIC PATCHER_GENERIC_PATCH mApfsTimeoutPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("ApfsTimeout"),
.Base = "_nx_mount_trim_thread",
.Mask = NULL,
.Replace = mApfsTimeoutReplace,
.ReplaceMask = NULL,
.Size = sizeof (mApfsTimeoutFind),
.Count = 1,
.Skip = 0,
.Limit = 0
}
STATIC UINT8 mApfsTimeoutFind[]
STATIC UINT8 mApfsTimeoutReplace[]

Definition at line 2849 of file CommonPatches.c.

◆ mApfsTimeoutReplace

STATIC UINT8 mApfsTimeoutReplace[]
Initial value:
= {
0x48, 0x3D, 0x00, 0x00, 0x00, 0x00
}

Definition at line 2842 of file CommonPatches.c.

◆ mAppleDummyCpuPmPatch

STATIC PATCHER_GENERIC_PATCH mAppleDummyCpuPmPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("DummyCpuPm"),
.Base = "__ZN28AppleIntelCPUPowerManagement5startEP9IOService",
.Find = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mAppleDummyCpuPmPatchReplace),
.Count = 1,
.Skip = 0
}
STATIC CONST UINT8 mAppleDummyCpuPmPatchReplace[]

Definition at line 1364 of file CommonPatches.c.

◆ mAppleDummyCpuPmPatchReplace

STATIC CONST UINT8 mAppleDummyCpuPmPatchReplace[]
Initial value:
= {
0xB8, 0x01, 0x00, 0x00, 0x00,
0xC3
}

Definition at line 1357 of file CommonPatches.c.

◆ mAppleIoMapperMappingPatch

STATIC PATCHER_GENERIC_PATCH mAppleIoMapperMappingPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("AppleIoMapperMapping"),
.Base = "__ZN8AppleVTD14addMemoryRangeEyy",
.Find = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Count = 1,
.Skip = 0
}
STATIC CONST UINT8 mAppleIoMapperMappingPatchReplace[]

Definition at line 1311 of file CommonPatches.c.

◆ mAppleIoMapperMappingPatchReplace

STATIC CONST UINT8 mAppleIoMapperMappingPatchReplace[]
Initial value:
= {
0xC3
}

Definition at line 1305 of file CommonPatches.c.

◆ mAppleIoMapperPatch

STATIC PATCHER_GENERIC_PATCH mAppleIoMapperPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("AppleIoMapper"),
.Base = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mAppleIoMapperPatchFind),
.Count = 1,
.Skip = 0
}
STATIC CONST UINT8 mAppleIoMapperPatchFind[]
STATIC CONST UINT8 mAppleIoMapperPatchReplace[]

Definition at line 1262 of file CommonPatches.c.

◆ mAppleIoMapperPatchFind

STATIC CONST UINT8 mAppleIoMapperPatchFind[]
Initial value:
= {
0x44, 0x4D, 0x41, 0x52, 0x00
}

Definition at line 1250 of file CommonPatches.c.

◆ mAppleIoMapperPatchReplace

STATIC CONST UINT8 mAppleIoMapperPatchReplace[]
Initial value:
= {
0x52, 0x41, 0x4D, 0x44, 0x00
}

Definition at line 1256 of file CommonPatches.c.

◆ mAppleRtcChecksumPatch32

STATIC PATCHER_GENERIC_PATCH mAppleRtcChecksumPatch32
Initial value:
= {
.Comment = DEBUG_POINTER ("DisableRtcChecksum32"),
.Base = NULL,
.Size = sizeof (mAppleRtcChecksumPatchFind32),
.Count = 4,
.Skip = 0,
.Limit = 0
}
STATIC CONST UINT8 mAppleRtcChecksumPatchMask32[]
STATIC CONST UINT8 mAppleRtcChecksumPatchReplace32[]
STATIC CONST UINT8 mAppleRtcChecksumPatchFind32[]

Definition at line 2235 of file CommonPatches.c.

◆ mAppleRtcChecksumPatch64

STATIC PATCHER_GENERIC_PATCH mAppleRtcChecksumPatch64
Initial value:
= {
.Comment = DEBUG_POINTER ("DisableRtcChecksum64"),
.Base = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mAppleRtcChecksumPatchFind64),
.Count = 4,
.Skip = 0,
.Limit = 0
}
STATIC CONST UINT8 mAppleRtcChecksumPatchReplace64[]
STATIC CONST UINT8 mAppleRtcChecksumPatchFind64[]
STATIC CONST UINT8 mAppleRtcChecksumPatchMask64[]

Definition at line 2250 of file CommonPatches.c.

◆ mAppleRtcChecksumPatchFind32

STATIC CONST UINT8 mAppleRtcChecksumPatchFind32[]
Initial value:
= {
0xC7, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00
}

Definition at line 2199 of file CommonPatches.c.

◆ mAppleRtcChecksumPatchFind64

STATIC CONST UINT8 mAppleRtcChecksumPatchFind64[]
Initial value:
= {
0xBE, 0x58, 0x00, 0x00, 0x00
}

Definition at line 2217 of file CommonPatches.c.

◆ mAppleRtcChecksumPatchMask32

STATIC CONST UINT8 mAppleRtcChecksumPatchMask32[]
Initial value:
= {
0xFF, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF
}

Definition at line 2205 of file CommonPatches.c.

◆ mAppleRtcChecksumPatchMask64

STATIC CONST UINT8 mAppleRtcChecksumPatchMask64[]
Initial value:
= {
0xFF, 0xFE, 0xFF, 0xFF, 0xFF
}

Definition at line 2223 of file CommonPatches.c.

◆ mAppleRtcChecksumPatchReplace32

STATIC CONST UINT8 mAppleRtcChecksumPatchReplace32[]
Initial value:
= {
0xC7, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00
}

Definition at line 2211 of file CommonPatches.c.

◆ mAppleRtcChecksumPatchReplace64

STATIC CONST UINT8 mAppleRtcChecksumPatchReplace64[]
Initial value:
= {
0xBE, 0xFF, 0xFF, 0x00, 0x00
}

Definition at line 2229 of file CommonPatches.c.

◆ mAquantiaEthernetPatchFindMaskShikumo

STATIC CONST UINT8 mAquantiaEthernetPatchFindMaskShikumo[]
Initial value:
= {
0xFF, 0xFF,
0xFF, 0x00,0x00, 0x00, 0x00,
0xFF, 0xFF,0x00, 0x00,
0xFF, 0xFF,0x00, 0x00, 0x00, 0x00
}

Definition at line 2649 of file CommonPatches.c.

◆ mAquantiaEthernetPatchFindMieze

STATIC CONST UINT8 mAquantiaEthernetPatchFindMieze[]
Initial value:
= {
0x41, 0xC7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xE9
}

Definition at line 2690 of file CommonPatches.c.

◆ mAquantiaEthernetPatchFindShikumo

STATIC CONST UINT8 mAquantiaEthernetPatchFindShikumo[]
Initial value:
= {
0x31, 0xC0,
0xE8, 0x00, 0x00, 0x00, 0x00,
0x83, 0x7D, 0x00, 0x00,
0x0F, 0x84, 0x00, 0x00, 0x00, 0x00
}

Definition at line 2640 of file CommonPatches.c.

◆ mAquantiaEthernetPatchMaskMieze

STATIC CONST UINT8 mAquantiaEthernetPatchMaskMieze[]
Initial value:
= {
0xFF, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00,
0xFF
}

Definition at line 2704 of file CommonPatches.c.

◆ mAquantiaEthernetPatchMieze

STATIC PATCHER_GENERIC_PATCH mAquantiaEthernetPatchMieze
Initial value:
= {
.Comment = DEBUG_POINTER ("ForceAquantiaEthernetMieze"),
.Base = NULL,
.Count = 1,
.Skip = 0
}
STATIC CONST UINT8 mAquantiaEthernetPatchMaskMieze[]
STATIC CONST UINT8 mAquantiaEthernetPatchReplaceMieze[]
STATIC CONST UINT8 mAquantiaEthernetPatchFindMieze[]

Definition at line 2711 of file CommonPatches.c.

◆ mAquantiaEthernetPatchReplaceMaskShikumo

STATIC CONST UINT8 mAquantiaEthernetPatchReplaceMaskShikumo[]
Initial value:
= {
0x00, 0x00,
0x00, 0x00,0x00, 0x00, 0x00,
0x00, 0x00,0x00, 0x00,
0xFF, 0xFF,0xFF, 0xFF, 0xFF, 0xFF
}

Definition at line 2667 of file CommonPatches.c.

◆ mAquantiaEthernetPatchReplaceMieze

STATIC CONST UINT8 mAquantiaEthernetPatchReplaceMieze[]
Initial value:
= {
0x41, 0xC7, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0xE9
}

Definition at line 2697 of file CommonPatches.c.

◆ mAquantiaEthernetPatchReplaceShikumo

STATIC CONST UINT8 mAquantiaEthernetPatchReplaceShikumo[]
Initial value:
= {
0x00, 0x00,
0x00, 0x00,0x00, 0x00, 0x00,
0x00, 0x00,0x00, 0x00,
0x90, 0x90,0x90, 0x90, 0x90, 0x90,
}

Definition at line 2658 of file CommonPatches.c.

◆ mAquantiaEthernetPatchShikumo

STATIC PATCHER_GENERIC_PATCH mAquantiaEthernetPatchShikumo
Initial value:
= {
.Comment = DEBUG_POINTER ("ForceAquantiaEthernetShikumo"),
.Base = "__ZN27AppleEthernetAquantiaAqtion5startEP9IOService",
.Count = 1,
.Skip = 0
}
STATIC CONST UINT8 mAquantiaEthernetPatchFindMaskShikumo[]
STATIC CONST UINT8 mAquantiaEthernetPatchReplaceShikumo[]
STATIC CONST UINT8 mAquantiaEthernetPatchReplaceMaskShikumo[]
STATIC CONST UINT8 mAquantiaEthernetPatchFindShikumo[]

Definition at line 2676 of file CommonPatches.c.

◆ mAsmLegacyBcopy64

STATIC CONST UINT8 mAsmLegacyBcopy64[]

Definition at line 2535 of file CommonPatches.c.

◆ mBTFeatureFlagsPatchV1

STATIC PATCHER_GENERIC_PATCH mBTFeatureFlagsPatchV1
Initial value:
= {
.Comment = DEBUG_POINTER ("BTFeatureFlagsV1"),
.Base = "__ZN25IOBluetoothHostController25SetControllerFeatureFlagsEj",
.Find = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mBTFeatureFlagsReplace),
.Count = 1,
.Skip = 0
}
STATIC CONST UINT8 mBTFeatureFlagsReplace[]

Definition at line 2392 of file CommonPatches.c.

◆ mBTFeatureFlagsPatchV2

STATIC PATCHER_GENERIC_PATCH mBTFeatureFlagsPatchV2
Initial value:
= {
.Comment = DEBUG_POINTER ("BTFeatureFlagsV2"),
.Base = "__ZN24IOBluetoothHCIController25SetControllerFeatureFlagsEj",
.Find = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mBTFeatureFlagsReplace),
.Count = 1,
.Skip = 0
}

Definition at line 2406 of file CommonPatches.c.

◆ mBTFeatureFlagsPatchV3

STATIC PATCHER_GENERIC_PATCH mBTFeatureFlagsPatchV3
Initial value:
= {
.Comment = DEBUG_POINTER ("BTFeatureFlagsV3"),
.Base = "__ZN17IOBluetoothDevice25setDeviceSupportedFeatureEj",
.Find = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mBTFeatureFlagsReplace),
.Count = 1,
.Skip = 0
}

Definition at line 2420 of file CommonPatches.c.

◆ mBTFeatureFlagsReplace

STATIC CONST UINT8 mBTFeatureFlagsReplace[]
Initial value:
= {
0x55,
0x83, 0xCE, 0x0F
}

Definition at line 2385 of file CommonPatches.c.

◆ mCustomSmbiosGuidPatch

STATIC PATCHER_GENERIC_PATCH mCustomSmbiosGuidPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("CustomSmbiosGuid"),
.Base = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mCustomSmbiosGuidPatchFind),
.Count = 1,
.Skip = 0
}
STATIC CONST UINT8 mCustomSmbiosGuidPatchReplace[]
STATIC CONST UINT8 mCustomSmbiosGuidPatchFind[]

Definition at line 1667 of file CommonPatches.c.

◆ mCustomSmbiosGuidPatchFind

STATIC CONST UINT8 mCustomSmbiosGuidPatchFind[]
Initial value:
= {
0x45, 0x42, 0x39, 0x44, 0x32, 0x44, 0x33, 0x31
}

Definition at line 1655 of file CommonPatches.c.

◆ mCustomSmbiosGuidPatchReplace

STATIC CONST UINT8 mCustomSmbiosGuidPatchReplace[]
Initial value:
= {
0x45, 0x42, 0x39, 0x44, 0x32, 0x44, 0x33, 0x35
}

Definition at line 1661 of file CommonPatches.c.

◆ mIncreasePciBarSizeLegacyPatch

STATIC PATCHER_GENERIC_PATCH mIncreasePciBarSizeLegacyPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("IncreasePciBarSizeLegacy"),
.Base = "__ZN17IOPCIConfigurator24probeBaseAddressRegisterEP16IOPCIConfigEntryjj",
.Mask = NULL,
.ReplaceMask = NULL,
.Count = 1,
.Skip = 0,
.Limit = 4096
}
STATIC CONST UINT8 mIncreasePciBarSizePatchLegacyReplace[]
STATIC CONST UINT8 mIncreasePciBarSizePatchLegacyFind[]

Definition at line 1446 of file CommonPatches.c.

◆ mIncreasePciBarSizePatch

STATIC PATCHER_GENERIC_PATCH mIncreasePciBarSizePatch
Initial value:
= {
.Comment = DEBUG_POINTER ("IncreasePciBarSize"),
.Base = "__ZN17IOPCIConfigurator24probeBaseAddressRegisterEP16IOPCIConfigEntryjj",
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mIncreasePciBarSizePatchFind),
.Count = 1,
.Skip = 0,
.Limit = 4096
}
STATIC CONST UINT8 mIncreasePciBarSizePatchReplace[]
STATIC CONST UINT8 mIncreasePciBarSizePatchFind[]

Definition at line 1419 of file CommonPatches.c.

◆ mIncreasePciBarSizePatchFind

STATIC CONST UINT8 mIncreasePciBarSizePatchFind[]
Initial value:
= {
0x00, 0x00, 0x00, 0x40
}

Definition at line 1407 of file CommonPatches.c.

◆ mIncreasePciBarSizePatchLegacyFind

STATIC CONST UINT8 mIncreasePciBarSizePatchLegacyFind[]
Initial value:
= {
0x01, 0x00, 0x00, 0x40
}

Definition at line 1434 of file CommonPatches.c.

◆ mIncreasePciBarSizePatchLegacyReplace

STATIC CONST UINT8 mIncreasePciBarSizePatchLegacyReplace[]
Initial value:
= {
0x01, 0x00, 0x00, 0x80
}

Definition at line 1440 of file CommonPatches.c.

◆ mIncreasePciBarSizePatchReplace

STATIC CONST UINT8 mIncreasePciBarSizePatchReplace[]
Initial value:
= {
0x00, 0x00, 0x00, 0x80
}

Definition at line 1413 of file CommonPatches.c.

◆ mInOutMaxDistance

STATIC CONST UINTN mInOutMaxDistance = 64

Definition at line 1510 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatch133Find1

STATIC CONST UINT8 mIOAHCIBlockStoragePatch133Find1[]
Initial value:
= {
0x48, 0x8D, 0x3D, 0x00, 0x00, 0x00, 0x00,
0xBA, 0x09, 0x00, 0x00, 0x00
}

Definition at line 993 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatch133Find2

STATIC CONST UINT8 mIOAHCIBlockStoragePatch133Find2[]
Initial value:
= {
0x48, 0x8D, 0x3D, 0x00, 0x00, 0x00, 0x00,
0xBA, 0x05, 0x00, 0x00, 0x00
}

Definition at line 1000 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatch133FindMask

STATIC CONST UINT8 mIOAHCIBlockStoragePatch133FindMask[]
Initial value:
= {
0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF
}

Definition at line 1007 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatch133Part1

STATIC PATCHER_GENERIC_PATCH mIOAHCIBlockStoragePatch133Part1
Initial value:
= {
.Comment = DEBUG_POINTER ("IOAHCIBlockStorage trim 13.3+ part 1"),
.Base = "__ZN24IOAHCIBlockStorageDriver23DetermineDeviceFeaturesEPt",
.Count = 1,
.Skip = 0,
.Limit = 4096
}
STATIC CONST UINT8 mIOAHCIBlockStoragePatch133Find1[]
STATIC CONST UINT8 mIOAHCIBlockStoragePatch133Replace[]
STATIC CONST UINT8 mIOAHCIBlockStoragePatch133FindMask[]
STATIC CONST UINT8 mIOAHCIBlockStoragePatch133ReplaceMask[]

Definition at line 1028 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatch133Part2

STATIC PATCHER_GENERIC_PATCH mIOAHCIBlockStoragePatch133Part2
Initial value:
= {
.Comment = DEBUG_POINTER ("IOAHCIBlockStorage trim 13.3+ part 2"),
.Base = "__ZN24IOAHCIBlockStorageDriver23DetermineDeviceFeaturesEPt",
.Count = 1,
.Skip = 0,
.Limit = 4096
}
STATIC CONST UINT8 mIOAHCIBlockStoragePatch133Find2[]

Definition at line 1043 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatch133Replace

STATIC CONST UINT8 mIOAHCIBlockStoragePatch133Replace[]
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xBA, 0x00, 0x00, 0x00, 0x00
}

Definition at line 1014 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatch133ReplaceMask

STATIC CONST UINT8 mIOAHCIBlockStoragePatch133ReplaceMask[]
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF
}

Definition at line 1021 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatch144

STATIC PATCHER_GENERIC_PATCH mIOAHCIBlockStoragePatch144
Initial value:
= {
.Comment = DEBUG_POINTER ("IOAHCIBlockStorage trim 14.4+"),
.Base = "__ZN24IOAHCIBlockStorageDriver23DetermineDeviceFeaturesEPt",
.Count = 2,
.Skip = 0,
.Limit = 4096
}
STATIC CONST UINT8 mIOAHCIBlockStoragePatch144FindMask[]
STATIC CONST UINT8 mIOAHCIBlockStoragePatch144Find[]
STATIC CONST UINT8 mIOAHCIBlockStoragePatch144ReplaceMask[]
STATIC CONST UINT8 mIOAHCIBlockStoragePatch144Replace[]

Definition at line 1094 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatch144Find

STATIC CONST UINT8 mIOAHCIBlockStoragePatch144Find[]
Initial value:
= {
0x4C, 0x8D, 0x2D, 0x00, 0x00, 0x00, 0x00,
0x4C, 0x89, 0xEF,
0xE8, 0x00, 0x00, 0x00, 0x00,
0x4C, 0x89, 0xEF
}

Definition at line 1058 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatch144FindMask

STATIC CONST UINT8 mIOAHCIBlockStoragePatch144FindMask[]
Initial value:
= {
0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF,
0xFF, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF
}

Definition at line 1067 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatch144Replace

STATIC CONST UINT8 mIOAHCIBlockStoragePatch144Replace[]
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x31, 0xC0, 0x90, 0x90, 0x90,
0x00, 0x00, 0x00
}

Definition at line 1076 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatch144ReplaceMask

STATIC CONST UINT8 mIOAHCIBlockStoragePatch144ReplaceMask[]
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x00
}

Definition at line 1085 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatchV1

STATIC PATCHER_GENERIC_PATCH mIOAHCIBlockStoragePatchV1
Initial value:
= {
.Comment = DEBUG_POINTER ("IOAHCIBlockStorageV1"),
.Base = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Count = 1,
.Skip = 0
}
STATIC CONST UINT8 mIOAHCIBlockStoragePatchV1Find[]
STATIC CONST UINT8 mIOAHCIBlockStoragePatchV1Replace[]

Definition at line 953 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatchV1Find

STATIC CONST UINT8 mIOAHCIBlockStoragePatchV1Find[]
Initial value:
= {
0x41, 0x50, 0x50, 0x4C, 0x45, 0x20, 0x53, 0x53, 0x44, 0x00
}

Definition at line 941 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatchV1Replace

STATIC CONST UINT8 mIOAHCIBlockStoragePatchV1Replace[]
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}

Definition at line 947 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatchV2

STATIC PATCHER_GENERIC_PATCH mIOAHCIBlockStoragePatchV2
Initial value:
= {
.Comment = DEBUG_POINTER ("IOAHCIBlockStorageV2"),
.Base = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Count = 1,
.Skip = 0
}
STATIC CONST UINT8 mIOAHCIBlockStoragePatchV2Find[]
STATIC CONST UINT8 mIOAHCIBlockStoragePatchV2Replace[]

Definition at line 979 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatchV2Find

STATIC CONST UINT8 mIOAHCIBlockStoragePatchV2Find[]
Initial value:
= {
0x41, 0x50, 0x50, 0x4C, 0x45, 0x00
}

Definition at line 967 of file CommonPatches.c.

◆ mIOAHCIBlockStoragePatchV2Replace

STATIC CONST UINT8 mIOAHCIBlockStoragePatchV2Replace[]
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}

Definition at line 973 of file CommonPatches.c.

◆ mIOAHCIPortPatch

STATIC PATCHER_GENERIC_PATCH mIOAHCIPortPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("IOAHCIPort"),
.Base = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mIOAHCIPortPatchFind),
.Count = 1,
.Skip = 0
}
STATIC CONST UINT8 mIOAHCIPortPatchFind[]
STATIC CONST UINT8 mIOAHCIPortPatchReplace[]

Definition at line 1203 of file CommonPatches.c.

◆ mIOAHCIPortPatchFind

STATIC CONST UINT8 mIOAHCIPortPatchFind[]
Initial value:
= {
0x45, 0x78, 0x74, 0x65, 0x72, 0x6E, 0x61, 0x6C
}

Definition at line 1191 of file CommonPatches.c.

◆ mIOAHCIPortPatchReplace

STATIC CONST UINT8 mIOAHCIPortPatchReplace[]
Initial value:
= {
0x49, 0x6E, 0x74, 0x65, 0x72, 0x6E, 0x61, 0x6C
}

Definition at line 1197 of file CommonPatches.c.

◆ mLapicKernelPanicLegacyPatch

STATIC PATCHER_GENERIC_PATCH mLapicKernelPanicLegacyPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("LapicKernelPanicLegacy"),
.Base = "_lapic_interrupt",
.ReplaceMask = NULL,
.Count = 1,
.Skip = 0,
.Limit = 1024
}
STATIC CONST UINT8 mLapicKernelPanicPatchLegacyFind[]
STATIC CONST UINT8 mLapicKernelPanicPatchLegacyReplace[]
STATIC CONST UINT8 mLapicKernelPanicPatchLegacyMask[]

Definition at line 1907 of file CommonPatches.c.

◆ mLapicKernelPanicMasterLegacyPatch1

STATIC PATCHER_GENERIC_PATCH mLapicKernelPanicMasterLegacyPatch1
Initial value:
= {
.Comment = DEBUG_POINTER ("LapicKernelPanicMasterLegacy v1"),
.Base = "_lapic_interrupt",
.Count = 1,
.Skip = 0,
.Limit = 4096
}
STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyFind1[]
STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyReplaceMask1[]
STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyMask1[]
STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyReplace1[]

Definition at line 1954 of file CommonPatches.c.

◆ mLapicKernelPanicMasterLegacyPatch2

STATIC PATCHER_GENERIC_PATCH mLapicKernelPanicMasterLegacyPatch2
Initial value:
= {
.Comment = DEBUG_POINTER ("LapicKernelPanicMasterLegacy v2"),
.Base = "_lapic_interrupt",
.Count = 1,
.Skip = 0,
.Limit = 4096
}
STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyReplaceMask2[]
STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyReplace2[]
STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyFind2[]
STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyMask2[]

Definition at line 2003 of file CommonPatches.c.

◆ mLapicKernelPanicMasterPatch

STATIC PATCHER_GENERIC_PATCH mLapicKernelPanicMasterPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("LapicKernelPanicMaster"),
.Base = "_lapic_interrupt",
.ReplaceMask = NULL,
.Count = 1,
.Skip = 0,
.Limit = 4096
}
STATIC CONST UINT8 mLapicKernelPanicMasterPatchFind[]
STATIC CONST UINT8 mLapicKernelPanicMasterPatchMask[]
STATIC CONST UINT8 mLapicKernelPanicMasterPatchReplace[]

Definition at line 1839 of file CommonPatches.c.

◆ mLapicKernelPanicMasterPatchFind

STATIC CONST UINT8 mLapicKernelPanicMasterPatchFind[]
Initial value:
= {
0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}

Definition at line 1820 of file CommonPatches.c.

◆ mLapicKernelPanicMasterPatchLegacyFind1

STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyFind1[]
Initial value:
= {
0x48, 0x8D, 0x00, 0x00, 0x00, 0x00, 0x00,
0x83, 0x00, 0x00,
0x74, 0x00, 0x83, 0x00
}

Definition at line 1922 of file CommonPatches.c.

◆ mLapicKernelPanicMasterPatchLegacyFind2

STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyFind2[]
Initial value:
= {
0x48, 0x8D, 0x05, 0x00, 0x00, 0x00, 0x00,
0x44, 0x8B, 0x00,
0x45, 0x85, 0xC0,
0x74, 0x00, 0x8B
}

Definition at line 1969 of file CommonPatches.c.

◆ mLapicKernelPanicMasterPatchLegacyMask1

STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyMask1[]
Initial value:
= {
0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0x00, 0x00,
0xFF, 0x00, 0xFF, 0x00
}

Definition at line 1930 of file CommonPatches.c.

◆ mLapicKernelPanicMasterPatchLegacyMask2

STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyMask2[]
Initial value:
= {
0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF,
0xFF, 0x00, 0xFF
}

Definition at line 1978 of file CommonPatches.c.

◆ mLapicKernelPanicMasterPatchLegacyReplace1

STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyReplace1[]
Initial value:
= {
0x31, 0xC0,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x00, 0x00, 0x00, 0x00
}

Definition at line 1938 of file CommonPatches.c.

◆ mLapicKernelPanicMasterPatchLegacyReplace2

STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyReplace2[]
Initial value:
= {
0x31, 0xC0,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x00, 0x00, 0x00
}

Definition at line 1987 of file CommonPatches.c.

◆ mLapicKernelPanicMasterPatchLegacyReplaceMask1

STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyReplaceMask1[]
Initial value:
= {
0xFF, 0xFF,
0xFF, 0xFF,0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00,0x00, 0x00
}

Definition at line 1946 of file CommonPatches.c.

◆ mLapicKernelPanicMasterPatchLegacyReplaceMask2

STATIC CONST UINT8 mLapicKernelPanicMasterPatchLegacyReplaceMask2[]
Initial value:
= {
0xFF, 0xFF,
0xFF, 0xFF,0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00,0x00
}

Definition at line 1995 of file CommonPatches.c.

◆ mLapicKernelPanicMasterPatchMask

STATIC CONST UINT8 mLapicKernelPanicMasterPatchMask[]
Initial value:
= {
0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF
}

Definition at line 1826 of file CommonPatches.c.

◆ mLapicKernelPanicMasterPatchReplace

STATIC CONST UINT8 mLapicKernelPanicMasterPatchReplace[]
Initial value:
= {
0x31, 0xC0,
0x90, 0x90, 0x90, 0x90, 0x90
}

Definition at line 1832 of file CommonPatches.c.

◆ mLapicKernelPanicPatch

STATIC PATCHER_GENERIC_PATCH mLapicKernelPanicPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("LapicKernelPanic"),
.Base = "_lapic_interrupt",
.ReplaceMask = NULL,
.Count = 1,
.Skip = 0,
.Limit = 1024
}
STATIC CONST UINT8 mLapicKernelPanicPatchMask[]
STATIC CONST UINT8 mLapicKernelPanicPatchReplace[]
STATIC CONST UINT8 mLapicKernelPanicPatchFind[]

Definition at line 1805 of file CommonPatches.c.

◆ mLapicKernelPanicPatchFind

STATIC CONST UINT8 mLapicKernelPanicPatchFind[]
Initial value:
= {
0x65, 0x8B, 0x04, 0x25, 0x00, 0x00, 0x00, 0x00,
0x3B, 0x05, 0x00, 0x00, 0x00, 0x00
}

Definition at line 1784 of file CommonPatches.c.

◆ mLapicKernelPanicPatchLegacyFind

STATIC CONST UINT8 mLapicKernelPanicPatchLegacyFind[]
Initial value:
= {
0x65, 0x8B, 0x04, 0x25, 0x14, 0x00, 0x00, 0x00,
0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00
}

Definition at line 1884 of file CommonPatches.c.

◆ mLapicKernelPanicPatchLegacyMask

STATIC CONST UINT8 mLapicKernelPanicPatchLegacyMask[]
Initial value:
= {
0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0xFF, 0xFF, 0xFF,
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00
}

Definition at line 1892 of file CommonPatches.c.

◆ mLapicKernelPanicPatchLegacyReplace

STATIC CONST UINT8 mLapicKernelPanicPatchLegacyReplace[]
Initial value:
= {
0x31, 0xC0,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90
}

Definition at line 1900 of file CommonPatches.c.

◆ mLapicKernelPanicPatchMask

STATIC CONST UINT8 mLapicKernelPanicPatchMask[]
Initial value:
= {
0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00
}

Definition at line 1791 of file CommonPatches.c.

◆ mLapicKernelPanicPatchReplace

STATIC CONST UINT8 mLapicKernelPanicPatchReplace[]
Initial value:
= {
0x31, 0xC0,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90
}

Definition at line 1798 of file CommonPatches.c.

◆ mMiscPwrMgmtDbgFind

STATIC CONST UINT8 mMiscPwrMgmtDbgFind[]
Initial value:
= {
0xBF, 0xAA, 0x01, 0x00, 0x00,
0xE8
}

Definition at line 393 of file CommonPatches.c.

◆ mMiscPwrMgmtDbgPatch

STATIC PATCHER_GENERIC_PATCH mMiscPwrMgmtDbgPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("MiscPwrMgmtDbg"),
.Base = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mMiscPwrMgmtDbgFind),
.Count = 0,
.Skip = 0,
.Limit = 0
}
STATIC CONST UINT8 mMiscPwrMgmtDbgFind[]
STATIC CONST UINT8 mMiscPwrMgmtDbgReplace[]

Definition at line 408 of file CommonPatches.c.

◆ mMiscPwrMgmtDbgReplace

STATIC CONST UINT8 mMiscPwrMgmtDbgReplace[]
Initial value:
= {
0xEB, 0x08,
0x90, 0x90, 0x90,
0xE8
}

Definition at line 400 of file CommonPatches.c.

◆ mMiscPwrMgmtRel15Patch

STATIC PATCHER_GENERIC_PATCH mMiscPwrMgmtRel15Patch
Initial value:
= {
.Comment = DEBUG_POINTER ("MiscPwrMgmtRel Sequoia"),
.Base = NULL,
.Size = sizeof (mMiscPwrMgmtRelFind15),
.Count = 0,
.Skip = 0,
.Limit = 0
}
STATIC CONST UINT8 mMiscPwrMgmtRelMask15[]
STATIC CONST UINT8 mMiscPwrMgmtRelReplaceMask15[]
STATIC CONST UINT8 mMiscPwrMgmtRelFind15[]
STATIC CONST UINT8 mMiscPwrMgmtRelReplace15[]

Definition at line 378 of file CommonPatches.c.

◆ mMiscPwrMgmtRelFind

STATIC CONST UINT8 mMiscPwrMgmtRelFind[]
Initial value:
= {
0xB9, 0xAA, 0x01, 0x00, 0x00,
0x0F, 0x30
}

Definition at line 309 of file CommonPatches.c.

◆ mMiscPwrMgmtRelFind15

STATIC CONST UINT8 mMiscPwrMgmtRelFind15[]
Initial value:
= {
0xB9, 0xAA, 0x01, 0x00, 0x00,
0x0F, 0x32,
0x89, 0xD2,
0x83, 0x00, 0x00,
0x0F, 0x30
}

Definition at line 338 of file CommonPatches.c.

◆ mMiscPwrMgmtRelMask15

STATIC CONST UINT8 mMiscPwrMgmtRelMask15[]
Initial value:
= {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF,
0xFF, 0xFF,
0xFF, 0x00, 0x00,
0xFF, 0xFF
}

Definition at line 348 of file CommonPatches.c.

◆ mMiscPwrMgmtRelPatch

STATIC PATCHER_GENERIC_PATCH mMiscPwrMgmtRelPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("MiscPwrMgmtRel"),
.Base = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mMiscPwrMgmtRelFind),
.Count = 0,
.Skip = 0,
.Limit = 0
}
STATIC CONST UINT8 mMiscPwrMgmtRelFind[]
STATIC CONST UINT8 mMiscPwrMgmtRelReplace[]

Definition at line 323 of file CommonPatches.c.

◆ mMiscPwrMgmtRelReplace

STATIC CONST UINT8 mMiscPwrMgmtRelReplace[]
Initial value:
= {
0xB9, 0xAA, 0x01, 0x00, 0x00,
0x90, 0x90
}

Definition at line 316 of file CommonPatches.c.

◆ mMiscPwrMgmtRelReplace15

STATIC CONST UINT8 mMiscPwrMgmtRelReplace15[]
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00,
0x90, 0x90
}

Definition at line 358 of file CommonPatches.c.

◆ mMiscPwrMgmtRelReplaceMask15

STATIC CONST UINT8 mMiscPwrMgmtRelReplaceMask15[]
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00,
0xFF, 0xFF
}

Definition at line 368 of file CommonPatches.c.

◆ mMovCxE2

STATIC CONST UINT8 mMovCxE2[]
Initial value:
= {
0x66, 0xB9, 0xE2, 0x00
}

Definition at line 35 of file CommonPatches.c.

◆ mMovEcxE2

STATIC CONST UINT8 mMovEcxE2[]
Initial value:
= {
0xB9, 0xE2, 0x00, 0x00, 0x00
}

Definition at line 28 of file CommonPatches.c.

◆ mPanicKextDumpPatch

STATIC PATCHER_GENERIC_PATCH mPanicKextDumpPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("PanicKextDump"),
.Base = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mPanicKextDumpPatchFind),
.Count = 1,
.Skip = 0
}
STATIC CONST UINT8 mPanicKextDumpPatchReplace[]
STATIC CONST UINT8 mPanicKextDumpPatchFind[]

Definition at line 1717 of file CommonPatches.c.

◆ mPanicKextDumpPatchFind

STATIC CONST UINT8 mPanicKextDumpPatchFind[]
Initial value:
= {
0x00, 0x25, 0x2E, 0x2A, 0x73, 0x00
}

Definition at line 1705 of file CommonPatches.c.

◆ mPanicKextDumpPatchReplace

STATIC CONST UINT8 mPanicKextDumpPatchReplace[]
Initial value:
= {
0x00, 0x00, 0x2E, 0x2A, 0x73, 0x00
}

Definition at line 1711 of file CommonPatches.c.

◆ mPerfCtrlFind1

STATIC CONST UINT8 mPerfCtrlFind1[]
Initial value:
= {
0xB9, 0x99, 0x01, 0x00, 0x00,
0x0F, 0x30
}

Definition at line 535 of file CommonPatches.c.

◆ mPerfCtrlFind2

STATIC CONST UINT8 mPerfCtrlFind2[]
Initial value:
= {
0xB9, 0x99, 0x01, 0x00, 0x00,
0x31, 0xD2,
0x0F, 0x30
}

Definition at line 542 of file CommonPatches.c.

◆ mPerfCtrlFind3

STATIC CONST UINT8 mPerfCtrlFind3[]
Initial value:
= {
0xB9, 0x99, 0x01, 0x00, 0x00,
0x4C, 0x89, 0xF0,
0x0F, 0x30
}

Definition at line 550 of file CommonPatches.c.

◆ mPerfCtrlFind4

STATIC CONST UINT8 mPerfCtrlFind4[]
Initial value:
= {
0xB9, 0x99, 0x01, 0x00, 0x00,
0x48, 0x89, 0xD8,
0x0F, 0x30
}

Definition at line 558 of file CommonPatches.c.

◆ mPerfCtrlMax

STATIC CONST UINT8 mPerfCtrlMax[]
Initial value:
= {
0xB9, 0x99, 0x01, 0x00, 0x00,
0x31, 0xD2,
0xB8, 0x00, 0xFF, 0x00, 0x00,
0x0F, 0x30,
0xC3
}

Definition at line 566 of file CommonPatches.c.

◆ mPmioRegisterBase

STATIC UINTN mPmioRegisterBase = 0

To be set by PatchSetPciSerialDevice()

Definition at line 1502 of file CommonPatches.c.

◆ mPmioRegisterStride

STATIC UINT32 mPmioRegisterStride = 1

To be set by PatchSetPciSerialDevice()

Definition at line 1506 of file CommonPatches.c.

◆ mPowerStateTimeoutPanicFind

STATIC CONST UINT8 mPowerStateTimeoutPanicFind[]
Initial value:
= {
0x63, 0x6F, 0x6D, 0x2E, 0x61, 0x70, 0x70, 0x6C, 0x65, 0x00
}

Definition at line 2078 of file CommonPatches.c.

◆ mPowerStateTimeoutPanicInlineFind

STATIC CONST UINT8 mPowerStateTimeoutPanicInlineFind[]
Initial value:
= {
0x80, 0x00, 0x01, 0x6F,
0x75, 0x00,
0x80, 0x00, 0x02, 0x6D,
0x75, 0x00,
}

Definition at line 2106 of file CommonPatches.c.

◆ mPowerStateTimeoutPanicInlineMask

STATIC CONST UINT8 mPowerStateTimeoutPanicInlineMask[]
Initial value:
= {
0xFF, 0x00, 0xFF, 0xFF,
0xFF, 0x00,
0xFF, 0x00, 0xFF, 0xFF,
0xFF, 0x00,
}

Definition at line 2115 of file CommonPatches.c.

◆ mPowerStateTimeoutPanicInlinePatch

STATIC PATCHER_GENERIC_PATCH mPowerStateTimeoutPanicInlinePatch
Initial value:
= {
.Comment = DEBUG_POINTER ("PowerStateTimeout"),
.Base = "__ZN9IOService12ackTimerTickEv",
.Count = 1,
.Skip = 0,
.Limit = 4096
}
STATIC CONST UINT8 mPowerStateTimeoutPanicInlineReplace[]
STATIC CONST UINT8 mPowerStateTimeoutPanicInlineFind[]
STATIC CONST UINT8 mPowerStateTimeoutPanicInlineMask[]

Definition at line 2133 of file CommonPatches.c.

◆ mPowerStateTimeoutPanicInlineReplace

STATIC CONST UINT8 mPowerStateTimeoutPanicInlineReplace[]
Initial value:
= {
0x80, 0x00, 0x01, 0x6E,
0x75, 0x00,
0x80, 0x00, 0x02, 0x6D,
0x75, 0x00,
}

Definition at line 2124 of file CommonPatches.c.

◆ mPowerStateTimeoutPanicMasterPatch

STATIC PATCHER_GENERIC_PATCH mPowerStateTimeoutPanicMasterPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("PowerStateTimeout"),
.Base = NULL,
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mPowerStateTimeoutPanicFind),
.Count = 1,
.Skip = 0,
.Limit = 0
}
STATIC CONST UINT8 mPowerStateTimeoutPanicFind[]
STATIC CONST UINT8 mPowerStateTimeoutPanicReplace[]

Definition at line 2091 of file CommonPatches.c.

◆ mPowerStateTimeoutPanicReplace

STATIC CONST UINT8 mPowerStateTimeoutPanicReplace[]
Initial value:
= {
0x6E, 0x6F, 0x74, 0x2E, 0x61, 0x70, 0x70, 0x6C, 0x65, 0x00
}

Definition at line 2084 of file CommonPatches.c.

◆ mRemoveUsbLimitIoP1Find1

STATIC CONST UINT8 mRemoveUsbLimitIoP1Find1[]
Initial value:
= {
0x0F, 0x0F, 0x87
}

Definition at line 713 of file CommonPatches.c.

◆ mRemoveUsbLimitIoP1Find2

STATIC CONST UINT8 mRemoveUsbLimitIoP1Find2[]
Initial value:
= {
0x41, 0x83, 0x00, 0x0F,
0x41, 0xD3, 0x00,
0x00, 0x09, 0x00
}

Definition at line 740 of file CommonPatches.c.

◆ mRemoveUsbLimitIoP1Mask2

STATIC CONST UINT8 mRemoveUsbLimitIoP1Mask2[]
Initial value:
= {
0xFF, 0xFF, 0x00, 0xFF,
0xFF, 0xFF, 0x00,
0x00, 0xFF, 0x00
}

Definition at line 748 of file CommonPatches.c.

◆ mRemoveUsbLimitIoP1Patch1

STATIC PATCHER_GENERIC_PATCH mRemoveUsbLimitIoP1Patch1
Initial value:
= {
.Comment = DEBUG_POINTER ("RemoveUsbLimitIoP1 part 1"),
.Base = "__ZN16AppleUSBHostPort15setPortLocationEj",
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mRemoveUsbLimitIoP1Replace1),
.Count = 1,
.Skip = 0,
.Limit = 4096
}
STATIC CONST UINT8 mRemoveUsbLimitIoP1Replace1[]
STATIC CONST UINT8 mRemoveUsbLimitIoP1Find1[]

Definition at line 725 of file CommonPatches.c.

◆ mRemoveUsbLimitIoP1Patch2

STATIC PATCHER_GENERIC_PATCH mRemoveUsbLimitIoP1Patch2
Initial value:
= {
.Comment = DEBUG_POINTER ("RemoveUsbLimitIoP1 part 2"),
.Base = "__ZN16AppleUSBHostPort15setPortLocationEj",
.Size = sizeof (mRemoveUsbLimitIoP1Replace2),
.Count = 1,
.Skip = 0,
.Limit = 4096
}
STATIC CONST UINT8 mRemoveUsbLimitIoP1Mask2[]
STATIC CONST UINT8 mRemoveUsbLimitIoP1Replace2[]
STATIC CONST UINT8 mRemoveUsbLimitIoP1Find2[]
STATIC CONST UINT8 mRemoveUsbLimitIoP1ReplaceMask2[]

Definition at line 772 of file CommonPatches.c.

◆ mRemoveUsbLimitIoP1Replace1

STATIC CONST UINT8 mRemoveUsbLimitIoP1Replace1[]
Initial value:
= {
0x40, 0x0F, 0x87
}

Definition at line 719 of file CommonPatches.c.

◆ mRemoveUsbLimitIoP1Replace2

STATIC CONST UINT8 mRemoveUsbLimitIoP1Replace2[]
Initial value:
= {
0x00, 0x00, 0x00, 0x3F,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00
}

Definition at line 756 of file CommonPatches.c.

◆ mRemoveUsbLimitIoP1ReplaceMask2

STATIC CONST UINT8 mRemoveUsbLimitIoP1ReplaceMask2[]
Initial value:
= {
0x00, 0x00, 0x00, 0xFF,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00
}

Definition at line 764 of file CommonPatches.c.

◆ mRemoveUsbLimitV1Find

STATIC CONST UINT8 mRemoveUsbLimitV1Find[]
Initial value:
= {
0xFF, 0xFF, 0x10
}

Definition at line 659 of file CommonPatches.c.

◆ mRemoveUsbLimitV1Patch

STATIC PATCHER_GENERIC_PATCH mRemoveUsbLimitV1Patch
Initial value:
= {
.Comment = DEBUG_POINTER ("RemoveUsbLimitV1"),
.Base = "__ZN15AppleUSBXHCIPCI11createPortsEv",
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mRemoveUsbLimitV1Replace),
.Count = 1,
.Skip = 0,
.Limit = 8192
}
STATIC CONST UINT8 mRemoveUsbLimitV1Replace[]
STATIC CONST UINT8 mRemoveUsbLimitV1Find[]

Definition at line 671 of file CommonPatches.c.

◆ mRemoveUsbLimitV1Replace

STATIC CONST UINT8 mRemoveUsbLimitV1Replace[]
Initial value:
= {
0xFF, 0xFF, 0x40
}

Definition at line 665 of file CommonPatches.c.

◆ mRemoveUsbLimitV2Find

STATIC CONST UINT8 mRemoveUsbLimitV2Find[]
Initial value:
= {
0x0F, 0x0F, 0x83
}

Definition at line 686 of file CommonPatches.c.

◆ mRemoveUsbLimitV2Patch

STATIC PATCHER_GENERIC_PATCH mRemoveUsbLimitV2Patch
Initial value:
= {
.Comment = DEBUG_POINTER ("RemoveUsbLimitV2"),
.Base = "__ZN12AppleUSBXHCI11createPortsEv",
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mRemoveUsbLimitV2Replace),
.Count = 1,
.Skip = 0,
.Limit = 4096
}
STATIC CONST UINT8 mRemoveUsbLimitV2Replace[]
STATIC CONST UINT8 mRemoveUsbLimitV2Find[]

Definition at line 698 of file CommonPatches.c.

◆ mRemoveUsbLimitV2Replace

STATIC CONST UINT8 mRemoveUsbLimitV2Replace[]
Initial value:
= {
0x40, 0x0F, 0x83
}

Definition at line 692 of file CommonPatches.c.

◆ mSerialDevicePmioFind

STATIC CONST UINT8 mSerialDevicePmioFind[]
Initial value:
= {
0x66, 0xBA, 0xF8, 0x03
}

Definition at line 1496 of file CommonPatches.c.

◆ mWrmsr

STATIC CONST UINT8 mWrmsr[]
Initial value:
= {
0x0F, 0x30
}

Definition at line 42 of file CommonPatches.c.

◆ mWrmsrMaxDistance

STATIC CONST UINTN mWrmsrMaxDistance = 32

Definition at line 49 of file CommonPatches.c.

◆ mXcpmCfgLockDbgFind

STATIC CONST UINT8 mXcpmCfgLockDbgFind[]
Initial value:
= {
0xBF, 0xE2, 0x00, 0x00, 0x00,
0xE8
}

Definition at line 204 of file CommonPatches.c.

◆ mXcpmCfgLockDbgPatch

STATIC PATCHER_GENERIC_PATCH mXcpmCfgLockDbgPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("XcpmCfgLockDbg"),
.Base = "_xcpm_cst_control_evaluate",
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mXcpmCfgLockDbgFind),
.Count = 2,
.Skip = 0,
.Limit = 4096
}
STATIC CONST UINT8 mXcpmCfgLockDbgReplace[]
STATIC CONST UINT8 mXcpmCfgLockDbgFind[]

Definition at line 219 of file CommonPatches.c.

◆ mXcpmCfgLockDbgReplace

STATIC CONST UINT8 mXcpmCfgLockDbgReplace[]
Initial value:
= {
0xEB, 0x08,
0x90, 0x90, 0x90,
0xE8
}

Definition at line 211 of file CommonPatches.c.

◆ mXcpmCfgLockRelFind

STATIC CONST UINT8 mXcpmCfgLockRelFind[]
Initial value:
= {
0xB9, 0xE2, 0x00, 0x00, 0x00,
0x0F, 0x30
}

Definition at line 175 of file CommonPatches.c.

◆ mXcpmCfgLockRelPatch

STATIC PATCHER_GENERIC_PATCH mXcpmCfgLockRelPatch
Initial value:
= {
.Comment = DEBUG_POINTER ("XcpmCfgLockRel"),
.Base = "_xcpm_idle",
.Mask = NULL,
.ReplaceMask = NULL,
.Size = sizeof (mXcpmCfgLockRelFind),
.Count = 2,
.Skip = 0,
.Limit = 4096
}
STATIC CONST UINT8 mXcpmCfgLockRelFind[]
STATIC CONST UINT8 mXcpmCfgLockRelReplace[]

Definition at line 189 of file CommonPatches.c.

◆ mXcpmCfgLockRelReplace

STATIC CONST UINT8 mXcpmCfgLockRelReplace[]
Initial value:
= {
0xB9, 0xE2, 0x00, 0x00, 0x00,
0x90, 0x90
}

Definition at line 182 of file CommonPatches.c.