zephyr/arch/x86/core/reboot_rst_cnt.c
Kumar Gala bf53ebf2c8 arch: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.  There are few places we dont convert over to the new
types because of compatiability with ext/HALs or for ease of transition
at this point.  Fixup a few of the PRI formatters so we build with newlib.

Jira: ZEP-2051

Change-Id: I7d2d3697cad04f20aaa8f6e77228f502cd9c8286
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 12:08:12 +00:00

34 lines
587 B
C

/*
* Copyright (c) 2015 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file x86-specific reboot functionalities
*
* @details Implements the required 'arch' sub-APIs.
*/
#include <kernel.h>
#include <misc/reboot.h>
static inline void cold_reboot(void)
{
u8_t reset_value = SYS_X86_RST_CNT_CPU_RST | SYS_X86_RST_CNT_SYS_RST |
SYS_X86_RST_CNT_FULL_RST;
sys_out8(reset_value, SYS_X86_RST_CNT_REG);
}
void sys_arch_reboot(int type)
{
switch (type) {
case SYS_REBOOT_COLD:
cold_reboot();
break;
default:
/* do nothing */
break;
}
}