coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
cf9_reset.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <arch/io.h>
4 #include <arch/cache.h>
5 #include <cf9_reset.h>
6 #include <console/console.h>
7 #include <halt.h>
8 
9 /*
10  * A system reset in terms of the CF9 register asserts the INIT#
11  * signal to reset the CPU along the PLTRST# signal to reset other
12  * board components. It is usually the hardest reset type that
13  * does not power cycle the board. Thus, it could be called a
14  * "warm reset".
15  */
16 void do_system_reset(void)
17 {
21 }
22 
23 /*
24  * A full reset in terms of the CF9 register triggers a power cycle
25  * (i.e. S0 -> S5 -> S0 transition). Thus, it could be called a
26  * "cold reset".
27  * Note: Not all x86 implementations comply with this definition,
28  * some may require additional configuration to power cycle.
29  */
30 void do_full_reset(void)
31 {
35 }
36 
37 void system_reset(void)
38 {
39  printk(BIOS_INFO, "%s() called!\n", __func__);
42  halt();
43 }
44 
45 void full_reset(void)
46 {
47  printk(BIOS_INFO, "%s() called!\n", __func__);
49  do_full_reset();
50  halt();
51 }
void dcache_clean_all(void)
Definition: cache.c:14
void full_reset(void)
Definition: cf9_reset.c:45
void do_full_reset(void)
Definition: cf9_reset.c:30
void system_reset(void)
Definition: cf9_reset.c:37
void do_system_reset(void)
Definition: cf9_reset.c:16
#define RST_CNT
Definition: cf9_reset.h:7
#define SYS_RST
Definition: cf9_reset.h:10
#define FULL_RST
Definition: cf9_reset.h:8
#define RST_CPU
Definition: cf9_reset.h:9
static void cf9_reset_prepare(void)
Definition: cf9_reset.h:20
#define printk(level,...)
Definition: stdlib.h:16
void outb(u8 val, u16 port)
void __noreturn halt(void)
halt the system reliably
Definition: halt.c:6
#define BIOS_INFO
BIOS_INFO - Expected events.
Definition: loglevel.h:113