To further answer your question functional Safety also applies to software. Some common Functional Safety relevant capabilities of software are ensuring the proper sequence of blocks of code, ensuring the blocks of code are executed within an expected time frame, and ensuring that code of different safety levels is executed only at the appropriate time (ex: be able to detect if code that should only run during either debug or during startup is executing during normal run time.) Similar to hardware, software must also be developed and documented with processes that minimize the likelihood of systematic bugs making it into the final product.