Skip to content
Browse files

arch/x86: relocate and rename SYS_X86_RST_* constants

These constants do not need global exposure, as they're only
referenced in the reboot API implementation. Also their names
are trimmed to fit into the X86-arch-specific namespace.

Signed-off-by: Charles E. Youse <>
  • Loading branch information...
Charles E. Youse authored and andrewboie committed Jun 23, 2019
1 parent 4bdbd87 commit ef736f77c269f179b25b3e7408e8e22a755bf2b7
Showing with 10 additions and 10 deletions.
  1. +10 −3 arch/x86/core/reboot_rst_cnt.c
  2. +0 −7 include/arch/x86/arch.h
@@ -13,11 +13,18 @@
#include <kernel.h>
#include <misc/reboot.h>

/* reboot through Reset Control Register (I/O port 0xcf9) */

#define X86_RST_CNT_REG 0xcf9
#define X86_RST_CNT_SYS_RST 0x02
#define X86_RST_CNT_CPU_RST 0x4
#define X86_RST_CNT_FULL_RST 0x08

static inline void cold_reboot(void)
u8_t reset_value = SYS_X86_RST_CNT_CPU_RST | SYS_X86_RST_CNT_SYS_RST |
sys_out8(reset_value, SYS_X86_RST_CNT_REG);
u8_t reset_value = X86_RST_CNT_CPU_RST | X86_RST_CNT_SYS_RST |
sys_out8(reset_value, X86_RST_CNT_REG);

void sys_arch_reboot(int type)
@@ -678,13 +678,6 @@ void z_x86_reset_pages(void *start, size_t size);

#endif /* !_ASMLANGUAGE */

/* reboot through Reset Control Register (I/O port 0xcf9) */

#define SYS_X86_RST_CNT_REG 0xcf9
#define SYS_X86_RST_CNT_SYS_RST 0x02
#define SYS_X86_RST_CNT_CPU_RST 0x4
#define SYS_X86_RST_CNT_FULL_RST 0x08

#ifdef __cplusplus

0 comments on commit ef736f7

Please sign in to comment.
You can’t perform that action at this time.