Jump to content

Patching SBUS in DSDT


  • Please log in to reply
13 replies to this topic

#1
Time2Retire

Time2Retire

    Retired

  • Retired Developers
  • 1,012 posts
  • Gender:Female
  • Location:anonymouse.eu
Hello all.

I don't see any SMBus related kext loaded (with kextstat -k). Let's start with a dump:
00:1f.3 SMBus [0c05]: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller [<strong class='bbc'>8086:3b30</strong>] (rev 05)	Subsystem: Hewlett-Packard Company Device [103c:143a]	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-	Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-	Interrupt: pin C routed to IRQ 10	Region 0: Memory at c4506000 (64-bit, non-prefetchable) [size=256]	Region 4: I/O ports at 4000 [size=32]	Kernel modules: i2c-i80100: 86 80 30 3b 03 00 80 02 05 00 05 0c 00 00 00 0010: 04 60 50 c4 00 00 00 00 00 00 00 00 00 00 00 0020: 01 40 00 00 00 00 00 00 00 00 00 00 3c 10 3a 1430: 00 00 00 00 00 00 00 00 00 00 00 00 0a 03 00 00
The device-id (8086:3b30) is already listen in AppleSMBusPCI.kext so that should be fine. However. I still don't see any SMBus related kext loaded with kextstat -k.
My DSDT looks fine to me, but maybe I am missing something:
Scope (_SB.PCI0)    {        Device (SBUS)        {            Name (_ADR, 0x001F0003)            OperationRegion (SMBP, PCI_Config, 0x40, 0xC0)            Field (SMBP, DWordAcc, NoLock, Preserve)            {                    ,   2,                 I2CE,   1            }            OperationRegion (SMPB, PCI_Config, 0x20, 0x04)            Field (SMPB, DWordAcc, NoLock, Preserve)            {                    ,   5,                 SBAR,   11            }...
It was already there, but I had to add the following code snippet myself:
Device (BUS0)
			{
				Name (_CID, "smbus")
				Name (_ADR, 0x00)
			}
But still no go. What am I doing wrong? What did I forgot? What else do I need?

Edit: I apparently missed IOSMBusFamily.kext in the kextstat -k output, but it's there. Again. How do I get the others loaded?

Edit: Solved with a small DSDT patch (in red):
                Device (DVL0)
{
Name (_ADR, 0x57)
Name (_CID, "diagsvault")
}
... _linenums:0'>Device (BUS0) { Name (_CID, "smbus") Name (_ADR, 0x00) Device (DVL0) { Name (_ADR, 0x57) Name (_CID, "diagsvault") }...
And now AppleSMBusController.kext, AppleSMBusPCI.kext and IOSMBusFamily.kext are loaded.

I hope this helps, because I was unable to locate this simple patch. At least now I can link to this info, for future use, and as a painful reminder of how difficult things can get.

#2
MaLd0n

MaLd0n

    ...filling veins with juice of chaos...

  • Moderators
  • 11,137 posts
  • Gender:Male
  • Location:Rio de Janeiro
Attached File  SBUS.txt   769bytes   593 downloads
http://www.insanelym...howtopic=223205
How to apply a patch (video)

kextstat|grep SMBus

60	0 0xffffff7f80982000 0x2000	 0x2000	 com.apple.driver.AppleSMBusPCI (1.0.8d0) <9 5 4 3>   71	1 0xffffff7f80a08000 0x2000	 0x2000	 com.apple.iokit.IOSMBusFamily (1.1) <5 4 3>   72	0 0xffffff7f80a0a000 0xb000	 0xb000	 com.apple.driver.AppleSMBusController (1.0.8d0) <71 9 8 5 4 3>


#3
weizh126

weizh126

    InsanelyMac Protégé

  • Members
  • PipPip
  • 64 posts

60	0 0xffffff7f80982000 0x2000	 0x2000	 com.apple.driver.AppleSMBusPCI (1.0.8d0) <9 5 4 3>   71	1 0xffffff7f80a08000 0x2000	 0x2000	 com.apple.iokit.IOSMBusFamily (1.1) <5 4 3>   72	0 0xffffff7f80a0a000 0xb000	 0xb000	 com.apple.driver.AppleSMBusController (1.0.8d0) <71 9 8 5 4 3>



Before reading this topic, I added only the Method (_DSM, 4, NotSerialized) below the device(SBUS), and I thought everything was OK, but not all kexts listed above were loaded. After adding the following codes, my hackintosh loads the three kexts as your post, but what confuses me is what the meaning of the following codes, and I don't notice anything special happening after the patch. My motherboard is phoenix. Sorry for my poor English.

Device (BUS0)\n
	{\n
		Name (_CID, "smbus")\n
		Name (_ADR, Zero)\n
		Device (DVL0)\n
		{\n
			Name (_ADR, 0x57)\n
			Name (_CID, "diagsvault")\n
		}\n
	}\n


#4
MaLd0n

MaLd0n

    ...filling veins with juice of chaos...

  • Moderators
  • 11,137 posts
  • Gender:Male
  • Location:Rio de Janeiro
http://www.projectos...p?showtopic=102

#5
weizh126

weizh126

    InsanelyMac Protégé

  • Members
  • PipPip
  • 64 posts
thx for your reply :)

#6
Time2Retire

Time2Retire

    Retired

  • Retired Developers
  • 1,012 posts
  • Gender:Female
  • Location:anonymouse.eu

Before reading this topic, I added only the Method (_DSM, 4, NotSerialized) below the device(SBUS), and I thought everything was OK, but not all kexts listed above were loaded. After adding the following codes, my hackintosh loads the three kexts as your post, but what confuses me is what the meaning of the following codes, and I don't notice anything special happening after the patch. My motherboard is phoenix. Sorry for my poor English.

Device (BUS0)\n
	{\n
		Name (_CID, "smbus")\n
		Name (_ADR, Zero)\n
		Device (DVL0)\n
		{\n
			Name (_ADR, 0x57)\n
			Name (_CID, "diagsvault")\n
		}\n
	}\n

This "diagsvault" is the diagnostic vault where messages are stored. It's located at address 87 (0x57) on the SMBus controller. More about the specific SMBus controllers in your hack, can be found in the Intel datasheet (use Google).

One of the Mac extra's is a front microphone. One that communicates via the SMBus controller with OS X (via kexts). Which is not included as part of this DSDT hack, simply because it is not required, but you can locate it nevertheless (in any Apple DSDT) by searching for: MKY0 which is said microphone.

My reason for adding it is that OS X may want to communicate with the SMBus controller, and thus that's why I enabled it. It may however not be required, but until the day that someone can clearly explain me why we don't need it... it stays as is.

Cheers,

Sam.

#7
weizh126

weizh126

    InsanelyMac Protégé

  • Members
  • PipPip
  • 64 posts
Really thanks for your so detailed explain. :) I'm not good at English, and some abbreviation is a little difficult to me. :)
While there is a question still confuses me. I've found a topic in projectosx posted by The King, and The King aimed at fixing some errors about the X58 boards , but my motherboard is phoenix, I don't have the errors. My notebook doesn't have the Device (DVL0)(what is the device?), I patch my DSDT to enable my hackintosh to load the kexts related to the SMBUS controller, does it really work or just cosmetic?

#8
Time2Retire

Time2Retire

    Retired

  • Retired Developers
  • 1,012 posts
  • Gender:Female
  • Location:anonymouse.eu
The SMBus controller doesn't do much on a Desktop hack though it can be used for I2C reading. It is however way more important for notebooks.

BTW: I can link to posts in this forum showing you who it was that got Device (SBUS) working, and that was most certainly not theking. Thank you.

#9
Kuebeker

Kuebeker

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 142 posts
HI,

I've searched Intel's ICH documentation and have not found references for diagnostic messages vault , or any term that would point me to the address being used by ICH for SMBus messages. Where did you find your information?
I am also curious where/how the need for the inclusion of device DVL0 was found. I've pretty much depleted my search options.

#10
Gringo Vermelho

Gringo Vermelho

    The Jan Bird fix

  • Supervisors
  • 6,045 posts
  • Gender:Male
  • Location:Brazil

Thanks guys, I've been looking for this, I knew we had an SMBus topic somewhere.
Topic moved to DSDT forum and pinned!

Unfortunately for us mere mortals "Time2Retire" doesn't come out to play anymore, so which datasheet to examine is anybody's guess.



#11
westwaerts

westwaerts

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 879 posts
  • Gender:Male
diagsvault refers to diags, a hardware diagnosis program via EFI for macs.
( service software from Apple, on retail install disks, but runs standalone)

tea on his tdev.me blog has the best documentation on SMC

#12
Gringo Vermelho

Gringo Vermelho

    The Jan Bird fix

  • Supervisors
  • 6,045 posts
  • Gender:Male
  • Location:Brazil
*crickets*

Slow horizontal pan across Cupertino corn field at full moon

*cue X-files theme*

#13
ssgoku129

ssgoku129

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts

Oh no, the Dev is retired :( could anyone help me on this topic?



#14
Gringo Vermelho

Gringo Vermelho

    The Jan Bird fix

  • Supervisors
  • 6,045 posts
  • Gender:Male
  • Location:Brazil

Maybe you could be a bit more specific.







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