11.5Sjoerg/*	$NetBSD: biosreboot.S,v 1.5 2011/06/16 13:27:59 joerg Exp $	*/
21.1Sperry
31.1Sperry/*
41.1Sperry * Copyright (c) 1997
51.1Sperry * 	Perry E. Metzger.  All rights reserved.
61.1Sperry *
71.1Sperry * Redistribution and use in source and binary forms, with or without
81.1Sperry * modification, are permitted provided that the following conditions
91.1Sperry * are met:
101.1Sperry * 1. Redistributions of source code must retain the above copyright
111.1Sperry *    notice, this list of conditions and the following disclaimer.
121.1Sperry * 2. Redistributions in binary form must reproduce the above copyright
131.1Sperry *    notice, this list of conditions and the following disclaimer in the
141.1Sperry *    documentation and/or other materials provided with the distribution.
151.1Sperry * 3. All advertising materials mentioning features or use of this software
161.1Sperry *    must display the following acknowledgements:
171.1Sperry *	This product includes software developed for the NetBSD Project
181.1Sperry *	by Perry E. Metzger.
191.1Sperry * 4. The names of the authors may not be used to endorse or promote products
201.1Sperry *    derived from this software without specific prior written permission.
211.1Sperry *
221.1Sperry * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
231.1Sperry * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
241.1Sperry * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
251.1Sperry * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
261.1Sperry * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
271.1Sperry * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
281.1Sperry * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
291.1Sperry * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
301.1Sperry * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
311.1Sperry * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
321.1Sperry *
331.1Sperry */
341.3Sjunyoung
351.1Sperry
361.1Sperry#include <machine/asm.h>
371.1Sperry
381.1Sperry	.text
391.1Sperry
401.1Sperry/* Call INT 19 to do the equivalent of CTL-ALT-DEL */
411.1Sperry
421.1SperryENTRY(reboot)
431.5Sjoerg	pusha
441.1Sperry
451.1Sperry	call	_C_LABEL(prot_to_real)
461.2Sdsl	.code16
471.1Sperry
481.1Sperry	int	$0x19
491.1Sperry
501.1Sperry	/* NOTE: We should never even get past this point. */
511.3Sjunyoung
521.2Sdsl	calll	_C_LABEL(real_to_prot)
531.2Sdsl	.code32
541.1Sperry
551.5Sjoerg	movl	%ebx, 28(%esp)
561.5Sjoerg	popa
571.1Sperry	ret
58