* Darmawan Salihun darmawan.salihun@gmail.com [070714 05:13]:
Application logic belongs into the application, not into the driver.
This makes me wonder if the current driver is good enough :-/
Take it as a suggestion. If there is no good way of doing it different, than the way you are doing it in your driver is fine.
The reality is the current driver is as stupid as it is. Because, it responds to every direct I/O functions (inb, outb, etc.) in the correct manner and mapped the requested physical address range as we expect from mmap'ing /dev/mem.
However, I'm thinking and experimenting about moving the board_enable and chipset_enable support to the driver, so that every low-level accesses is kept to the driver.
Which implementation approach do you think is best ?
good question. There is certainly an advantage to both approaches.
Having a simple driver would allow to update the userspace program while the driver always stays the same.
On the other hand, letting userspace do arbitrary io accesses is not good.
Can anyone else except flashrom easily use the driver? By accident? On purpose, to break into the system?