Skip to content

Commit 9353abf

Browse files
akanisettikartben
authored andcommitted
arch: x86: core: reboot_rst_cnt: Enable support for warm reboot
Enable support for warm reboot for x86 arch as per the Reset Control Register description. Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
1 parent 11083fc commit 9353abf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

arch/x86/core/reboot_rst_cnt.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,22 @@ static inline void cold_reboot(void)
2727
sys_out8(reset_value, X86_RST_CNT_REG);
2828
}
2929

30+
static inline void warm_reboot(void)
31+
{
32+
uint8_t reset_value = X86_RST_CNT_CPU_RST | X86_RST_CNT_SYS_RST;
33+
34+
sys_out8(reset_value, X86_RST_CNT_REG);
35+
}
36+
3037
void __weak sys_arch_reboot(int type)
3138
{
3239
switch (type) {
3340
case SYS_REBOOT_COLD:
3441
cold_reboot();
3542
break;
43+
case SYS_REBOOT_WARM:
44+
warm_reboot();
45+
break;
3646
default:
3747
/* do nothing */
3848
break;

0 commit comments

Comments
 (0)