Read modify write

November 30, 2009

The Dangers of Read-Modify-Write

In registers containing several read/write configuration bits, a device driver often needs to change one bit without changing the others. One technique is for the device driver to keep a shadow copy of that register in its own data structures. The device driver modifies the desired bit in its copy, […]
December 31, 2009

Limited CPU Support for Read-Modify-Write Operations

In last month’s article, I discussed the dangers of read-modify-write operations when multiple device drivers access the same hardware registers, since basic firmware read-modify-write operations are not atomic. I also discussed how firmware techniques such as shadow copies and mutexes can be used to provide atomic read-modify-write operations, but only […]