Jump to content

Master Chief's P5K PRO ACPI Warfare


  • Please log in to reply
908 replies to this topic

#261
kdawg

kdawg

    InsanelyMac Legend

  • Donators
  • 508 posts
  • Gender:Male
  • Location:Boston, MA

Note: Sometime people amaze me. I mean I may drop dead on the floor right now, if I haven't worked on this yesterday! I was however unable to locate the address of it, but now simply replaced the 7 with a 3 – knowing that it should be like that – et voila!

p.s. The FireWire device on a P5K Pro is normally represented by pci1106,3044@3 in ioreg / IORegistryExplorer and will change into FRWR@3 with the provided code.

Edit: I guess all that rest now is to see what is connected to P0P[4/5/6 and 7].


Using lscpi.kext or something like the dated OSX86 tools app you can run LSCPI and get something like the following.

00:00.0 Host bridge [0600]: Intel Corporation Eaglelake DRAM Controller [8086:2e20] (rev 03)00:01.0 PCI bridge [0604]: Intel Corporation Eaglelake PCI Express Root Port [8086:2e21] (rev 03)00:06.0 PCI bridge [0604]: Intel Corporation Unknown device [8086:2e29] (rev 03)00:1a.0 USB Controller [0c03]: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #4 [8086:3a37]00:1a.1 USB Controller [0c03]: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #5 [8086:3a38]00:1a.2 USB Controller [0c03]: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #6 [8086:3a39]00:1a.7 USB Controller [0c03]: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #2 [8086:3a3c]00:1b.0 Audio device [0403]: Intel Corporation 82801JI (ICH10 Family) HD Audio Controller [8086:3a3e]00:1c.0 PCI bridge [0604]: Intel Corporation 82801JI (ICH10 Family) PCI Express Port 1 [8086:3a40]00:1c.3 PCI bridge [0604]: Intel Corporation 82801JI (ICH10 Family) PCI Express Port 4 [8086:3a46]00:1c.4 PCI bridge [0604]: Intel Corporation 82801JI (ICH10 Family) PCI Express Port 5 [8086:3a48]00:1c.5 PCI bridge [0604]: Intel Corporation 82801JI (ICH10 Family) PCI Express Port 6 [8086:3a4a]00:1d.0 USB Controller [0c03]: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #1 [8086:3a34]00:1d.1 USB Controller [0c03]: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #2 [8086:3a35]00:1d.2 USB Controller [0c03]: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #3 [8086:3a36]00:1d.7 USB Controller [0c03]: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #1 [8086:3a3a]00:1e.0 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev 90)00:1f.0 ISA bridge [0601]: Intel Corporation 82801JIR (ICH10R) LPC Interface Controller [8086:3a16]00:1f.2 SATA controller [0106]: Intel Corporation 82801JI (ICH10 Family) SATA AHCI Controller [8086:3a22]00:1f.3 SMBus [0c05]: Intel Corporation 82801JI (ICH10 Family) SMBus Controller [8086:3a30]01:00.0 VGA compatible controller [0300]: nVidia Corporation GeForce 8800 GT [10de:0611] (rev a2)02:00.0 VGA compatible controller [0300]: nVidia Corporation GeForce 8500 GT [10de:0421] (rev a1)04:00.0 SATA controller [0106]: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller [197b:2363] (rev 02)04:00.1 IDE interface [0101]: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller [197b:2363] (rev 02)05:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 02)06:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 02)07:00.0 Network controller [0280]: Atheros Communications Inc. AR5416 802.11abgn Wireless PCI Adapter [168c:0023] (rev 01)<strong class='bbc'>07:07.0 FireWire (IEEE 1394) [0c00]: Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link) [104c:8024]</strong>

Last entry is the Firewire. The _ADR is the middle entry of 07:07.0.
Anything else on POP 4-7 or any add on cards will be clearly visible. As you can see I also have two GFX cards and an airport card.

#262
bobby_rocks

bobby_rocks

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 4 posts
Chief,

It's been bugging me.......my bad, i was booting in 64bit mode and hence i needed the SUPERVIAATA 64bit compiled kext. In 32Bit mode, the one you linked to works, no problem. ahhhhh.

Still on to the DLINK DWA 547 card now. thanks for your help man even if i am a bit slow.

cheers

#263
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male

Using lscpi.kext or something like the dated OSX86 tools app you can run LSCPI and get something like the following.

...

Last entry is the Firewire. The _ADR is the middle entry of 07:07.0.
Anything else on POP 4-7 or any add on cards will be clearly visible. As you can see I also have two GFX cards and an airport card.

Thanks. I know about lspci -nn but the dumped info is static as it doesn't show the changed addresses – it probably reads the name instead of the ID itself. Yeah, that might actually be it. Let me check that for my changed SATA (now 2681).

I also got used to using IORegistryExplorer, this despite the persist problem, because I know that @3 equals 0x00030000. The thing is that I copied that block from my good old Mac Pro 3,1 DSDT and put it right outside of the PCIB scope, right over over the closing } of it. That was why it didn't work the other day. I happen to learn a lot from my own failures you know :P

And the note about the P0Pn ports was for other people, since I don't really use my hack for anything but fun.

@bobby_rocks: Thanks for the heads up and good luck with the DLINK.

#264
ZGT

ZGT

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts
thanks a lot !
I will test it !

#265
bobby_rocks

bobby_rocks

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 4 posts
Chief,

DLINK DWA-547 flawless in 32bit.

However, I have added another SATA HDD to my rig and i can see it is OSX when booted but can not see it with Standard Chameleon RC3. I'd like to install Sl on it.

Running Disk Utility from SL Retail Install it just beachballs! . I have created custom P5K Pro boot Cd with my dsdt and kexts but still no luck.

I remember you saying that you has issues with Chameleon and a HDD you were using, what was the possible cause and or solution?

HDD is Maxtor 6B200M0 (it is SATA but 150 not 300) possible issue?


Bobby

#266
ZGT

ZGT

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts

Correct. This is exactly what a Apple is using, and this is what I have:

Method (_L18, 0, NotSerialized) // Newly added for FireWire support.
			{
				Notify (\_SB.PCI0.PCIB.FRWR, 0x00)
			}
In combination with the following code for my Asus P5K Pro:
Device (FRWR) // Newly added device                {                    Name (_ADR, 0x00030000)                    Name (_GPE, 0x18)                    Method (_DSM, 4, NotSerialized)                    {                        Store (Package (0x02)                        {                            "fwhub",                            Buffer (0x02)                            {                                0x00, 0x00, 0x00, 0x00                            }                        }, Local0)                        MCDP (Arg2, RefOf (Local0))                        Return (Local0)                    }                }
Starting with the new MCDP Method (less arguments) and a different address.

Note: Sometime people amaze me. I mean I may drop dead on the floor right now, if I haven't worked on this yesterday! I was however unable to locate the address of it, but now simply replaced the 7 with a 3 €“ knowing that it should be like that €“ et voila!

p.s. The FireWire device on a P5K Pro is normally represented by pci1106,3044@3 in ioreg / IORegistryExplorer and will change into FRWR@3 with the provided code.

Edit: I guess all that rest now is to see what is connected to P0P[4/5/6 and 7].



"MCDP" is not exist,I can not production the *.aml.(in dsdt.aml 3.0)

Iike "DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))"
I get dsdt.aml,(Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 97 Optimizations.),BUT the "FireWire runtime power conservation disabled. (2)" still.............

Sorry,My level is limited。

#267
DB1

DB1

    InsanelyMac Sage

  • Donators
  • 407 posts

"MCDP" is not exist,I can not production the *.aml.(in dsdt.aml 3.0)

Iike "DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))"
I get dsdt.aml,(Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 97 Optimizations.),BUT the "FireWire runtime power conservation disabled. (2)" still.............

Sorry,My level is limited。


Need to read post 214 and others just prior where it explains DTGP replacement by the MCDP method. This is a post V3.0 refinement that will likely appear in V3.1.

General note for newcomers to the thread is that you must read through rather than just pick a fix and drop in your own dsdt as invariably it wont work.

@MasterChief - maybe were ready for V3.1?

#268
kdawg

kdawg

    InsanelyMac Legend

  • Donators
  • 508 posts
  • Gender:Male
  • Location:Boston, MA

"MCDP" is not exist,I can not production the *.aml.(in dsdt.aml 3.0)

Iike "DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))"
I get dsdt.aml,(Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 97 Optimizations.),BUT the "FireWire runtime power conservation disabled. (2)" still.............

Sorry,My level is limited。


MCDP is Master Chief's own homebrew method thats why it doesnt work for you have have to add it. If you want to use DTGP then it would look like so

Add this into the _GPE method:
Method (_L18, 0, NotSerialized) // <-- Added for firewire
		{
			Notify (\_SB.PCI0.PCIB.FRWR, 0x00)
		}


Add this into the PCIB device
Device (FRWR) // <--Firewire
				{
					Name (_ADR, 0x00030000) //<-- MC revisions
					Name (_GPE, 0x18)
					Method (_DSM, 4, NotSerialized)
					{
						Store (Package (0x02)
							{
								"fwhub", 
								Buffer (0x04)
								{
									0x00, 0x00, 0x00, 0x00
								}
							}, Local0)
						DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
						Return (Local0)
					}
				}

Need to read post 214 and others just prior where it explains DTGP replacement by the MCDP method. This is a post V3.0 refinement that will likely appear in V3.1.

General note for newcomers to the thread is that you must read through rather than just pick a fix and drop in your own dsdt as invariably it wont work.

@MasterChief - maybe were ready for V3.1?

DB1 is right users need to do a bit more research before asking otherwise you'll have no idea what you're doing. Someone should write a DSDT (ACPI) tutorial for dummies. For those interested in the spec this is worth having in your library.
ACPISpec4.0

#269
ZGT

ZGT

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts

MCDP is Master Chief's own homebrew method thats why it doesnt work for you have have to add it. If you want to use DTGP then it would look like so

Add this into the _GPE method:

Method (_L18, 0, NotSerialized) // <-- Added for firewire
		{
			Notify (\_SB.PCI0.PCIB.FRWR, 0x00)
		}


Add this into the PCIB device
Device (FRWR) // <--Firewire
				{
					Name (_ADR, 0x00030000) //<-- MC revisions
					Name (_GPE, 0x18)
					Method (_DSM, 4, NotSerialized)
					{
						Store (Package (0x02)
							{
								"fwhub", 
								Buffer (0x04)
								{
									0x00, 0x00, 0x00, 0x00
								}
							}, Local0)
						DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
						Return (Local0)
					}
				}

DB1 is right users need to do a bit more research before asking otherwise you'll have no idea what you're doing. Someone should write a DSDT (ACPI) tutorial for dummies. For those interested in the spec this is worth having in your library.
ACPISpec4.0




Thanks you to be able to pay attention to this question and your reply.I already do it such you said.But it still.

Need to read post 214 and others just prior where it explains DTGP replacement by the MCDP method. This is a post V3.0 refinement that will likely appear in V3.1.

General note for newcomers to the thread is that you must read through rather than just pick a fix and drop in your own dsdt as invariably it wont work.

@MasterChief - maybe were ready for V3.1?


I always cannot complete it..........

#270
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male
DSDT V3.1 Has Been Released Today – see attachments in post#3

Time for another update. Time for DSDT V3.1 So what have you been doing for this release Chief? Well. Let's see:

1) Stripped Device (SATA) to a bare minimum.
2) Added Device (PATA) for IDE hardware.
3) Added Device (FRWR) for FireWire hardware.
4) New Method (MCID) added.
5) New Method (MCBN) added.
6) New Method (MCDP) added.
7) Removed Method (DTGP)
- replaced with the new Method (MCDP) which uses fewer arguments.
8) Added Device (GFX0)
- a placeholder for graphics cards.
9) The UHCn devices are now using MCID to change the device-id.
- Broken in previous version(s) due to my use of a hacked com.apple.Boot.plist
10) And as usual, a lot new comments – hopefully to help you understand things better.

Notes: People who do happen to use Method MCID already, should check if they are using the latest version (Version 1.3) which now supports device-id with MCID (Arg2, 0x2681) as well as both device-id and vendor-id by using MCID (Arg2, 0x26818086).

P5K Pro users can simple use the provided dsdt.dsl as their starting point. Simply copy your HDEF/GFX Devices into the provided dsdt.dsl and compile it. There's really no need to re-invent the wheel, other than maybe trying to learn something new.

@DB1: I think this covers it :unsure:

Happy Hacking!

#271
DB1

DB1

    InsanelyMac Sage

  • Donators
  • 407 posts

DSDT V3.1 Has Been Released Today

Time for another update. Time for DSDT V3.1 So what have you been doing for this release Chief? Well. Let's see:

1) Stripped Device (SATA) to a bare minimum.
2) Added Device (PATA) for IDE hardware.
3) Added Device (FRWR) for FireWire hardware.
4) New Method (MCID) added.
5) New Method (MCBN) added.
6) New Method (MCDP) added.
7) Removed Method (DTGP)
- replaced with the new Method (MCDP) which uses fewer arguments.
8) Added Device (GFX0)
- a placeholder for graphics cards.
9) The UHCn devices are now using MCID to change the device-id.
- Broken in previous version(s) due to my use of a hacked com.apple.Boot.plist
10) And as usual, a lot new comments – hopefully to help you understand things better.

Notes: People who do happen to use Method MCID already, should check if they are using the latest version (Version 1.3) which now supports device-id with MCID (Arg2, 0x2681) as well as both device-id and vendor-id by using MCID (Arg2, 0x26818086).

@DB1: I think this covers it :)


And some! Many thanks, up and running well on P5k VM - except sleep not solved yet, but I'm working on it Sleep solved, just restart to sort :-)

#272
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male
Blimey. I guess that adding Device (SBUS) wasn't such a bad idea after all. I mean the great n00b caller – pardon the pun – now also recommends it. Well well. I guess someone noticed that there was at least one error less at boot time. No word about thanks, but whatever. I'm too big for little stuff like this. Let's move forward in a positive way and provide him a bit of useful info, because that's what I am. A nice guy:
Device (SBUS)                                              // Newly added Device.            {                Name (_ADR, 0x001F0003)                Method (_DSM, 4, NotSerialized)                        // Change device-id from pci8086,2930 to pci8086,3a30                {                    Store (Package (0x04)                    {                        "name",                        "pci8086,3a30",                        "device-id",                         Buffer (0x04)                        {                            0x30, 0x3a, 0x00, 0x00                        }                    }, Local0)                    MCDP (Arg2, RefOf (Local0))                    Return (Local0)                }                OperationRegion (SMBP, PCI_Config, 0x40, 0xC0)         // Host Configuration Register (ICH9R-316972.pdf / 19.1.16 / page 757).                Field (SMBP, DWordAcc, NoLock, Preserve)                {                        ,   2,                     I2CE,   1                }                OperationRegion (SMBE, PCI_Config, 0x04, 0x02)         // PCI Command Register (ICH9R-316972.pdf / 19.1.3 / page 752).                Field (SMBE, AnyAcc, NoLock, Preserve)                {                    IOSE,   1                }                OperationRegion (SMBI, SystemIO, 0x4000, 0x10)         // SMBus I/O and Memory Mapped I/O Registers (ICH9R-316972.pdf / 19.2 / page 758).                Field (SMBI, ByteAcc, NoLock, Preserve)                {                    HSTS,   8,                                         // Host Status.                            Offset (0x02),                     HCON,   8,                                         // Host Control.                    HCOM,   8,                                         // Host Command.                    TXSA,   8,                                         // Transmit Slave Address.                    DAT0,   8,                                         // Host Data 0.                    DAT1,   8,                                         // Host Data 1.                    HBDR,   8,                                         // Host Block Data Register (Byte).                    PECR,   8,                                         // Packet Error Check Register.                    RXSA,   8,                                         // Receive Slave Address.                    SDAT,   16                                         // Receive Slave Data.                }                Name (SBOK, 0x00)                Method (ENAB, 0, NotSerialized)                {                    Store (One, IOSE)                                  // Enabled to communicate with I2C devices.                    Store (One, SBOK)                                  // Activated.                }                Method (DISB, 0, NotSerialized)                {                    Store (Zero, SBOK)                                 // Disabled.                }                Method (SSXB, 2, Serialized)                           // ASUS Method (SBYT)                {                    If (STRT ())                                       // Ready?                    {                        Store (Zero, I2CE)                             //                         Store (0xBF, HSTS)                             // Clear Host Status Register, with the exception of bit-6 (INUSE_STS).                        Store (Arg0, TXSA)                             // This is a write command (bit 1-7 is the address of the targeted device).                        Store (Arg1, HCOM)                             // Forward Command.                        Store (0x48, HCON)                             // Bit-6 (40) represents the start bit and bits 4:2 the command type:                                                                       // 0x40 = 01000000 - Quick.                                                                       // 0x44 = 01000100 - Byte.                                                                       // 0x48 = 01001000 - Byte Data.                                                                       // 0x4C = 01001100 - Word Data.                                                                       // 0x50 = 01000000 - Process Call.                                                                       // 0x54 = 01010100 - Block.                                                                       // 0x58 = 01011000 - I2C Read.                                                                       // 0x5C = 01011100 - Block Process.                        If (COMP ())                                   // Error checking – Successful completion of command?                        {                            Or (HSTS, 0xFF, HSTS)                      // Clear Host Status Register.                            Return (One)                               // Return success status.                        }                    }                    Return (Zero)                                      // Return error status – no (all) bytes sent.                }                Method (SRXB, 1, Serialized)                           // ASUS Method (RSBT)                {                    If (STRT ())                                       // Ready?                    {                        Store (Zero, I2CE)                        Store (0xBF, HSTS)                             // Clear Host Status Register, with the exception of bit-6 (INUSE_STS).                        Store (Or (Arg0, 0x01), TXSA)                  // This is a Read Command (bit 1-7 is the address of the targeted device).                        Store (0x44, HCON)                             // Start Byte Read Command.                        If (COMP ())                                   // Error checking – Successful completion of command?                        {                            Or (HSTS, 0xFF, HSTS)                      // Clear Host Status Register.                            Return (DAT0)                              // Return Read Data.                        }                    }                    Return (0xFFFF)                                    // Return byte read command error status (65535).                }                Method (SWRB, 3, Serialized)                           // ASUS Method (WBYT)                {                    If (STRT ())                                       // Ready?                    {                        Store (Zero, I2CE)                             //                         Store (0xBF, HSTS)                             // Clear Host Status Register, with the exception of bit-6 (INUSE_STS).                        Store (Arg0, TXSA)                             // This is a write command (bit 1-7 is the address of the targeted device).                        Store (Arg1, HCOM)                             // Forward Command.                        Store (Arg2, DAT0)                             // Forward Data Byte.                        Store (0x48, HCON)                             // Start Byte Data Command.                        If (COMP ())                                   // Error checking – Successful completion of command?                        {                            Or (HSTS, 0xFF, HSTS)                      // Clear Host Status Register.                            Return (One)                               // Success (one byte sent).                        }                    }                    Return (Zero)                                      // Return error status (no byte sent).                }                Method (SRDB, 2, Serialized)                           // ASUS Method (RBYT)                {                    If (STRT ())                                       // Ready?                    {                        Store (Zero, I2CE)                             //                         Store (0xBF, HSTS)                             // Clear Host Status Register, with the exception of bit-6 (INUSE_STS).                        Store (Or (Arg0, One), TXSA)                   // This is a Read Command (bit 1-7 is the address of the targeted device).                        Store (Arg1, HCOM)                             //                         Store (0x48, HCON)                             // Start Byte Data Command.                        If (COMP ())                                   // Error checking – Successful completion of command?                        {                           Or (HSTS, 0xFF, HSTS)                       // Clear Host Status Register.                           Return (DAT0)                               // Return Read Data.                        }                    }                    Return (0xFFFF)                                    // Return data byte read command error status (65535).                }                Method (SBLW, 4, Serialized)                           // ASUS Method (WBLK)                {                    If (STRT ())                                       // Ready?                    {                        Store (Arg3, I2CE)                             //                         Store (0xBF, HSTS)                             // Clear Host Status Register, with the exception of bit-6 (INUSE_STS).                        Store (Arg0, TXSA)                             //                         Store (Arg1, HCOM)                             // Forward Command.                        Store (SizeOf (Arg2), DAT0)                    // Forward buffer length for transmission.                        Store (Zero, Local1)                           // Buffer index of transmitted bytes.                        Store (DerefOf (Index (Arg2, Zero)), HBDR)     // Forward first data byte.                        Store (0x54, HCON)                             // Start Block Write Command.                        While (LGreater (SizeOf (Arg2), Local1))       // Loop until all bytes are successfully transmitted.                        {                            Store (0x0FA0, Local0)                     // 0x0FA = 4000 (timeout counter).                                                                       // Wait for the command to complete by checking bit-7 (Byte Done Status) – up to 4000 times.                            While (LAnd (LNot (And (HSTS, 0x80)), Local0))                            {                                Decrement (Local0)                     // 3999, 3998, 3997…                                Stall (0x32)                           // Delay execution for at least 50 microseconds.                            }                            If (LNot (Local0))                         // Error checking – If Local0 is Zero then something went wrong.                            {                                KILL ()                                // Abort command.                                Return (Zero)                          // Error Status.                            }                            Store (0x80, HSTS)                         // Byte Done Status (DS) — Clear bit 'byte transmission completed'.                             Increment (Local1)                         // Increase index.                            If (LGreater (SizeOf (Arg2), Local1))      // Forward nth byte (if we have one left).                            {                                Store (DerefOf (Index (Arg2, Local1)), HBDR)                            }                        }                        If (COMP ())                                   // Error checking – Successful completion of command?                        {                            Or (HSTS, 0xFF, HSTS)                      // Clear Host Status Register.                            Return (One)                               // Success Status.                        }                    }                    Return (Zero)                                      // Return error status – not (all) bytes sent.                }                Method (SBLR, 3, Serialized)                           // ASUS Method (RBLK)                {                    If (STRT ())                                       // Ready?                    {                        Name (TBUF, Buffer (0x0100) {})                // Create buffer (256 bytes).                        Store (Arg2, I2CE)                             //                         Store (0xBF, HSTS)                             // Clear Host Status Register, with the exception of bit-6 (INUSE_STS).                        Store (Or (Arg0, One), TXSA)                   // This is a Read Command (bit 1-7 is the address of the targeted device).                        Store (Arg1, HCOM)                             // Forward Command.                        Store (0x54, HCON)                             // Start Block Read Command.                        Store (0x0FA0, Local0)                         // Counter (4000).                        While (LAnd (LNot (And (HSTS, 0x80)), Local0)) //                         {                            Decrement (Local0)                         //                             Stall (0x32)                               // Delay execution for at least 50 microseconds.                        }                        If (LNot (Local0))                             //                         {                            KILL ()                                    // Abort.                            Return (Zero)                              // Return error status.                        }                        Store (DAT0, Index (TBUF, Zero))               //                         Store (0x80, HSTS)                             // Byte Done Status (DS) — Host controller received a byte.                        Store (One, Local1)                        While (LLess (Local1, DerefOf (Index (TBUF, Zero))))                        {                            Store (0x0FA0, Local0)                     // Counter (4000).                            While (LAnd (LNot (And (HSTS, 0x80)), Local0))                            {                                Decrement (Local0)                     // 3999, 3998, 3997...                                Stall (0x32)                           // Delay execution for at least 50 microseconds.                            }                            If (LNot (Local0))                         //                             {                                KILL ()                                // Abort.                                Return (Zero)                          // Return error status.                            }                            Store (HBDR, Index (TBUF, Local1))         // Store byte in buffer.                            Store (0x80, HSTS)                         // Byte Done Status (DS) — Host controller received a byte.                            Increment (Local1)                         // Increase byte buffer index.                        }                        If (COMP ())                                   // Error checking – Successful completion of command?                        {                            Or (HSTS, 0xFF, HSTS)                      // Clear Host Status Register.                            Return (TBUF)                              // Return buffer.                        }                    }                    Return (Zero)                                      // Return error status.                }                Method (STRT, 0, Serialized)                {                    Store (0xC8, Local0)                               // Counter (200).                    While (Local0)                                     // Loop until Zero.                    {                        If (And (HSTS, 0x40))                          // Check bit-6 (INUSE_STS) – In use?                        {                            Decrement (Local0)                         // 199, 198, 197…                            Sleep (0x01)                               // Delay execution for at least 1 microsecond.                            If (LEqual (Local0, Zero))                 // Have we reached Zero, then something might be wrong.                             {                                Return (Zero)                          // Return Busy status.                            }                        }                        Else                        {                            Store (Zero, Local0)                       // Break (not in use).                        }                    }                    Store (0x0FA0, Local0)                             // Counter (4000).                    While (Local0)                                     // Loop until Zero.                    {                        If (And (HSTS, One))                           // Check bit-0 (HOST_BUSY) – Running command from the host interface?                        {                            Decrement (Local0)                         // 3999, 3998, 3997...                            Stall (0x32)                               // Delay execution for at least 50 microseconds.                            If (LEqual (Local0, Zero))                 // Have we reached Zero, then something must be wrong.                            {                                KILL ()                                // Abort.                            }                        }                        Else                        {                            Return (One)                               // Return ready status.                        }                    }                    Return (Zero)                                      // Return error status.                }                Method (COMP, 0, Serialized)                {                    Store (0x0FA0, Local0)                             // Counter 0x0FA0 (4000).                     While (Local0)                                     // Loop until Zero.                    {                        If (And (HSTS, 0x02))                          // INTR – Successful completion of last command?                        {                            Return (One)                               // Return transmission success ended.                        }                        Else                        {                            Decrement (Local0)                         // 3999, 3998, 3997...                            Stall (0x32)                               // Delay execution for at least 50 microseconds.                            If (LEqual (Local0, Zero))                 // Error.                            {                                KILL ()                                // Abort transmission.                            }                        }                    }                    Return (Zero)                                      // Return error status.                }                Method (KILL, 0, Serialized)                {                    Or (HCON, 0x02, HCON)                              // Set bit-1 – Abort current host transaction.                    Or (HSTS, 0xFF, HSTS)                              // Clear Host Status Register.                }                Device (BUS0)                {
Have fun with part one while I rewrite it. Oh and get Debug() working man, that helps a lot. Good luck with it.

p.s. I was not allowed to comment in your thread so I've put it here in good spirit :(

#273
ƃuıʞ ǝɥʇ

ƃuıʞ ǝɥʇ

    InsanelyMac Protégé

  • Members
  • Pip
  • 12 posts
What I do recommend in that post is the usage of:
[codebox] Device (SBUS)
{
Name (_ADR, 0x001F0003)
Device (BUS0)
{
Name (_CID, "smbus")
Name (_ADR, Zero)
Device (DVL0)
{
Name (_ADR, 0x57)
Name (_CID, "diagsvault")
}
}
}
[/codebox]
But only for those who get that error on boot, also to show that it has the same effect with full apple copy/paste.
No need for thanks since this was discovered long time before you started to play with DSDT.
I always remarked when you have a good idea, like was with _INI method(also recommended by a friend), and the _PRT stuff is interesting...

I'm also happy to see that you started to add back stuff from SIOR in the place where they belong SBUS, waiting for the day when you will remove EC device since is useless...

I totally disagree with your new methods, you are going, like other ODM/OEM's who dosen't fallow ACPI specs, to create more confusion then clearing something. IMHO DSM is good enough for what we use, and also almost all knows what it does, what you will do create new methods for other stuff we have to inject?
Try to keep stuff in the known area(and as they are defined in specs)...you already got negative results/reports on this.

#274
barnum

barnum

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 135 posts
  • Gender:Male
  • Location:france

DSDT V3.1 Has Been Released Today �" see attachments in post#3


Happy Hacking!

Hi Master chief,
I see that you add this method in the cpu declaration :
Method (_PSD, 0, NotSerialized)            {                Return (Package (0x05)                {                    0x05,                    0x00,                    0x00,                    0xFC,                    0x04                })            }
is it specific to your cpu ?

Barnum

#275
Pene

Pene

    InsanelyMac Geek

  • Coders
  • 112 posts
  • Gender:Male
Hi Master Chief,

As already reported, when using the SBUS patch, it tries to load the kexts com.apple.driver.AppleMikeyDriver and com.apple.driver.AppleMikeyHIDDriver.

These are not needed and report an error when they load, yet they remain loaded.

Is it possible to disable loading them when using SMBUS (which would also disable the logged error)?

Thanks!

#276
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male

Hi Master Chief,

As already reported, when using the SBUS patch, it tries to load the kexts com.apple.driver.AppleMikeyDriver and com.apple.driver.AppleMikeyHIDDriver.

These are not needed and report an error when they load, yet they remain loaded.

Is it possible to disable loading them when using SMBUS (which would also disable the logged error)?

Thanks!

Reported where? I must have missed it. Not to mention that this specific code part is commented out, so that can't trigger a kext load.


Hi Master chief,
I see that you add this method in the cpu declaration :

Method (_PSD, 0, NotSerialized)            {                Return (Package (0x05)                {                    0x05,                    0x00,                    0x00,                    0xFC,                    0x04                })            }
is it specific to your cpu ?

Barnum

No, and I kindly point you to the ACPI specification (link in post #3) where you can read everything you want to know about this sort of Methods. No need to ask here :)

...

But only for those who get that error on boot, also to show that it has the same effect with full apple copy/paste.
No need for thanks since this was discovered long time before you started to play with DSDT.

Never seen anything about it. But probably because I usually do things my way anyway, most of the time the hard way, because this way I learn stuff. I didn't exactly learn to walk in one day either so...

I always remarked when you have a good idea, like was with _INI method(also recommended by a friend), and the _PRT stuff is interesting...

Thanks, but there is no need for 'battles' anymore. We know what we know and want to share stuff. Right? Like I say, move on forward either with or without my help :D

I'm also happy to see that you started to add back stuff from SIOR in the place where they belong SBUS, waiting for the day when you will remove EC device since is useless...

I didn't. Really. And I won't remove EC because I need it (for my notebook).

I totally disagree with your new methods, you are going, like other ODM/OEM's who dosen't fallow ACPI specs, to create more confusion then clearing something. IMHO DSM is good enough for what we use, and also almost all knows what it does, what you will do create new methods for other stuff we have to inject? Try to keep stuff in the known area(and as they are defined in specs)...you already got negative results/reports on this.

Uhm. Well. I don't see a need for unused arguments, and thus I simply removed them.

Now. About Method DTGP because that isn't even mentioned in the ACPI specifications. Not even once, and thus changing methods like DTGP is a non-issue. Also no word about adding new methods, not even one single word and thus that too is really a non-issue. You may dislike it, but that's as far as it goes.

And yes, I might add a new method or change one or more previously introduced methods. Pretty obvious of course, for a developer trying to move forward.

#277
barnum

barnum

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 135 posts
  • Gender:Male
  • Location:france

No, and I kindly point you to the ACPI specification (link in post #3) where you can read everything you want to know about this sort of Methods. No need to ask here :thumbsup_anim:


Thanks, I read the spec and I modify your code to this because I have a core 2 duo not quad :thumbsup_anim:

0x02
})
} _linenums:0'>Method (_PSD, 0, NotSerialized) { Return (Package (0x05) { 0x05, 0x00, 0x00, 0xFC, <strong class='bbc'>0x02</strong> }) }

Barnum

#278
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male

Thanks, I read the spec and I modify your code to this because I have a core 2 duo not quad :)

...

Barnum

Well done! Doing stuff yourself is much more rewarding isn't it ;)

#279
FKA

FKA

    are we there yet?

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,626 posts
  • Gender:Male

Well done! Doing stuff yourself is much more rewarding isn't it :)


Terribly rewarding !

0xFC,
0x02
})
} _linenums:0'>Method (_PSD, 0, NotSerialized){Return (Package (0x05){0x05,0x00,0x00,<strong class='bbc'>0xFC,</strong>0x02})}

In red 'OSPM Coordinate' - "When OSPM coordinates, the platform may
require that OSPM transition ALL (0xFC) or ANY ONE (0xFD) of the processors belonging to the domain into a particular target state."

So by using 0xFC rather than 0xFD OSPM will treat all cores as 1. Surely you should be using 0XFD?

D

#280
Matthew L.

Matthew L.

    InsanelyMac Protégé

  • Members
  • PipPip
  • 70 posts
  • Gender:Male

[...] So by using 0xFC rather than 0xFD OSPM will treat all cores as 1. Surely you should be using 0XFD?

D

IMHO it's the exact opposite, and to prove it, take a peek at the Example in the ACPI Spec rev. 4.0 page 329, where it says "[...] OSPM will be required to coordinate the P-state transitions between the two processors and can initiate a transition on either processor to cause both to transition to the common target P-state." and the value in the example code is 0xFD.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

© 2015 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy