Re: Write/Read Bulk communication process in KEXT. How?
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Terry Lambert writes:
If you need to do file I/O to load firmware (as an example), either put the firmware in a discardable section (vm_deallocate() it after it's loaded in the card), or have a user space daemon communicate the firmware to your driver via a series of ioctl() calls to push the data *temporarily* into the kernel, so it doesn't take up real or virtual memory in your driver.
This comes up over, and over, and over again here. Is there any chance Apple can provide a centralized way to do this in the OS, so we don't all have to use our own home grown and (potentially) buggy or wasteful mechanisms? At least 3 other OSes provide a way for drivers to load firmware easily: Windows' NdisOpenFile / NdisMapFile: Reads files from in the kernel. Linux: request_firmware(): Signals a centralized user-space daemon (udev) to copy firmware image file into the kernel. FreeBSD: firmware(9) Makes it easy to wrap a firmware image in a loadable module, and allows a driver to easily load and unload the module on demand via firmware_get() and firmware_put(). Drew _______________________________________________ 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
participants (1)
-
Andrew Gallatin