1*36105be2Sjmcneill /* $NetBSD: panic.c,v 1.1 2018/08/24 02:01:06 jmcneill Exp $ */
2*36105be2Sjmcneill
3*36105be2Sjmcneill /*-
4*36105be2Sjmcneill * Copyright (c) 2016 Kimihiro Nonaka <nonaka@netbsd.org>
5*36105be2Sjmcneill * All rights reserved.
6*36105be2Sjmcneill *
7*36105be2Sjmcneill * Redistribution and use in source and binary forms, with or without
8*36105be2Sjmcneill * modification, are permitted provided that the following conditions
9*36105be2Sjmcneill * are met:
10*36105be2Sjmcneill * 1. Redistributions of source code must retain the above copyright
11*36105be2Sjmcneill * notice, this list of conditions and the following disclaimer.
12*36105be2Sjmcneill * 2. Redistributions in binary form must reproduce the above copyright
13*36105be2Sjmcneill * notice, this list of conditions and the following disclaimer in the
14*36105be2Sjmcneill * documentation and/or other materials provided with the distribution.
15*36105be2Sjmcneill *
16*36105be2Sjmcneill * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17*36105be2Sjmcneill * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18*36105be2Sjmcneill * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19*36105be2Sjmcneill * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20*36105be2Sjmcneill * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21*36105be2Sjmcneill * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22*36105be2Sjmcneill * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23*36105be2Sjmcneill * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24*36105be2Sjmcneill * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25*36105be2Sjmcneill * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26*36105be2Sjmcneill * SUCH DAMAGE.
27*36105be2Sjmcneill */
28*36105be2Sjmcneill
29*36105be2Sjmcneill #include "efiboot.h"
30*36105be2Sjmcneill
31*36105be2Sjmcneill __dead void
reboot(void)32*36105be2Sjmcneill reboot(void)
33*36105be2Sjmcneill {
34*36105be2Sjmcneill
35*36105be2Sjmcneill uefi_call_wrapper(RT->ResetSystem, 4, EfiResetCold, EFI_SUCCESS,
36*36105be2Sjmcneill 0, NULL);
37*36105be2Sjmcneill for (;;)
38*36105be2Sjmcneill continue;
39*36105be2Sjmcneill }
40*36105be2Sjmcneill
41*36105be2Sjmcneill __dead void
_rtt(void)42*36105be2Sjmcneill _rtt(void)
43*36105be2Sjmcneill {
44*36105be2Sjmcneill
45*36105be2Sjmcneill reboot();
46*36105be2Sjmcneill }
47