[coreboot] LOCK prefix
Patrick Georgi
patrick at georgi-clan.de
Tue Dec 16 15:21:53 CET 2014
Am 2014-12-16 03:54, schrieb ron minnich:
> Notwithstanding the merits of the idea, does anyone know if this is
> doable or I am just misremembering?
Since even LOCK REP ... is not allowed, I think you're misremembering.
LOCK provides atomicity guarantees for the single instruction it covers,
nothing else.
What's typically used in situations like your example is cmpxchg: load
the value, copy it, modify, then atomically exchange ram and register
content. compare exchanged value with copy to make sure there was no
interference, otherwise restart.
Patrick
More information about the coreboot
mailing list