diff --git a/.DS_Store b/.DS_Store index c4fed32..cdc9253 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/EFI/.DS_Store b/EFI/.DS_Store index c7ae75b..79b1e83 100644 Binary files a/EFI/.DS_Store and b/EFI/.DS_Store differ diff --git a/EFI/BOOT/BOOTx64.efi b/EFI/BOOT/BOOTx64.efi index 3d979e3..66ee038 100755 Binary files a/EFI/BOOT/BOOTx64.efi and b/EFI/BOOT/BOOTx64.efi differ diff --git a/EFI/OC/.DS_Store b/EFI/OC/.DS_Store index 5f97c46..129cf01 100755 Binary files a/EFI/OC/.DS_Store and b/EFI/OC/.DS_Store differ diff --git a/EFI/OC/ACPI/.DS_Store b/EFI/OC/ACPI/.DS_Store index 67b83dc..aedf0d8 100644 Binary files a/EFI/OC/ACPI/.DS_Store and b/EFI/OC/ACPI/.DS_Store differ diff --git a/EFI/OC/ACPI/SSDT-OCBATT.aml b/EFI/OC/ACPI/SSDT-OCBATT.aml index 81b801e..4ad7b94 100755 Binary files a/EFI/OC/ACPI/SSDT-OCBATT.aml and b/EFI/OC/ACPI/SSDT-OCBATT.aml differ diff --git a/EFI/OC/ACPI/SSDT-TEMP.aml b/EFI/OC/ACPI/SSDT-TEMP.aml index a7b6a19..1b09eb8 100755 Binary files a/EFI/OC/ACPI/SSDT-TEMP.aml and b/EFI/OC/ACPI/SSDT-TEMP.aml differ diff --git a/EFI/OC/ACPI/SSDT-VPS2.aml b/EFI/OC/ACPI/SSDT-VPS2.aml index 122343d..5def934 100755 Binary files a/EFI/OC/ACPI/SSDT-VPS2.aml and b/EFI/OC/ACPI/SSDT-VPS2.aml differ diff --git a/EFI/OC/Bootstrap/Bootstrap.efi b/EFI/OC/Bootstrap/Bootstrap.efi index 5fdc50a..66ee038 100755 Binary files a/EFI/OC/Bootstrap/Bootstrap.efi and b/EFI/OC/Bootstrap/Bootstrap.efi differ diff --git a/EFI/OC/Drivers/AudioDxe.efi b/EFI/OC/Drivers/AudioDxe.efi index 05b2fbd..4b063af 100755 Binary files a/EFI/OC/Drivers/AudioDxe.efi and b/EFI/OC/Drivers/AudioDxe.efi differ diff --git a/EFI/OC/Drivers/CrScreenshotDxe.efi b/EFI/OC/Drivers/CrScreenshotDxe.efi index cbeea80..d2f90bd 100755 Binary files a/EFI/OC/Drivers/CrScreenshotDxe.efi and b/EFI/OC/Drivers/CrScreenshotDxe.efi differ diff --git a/EFI/OC/Drivers/HiiDatabase.efi b/EFI/OC/Drivers/HiiDatabase.efi index 1cdd344..d018350 100755 Binary files a/EFI/OC/Drivers/HiiDatabase.efi and b/EFI/OC/Drivers/HiiDatabase.efi differ diff --git a/EFI/OC/Drivers/NvmExpressDxe.efi b/EFI/OC/Drivers/NvmExpressDxe.efi index aab6720..599955a 100755 Binary files a/EFI/OC/Drivers/NvmExpressDxe.efi and b/EFI/OC/Drivers/NvmExpressDxe.efi differ diff --git a/EFI/OC/Drivers/OpenCanopy.efi b/EFI/OC/Drivers/OpenCanopy.efi index dbcc73b..3b88b2d 100755 Binary files a/EFI/OC/Drivers/OpenCanopy.efi and b/EFI/OC/Drivers/OpenCanopy.efi differ diff --git a/EFI/OC/Drivers/OpenRuntime.efi b/EFI/OC/Drivers/OpenRuntime.efi index 21c0e5c..11158ab 100755 Binary files a/EFI/OC/Drivers/OpenRuntime.efi and b/EFI/OC/Drivers/OpenRuntime.efi differ diff --git a/EFI/OC/Drivers/OpenUsbKbDxe.efi b/EFI/OC/Drivers/OpenUsbKbDxe.efi index a0bfef2..6aa7a7b 100755 Binary files a/EFI/OC/Drivers/OpenUsbKbDxe.efi and b/EFI/OC/Drivers/OpenUsbKbDxe.efi differ diff --git a/EFI/OC/Drivers/Ps2KeyboardDxe.efi b/EFI/OC/Drivers/Ps2KeyboardDxe.efi index 428bac6..dc7d7c0 100755 Binary files a/EFI/OC/Drivers/Ps2KeyboardDxe.efi and b/EFI/OC/Drivers/Ps2KeyboardDxe.efi differ diff --git a/EFI/OC/Drivers/Ps2MouseDxe.efi b/EFI/OC/Drivers/Ps2MouseDxe.efi index b20be85..2c47475 100755 Binary files a/EFI/OC/Drivers/Ps2MouseDxe.efi and b/EFI/OC/Drivers/Ps2MouseDxe.efi differ diff --git a/EFI/OC/Drivers/UsbMouseDxe.efi b/EFI/OC/Drivers/UsbMouseDxe.efi index 52aaa0d..837b6a3 100755 Binary files a/EFI/OC/Drivers/UsbMouseDxe.efi and b/EFI/OC/Drivers/UsbMouseDxe.efi differ diff --git a/EFI/OC/Drivers/XhciDxe.efi b/EFI/OC/Drivers/XhciDxe.efi index 104d103..5bda458 100755 Binary files a/EFI/OC/Drivers/XhciDxe.efi and b/EFI/OC/Drivers/XhciDxe.efi differ diff --git a/EFI/OC/Kexts/SMCBatteryManager.kext/Contents/Info.plist b/EFI/OC/Kexts/SMCBatteryManager.kext/Contents/Info.plist new file mode 100755 index 0000000..83980e2 --- /dev/null +++ b/EFI/OC/Kexts/SMCBatteryManager.kext/Contents/Info.plist @@ -0,0 +1,100 @@ + + + + + BuildMachineOSBuild + 18E226 + CFBundleDevelopmentRegion + en + CFBundleExecutable + SMCBatteryManager + CFBundleIdentifier + ru.usrsse2.SMCBatteryManager + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SMCBatteryManager + CFBundlePackageType + KEXT + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 10E1001 + DTPlatformVersion + GM + DTSDKBuild + 18E219 + DTSDKName + macosx10.14 + DTXcode + 1020 + DTXcodeBuild + 10E1001 + IOKitPersonalities + + IOSMBusController + + CFBundleIdentifier + ru.usrsse2.SMCBatteryManager + IOClass + SMCSMBusController + IOMatchCategory + SMCSMBusController + IOProviderClass + IOResources + IOResourceMatch + IOKit + + SMCBatteryManager + + CFBundleIdentifier + ru.usrsse2.SMCBatteryManager + IOClass + SMCBatteryManager + IOMatchCategory + SMCBatteryManager + IOProviderClass + IOResources + IOResourceMatch + IOKit + + + NSHumanReadableCopyright + Copyright © 2018 usrsse2. All rights reserved. + OSBundleCompatibleVersion + 1.0.0 + OSBundleLibraries + + as.vit9696.Lilu + 1.2.0 + as.vit9696.VirtualSMC + 1.0.0 + com.apple.iokit.IOACPIFamily + 1.0.0d1 + com.apple.iokit.IOSMBusFamily + 1.0.0 + com.apple.kpi.bsd + 12.0.0 + com.apple.kpi.dsep + 12.0.0 + com.apple.kpi.iokit + 12.0.0 + com.apple.kpi.libkern + 12.0.0 + com.apple.kpi.mach + 12.0.0 + com.apple.kpi.unsupported + 12.0.0 + + OSBundleRequired + Root + + diff --git a/EFI/OC/Kexts/SMCBatteryManager.kext/Contents/MacOS/SMCBatteryManager b/EFI/OC/Kexts/SMCBatteryManager.kext/Contents/MacOS/SMCBatteryManager new file mode 100755 index 0000000..425230a Binary files /dev/null and b/EFI/OC/Kexts/SMCBatteryManager.kext/Contents/MacOS/SMCBatteryManager differ diff --git a/EFI/OC/Kexts/SMCBatteryManager.kext/Contents/Resources/SSDT-BATC.dsl b/EFI/OC/Kexts/SMCBatteryManager.kext/Contents/Resources/SSDT-BATC.dsl new file mode 100755 index 0000000..b323aa5 --- /dev/null +++ b/EFI/OC/Kexts/SMCBatteryManager.kext/Contents/Resources/SSDT-BATC.dsl @@ -0,0 +1,400 @@ +// SSDT-BATC.dsl +// +// Based on https://github.com/RehabMan/OS-X-ACPI-Battery-Driver/blob/master/SSDT-BATC.dsl +// +// An SSDT to combine two batteries into one +// initial work/testing by ag6952563 (with assistance by RehabMan) +// finalize into generic SSDT by RehabMan +// some code cleanup/optimization/and bug fixing by RehabMan +// modifications to work VirtualSMC SMCBatteryManager by armenio +// add _BIX (easy, following the original code from RehabMan) by armenio +// +// OS X support for multiple batteries is a bit buggy. +// This SSDT can be used to combine two batteries into one, +// avoiding the bugs. +// +// It may need modification depending on the ACPI path of your +// existing battery objects. +// + +// IMPORTANT: +// +// To use this SSDT, you must also patch any Notify for either BAT0 or BAT1 +// objects. +// +// The Notify is used to tell the system when a battery is removed or added. +// +// Any code: +// Notify (...BAT0, ...) +// -or +// Notify (...BAT1, ...) +// +// Must be changed to: +// Notify (...BATC, ...) +// +// Refer to Dual Battery Support.md for patching details +// + +DefinitionBlock ("", "SSDT", 2, "ACDT", "BATC", 0x00000000) +{ + External (_SB_.PCI0.LPCB.EC, DeviceObj) + External (_SB_.PCI0.LPCB.EC.BAT0, DeviceObj) + External (_SB_.PCI0.LPCB.EC.BAT0._BIF, MethodObj) + External (_SB_.PCI0.LPCB.EC.BAT0._BIX, MethodObj) + External (_SB_.PCI0.LPCB.EC.BAT0._BST, MethodObj) + External (_SB_.PCI0.LPCB.EC.BAT0._HID, IntObj) + External (_SB_.PCI0.LPCB.EC.BAT0._STA, MethodObj) + External (_SB_.PCI0.LPCB.EC.BAT1, DeviceObj) + External (_SB_.PCI0.LPCB.EC.BAT1._BIF, MethodObj) + External (_SB_.PCI0.LPCB.EC.BAT1._BIX, MethodObj) + External (_SB_.PCI0.LPCB.EC.BAT1._BST, MethodObj) + External (_SB_.PCI0.LPCB.EC.BAT1._HID, IntObj) + External (_SB_.PCI0.LPCB.EC.BAT1._STA, MethodObj) + + Scope (\_SB.PCI0.LPCB.EC) + { + Device (BATC) + { + Name (_HID, EisaId ("PNP0C0A")) + Name (_UID, 0x02) + + Method (_INI) + { + If (_OSI ("Darwin")) + { + // disable original battery objects by setting invalid _HID + ^^BAT0._HID = 0 + ^^BAT1._HID = 0 + } + } + + Method (_STA) + { + If (_OSI ("Darwin")) + { + // call original _STA for BAT0 and BAT1 + // result is bitwise OR between them + Return (^^BAT0._STA () | ^^BAT1._STA ()) + } + Else + { + Return (Zero) + } + } + + Method (_BIF) + { + // Local0 BAT0._BIF + // Local1 BAT1._BIF + // Local2 BAT0._STA + // Local3 BAT1._STA + // Local4/Local5 scratch + + // gather and validate data from BAT0 + Local0 = ^^BAT0._BIF () + Local2 = ^^BAT0._STA () + If (0x1f == Local2) + { + // check for invalid design capacity + Local4 = DerefOf (Local0 [1]) + If (!Local4 || Ones == Local4) { Local2 = 0; } + // check for invalid last full charge capacity + Local4 = DerefOf (Local0 [2]) + If (!Local4 || Ones == Local4) { Local2 = 0; } + // check for invalid design voltage + Local4 = DerefOf (Local0 [4]) + If (!Local4 || Ones == Local4) { Local2 = 0; } + } + // gather and validate data from BAT1 + Local1 = ^^BAT1._BIF () + Local3 = ^^BAT1._STA () + If (0x1f == Local3) + { + // check for invalid design capacity + Local4 = DerefOf (Local1 [1]) + If (!Local4 || Ones == Local4) { Local3 = 0; } + // check for invalid last full charge capacity + Local4 = DerefOf (Local1 [2]) + If (!Local4 || Ones == Local4) { Local3 = 0; } + // check for invalid design voltage + Local4 = DerefOf (Local1 [4]) + If (!Local4 || Ones == Local4) { Local3 = 0; } + } + // find primary and secondary battery + If (0x1f != Local2 && 0x1f == Local3) + { + // make primary use BAT1 data + Local0 = Local1 // BAT1._BIF result + Local2 = Local3 // BAT1._STA result + Local3 = 0 // no secondary battery + } + // combine batteries into Local0 result if possible + If (0x1f == Local2 && 0x1f == Local3) + { + // _BIF 0 Power Unit - leave BAT0 value + // _BIF 1 Design Capacity - add BAT0 and BAT1 values + Local4 = DerefOf (Local0 [1]) + Local5 = DerefOf (Local1 [1]) + If (0xffffffff != Local4 && 0xffffffff != Local5) + { + Local0 [1] = Local4 + Local5 + } + // _BIF 2 Last Full Charge Capacity - add BAT0 and BAT1 values + Local4 = DerefOf (Local0 [2]) + Local5 = DerefOf (Local1 [2]) + If (0xffffffff != Local4 && 0xffffffff != Local5) + { + Local0 [2] = Local4 + Local5 + } + // _BIF 3 Battery Technology - leave BAT0 value + // _BIF 4 Design Voltage - average between BAT0 and BAT1 values + Local4 = DerefOf (Local0 [4]) + Local5 = DerefOf (Local1 [4]) + If (0xffffffff != Local4 && 0xffffffff != Local5) + { + Local0 [4] = (Local4 + Local5) / 2 + } + // _BIF 5 Design Capacity of Warning - add BAT0 and BAT1 values + Local0 [5] = DerefOf (Local0 [5]) + DerefOf (Local1 [5]) + // _BIF 6 Design Capacity of Low - add BAT0 and BAT1 values + Local0 [6] = DerefOf (Local0 [6]) + DerefOf (Local1 [6]) + // _BIF 7 Battery Capacity Granularity 1 - add BAT0 and BAT1 values + Local4 = DerefOf (Local0 [7]) + Local5 = DerefOf (Local1 [7]) + If (0xffffffff != Local4 && 0xffffffff != Local5) + { + Local0 [7] = Local4 + Local5 + } + // _BIF 8 Battery Capacity Granularity 2 - add BAT0 and BAT1 values + Local4 = DerefOf (Local0 [8]) + Local5 = DerefOf (Local1 [8]) + If (0xffffffff != Local4 && 0xffffffff != Local5) + { + Local0 [8] = Local4 + Local5 + } + // _BIF 9 Model Number - concatenate BAT0 and BAT1 values + Local0 [0x09] = Concatenate (Concatenate (DerefOf (Local0 [0x09]), " / "), DerefOf (Local1 [0x09])) + // _BIF a Serial Number - concatenate BAT0 and BAT1 values + Local0 [0x0a] = Concatenate (Concatenate (DerefOf (Local0 [0x0a]), " / "), DerefOf (Local1 [0x0a])) + // _BIF b Battery Type - concatenate BAT0 and BAT1 values + Local0 [0x0b] = Concatenate (Concatenate (DerefOf (Local0 [0x0b]), " / "), DerefOf (Local1 [0x0b])) + // _BIF c OEM Information - concatenate BAT0 and BAT1 values + Local0 [0x0c] = Concatenate (Concatenate (DerefOf (Local0 [0x0c]), " / "), DerefOf (Local1 [0x0c])) + } + + Return (Local0) + } // _BIF + + Method (_BIX) + { + // Local0 BAT0._BIX + // Local1 BAT1._BIX + // Local2 BAT0._STA + // Local3 BAT1._STA + // Local4/Local5 scratch + + // gather and validate data from BAT0 + Local0 = ^^BAT0._BIX () + Local2 = ^^BAT0._STA () + If (0x1f == Local2) + { + // check for invalid design capacity + Local4 = DerefOf (Local0 [2]) + If (!Local4 || Ones == Local4) { Local2 = 0; } + // check for invalid last full charge capacity + Local4 = DerefOf (Local0 [3]) + If (!Local4 || Ones == Local4) { Local2 = 0; } + // check for invalid design voltage + Local4 = DerefOf (Local0 [5]) + If (!Local4 || Ones == Local4) { Local2 = 0; } + } + // gather and validate data from BAT1 + Local1 = ^^BAT1._BIX () + Local3 = ^^BAT1._STA () + If (0x1f == Local3) + { + // check for invalid design capacity + Local4 = DerefOf (Local1 [2]) + If (!Local4 || Ones == Local4) { Local3 = 0; } + // check for invalid last full charge capacity + Local4 = DerefOf (Local1 [3]) + If (!Local4 || Ones == Local4) { Local3 = 0; } + // check for invalid design voltage + Local4 = DerefOf (Local1 [5]) + If (!Local4 || Ones == Local4) { Local3 = 0; } + } + // find primary and secondary battery + If (0x1f != Local2 && 0x1f == Local3) + { + // make primary use BAT1 data + Local0 = Local1 // BAT1._BIX result + Local2 = Local3 // BAT1._STA result + Local3 = 0 // no secondary battery + } + // combine batteries into Local0 result if possible + If (0x1f == Local2 && 0x1f == Local3) + { + // _BIX 0 Revision - leave BAT0 value + // _BIX 1 Power Unit - leave BAT0 value + // _BIX 2 Design Capacity - add BAT0 and BAT1 values + Local4 = DerefOf (Local0 [2]) + Local5 = DerefOf (Local1 [2]) + If (0xffffffff != Local4 && 0xffffffff != Local5) + { + Local0 [2] = Local4 + Local5 + } + // _BIX 3 Last Full Charge Capacity - add BAT0 and BAT1 values + Local4 = DerefOf (Local0 [3]) + Local5 = DerefOf (Local1 [3]) + If (0xffffffff != Local4 && 0xffffffff != Local5) + { + Local0 [3] = Local4 + Local5 + } + // _BIX 4 Battery Technology - leave BAT0 value + // _BIX 5 Design Voltage - average between BAT0 and BAT1 values + Local4 = DerefOf (Local0 [5]) + Local5 = DerefOf (Local1 [5]) + If (0xffffffff != Local4 && 0xffffffff != Local5) + { + Local0 [5] = (Local4 + Local5) / 2 + } + // _BIX 6 Design Capacity of Warning - add BAT0 and BAT1 values + Local0 [6] = DerefOf (Local0 [6]) + DerefOf (Local1 [6]) + // _BIX 7 Design Capacity of Low - add BAT0 and BAT1 values + Local0 [7] = DerefOf (Local0 [7]) + DerefOf (Local1 [7]) + // _BIX 8 Cycle Count - average between BAT0 and BAT1 values + Local4 = DerefOf (Local0 [8]) + Local5 = DerefOf (Local1 [8]) + If (0xffffffff != Local4 && 0xffffffff != Local5) + { + Local0 [8] = (Local4 + Local5) / 2 + } + // _BIX 9 Measurement Accuracy - average between BAT0 and BAT1 values + Local0 [9] = (DerefOf (Local0 [9]) + DerefOf (Local1 [9])) / 2 + // _BIX 0xa Max Sampling Time - average between BAT0 and BAT1 values + Local4 = DerefOf (Local0 [0xa]) + Local5 = DerefOf (Local1 [0xa]) + If (0xffffffff != Local4 && 0xffffffff != Local5) + { + Local0 [0xa] = (Local4 + Local5) / 2 + } + // _BIX 0xb Min Sampling Time - average between BAT0 and BAT1 values + Local4 = DerefOf (Local0 [0xb]) + Local5 = DerefOf (Local1 [0xb]) + If (0xffffffff != Local4 && 0xffffffff != Local5) + { + Local0 [0xb] = (Local4 + Local5) / 2 + } + // _BIX 0xc Max Averaging Interval - average between BAT0 and BAT1 values + Local0 [0xc] = (DerefOf (Local0 [0xc]) + DerefOf (Local1 [0xc])) / 2 + // _BIX 0xd Min Averaging Interval - average between BAT0 and BAT1 values + Local0 [0xd] = (DerefOf (Local0 [0xd]) + DerefOf (Local1 [0xd])) / 2 + // _BIX 0xe Battery Capacity Granularity 1 - add BAT0 and BAT1 values + Local4 = DerefOf (Local0 [0xe]) + Local5 = DerefOf (Local1 [0xe]) + If (0xffffffff != Local4 && 0xffffffff != Local5) + { + Local0 [0xe] = Local4 + Local5 + } + // _BIX 0xf Battery Capacity Granularity 2 - add BAT0 and BAT1 values + Local4 = DerefOf (Local0 [0xf]) + Local5 = DerefOf (Local1 [0xf]) + If (0xffffffff != Local4 && 0xffffffff != Local5) + { + Local0 [0xf] = Local4 + Local5 + } + // _BIX 10 Model Number - concatenate BAT0 and BAT1 values + Local0 [0x10] = Concatenate (Concatenate (DerefOf (Local0 [0x10]), " / "), DerefOf (Local1 [0x10])) + // _BIX 11 Serial Number - concatenate BAT0 and BAT1 values + Local0 [0x11] = Concatenate (Concatenate (DerefOf (Local0 [0x11]), " / "), DerefOf (Local1 [0x11])) + // _BIX 12 Battery Type - concatenate BAT0 and BAT1 values + Local0 [0x12] = Concatenate (Concatenate (DerefOf (Local0 [0x12]), " / "), DerefOf (Local1 [0x12])) + // _BIX 13 OEM Information - concatenate BAT0 and BAT1 values + Local0 [0x13] = Concatenate (Concatenate (DerefOf (Local0 [0x13]), " / "), DerefOf (Local1 [0x13])) + // _BIX 14 Battery Swapping Capability - leave BAT0 value for now + } + Return (Local0) + } // _BIX + + Method (_BST) + { + // Local0 BAT0._BST + // Local1 BAT1._BST + // Local2 BAT0._STA + // Local3 BAT1._STA + // Local4/Local5 scratch + + // gather battery data from BAT0 + Local0 = ^^BAT0._BST () + Local2 = ^^BAT0._STA () + If (0x1f == Local2) + { + // check for invalid remaining capacity + Local4 = DerefOf (Local0 [2]) + If (!Local4 || Ones == Local4) { Local2 = 0; } + } + // gather battery data from BAT1 + Local1 = ^^BAT1._BST () + Local3 = ^^BAT1._STA () + If (0x1f == Local3) + { + // check for invalid remaining capacity + Local4 = DerefOf (Local1 [2]) + If (!Local4 || Ones == Local4) { Local3 = 0; } + } + // find primary and secondary battery + If (0x1f != Local2 && 0x1f == Local3) + { + // make primary use BAT1 data + Local0 = Local1 // BAT1._BST result + Local2 = Local3 // BAT1._STA result + Local3 = 0 // no secondary battery + } + // combine batteries into Local0 result if possible + If (0x1f == Local2 && 0x1f == Local3) + { + // _BST 0 - Battery State - if one battery is charging, then charging, else discharging + Local4 = DerefOf (Local0 [0]) + Local5 = DerefOf (Local1 [0]) + If (Local4 != Local5) + { + If (Local4 == 2 || Local5 == 2) + { + // 2 = charging + Local0 [0] = 2 + } + ElseIf (Local4 == 1 || Local5 == 1) + { + // 1 = discharging + Local0 [0] = 1 + } + ElseIf (Local4 == 3 || Local5 == 3) + { + Local0 [0] = 3 + } + ElseIf (Local4 == 4 || Local5 == 4) + { + // critical + Local0 [0] = 4 + } + ElseIf (Local4 == 5 || Local5 == 5) + { + // critical and discharging + Local0 [0] = 5 + } + // if none of the above, just leave as BAT0 is + } + + // _BST 1 - Battery Present Rate - add BAT0 and BAT1 values + Local0 [1] = DerefOf (Local0 [1]) + DerefOf (Local1 [1]) + // _BST 2 - Battery Remaining Capacity - add BAT0 and BAT1 values + Local0 [2] = DerefOf (Local0 [2]) + DerefOf (Local1 [2]) + // _BST 3 - Battery Present Voltage - average between BAT0 and BAT1 values + Local0 [3] = (DerefOf (Local0 [3]) + DerefOf (Local1 [3])) / 2 + } + Return (Local0) + } // _BST + } // BATC + } // Scope (...) +} +//EOF diff --git a/EFI/OC/Kexts/SMCDellSensors.kext/Contents/Info.plist b/EFI/OC/Kexts/SMCDellSensors.kext/Contents/Info.plist new file mode 100755 index 0000000..98f7239 --- /dev/null +++ b/EFI/OC/Kexts/SMCDellSensors.kext/Contents/Info.plist @@ -0,0 +1,98 @@ + + + + + BuildMachineOSBuild + 18E226 + CFBundleDevelopmentRegion + en + CFBundleExecutable + SMCDellSensors + CFBundleIdentifier + as.lvs1974.SMCDellSensors + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SMCDellSensors + CFBundlePackageType + KEXT + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 10E1001 + DTPlatformVersion + GM + DTSDKBuild + 18E219 + DTSDKName + macosx10.14 + DTXcode + 1020 + DTXcodeBuild + 10E1001 + IOKitPersonalities + + SMCDellSensors + + CFBundleIdentifier + as.lvs1974.SMCDellSensors + FanMultiplier + 1 + FanNames + + CPU Fan + System Fan + GPU Fan + PSU Fan + Chipset Fan + Other Fan + + IOClass + SMCDellSensors + IOMatchCategory + SMCDellSensors + IOProviderClass + IOResources + IOResourceMatch + IOKit + + + NSHumanReadableCopyright + Copyright © 2018 usrsse2. All rights reserved. + OSBundleCompatibleVersion + 1.0.0 + OSBundleLibraries + + as.vit9696.Lilu + 1.2.0 + as.vit9696.VirtualSMC + 1.0.0 + com.apple.iokit.IOACPIFamily + 1.0.0d1 + com.apple.iokit.IOSMBusFamily + 1.0.0 + com.apple.kpi.bsd + 12.0.0 + com.apple.kpi.dsep + 12.0.0 + com.apple.kpi.iokit + 12.0.0 + com.apple.kpi.libkern + 12.0.0 + com.apple.kpi.mach + 12.0.0 + com.apple.kpi.unsupported + 12.0.0 + + OSBundleRequired + Root + + diff --git a/EFI/OC/Kexts/SMCDellSensors.kext/Contents/MacOS/SMCDellSensors b/EFI/OC/Kexts/SMCDellSensors.kext/Contents/MacOS/SMCDellSensors new file mode 100755 index 0000000..47b5ab1 Binary files /dev/null and b/EFI/OC/Kexts/SMCDellSensors.kext/Contents/MacOS/SMCDellSensors differ diff --git a/EFI/OC/Kexts/SMCLightSensor.kext/Contents/MacOS/SMCLightSensor b/EFI/OC/Kexts/SMCLightSensor.kext/Contents/MacOS/SMCLightSensor index b2c2d44..e654c24 100755 Binary files a/EFI/OC/Kexts/SMCLightSensor.kext/Contents/MacOS/SMCLightSensor and b/EFI/OC/Kexts/SMCLightSensor.kext/Contents/MacOS/SMCLightSensor differ diff --git a/EFI/OC/Kexts/SMCProcessor.kext/Contents/Info.plist b/EFI/OC/Kexts/SMCProcessor.kext/Contents/Info.plist index dda6a97..2e18bf1 100755 --- a/EFI/OC/Kexts/SMCProcessor.kext/Contents/Info.plist +++ b/EFI/OC/Kexts/SMCProcessor.kext/Contents/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 19F101 + 18E226 CFBundleDevelopmentRegion en CFBundleExecutable @@ -29,17 +29,17 @@ DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 11E608c + 10E1001 DTPlatformVersion GM DTSDKBuild - 19E258 + 18E219 DTSDKName - macosx10.15 + macosx10.14 DTXcode - 1150 + 1020 DTXcodeBuild - 11E608c + 10E1001 IOKitPersonalities as.vit9696.SMCProcessor @@ -63,8 +63,6 @@ ACPI - LSMinimumSystemVersion - 10.8 NSHumanReadableCopyright Copyright © 2018 vit9696. All rights reserved. OSBundleCompatibleVersion diff --git a/EFI/OC/Kexts/SMCProcessor.kext/Contents/MacOS/SMCProcessor b/EFI/OC/Kexts/SMCProcessor.kext/Contents/MacOS/SMCProcessor index a5c2500..97b68e8 100755 Binary files a/EFI/OC/Kexts/SMCProcessor.kext/Contents/MacOS/SMCProcessor and b/EFI/OC/Kexts/SMCProcessor.kext/Contents/MacOS/SMCProcessor differ diff --git a/EFI/OC/Kexts/SMCProcessor.kext/Contents/_CodeSignature/CodeResources b/EFI/OC/Kexts/SMCProcessor.kext/Contents/_CodeSignature/CodeResources deleted file mode 100755 index d5d0fd7..0000000 --- a/EFI/OC/Kexts/SMCProcessor.kext/Contents/_CodeSignature/CodeResources +++ /dev/null @@ -1,115 +0,0 @@ - - - - - files - - files2 - - rules - - ^Resources/ - - ^Resources/.*\.lproj/ - - optional - - weight - 1000 - - ^Resources/.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^Resources/Base\.lproj/ - - weight - 1010 - - ^version.plist$ - - - rules2 - - .*\.dSYM($|/) - - weight - 11 - - ^(.*/)?\.DS_Store$ - - omit - - weight - 2000 - - ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ - - nested - - weight - 10 - - ^.* - - ^Info\.plist$ - - omit - - weight - 20 - - ^PkgInfo$ - - omit - - weight - 20 - - ^Resources/ - - weight - 20 - - ^Resources/.*\.lproj/ - - optional - - weight - 1000 - - ^Resources/.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^Resources/Base\.lproj/ - - weight - 1010 - - ^[^/]+$ - - nested - - weight - 10 - - ^embedded\.provisionprofile$ - - weight - 20 - - ^version\.plist$ - - weight - 20 - - - - diff --git a/EFI/OC/Kexts/SMCSuperIO.kext/Contents/Info.plist b/EFI/OC/Kexts/SMCSuperIO.kext/Contents/Info.plist index 1afa06a..d335eef 100755 --- a/EFI/OC/Kexts/SMCSuperIO.kext/Contents/Info.plist +++ b/EFI/OC/Kexts/SMCSuperIO.kext/Contents/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 19F101 + 18E226 CFBundleDevelopmentRegion en CFBundleExecutable @@ -29,17 +29,17 @@ DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 11E608c + 10E1001 DTPlatformVersion GM DTSDKBuild - 19E258 + 18E219 DTSDKName - macosx10.15 + macosx10.14 DTXcode - 1150 + 1020 DTXcodeBuild - 11E608c + 10E1001 IOKitPersonalities ru.joedm.SMCSuperIO @@ -58,8 +58,6 @@ ACPI - LSMinimumSystemVersion - 10.8 NSHumanReadableCopyright Copyright © 2018 joedm. All rights reserved. OSBundleCompatibleVersion diff --git a/EFI/OC/Kexts/SMCSuperIO.kext/Contents/MacOS/SMCSuperIO b/EFI/OC/Kexts/SMCSuperIO.kext/Contents/MacOS/SMCSuperIO index 721cad1..ec7ed8d 100755 Binary files a/EFI/OC/Kexts/SMCSuperIO.kext/Contents/MacOS/SMCSuperIO and b/EFI/OC/Kexts/SMCSuperIO.kext/Contents/MacOS/SMCSuperIO differ diff --git a/EFI/OC/Kexts/SMCSuperIO.kext/Contents/_CodeSignature/CodeResources b/EFI/OC/Kexts/SMCSuperIO.kext/Contents/_CodeSignature/CodeResources deleted file mode 100755 index d5d0fd7..0000000 --- a/EFI/OC/Kexts/SMCSuperIO.kext/Contents/_CodeSignature/CodeResources +++ /dev/null @@ -1,115 +0,0 @@ - - - - - files - - files2 - - rules - - ^Resources/ - - ^Resources/.*\.lproj/ - - optional - - weight - 1000 - - ^Resources/.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^Resources/Base\.lproj/ - - weight - 1010 - - ^version.plist$ - - - rules2 - - .*\.dSYM($|/) - - weight - 11 - - ^(.*/)?\.DS_Store$ - - omit - - weight - 2000 - - ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ - - nested - - weight - 10 - - ^.* - - ^Info\.plist$ - - omit - - weight - 20 - - ^PkgInfo$ - - omit - - weight - 20 - - ^Resources/ - - weight - 20 - - ^Resources/.*\.lproj/ - - optional - - weight - 1000 - - ^Resources/.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^Resources/Base\.lproj/ - - weight - 1010 - - ^[^/]+$ - - nested - - weight - 10 - - ^embedded\.provisionprofile$ - - weight - 20 - - ^version\.plist$ - - weight - 20 - - - - diff --git a/EFI/OC/Kexts/VirtualSMC.kext/Contents/Info.plist b/EFI/OC/Kexts/VirtualSMC.kext/Contents/Info.plist index 7a26054..37c36bd 100755 --- a/EFI/OC/Kexts/VirtualSMC.kext/Contents/Info.plist +++ b/EFI/OC/Kexts/VirtualSMC.kext/Contents/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 20A4300b + 18E226 CFBundleDevelopmentRegion en CFBundleExecutable @@ -29,17 +29,17 @@ DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 11E708 + 10E1001 DTPlatformVersion GM DTSDKBuild - 19G68 + 18E219 DTSDKName - macosx10.15 + macosx10.14 DTXcode - 1160 + 1020 DTXcodeBuild - 11E708 + 10E1001 IOKitPersonalities as.vit9696.VirtualSMC @@ -381,8 +381,6 @@ - LSMinimumSystemVersion - 10.8 NSHumanReadableCopyright Copyright © 2017 vit9696. All rights reserved. OSBundleCompatibleVersion diff --git a/EFI/OC/Kexts/VirtualSMC.kext/Contents/MacOS/VirtualSMC b/EFI/OC/Kexts/VirtualSMC.kext/Contents/MacOS/VirtualSMC index 395d47b..2d14ec2 100755 Binary files a/EFI/OC/Kexts/VirtualSMC.kext/Contents/MacOS/VirtualSMC and b/EFI/OC/Kexts/VirtualSMC.kext/Contents/MacOS/VirtualSMC differ diff --git a/EFI/OC/Kexts/VirtualSMC.kext/Contents/_CodeSignature/CodeResources b/EFI/OC/Kexts/VirtualSMC.kext/Contents/_CodeSignature/CodeResources deleted file mode 100755 index d5d0fd7..0000000 --- a/EFI/OC/Kexts/VirtualSMC.kext/Contents/_CodeSignature/CodeResources +++ /dev/null @@ -1,115 +0,0 @@ - - - - - files - - files2 - - rules - - ^Resources/ - - ^Resources/.*\.lproj/ - - optional - - weight - 1000 - - ^Resources/.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^Resources/Base\.lproj/ - - weight - 1010 - - ^version.plist$ - - - rules2 - - .*\.dSYM($|/) - - weight - 11 - - ^(.*/)?\.DS_Store$ - - omit - - weight - 2000 - - ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ - - nested - - weight - 10 - - ^.* - - ^Info\.plist$ - - omit - - weight - 20 - - ^PkgInfo$ - - omit - - weight - 20 - - ^Resources/ - - weight - 20 - - ^Resources/.*\.lproj/ - - optional - - weight - 1000 - - ^Resources/.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^Resources/Base\.lproj/ - - weight - 1010 - - ^[^/]+$ - - nested - - weight - 10 - - ^embedded\.provisionprofile$ - - weight - 20 - - ^version\.plist$ - - weight - 20 - - - - diff --git a/EFI/OC/OpenCore.efi b/EFI/OC/OpenCore.efi index 3bbf2ee..6a1d500 100755 Binary files a/EFI/OC/OpenCore.efi and b/EFI/OC/OpenCore.efi differ diff --git a/EFI/OC/Tools/BootKicker.efi b/EFI/OC/Tools/BootKicker.efi index c234bb9..6489805 100755 Binary files a/EFI/OC/Tools/BootKicker.efi and b/EFI/OC/Tools/BootKicker.efi differ diff --git a/EFI/OC/Tools/ChipTune.efi b/EFI/OC/Tools/ChipTune.efi index fa1fe5a..df029bb 100755 Binary files a/EFI/OC/Tools/ChipTune.efi and b/EFI/OC/Tools/ChipTune.efi differ diff --git a/EFI/OC/Tools/CleanNvram.efi b/EFI/OC/Tools/CleanNvram.efi index 50a43f6..a5e2f3f 100755 Binary files a/EFI/OC/Tools/CleanNvram.efi and b/EFI/OC/Tools/CleanNvram.efi differ diff --git a/EFI/OC/Tools/GopStop.efi b/EFI/OC/Tools/GopStop.efi index 072f8d2..25e0efa 100755 Binary files a/EFI/OC/Tools/GopStop.efi and b/EFI/OC/Tools/GopStop.efi differ diff --git a/EFI/OC/Tools/HdaCodecDump.efi b/EFI/OC/Tools/HdaCodecDump.efi index 7b4f42b..dd7c60c 100755 Binary files a/EFI/OC/Tools/HdaCodecDump.efi and b/EFI/OC/Tools/HdaCodecDump.efi differ diff --git a/EFI/OC/Tools/MmapDump.efi b/EFI/OC/Tools/MmapDump.efi index 604f277..cf73664 100755 Binary files a/EFI/OC/Tools/MmapDump.efi and b/EFI/OC/Tools/MmapDump.efi differ diff --git a/EFI/OC/Tools/OpenControl.efi b/EFI/OC/Tools/OpenControl.efi index ad7d43a..2806076 100755 Binary files a/EFI/OC/Tools/OpenControl.efi and b/EFI/OC/Tools/OpenControl.efi differ diff --git a/EFI/OC/Tools/OpenShell.efi b/EFI/OC/Tools/OpenShell.efi index d463373..c56a5d8 100755 Binary files a/EFI/OC/Tools/OpenShell.efi and b/EFI/OC/Tools/OpenShell.efi differ diff --git a/EFI/OC/Tools/ResetSystem.efi b/EFI/OC/Tools/ResetSystem.efi index b5e83e4..0e70a94 100755 Binary files a/EFI/OC/Tools/ResetSystem.efi and b/EFI/OC/Tools/ResetSystem.efi differ diff --git a/EFI/OC/Tools/RtcRw.efi b/EFI/OC/Tools/RtcRw.efi index 2487a60..e19b785 100755 Binary files a/EFI/OC/Tools/RtcRw.efi and b/EFI/OC/Tools/RtcRw.efi differ diff --git a/EFI/OC/Tools/VerifyMsrE2.efi b/EFI/OC/Tools/VerifyMsrE2.efi index 0281d6a..e705780 100755 Binary files a/EFI/OC/Tools/VerifyMsrE2.efi and b/EFI/OC/Tools/VerifyMsrE2.efi differ diff --git a/EFI/OC/config.plist b/EFI/OC/config.plist index b200152..bd76db1 100755 --- a/EFI/OC/config.plist +++ b/EFI/OC/config.plist @@ -1367,13 +1367,13 @@ BundlePath - ACPIBatteryManager.kext + SMCBatteryManager.kext Comment Enabled ExecutablePath - Contents/MacOS/ACPIBatteryManager + Contents/MacOS/SMCBatteryManager MaxKernel MinKernel @@ -1383,13 +1383,13 @@ BundlePath - SMCBatteryManager.kext + ACPIBatteryManager.kext Comment Enabled ExecutablePath - Contents/MacOS/SMCBatteryManager + Contents/MacOS/ACPIBatteryManager MaxKernel MinKernel diff --git a/README.md b/README.md index 992a470..406c799 100755 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@ ![Thismachine](./picture/Thismachine.png) ## 简介 - 这是一个完整的ThinkPad T450s macOS Big Sur + DW1820a 配置。 -- 使用DW1820A安装系统时无需在BIOS中禁用WIFI。 -- 默认使用fakeSMC,安装完成后可以替换为virtualSMC。 +- 使用DW1820A安装系统时无需在BIOS中禁用WIFI。 - 声卡默认 layout-id = 15,解决耳机杂音问题。 - 插入音频设备不会自动切换, 需要手动选择输入/输出设备。 - (内置扬声器 + 内置麦克风 + 耳机 + 耳机麦克风测试正常)