Pretty much every single processor made in the past decade, if not two, has a core temperature sensor along with overheating regulation. Even the Raspberry Pi.
Typically embedded linux systems use the linux CPU frequency scaler, which uses various inputs including CPU temperature to scale the CPU clock frequency.