An image forming apparatus which is connected to a host device, the image forming apparatus comprising first and second power domains (PD1, PD2) which are separately supplied with power through different power supply lines, the image forming apparatus comprising: a first memory and a second memory; a main controller disposed in the first power domain to perform a control operation using the first memory in a normal mode; a sub-controller disposed in the second power domain to perform a control operation using the second memory in a power-saving mode; and a context storage unit to store context information, characterised in that: the first memory and the second memory are both disposed in the second power domain; a power supply to the first power domain is shut off when the normal mode is changed to the power-saving mode; the first memory is set to operate in a self-refresh mode when the normal mode is changed to the power-saving mode; the main controller is arranged to copy central processing unit, CPU, context information, which is lost when shutting off the power supply to the first power domain, into the context storage unit when the normal mode is changed to the power-saving mode; and the main controller is booted using the CPU context information stored in the context storage unit when the power-saving mode is changed to the normal mode; wherein the first and second power domains (PD1, PD2), the first memory, the second memory, the main controller, the sub-controller, and the context storage unit are comprised in a system-on-chip, SoC. a first memory and a second memory; a main controller disposed in the first power domain to perform a control operation using the first memory in a normal mode; a sub-controller disposed in the second power domain to perform a control operation using the second memory in a power-saving mode; and a context storage unit to store context information, characterised in that: the first memory and the second memory are both disposed in the second power domain; a power supply to the first power domain is shut off when the normal mode is changed to the power-saving mode; the first memory is set to operate in a self-refresh mode when the normal mode is changed to the power-saving mode; the main controller is arranged to copy central processing unit, CPU, context information, which is lost when shutting off the power supply to the first power domain, into the context storage unit when the normal mode is changed to the power-saving mode; and the main controller is booted using the CPU context information stored in the context storage unit when the power-saving mode is changed to the normal mode; wherein the first and second power domains (PD1, PD2), the first memory, the second memory, the main controller, the sub-controller, and the context storage unit are comprised in a system-on-chip, SoC. the first memory and the second memory are both disposed in the second power domain; a power supply to the first power domain is shut off when the normal mode is changed to the power-saving mode; the first memory is set to operate in a self-refresh mode when the normal mode is changed to the power-saving mode; the main controller is arranged to copy central processing unit, CPU, context information, which is lost when shutting off the power supply to the first power domain, into the context storage unit when the normal mode is changed to the power-saving mode; and the main controller is booted using the CPU context information stored in the context storage unit when the power-saving mode is changed to the normal mode; wherein the first and second power domains (PD1, PD2), the first memory, the second memory, the main controller, the sub-controller, and the context storage unit are comprised in a system-on-chip, SoC.