Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: User space interface to controller.



Tom --

I have an ATA RAID HBA which is managed by a driver which is a subclass of IOSCSIParallelInterfaceController.
I need to provide an interface for my user space tools to manage the RAID controller.  Under Linux, FreeBSD and
Windows this is accomplished via an ioctl interface to the RAID controller driver.  The largest ioctl payloads are 8K.

You can create a custom subclass of IOUserClient. Since the payload could be larger than 4K, you can't simply use IOConnectMethodStructIStructO. You will have to save the task_t for the calling process (override initWithTask() and save the task_t) and you'll have to wrap the address of the user-space buffer with an IOMemoryDescriptor using withAddress() and passing the task_t. Once you do that, you prepare() the buffer, then you can DMA with it, call readBytes() or writeBytes(), etc. When done, call complete() on it, then release() it.

HTH,

-- Chris


------------------

6 Infinite Loop

M/S 306-2MS

Cupertino CA 95014

phone: (408) 974-4033

fax:   (408) 862-7577

email: email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Ata-scsi-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/ata-scsi-dev/email@hidden

This email sent to email@hidden

References: 
 >RE: User space interface to controller. (From: "Tom Couch" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.