arm64: save and restore cntfrq for secondary cpus

CNTFRQ_EL0 can only be set in highest implemented exception level.
Save and restore CNTFRQ_EL0 for secondary cpus in coreboot.

This patch fix the error below:

SANITY CHECK: Unexpected variation in cntfrq. Boot CPU:
0x00000000c65d40, CPU1: 0x00000000000000

TEST=boot to kernel on oak board and check secondary cpu's cntfrq.
     confirmed cpu1's cntfrq is same as boot cpu's.

Change-Id: I9fbc3c82c2544f0b59ec34b1d631dadf4b9d40eb
Signed-off-by: Patrick Georgi <>
Original-Commit-Id: b47e4e649efc7f79f016522c7d8a240f98225598
Original-Signed-off-by: Jimmy Huang <>
Original-Change-Id: I2d71b0ccfe42e8a30cd1367d10b0f8993431ef8c
Original-Reviewed-by: Aaron Durbin <>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <>
5 files changed