Skip to content

Commit

Permalink
experiments/cpu_pstates.py: Only set DVMR if necessary
Browse files Browse the repository at this point in the history
Signed-off-by: Hector Martin <marcan@marcan.st>
  • Loading branch information
marcan committed Sep 23, 2021
1 parent febf83a commit 3a4b287
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions proxyclient/experiments/cpu_pstates.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ def bench_cpu(idx):
for cluster in range(2):
print(f"Initializing cluster {cluster}")
ena = (1<<63)
val = p.read64(CREG[cluster] + CLUSTER_DVMR)
if cluster == 1:
ena |= (1<<32) | (1<<31)
if (val & ena) != ena:
print(f"DVMR: {val:#x} -> {val|ena:#x}")
p.set64(CREG[cluster] + CLUSTER_DVMR, ena) # CLUSTER_DVMR

#p.set64(CREG[cluster] + CLUSTER_LIMIT1, 1<<63)
Expand Down

0 comments on commit 3a4b287

Please sign in to comment.