Switch JMicron JMB363 Controller to Multi-Function Mode

0 views
Skip to first unread message

D.Simon

unread,
Oct 25, 2009, 11:09:54 AM10/25/09
to darwin-ata-dev
Hi!

I have a Delock JMB363 PCIe Card which has NO option to Switch to
Multi-Function Mode (two PCI Devices, one pure SATA, the other one
IDE). Instead, the Card shows up as a single RAID Controller, so no
AHCI is possible. Integrated JMB Chips on Motherboards can be switched
to pure AHCI via Mainboard BIOS' Setup, with PCIe Cards, you can't :(

When i booted into Linux, i found that Linux managed to turn on AHCI
for that Card and the Controller showed up as two Devices! AHCI and
IDE. I peeked around in the Driver Sources and found that
"pci_write_config_byte(pdev, 0x41, 0xa1);" turns on this mode.

The darwinata project Mac Driver has this pci write Function:

void CLASS::pciConfigWrite8( UInt8 offset, UInt8 data, UInt8 mask )
{
fProvider->pciConfigWrite8( offset, data, mask );
}

I tried to integrate that in the Mac Driver, but i did not get it to
work. "Offset" should be 0x41, "data" should be 0xa1. But what should
"mask" be?
How and where should i call that function in the Mac Driver?


Thanks, Dom

Fede

unread,
Oct 25, 2009, 1:10:07 PM10/25/09
to darwin-...@googlegroups.com
This is the definition of pciConfigWrite8 from JMicronATAPCIRoot:

void CLASS::pciConfigWrite8( UInt8 offset, UInt8 data, UInt8 mask )
{
UInt8 u8;

IOLockLock( fPCILock );

u8 = fProvider->configRead8( offset );
u8 &= ~mask;
u8 |= (mask & data);
fProvider->configWrite8( offset, u8 );

IOLockUnlock( fPCILock );
}


This is used to write bits. So the mask is used to tell wich bits we
are replacing.

If you set the mask in 0xFF, then every bit is written.
Reply all
Reply to author
Forward
0 new messages