summaryrefslogtreecommitdiff
path: root/src/arch/x86/include/cf9_reset.h
blob: 51f89504d28bcd13e6d36af4fbf0591649899d8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* SPDX-License-Identifier: GPL-2.0-only */

#ifndef X86_CF9_RESET_H
#define X86_CF9_RESET_H

/* Reset control port */
#define RST_CNT			0xcf9
#define FULL_RST		(1 << 3)
#define RST_CPU			(1 << 2)
#define SYS_RST			(1 << 1)

/* Implement the bare reset, i.e. write to cf9. */
void do_system_reset(void);
void do_full_reset(void);

/* Called by functions below before reset. */
#if CONFIG(HAVE_CF9_RESET_PREPARE)
void cf9_reset_prepare(void);
#else
static inline void cf9_reset_prepare(void) {}
#endif

/* Prepare for reset, run do_*_reset(), halt. */
__noreturn void system_reset(void);
__noreturn void full_reset(void);

#endif	/* X86_CF9_RESET_H */