diff options
author | Andreas Sandberg <andreas@sandberg.pp.se> | 2013-06-11 09:24:38 +0200 |
---|---|---|
committer | Andreas Sandberg <andreas@sandberg.pp.se> | 2013-06-11 09:24:38 +0200 |
commit | 0b4a8b40866a1ed44bacbccc788ce3001eab8b20 (patch) | |
tree | 103ebeb6693f4c02a12a5614e3ab4be9c34fbd91 /README | |
parent | 2442aae54f1726b63674e47de1b62bf2af847f70 (diff) | |
download | gem5-0b4a8b40866a1ed44bacbccc788ce3001eab8b20.tar.xz |
x86: Fix bug when copying TSC on CPU handover
The TSC value stored in MISCREG_TSC is actually just an offset from
the current CPU cycle to the actual TSC value. Writes with
side-effects to the TSC subtract the current cycle count before
storing the new value, while reads add the current cycle count. When
switching CPUs, the current value is copied without side-effects. This
works as long as the source and the destination CPUs have the same
clock frequencies. The TSC will jump, sometimes backwards, if they
have different clock frequencies. Most OSes assume the TSC to be
monotonic and break when this happens.
This changeset makes sure that the TSC is copied with side-effects to
ensure that the offset is updated to match the new CPU.
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions