Jump to content

Patch DSDT for JMB362 in AHCI mode


  • Please log in to reply
34 replies to this topic

#21
stradivari1723

stradivari1723

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
Does WOL have to be supported in the driver?

#22
LatinMcG

LatinMcG

    Insanely digesting DSDT

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,509 posts
  • Gender:Male
  • Location:Tampa, Florida
in bios it should be enabled. but if driver is intel .. some have issues.

i have realtek rtl8111d and i use lnx2mac driver for proper wake to work. seems realtek's 2.0.5 and up broke wake.

#23
stradivari1723

stradivari1723

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts

in bios it should be enabled.


It is.

Did you take a look at my attachments? What do you think...?

#24
LatinMcG

LatinMcG

    Insanely digesting DSDT

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,509 posts
  • Gender:Male
  • Location:Tampa, Florida
this is your GBE
Device (GBE)
			{
				Name (_ADR, 0x00190000)
				Method (_PRW, 0, NotSerialized)
				{
					Return (GPRW (0x0D, 0x04))
				}
			}
change 0x04 to 0x05 ?

is it intel or realtek ???

lookin in your dsdt i was wondering of your OSFL aka osvr in this asus.
Name (OSVR, Ones)    Method (OSFL, 0, NotSerialized)    {        If (LNotEqual (OSVR, Ones))        {            Return (OSVR)        }        If (LEqual (PICM, Zero))        {            Store (0xAC, DBG8)        }        Store (One, OSVR)        If (CondRefOf (_OSI, Local0))        {            If (_OSI ("Linux"))            {                Store (0x03, OSVR)            }            If (_OSI ("Windows 2001"))            {                Store (0x04, OSVR)            }            If (_OSI ("Windows 2001.1"))            {                Store (0x05, OSVR)            }            If (_OSI ("Darwin"))            {                Store (0x06, OSVR)            }            If (_OSI ("HP-UX"))            {                Store (0x07, OSVR)            }            If (_OSI ("OpenVMS"))            {                Store (0x08, OSVR)            }            If (_OSI ("Windows 2001 SP1"))            {                Store (0x09, OSVR)            }            If (_OSI ("Windows 2001 SP2"))            {                Store (0x0A, OSVR)            }            If (_OSI ("Windows 2001 SP3"))            {                Store (0x0B, OSVR)            }            If (_OSI ("Windows 2006"))            {                Store (0x0C, OSVR)            }            If (_OSI ("Windows 2006 SP1"))            {                Store (0x0D, OSVR)            }            If (_OSI ("Windows 2009"))            {                Store (0x0E, OSVR)            }        }        Else        {            If (MCTH (_OS, "Microsoft Windows NT"))            {                Store (Zero, OSVR)            }            If (MCTH (_OS, "Microsoft Windows"))            {                Store (One, OSVR)            }            If (MCTH (_OS, "Microsoft WindowsME: Millennium Edition"))            {                Store (0x02, OSVR)            }            If (MCTH (_OS, "Linux"))            {                Store (0x03, OSVR)            }            If (MCTH (_OS, "Dariwn"))            {                Store (0x06, OSVR)            }            If (MCTH (_OS, "HP-UX"))            {                Store (0x07, OSVR)            }            If (MCTH (_OS, "OpenVMS"))            {                Store (0x08, OSVR)            }        }        Return (OSVR)    }

its missing Darwin .. try replacing "FreeBSD"or or "Windows 2006" with "Darwin"

#25
stradivari1723

stradivari1723

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts

Tried that. No good.

is it intel or realtek ???


Intel.

lookin in your dsdt i was wondering of your OSFL aka osvr in this asus.
Name (OSVR, Ones)
Method (OSFL, 0, NotSerialized)
{
If (LNotEqual (OSVR, Ones))
{
Return (OSVR)
}

If (LEqual (PICM, Zero))
{
Store (0xAC, DBG8)
}

Store (One, OSVR)
If (CondRefOf (_OSI, Local0))
{
If (_OSI ("Linux"))
{
Store (0x03, OSVR)
}

If (_OSI ("Windows 2001"))
{
Store (0x04, OSVR)
}

If (_OSI ("Windows 2001.1"))
{
Store (0x05, OSVR)
}

If (_OSI ("FreeBSD"))
{
Store (0x06, OSVR)
}

If (_OSI ("HP-UX"))
{
Store (0x07, OSVR)
}

If (_OSI ("OpenVMS"))
{
Store (0x08, OSVR)
}

If (_OSI ("Windows 2001 SP1"))
{
Store (0x09, OSVR)
}

If (_OSI ("Windows 2001 SP2"))
{
Store (0x0A, OSVR)
}

If (_OSI ("Windows 2001 SP3"))
{
Store (0x0B, OSVR)
}

If (_OSI ("Windows 2006"))
{
Store (0x0C, OSVR)
}

If (_OSI ("Windows 2006 SP1"))
{
Store (0x0D, OSVR)
}

If (_OSI ("Windows 2009"))
{
Store (0x0E, OSVR)
}
}
Else
{
If (MCTH (_OS, "Microsoft Windows NT"))
{
Store (Zero, OSVR)
}

If (MCTH (_OS, "Microsoft Windows"))
{
Store (One, OSVR)
}

If (MCTH (_OS, "Microsoft WindowsME: Millennium Edition"))
{
Store (0x02, OSVR)
}

If (MCTH (_OS, "Linux"))
{
Store (0x03, OSVR)
}

If (MCTH (_OS, "FreeBSD"))
{
Store (0x06, OSVR)
}

If (MCTH (_OS, "HP-UX"))
{
Store (0x07, OSVR)
}

If (MCTH (_OS, "OpenVMS"))
{
Store (0x08, OSVR)
}
}

Return (OSVR)
}

its missing Darwin .. try replacing "FreeBSD"or or "Windows 2006" with "Darwin"


Does that actually affect anything, though? I can change it and try...

Edit: replaced 0x04 with 0x05, and replaced FreeBSD with Darwin. Doesn't seem to change anything. :-\ BTW, wake itself works great. Just WOL I'm trying to get working, now. And it's not my network... my hackintosh can WOL my MacBook Pro.

I'm wondering if it's a software/driver issue... I'm bothered by the fact that my MacBook Pro has "Wake on network access" option in Energy Saver, but my Hackintosh does not...

#26
LatinMcG

LatinMcG

    Insanely digesting DSDT

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,509 posts
  • Gender:Male
  • Location:Tampa, Florida
im sure someone has this dsdt working WOL..
i havent had that issue besides in a older inspiron 530 intel WOL .. wake would kill LAN = reboot. never fixed that

the osfl calls do change things barely noticable. i notice cooler cpu with darwin as it loads the power management instead of generic.

but ultimately it might be dsdt or driver. or even bios.. i run gigabyte not asus.
but soon im getting a bad bios flash mobo from a friend for 20$ im going to recover bios on it and test osx in it.

#27
stradivari1723

stradivari1723

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts

I have run across more than one account of how people with Realtek NICs did not have WOL working until they switched from Realtek drivers to Lnx2mac's beta driver. So it could very well be a driver issue.

Edit: Couple more things... changing OSVR to Darwin does indeed seem to have provided lower CPU temperatures, however I have done no scientific comparisons, but it also seems to me that perhaps my Geekbench scores are higher than previously!? Finally, I may boot into Win 7 and see if WOL is working in Windows. If it is, that would narrow things down, right? If it's not working in Windows, then that would mean it is a BIOS issue?



#28
LatinMcG

LatinMcG

    Insanely digesting DSDT

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,509 posts
  • Gender:Male
  • Location:Tampa, Florida
yes if in cant WOL id say bios might be at fault (most likely its intel driver). read bios fixes for that board. one does mention WOL.

i edited the osvr post with Darwin on spots for freeBSD

#29
stradivari1723

stradivari1723

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts

WOL works fine in Win 7. :-\

Further thought... could it be because we have to use SleepEnabler.kext and "pmVersion=23" boot argument in order to have sleep working? Would it work if we had vanilla sleep? Or does the sleepenabler kext need to be edited to keep power supplied to the NIC when initiating sleep? Or is that not even relevant??

I'm about to give up... :-(



#30
LatinMcG

LatinMcG

    Insanely digesting DSDT

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,509 posts
  • Gender:Male
  • Location:Tampa, Florida
i have no clue of what sleepenbler does. as i never use it.

#31
Camilo_ML

Camilo_ML

    InsanelyMac Protégé

  • Members
  • Pip
  • 19 posts
Device (RP03)
			{
				Name (_ADR, 0x001C0002)
				OperationRegion (P3CS, PCI_Config, 0x40, 0xA0)
				Field (P3CS, AnyAcc, NoLock, WriteAsZeros)
				{
							Offset (0x20), 
							Offset (0x22), 
					PSP3,   1, 
							Offset (0x9C), 
						,   30, 
					HPS3,   1, 
					PMS3,   1
				}

				Device (ETH0)
				{
					Name (_ADR, 0x00)
					Name (_PRW, Package (0x02)
					{
						0x09, 
						0x03
					})
					Method (_DSM, 4, NotSerialized)
					{
						Store (Package (0x02)
							{
								"location", 
								Buffer (0x02)
								{
									"1"
								}
							}, Local0)
						DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
						Return (Local0)
					}
				}

				Method (_PRT, 0, NotSerialized)
				{
					If (\GPIC)
					{
						Return (Package (0x04)
						{
							Package (0x04)
							{
								0xFFFF, 
								0x00, 
								0x00, 
								0x12
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x01, 
								0x00, 
								0x13
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x02, 
								0x00, 
								0x10
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x03, 
								0x00, 
								0x11
							}
						})
					}
					Else
					{
						Return (Package (0x04)
						{
							Package (0x04)
							{
								0xFFFF, 
								0x00, 
								\_SB.PCI0.LPCB.LNKC, 
								0x00
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x01, 
								\_SB.PCI0.LPCB.LNKD, 
								0x00
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x02, 
								\_SB.PCI0.LPCB.LNKA, 
								0x00
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x03, 
								\_SB.PCI0.LPCB.LNKB, 
								0x00
							}
						})
					}
				}
			}

This is from an original macpro4,1, maybe it helps

rgrds

#32
stradivari1723

stradivari1723

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts

i have no clue of what sleepenbler does. as i never use it.


I think it sets the power states correctly for sleep on Asus P8P67. Without the kext, choosing sleep results in display off, drives spun down, but fans still running.

Device (RP03)
			{
				Name (_ADR, 0x001C0002)
				OperationRegion (P3CS, PCI_Config, 0x40, 0xA0)
				Field (P3CS, AnyAcc, NoLock, WriteAsZeros)
				{
							Offset (0x20), 
							Offset (0x22), 
					PSP3,   1, 
							Offset (0x9C), 
						,   30, 
					HPS3,   1, 
					PMS3,   1
				}

				Device (ETH0)
				{
					Name (_ADR, 0x00)
					Name (_PRW, Package (0x02)
					{
						0x09, 
						0x03
					})
					Method (_DSM, 4, NotSerialized)
					{
						Store (Package (0x02)
							{
								"location", 
								Buffer (0x02)
								{
									"1"
								}
							}, Local0)
						DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
						Return (Local0)
					}
				}

				Method (_PRT, 0, NotSerialized)
				{
					If (\GPIC)
					{
						Return (Package (0x04)
						{
							Package (0x04)
							{
								0xFFFF, 
								0x00, 
								0x00, 
								0x12
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x01, 
								0x00, 
								0x13
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x02, 
								0x00, 
								0x10
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x03, 
								0x00, 
								0x11
							}
						})
					}
					Else
					{
						Return (Package (0x04)
						{
							Package (0x04)
							{
								0xFFFF, 
								0x00, 
								\_SB.PCI0.LPCB.LNKC, 
								0x00
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x01, 
								\_SB.PCI0.LPCB.LNKD, 
								0x00
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x02, 
								\_SB.PCI0.LPCB.LNKA, 
								0x00
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x03, 
								\_SB.PCI0.LPCB.LNKB, 
								0x00
							}
						})
					}
				}
			}

This is from an original macpro4,1, maybe it helps

rgrds


Interesting. Mac Pro 4,1 has an Intel NIC, right? (dual port, Gigabit)

#33
stradivari1723

stradivari1723

    InsanelyMac Protégé

  • Members
  • Pip
  • 21 posts
I tried replacing the GBE entry with the ETH0 entry below, but no go. :-( Thanks, though.

Device (RP03)
			{
				Name (_ADR, 0x001C0002)
				OperationRegion (P3CS, PCI_Config, 0x40, 0xA0)
				Field (P3CS, AnyAcc, NoLock, WriteAsZeros)
				{
							Offset (0x20), 
							Offset (0x22), 
					PSP3,   1, 
							Offset (0x9C), 
						,   30, 
					HPS3,   1, 
					PMS3,   1
				}

				Device (ETH0)
				{
					Name (_ADR, 0x00)
					Name (_PRW, Package (0x02)
					{
						0x09, 
						0x03
					})
					Method (_DSM, 4, NotSerialized)
					{
						Store (Package (0x02)
							{
								"location", 
								Buffer (0x02)
								{
									"1"
								}
							}, Local0)
						DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
						Return (Local0)
					}
				}

				Method (_PRT, 0, NotSerialized)
				{
					If (\GPIC)
					{
						Return (Package (0x04)
						{
							Package (0x04)
							{
								0xFFFF, 
								0x00, 
								0x00, 
								0x12
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x01, 
								0x00, 
								0x13
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x02, 
								0x00, 
								0x10
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x03, 
								0x00, 
								0x11
							}
						})
					}
					Else
					{
						Return (Package (0x04)
						{
							Package (0x04)
							{
								0xFFFF, 
								0x00, 
								\_SB.PCI0.LPCB.LNKC, 
								0x00
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x01, 
								\_SB.PCI0.LPCB.LNKD, 
								0x00
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x02, 
								\_SB.PCI0.LPCB.LNKA, 
								0x00
							}, 

							Package (0x04)
							{
								0xFFFF, 
								0x03, 
								\_SB.PCI0.LPCB.LNKB, 
								0x00
							}
						})
					}
				}
			}

This is from an original macpro4,1, maybe it helps

rgrds



I found this info on the Intel site, for the NIC that is onboard my MOBO. Does any of this info help??

7.4.1.1
b.	Flexible Filter Value Table MSBs – FFVT_H (filters 23) c.	Flexible Filter Value Table - FFVT_45 (filters 45) d.	Flexible Filter Value Table - FFVT_67 (filters 67) e.	Flexible TCO Filter Value/Mask Table LSBs – FTFT_L f.	Flexible TCO Filter Value/Mask Table MSBs – FTFT_H
4. Configure the 82579’s wake up registers per ACPI/APM wake up needs.
5. Clear the Slave Access Enable bit (bit 2) in the Receive Control register (page 800, register 0) to enable the flex filters.
6. Set the Host_WU_Active bit (bit 4) in the Port General Configuration register (page 769, register 17) to activate the 82579’s wake up functionality.
Once wake up is enabled, the 82579 stops responding to SMBus commands.
Host wake up:
1. When a WoL packet/event is detected, the 82579 sends an in-band message to the integrated LAN controller indicating Host wake up.
2. In case of host wake up, the integrated LAN controller wakes the host. 3. Host should issue a LCD reset to the 82579 before clearing the Host_WU_Active bit. 4. Host reads the Wake Up Status register (WUS); wake up status from the 82579).
When a wake up packet is identified, the wake up in-band message is sent and the host should clear the Host_WU_Active bit (bit 4) in the Port General Configuration register (page 769, register 17).
While in wake up active mode new wake up packets received will not overwrite the packet in the FIFO. The 82579 re-transmits the wake up in-band message after 50 ms if no change in the Host_WU_Active bits occurred.
Host Wake Up
The 82579 supports two types of wake up mechanisms: • Advanced Power Management (APM) wake up • ACPI Power Management wake up
Advanced Power Management Wake Up
Advanced Power Management Wakeup or APM Wakeup was previously known as Wake on LAN (WoL). The basic premise is to receive a broadcast or unicast packet with an explicit data pattern, and then to assert a signal to wake up the system or issue an in- band PM_PME message (if configured to).
At power up, if the 82579’s wake up functionality is enabled, the APM Enable bits from the NVM are written to the 82579 by the integrated LAN controller to the APM Enable (APME) bits of the Wakeup Control (WUC) register. These bits control the enabling of APM wake up.
When APM wake up is enabled, the 82579 checks all incoming packets for Magic Packets. See Section 7.4.1.3.1.4 for a definition of Magic Packets.
39
Device Functionality—Intel® 82579 Gigabit Ethernet
7.4.1.1.1
7.4.1.2
To enable APM wake up, programmers should write a 1b to bit 10 in register 26 on page 0 PHY address 01, and then the station address to registers 27, 28, 29 at page 0 PHY address 01. The order is mandatory since registers RAL0[31:0] and RAH0[15:0] are updated with a corresponding value from registers 27, 28, 29, if the APM WoL Enable bit is set in register 26. The Address Valid bit (bit 31 in RAH0) is automatically set with a write to register 29, if the APM WoL Enable bit is set in register 26. The APM Enable bit (bit 0 in the WUC) is automatically set with a write to register 29, if the APM WoL Enable bit is set in register 26.
Once the 82579 receives a matching magic packet, it: • Sets the Magic Packet Received bit in the WUS register. • Initiates the integrated LAN controller wake up event through an in-band message.
APM wake up is supported in all power states and only disabled if a subsequent NVM read results in the APM Wake Up bit being cleared or software explicitly writes a 0b to the APM Wake Up (APM) bit of the WUC register.

To enable APM wake up, programmers should write a 1b to bit 10 in register 26 on page 0 PHY address 01, and then the station address to registers 27, 28, 29 at page 0 PHY address 01


Can this be done in DSDT, or is this different than PCI registers? How would I do this?

#34
LatinMcG

LatinMcG

    Insanely digesting DSDT

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,509 posts
  • Gender:Male
  • Location:Tampa, Florida
yes it can.. your LAN in dsdt is missing the stuff.

but not same way as the ahci.. thats simple.
wer talking about a whole section .. from 20 lines of code for wol function

#35
Riley Freeman

Riley Freeman

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 920 posts
  • Gender:Male
  • Location:The Streets

I got it to finally work by replacing the ENTIRE JMB entry with this simplified bit that The King posted in that other thread:

Device (JMB0)
				{
					Name (_ADR, Zero)
					OperationRegion (BAR0, PCI_Config, 0x40, 0x04)
					Field (BAR0, WordAcc, NoLock, Preserve)
					{
						M1,	 8,
						M2,	 8,
						M3,	 8
					}

					Method (_DSM, 4, NotSerialized)
					{
						Store (0xB3, M1)
						Store (0xA1, M2)
						Store (0xC2, M3)
						Store (Package (0x02)
							{
								"name",
								Buffer (0x16)
								{
									"J-Micron JMB36x eSATA"
								}
							}, Local0)
						DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
						Return (Local0)
					}
				}


I've used this code to get the JMB362 working on my P8Z68 board. However it lists two eSATA ports while I only have one port on my board (even though it's apparently a dual-port chipset).

Is it possible to disable the second port via a DSDT hack? This is what I have in IORegExp. Only PRT0 is needed.

Another issue here is I can't get the drive to wake from sleep. I've added the PINI method, but it's possible I'm calling it in the wrong place. I have _WAK and WAK entries and adding PINI() to either of these has no effect. I have to manually wake the drive by launching Disk Utility. I've attached my DSDT, hopefully someone can help.

Attached Files







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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