CPU Bugs: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Line 23:
To fix this bug, one must write to the cyrix registers and set the NO-LOCK bit in CCR1, which disables all but the most essential bus locks. The downside of this is that read-modify-write atomicity is no longer guaranteed on multiprocessor systems. Source code that should prevent this condition: (untested)
 
<source lang="asm">
MOV AL, 0xC1 ; 0xC1 refers to CCR1
OUTMOV 0x22AL, AL0xC1 ; Select0xC1 refers to RegisterCCR1
INOUT 0x230x22, AL ; LoadSelect ContentsRegister
ORIN AL0x23, 0x10AL ; Set No-LockLoad bitContents
MOVOR AHAL, AL 0x10 ; Set No-Lock bit
MOV ALAH, 0xC1AL ; 0xC1 refers to CCR1;
OUTMOV 0x22AL, AL0xC1 ; Select0xC1 refers to registerCCR1
MOVOUT AL0x22, AH AL ; Load newSelect contentsregister
OUTMOV 0x23AL, ALAH ; WriteLoad new CCR1 with No-Lock setcontents
OUT 0x23, AL ; Write new CCR1 with No-Lock set
 
</source>
[[Category:X86 CPU]]