excos
03-16-2011, 10:11 PM
Φιλε tangon ο νομος λεει οτι οταν κατι δουλευει καλα δεν το πειραζουμε!
Αλλα επειδη ξεκινησαμε αυτο το σπορ για hack στα μηχανακια μας και εκει ειναι ολη η υποθεση οτι οσο σκαλιζεις μαθαινεις και περισσοτερο.
Αυτο που εχω κανει για να βελτιωσω την εγκατασταση μου στο μηχανακι μου, ειναι οτι εχω ενα εξωτερικο δισκο, που εχω βαλει ακριβως το ιδιο installation, που εχω και στο εσωτερικο μου δισκο, με την διαφορα οτι εκει κανω τα πειραματα μου χωρις να πειραζω την υπαρχων καλη μου εγκατασταση.
Αυτο σαν αποτελεσμα οτι μπορω να φορτωνω και τροποιημενα DSDT χωρις προβλημα για να δω πως παιζουν.
Μερικα απο Fix σε usb ειναι τα παρακατω εαν ενδιαφερεσαι αλλα οτι κανεις κανε το με το συστημα που αναφερω παραπανω μεχρι να δεις τι παιζει στο δικο σου.
native USB EHCI Mac Pro hack
Look for the section EHCI in the DSDT code, Change the section to this code:
Device (EHCI)
{
Name (_ADR, 0x001A0007) /*<-----------------------look for the correct address, ADR, in each DSDT */
OperationRegion (UFCS, PCI_Config, 0x54, 0x04)
Field (UFCS, DWordAcc, NoLock, Preserve)
{
, 15,
PMES, 1
}
Device (HUB2)
{
Name (_ADR, Zero)
Device (PRT1)
{
Name (_ADR, One)
}
Device (PRT2)
{
Name (_ADR, 0x02)
}
Device (PRT3)
{
Name (_ADR, 0x03)
}
Device (PRT4)
{
Name (_ADR, 0x04)
}
}
Name (_PRW, Package (0x02)
{
0x0D,
0x03
})
Method (_S3D, 0, NotSerialized)
{
Return (0x03)
}
Method (_S4D, 0, NotSerialized)
{
Return (0x03)
}
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x07)
{
"AAPL,current-available",
0x05DC,
"AAPL,current-extra",
0x03E8,
"AAPL,current-in-sleep",
0x0BB8,
Buffer (One)
{
0x00
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
USB UHCI hack 2
This hack adds an id of a Mac to the USB to make it more compatible with OSX.
Device (UHC1)
{
Name (_ADR, 0x001D0000)
Name (UPS1, Package (0x02)
{
0x03,
0x03
})
Method (_PRW, 0, NotSerialized)
{
Return (UPS1)
}
OperationRegion (USBR, PCI_Config, 0xC4, One)
Field (USBR, AnyAcc, NoLock, Preserve)
{
URES, 8
}
Method (_PSW, 1, NotSerialized)
{
If (LEqual (Arg0, Zero))
{
Store (Zero, URES)
}
If (LEqual (Arg0, One))
{
Store (0x03, URES)
}
}
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x02)
{
"device-id",
Buffer (0x04)
{
0x34, 0x3a, 0x00, 0x00 /*<--------- ID MAC------*/
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
Device (UHC2)
{
Name (_ADR, 0x001D0001)
Name (UPS1, Package (0x02)
{
0x04,
0x03
})
Method (_PRW, 0, NotSerialized)
{
Return (UPS1)
}
OperationRegion (USBR, PCI_Config, 0xC4, One)
Field (USBR, AnyAcc, NoLock, Preserve)
{
URES, 8
}
Method (_PSW, 1, NotSerialized)
{
If (LEqual (Arg0, Zero))
{
Store (Zero, URES)
}
If (LEqual (Arg0, One))
{
Store (0x03, URES)
}
}
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x02)
{
"device-id",
Buffer (0x04)
{
0x35, 0x3a, 0x00, 0x00 /*<--------- ID MAC------*/
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
Device (UHC3)
{
Name (_ADR, 0x001D0002)
Name (UPS1, Package (0x02)
{
0x0C,
0x03
})
Method (_PRW, 0, NotSerialized)
{
Return (UPS1)
}
OperationRegion (USBR, PCI_Config, 0xC4, One)
Field (USBR, AnyAcc, NoLock, Preserve)
{
URES, 8
}
Method (_PSW, 1, NotSerialized)
{
If (LEqual (Arg0, Zero))
{
Store (Zero, URES)
}
If (LEqual (Arg0, One))
{
Store (0x03, URES)
}
}
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x02)
{
"device-id",
Buffer (0x04)
{
0x36, 0x3a, 0x00, 0x00 /*<--------- ID MAC------*/
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
Device (UHC4)
{
Name (_ADR, 0x001A0000)
Name (UPS1, Package (0x02)
{
0x0E,
0x03
})
Method (_PRW, 0, NotSerialized)
{
Return (UPS1)
}
OperationRegion (USBR, PCI_Config, 0xC4, One)
Field (USBR, AnyAcc, NoLock, Preserve)
{
URES, 8
}
Method (_PSW, 1, NotSerialized)
{
If (LEqual (Arg0, Zero))
{
Store (Zero, URES)
}
If (LEqual (Arg0, One))
{
Store (0x03, URES)
}
}
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x02)
{
"device-id",
Buffer (0x04)
{
0x37, 0x3a, 0x00, 0x00 /*<--------- ID MAC------*/
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
Device (UHC5)
{
Name (_ADR, 0x001A0001)
Name (UPS1, Package (0x02)
{
0x05,
0x03
})
Method (_PRW, 0, NotSerialized)
{
Return (UPS1)
}
OperationRegion (USBR, PCI_Config, 0xC4, One)
Field (USBR, AnyAcc, NoLock, Preserve)
{
URES, 8
}
Method (_PSW, 1, NotSerialized)
{
If (LEqual (Arg0, Zero))
{
Store (Zero, URES)
}
If (LEqual (Arg0, One))
{
Store (0x03, URES)
}
}
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x02)
{
"device-id",
Buffer (0x04)
{
0x38, 0x3a, 0x00, 0x00 /*<--------- ID MAC------*/
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
Device (UHC6)
{
Name (_ADR, 0x001A0002)
Name (UPS1, Package (0x02)
{
0x20,
0x03
})
Method (_PRW, 0, NotSerialized)
{
Return (UPS1)
}
OperationRegion (USBR, PCI_Config, 0xC4, One)
Field (USBR, AnyAcc, NoLock, Preserve)
{
URES, 8
}
Method (_PSW, 1, NotSerialized)
{
If (LEqual (Arg0, Zero))
{
Store (Zero, URES)
}
If (LEqual (Arg0, One))
{
Store (0x03, URES)
}
}
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x02)
{
"device-id",
Buffer (0x04)
{
0x39, 0x3a, 0x00, 0x00 /*<--------- ID MAC------*/
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
Device (EHC1)
{
Name (_ADR, 0x001D0007)
Name (UPS1, Package (0x02)
{
0x0D,
0x03
})
Method (_PRW, 0, NotSerialized)
{
Return (UPS1)
}
OperationRegion (USBR, PCI_Config, 0x62, 0x02)
Field (USBR, AnyAcc, NoLock, Preserve)
{
URE2, 9
}
Method (_PSW, 1, NotSerialized)
{
If (LEqual (Arg0, Zero))
{
Store (Zero, URE2)
}
If (LEqual (Arg0, One))
{
Store (0x01FF, URE2)
}
}
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x02)
{
"device-id",
Buffer (0x04)
{
0x3a, 0x3a, 0x00, 0x00 /*<--------- ID MAC------*/
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
Device (EHC2)
{
Name (_ADR, 0x001A0007)
Name (UPS1, Package (0x02)
{
0x0D,
0x03
})
Method (_PRW, 0, NotSerialized)
{
Return (UPS1)
}
OperationRegion (USBR, PCI_Config, 0x62, 0x02)
Field (USBR, AnyAcc, NoLock, Preserve)
{
URE2, 9
}
Method (_PSW, 1, NotSerialized)
{
If (LEqual (Arg0, Zero))
{
Store (Zero, URE2)
}
If (LEqual (Arg0, One))
{
Store (0x01FF, URE2)
}
}
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x02)
{
"device-id",
Buffer (0x04)
{
0x3c, 0x3a, 0x00, 0x00 /*<--------- ID MAC------*/
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
USB native driver hack:
Locate your usb devices and add this code to each one, changing the values from device id with the one supplied under the code:
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x0f)
{
"device-id",
Buffer (0x04)
{
0x34, 0x3A, 0x00, 0x00 //the values below
},
"AAPL,clock-id", // property needed for sleep support
Buffer (One)
{
0x0a
},
"built-in",
Buffer ()
{
0x00
},
"device_type", //not sure it is useful
Buffer (0x05)
{
"EHCI"
},
"AAPL,current-available",
0x04B0,
"AAPL,current-extra",
0x02BC,
"AAPL,current-in-sleep", // to solve a problem with sleep when stick is inserted
0x03E8,
Buffer (0x01)
{
0x00
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
DeviceIDs
Intel
USB1 - 0x2830
USB2 - 0x2831
USB3 - 0x2832
USB4 - 0x2834
USB5 - 0x2835
EHC1 - 0x2836
EHC2 - 0x283a
nForce
USB1 - 0x0aa5
USB2 - 0x0aa7
EHC1 - 0x0aa6
EHC2 - 0x0aa9
Αυτα τα λιγα!!!