Backport CPU stuff from FeraKernel-GB