Yes, something like SecureBoot possibly could be a piece of a system that guarantees the operation of code - though, it need not be either (e.g. the hardware could come with a formal proof or model, and a checker could verify the loaded code follows the proof - not caring where it comes from).
However, SecureBoot is not that system, nor does SecureBoot of itself get you any closer to that system.
SecureBoot doesn't stop the bad guys. It will only stop the less-technical, more ordinary users from using their computers the way they want.