mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-10 09:44:13 +00:00
experiments/cpu_pstates.py: Only set DVMR if necessary
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
febf83a981
commit
3a4b2870a8
1 changed files with 3 additions and 0 deletions
|
@ -82,8 +82,11 @@ CLUSTER_PSCTRL = 0x200f8
|
|||
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)
|
||||
|
|
Loading…
Reference in a new issue