The invention provides a method for protecting compute system, belonging to the computer security technical field, which comprises: processing attestation of integrity on a computer system; recording the metric value via a credit calculation chip into a platform state register; judging the consistence between the metric value and an initial metric value corresponding to the platform state recorded in the credit calculation chip, when they are consistent, allowing the execution, or else, hanging the computer system. The computer system generates a credit root via embedding a hardware chip on a main board, utilizes password mechanism to build a credit chain from bottom components to superior application, and calculates and adds discrete values into a platform configuration register of a credit calculation chip. When the value is inconsistent to the one stored in the credit calculation chip, the computer system recovers or hangs, thereby confirming the safety of the computer system.