1*65052cacSmlarkin /* $OpenBSD: hibernate.h,v 1.3 2018/06/21 07:33:30 mlarkin Exp $ */ 23fc8f127Spirofti 33fc8f127Spirofti /* 43fc8f127Spirofti * Copyright (c) 2013 Paul Irofti. 53fc8f127Spirofti * 63fc8f127Spirofti * Permission to use, copy, modify, and distribute this software for any 73fc8f127Spirofti * purpose with or without fee is hereby granted, provided that the above 83fc8f127Spirofti * copyright notice and this permission notice appear in all copies. 93fc8f127Spirofti * 103fc8f127Spirofti * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 113fc8f127Spirofti * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 123fc8f127Spirofti * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 133fc8f127Spirofti * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 143fc8f127Spirofti * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 153fc8f127Spirofti * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 163fc8f127Spirofti * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 173fc8f127Spirofti */ 183fc8f127Spirofti 193fc8f127Spirofti 203fc8f127Spirofti #include <machine/hibernate_var.h> 213fc8f127Spirofti 223fc8f127Spirofti /* Loongson hibernate support structures and functions */ 233fc8f127Spirofti 243fc8f127Spirofti int get_hibernate_info_md(union hibernate_info *); 253fc8f127Spirofti void hibernate_flush(void); 263fc8f127Spirofti void hibernate_enter_resume_mapping(vaddr_t, paddr_t, int); 273fc8f127Spirofti int hibernate_inflate_skip(union hibernate_info *, paddr_t); 283fc8f127Spirofti int hibernate_suspend(void); 293fc8f127Spirofti void hibernate_switch_stack_machdep(void); 30*65052cacSmlarkin void hibernate_resume_machdep(vaddr_t); 313fc8f127Spirofti void hibernate_activate_resume_pt_machdep(void); 323fc8f127Spirofti void hibernate_enable_intr_machdep(void); 333fc8f127Spirofti void hibernate_disable_intr_machdep(void); 34