From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Thu, 6 Mar 2014 23:38:26 +0100 From: cinap_lenrek@felloff.net To: 9fans@9fans.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] prototyping device drivers in user space Topicbox-Message-UUID: c4fa8944-ead8-11e9-9d60-3106f5b1d025 this depends on the device you'r interfacing with. plan9 already does exactly this with aux/vga on the pc for example. you cant receive or disable interrupts in userspace, or do dma (you have to physical address mapping, well you could have fixed segments for that as well and some way for the kernel to tell you the physical address but dude...). the kernel has the great advantage that it can guard and serialize/multiplex access to a device in a sane way. and you can idealize the hardware in the kernel so that accessing a device remotely over exportfs will be efficient and machine idependent. you can't do this when you just expose device registers. the amount of fs code for kernel and lib9p is arround the same. and writing kernel driver seems to be the better approach in the long run. but for experiments, some backdoor driver that lets you access registers directly might be fine as well. really depends... -- cinap