HomeFreeBSD

arm64, qoriq_therm: fix handling sites on version 1 and 2

Description

arm64, qoriq_therm: fix handling sites on version 1 and 2

For version 2 extend the TMUV2_TMSAR() write loop over all site_ids
registered for a particular SoC and actually use the site_id rather
than always just the first [0] (which for the LX2080 would be a
problem given there is no site0).

Later, while version 2 adds the SITEs to enable to TMSR in bits 0..<n>,
version 1 (e.g., LS1028, LS1046, LS1088) add MSITEs to TMR
bits 16..31 or rather 15..0(16-<n>). Adjust the loops to only enable
the site_ids listed for the particular SoC for monitoring. This now
also deals with sparse site_ids (not starting at 0, or not being
contiguous).

Sponsored by: Traverse Technologies (providing Ten64 HW for testing)
Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D35764

(cherry picked from commit fe88072dc69fcd64b42d8512ad214c0fe009ad8e)

Details

Provenance
bzAuthored on Jul 10 2022, 1:38 PM
Reviewer
mmel
Differential Revision
D35764: arm64, qoriq_therm: fix handling sites on version 1 and 2
Parents
rGb3189b3295d6: arm64, qoriq_therm: configure the number of sites base don SoC
Branches
Unknown
Tags
Unknown