My MSI Z170A Gaming M5 motherboard was stuck at 800MHz, I bought the motherboard 2nd hand and I think the previous owner both messed up the boot speed and then screwed the BIOS up. You can see my BIOS fix here.
Here are 2 possible fixes
1. First, check that the Slow 1 switch is set to Normal mode.

If that doesn’t resolve the issue try 2.
2. BIOS>Overclocking>CPU Features>Intel Adaptive Thermal Monitor>Disable
This fix work is for some reason your PC got stuck thermal throttling. Please be careful with this if you are worried about overheating.