root / hw / watchdog.h @ 15a1956a
History | View | Annotate | Download (2.2 kB)
1 | 9dd986cc | Richard W.M. Jones | /*
|
---|---|---|---|
2 | 9dd986cc | Richard W.M. Jones | * Virtual hardware watchdog.
|
3 | 9dd986cc | Richard W.M. Jones | *
|
4 | 9dd986cc | Richard W.M. Jones | * Copyright (C) 2009 Red Hat Inc.
|
5 | 9dd986cc | Richard W.M. Jones | *
|
6 | 9dd986cc | Richard W.M. Jones | * This program is free software; you can redistribute it and/or
|
7 | 9dd986cc | Richard W.M. Jones | * modify it under the terms of the GNU General Public License
|
8 | 9dd986cc | Richard W.M. Jones | * as published by the Free Software Foundation; either version 2
|
9 | 9dd986cc | Richard W.M. Jones | * of the License, or (at your option) any later version.
|
10 | 9dd986cc | Richard W.M. Jones | *
|
11 | 9dd986cc | Richard W.M. Jones | * This program is distributed in the hope that it will be useful,
|
12 | 9dd986cc | Richard W.M. Jones | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | 9dd986cc | Richard W.M. Jones | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 | 9dd986cc | Richard W.M. Jones | * GNU General Public License for more details.
|
15 | 9dd986cc | Richard W.M. Jones | *
|
16 | 9dd986cc | Richard W.M. Jones | * You should have received a copy of the GNU General Public License
|
17 | 9dd986cc | Richard W.M. Jones | * along with this program; if not, write to the Free Software
|
18 | 9dd986cc | Richard W.M. Jones | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
19 | 9dd986cc | Richard W.M. Jones | * USA.
|
20 | 9dd986cc | Richard W.M. Jones | *
|
21 | 9dd986cc | Richard W.M. Jones | * By Richard W.M. Jones (rjones@redhat.com).
|
22 | 9dd986cc | Richard W.M. Jones | */
|
23 | 9dd986cc | Richard W.M. Jones | |
24 | 9dd986cc | Richard W.M. Jones | #ifndef QEMU_WATCHDOG_H
|
25 | 9dd986cc | Richard W.M. Jones | #define QEMU_WATCHDOG_H
|
26 | 9dd986cc | Richard W.M. Jones | |
27 | 9dd986cc | Richard W.M. Jones | extern void wdt_i6300esb_init(void); |
28 | 9dd986cc | Richard W.M. Jones | extern void wdt_ib700_init(void); |
29 | 9dd986cc | Richard W.M. Jones | |
30 | 9dd986cc | Richard W.M. Jones | /* Possible values for action parameter. */
|
31 | 9dd986cc | Richard W.M. Jones | #define WDT_RESET 1 /* Hard reset. */ |
32 | 9dd986cc | Richard W.M. Jones | #define WDT_SHUTDOWN 2 /* Shutdown. */ |
33 | 9dd986cc | Richard W.M. Jones | #define WDT_POWEROFF 3 /* Quit. */ |
34 | 9dd986cc | Richard W.M. Jones | #define WDT_PAUSE 4 /* Pause. */ |
35 | 9dd986cc | Richard W.M. Jones | #define WDT_DEBUG 5 /* Prints a message and continues running. */ |
36 | 9dd986cc | Richard W.M. Jones | #define WDT_NONE 6 /* Do nothing. */ |
37 | 9dd986cc | Richard W.M. Jones | |
38 | 9dd986cc | Richard W.M. Jones | struct WatchdogTimerModel {
|
39 | 9dd986cc | Richard W.M. Jones | LIST_ENTRY(WatchdogTimerModel) entry; |
40 | 9dd986cc | Richard W.M. Jones | |
41 | 9dd986cc | Richard W.M. Jones | /* Short name of the device - used to select it on the command line. */
|
42 | 9dd986cc | Richard W.M. Jones | const char *wdt_name; |
43 | 9dd986cc | Richard W.M. Jones | /* Longer description (eg. manufacturer and full model number). */
|
44 | 9dd986cc | Richard W.M. Jones | const char *wdt_description; |
45 | 9dd986cc | Richard W.M. Jones | |
46 | 9dd986cc | Richard W.M. Jones | /* This callback should create/register the device. It is called
|
47 | 9dd986cc | Richard W.M. Jones | * indirectly from hw/pc.c when the virtual PC is being set up.
|
48 | 9dd986cc | Richard W.M. Jones | */
|
49 | 9dd986cc | Richard W.M. Jones | void (*wdt_pc_init)(PCIBus *pci_bus);
|
50 | 9dd986cc | Richard W.M. Jones | }; |
51 | 9dd986cc | Richard W.M. Jones | typedef struct WatchdogTimerModel WatchdogTimerModel; |
52 | 9dd986cc | Richard W.M. Jones | |
53 | 9dd986cc | Richard W.M. Jones | /* in vl.c */
|
54 | 9dd986cc | Richard W.M. Jones | extern WatchdogTimerModel *watchdog;
|
55 | 9dd986cc | Richard W.M. Jones | extern int watchdog_action; |
56 | 9dd986cc | Richard W.M. Jones | |
57 | 9dd986cc | Richard W.M. Jones | /* in hw/watchdog.c */
|
58 | 9dd986cc | Richard W.M. Jones | extern int select_watchdog(const char *p); |
59 | 9dd986cc | Richard W.M. Jones | extern int select_watchdog_action(const char *action); |
60 | 9dd986cc | Richard W.M. Jones | extern void watchdog_add_model(WatchdogTimerModel *model); |
61 | 9dd986cc | Richard W.M. Jones | extern void watchdog_perform_action(void); |
62 | 9dd986cc | Richard W.M. Jones | extern void watchdog_pc_init(PCIBus *pci_bus); |
63 | 9dd986cc | Richard W.M. Jones | extern void register_watchdogs(void); |
64 | 9dd986cc | Richard W.M. Jones | |
65 | 9dd986cc | Richard W.M. Jones | #endif /* QEMU_WATCHDOG_H */ |