site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=LLkWGTwSpZh0ZPpWxKBKkuqh25jlLitjvvaa4ajHotOCwHfvkvfXAe96gO42irRbeorlfJXsGrrdq32Q4Vv04vgpbtrmJK8UmpbbgEaXX/LKXpOMELnGGVjKr4kMM3PBcedmsCKo+oMMb4ELMdg6oQK8a2pSk2gzmnzl6AMzN5E= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=arytpTigok1Lc9MjzEBknKlWZpdjC1s7P9qgx5F9yNXYSQFSfHKhkT7pAcJjhxMAsysSeXTjcKIwB22zDO1yUs01yXsvPQlp086jgJBRM7kDMbUdW7cxFzv4q+QT5CiFcCdpWy5p4Oz6PAYZ/id2kEY6XaruqncNWl7pYiFzhJ8= Dear All, Developing a USB KEXT for my bulk USB device and wanted suggestions from this group. The device has two bulk endpoints I continously pass around 40KB data from the user level application - Write 40K data from OUT EP– Read single byte data. This is a continous process. Since the data amount is huge, I need a mechanism which takes minimum memory and time to pass this data to device. Below are my thoughts for the same: 1. I cannot pass/copy the entire data from IOConnect methods since these methods cannot pass more than 512kb data. Please correct me if I am wrong 2. Send the address of the buffer and buffer size from the user application. At kernel level, we will get this address and length, Then use copyin function to copy this buffer at kernel level and use further. status = copyin((user_addr_t)Bufferaddr, Buffer, Buflen); I am able to pass the data correctly using this procedure, but i suppose this is not the preffered way because (a) I am developing the buffer at user level (b) then again at kernel level , i copyin the entire buffer So this process is much time and space consuming. B/w is it required to get the entire memory buffer at kernel level and then pass to the driver? Can we use the user level address and size and use the user space itself? IF yes, please detail how it is possible? 3. Can we use IOConnectMapMemory to map the user level buffer with the kernel memory ?? If yes, please detail. As per Apple documentation, we can only map the device registers to map with user level. Please refer http://developer.apple.com/documentation/DeviceDrivers/Conceptual/AccessingH... Please suggest the most optimal way to pass this user buffer at kernel level. Thanks and Regards, Rohit Dhamija _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com