Mailing Lists: Apple Mailing Lists

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

Large Buffers in Driver



I am writing a device driver for a custom PCI card which has a large on-board memory buffer that I want to unload and subsequently pass on to a user app. I have tried allocating an 8MB buffer with IOMallocContiguous when my driver loads at boot time and I find that I am unable to access only up to a few bytes less that 4096 before I start getting garbage returned. Someone told me that there is a bug in IOMallocContiguous that may be causing this problem. If so, is there a work around? Or even better what is the best way to allocate a large wired, contiguous driver buffer and then pass the contents on to user space? I am using bcopy() for the copy to/from user space now. The docs suggest copyin() and copyout() but I tried those without any success.

I would also appreciate a pointer to a source code example if possible. Plowing through code snippets in the docs is getting just a little bit tiresome.

Thanks for any help,

Frank McGirt


--
Frank McGirt
32 First Mesa Court
Placitas, NM 87043

NM Voice: 505-867-4727
NM FAX: 505-771-1218
OK Voice & Fax: 918-773-4051
NC Voice: 910-422-8479
OK Cell: 918-773-2032
NM Cell: 505-310-0245

email@hidden
email@hidden
_______________________________________________
darwin-drivers mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-drivers
Do not post admin requests to the list. They will be ignored.



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.