Annotation of sys/arch/hppa64/stand/boot/exec.c, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: exec.c,v 1.1 2005/04/01 10:40:48 mickey Exp $ */
2:
3: /*
4: * Copyright (c) 2005 Michael Shalayeff
5: * All rights reserved.
6: *
7: * Permission to use, copy, modify, and distribute this software for any
8: * purpose with or without fee is hereby granted, provided that the above
9: * copyright notice and this permission notice appear in all copies.
10: *
11: * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12: * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13: * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14: * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15: * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
16: * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
17: * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18: */
19:
20: #include <sys/param.h>
21: #include <machine/pdc.h>
22: #include "libsa.h"
23: #include <lib/libsa/loadfile.h>
24: #include <stand/boot/bootarg.h>
25: #include "dev_hppa64.h"
26:
27: typedef void (*startfuncp)(int, int, int, int, int, int, caddr_t)
28: __attribute__ ((noreturn));
29:
30: void
31: run_loadfile(u_long *marks, int howto)
32: {
33: fcacheall();
34:
35: __asm("mtctl %r0, %cr17");
36: __asm("mtctl %r0, %cr17");
37: /* stack and the gung is ok at this point, so, no need for asm setup */
38: (*(startfuncp)(marks[MARK_ENTRY]))((int)(long)(long)pdc, howto, bootdev,
39: marks[MARK_END], BOOTARG_APIVER, BOOTARG_LEN, (caddr_t)BOOTARG_OFF);
40:
41: /* not reached */
42: }
CVSweb