In one embodiment, a processor comprises a coherence trap unit and a trap
logic coupled to the coherence trap unit. The coherence trap unit is also
coupled to receive data accessed in response to the processor executing a
memory operation. The coherence trap unit is configured to detect that
the data matches a designated value indicating that a coherence trap is
to be initiated to coherently perform the memory operation. The trap
logic is configured to trap to a designated software routine responsive
to the coherence trap unit detecting the designated value. In some
embodiments, a cache tag in a cache may track whether or not the
corresponding cache line has the designated value, and the cache tag may
be used to trigger a trap in response to an access to the corresponding
cache line.