Say we expose registers of an FPGA through UIO to user space and say we need to guarantee a certain sequence of write operations without having the compiler and/or processor reordering the writes e.g. write a block of registers (order does not matter), but writing a specific bit in a specific register at the end would start a timer (all the others need to be written before this one is written).
In kernel space I would use barriers or write e.g. to IO ports on x86 to guarantee this. How would I do this with UIO and/or with libuio. Maybe I am totally wrong here, but I see a potential reordering problem and if so maybe new functions should be added to libuio.
Another thing I am kind of missing are atomic bit operations, so the compiler does not optimize things away it should not.
Hi,
Say we expose registers of an FPGA through UIO to user space and say we need to guarantee a certain sequence of write operations without having the compiler and/or processor reordering the writes e.g. write a block of registers (order does not matter), but writing a specific bit in a specific register at the end would start a timer (all the others need to be written before this one is written).
In kernel space I would use barriers or write e.g. to IO ports on x86 to guarantee this. How would I do this with UIO and/or with libuio. Maybe I am totally wrong here, but I see a potential reordering problem and if so maybe new functions should be added to libuio.
Another thing I am kind of missing are atomic bit operations, so the compiler does not optimize things away it should not.
What do you think?
Thanks,
Robert