// 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
//
// 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, ...)
//
// Also, you must use ACPIBatteryManager.kext v1.70.0 or greater.
//
// If the Notify code is not patched, or the latest kext is not used,
// detection of battery removal/adding will not work correctly.
//
// You can Clover hotpatch (config.plist/ACPI/DSDT/Patches) your battery code.
//
// For example, Notify(BAT0, 0x80) is
// 86 42 41 54 30 0A 80
// To change it to Notify(BATC, 0x80):
// 86 42 41 54 30 0A 80
//
// Sometimes, you'll find there is a fully qualified path.
// Such as, Notify (\_SB.PCI0.LPC.EC.BAT1, 0x01)
// 86 5C 2F 05 5F 53 42 5F 50 43 49 30 4C 50 43 5F 45 43 5F 5F 42 41 54 30 0A 01
// Changing to BATC:
// 86 5C 2F 05 5F 53 42 5F 50 43 49 30 4C 50 43 5F 45 43 5F 5F 42 41 54 43 0A 01
//
// You may find that 0x01 is optimized:
// 86 5C 2F 05 5F 53 42 5F 50 43 49 30 4C 50 43 5F 45 43 5F 5F 42 41 54 30 01
// Similarly, 0x00 can be optimized:
// 86 5C 2F 05 5F 53 42 5F 50 43 49 30 4C 50 43 5F 45 43 5F 5F 42 41 54 30 00
//
Method(_INI)
{
// disable original battery objects by setting invalid _HID
^^BAT0._HID = 0
^^BAT1._HID = 0
}
Method(CVWA, 3)
// Convert mW to mA (or mWh to mAh)
// Arg0 is mW or mWh (or mA/mAh in the case Arg2==0)
// Arg1 is mV (usually design voltage)
// Arg2 is whether conversion is needed (non-zero for convert)
// return is mA or mAh
{
If (Arg2)
{
Arg0 = (Arg0 * 1000) / Arg1
}
Return(Arg0)
}
Method(_STA)
{
// call original _STA for BAT0 and BAT1
// result is bitwise OR between them
Return(^^BAT0._STA() | ^^BAT1._STA())
}
Name(B0CO, 0x00) // BAT0 0/1 needs conversion to mAh
Name(B1CO, 0x00) // BAT1 0/1 needs conversion to mAh
Name(B0DV, 0x00) // BAT0 design voltage
Name(B1DV, 0x00) // BAT1 design voltage
你误导了,不在dsdt里面改,你给的ssdt里面有说明
/ You can Clover hotpatch (config.plist/ACPI/DSDT/Patches) your battery code.
//
// For example, Notify(BAT0, 0x80) is
// 86 42 41 54 30 0A 80
// To change it to Notify(BATC, 0x80):
// 86 42 41 54 30 0A 80