1. A method of operating a data processing system, having a system context, comprising a first storage medium having a current system memory context, which includes data relating to the system context, and a second non-volatile storage medium; the system being operable in a plurality of states, each state having an associated level of system power consumption; and a power management system for saving the system memory context to the second nonvolatile storage medium in preparation for entering at least one of the plurality of states; the method comprising the steps of: storing an indication of whether the system has been shutdown correctly or incorrectly; outputting, during a working state of the plurality of states, data representing at least a portion of the current system memory context for storage on the second storage medium; determining, upon initialisation of the system, from the indication of whether the system has been shutdown correctly or incorrectly, that the system was previously shutdown incorrectly and recovering, in response to that determination, the data from the second storage medium and restoring the system memory context using the recovered data.