1/* $NetBSD: Locore.c,v 1.7 2000/08/20 07:04:59 tsubai Exp $ */ 2 3/* 4 * Copyright (C) 1995, 1996 Wolfgang Solfrank. 5 * Copyright (C) 1995, 1996 TooLs GmbH. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 18 unchanged lines hidden (view full) --- 27 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 28 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 29 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 30 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 31 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/dev/ofw/openfirm.c 133862 2004-08-16 15:45:27Z marius $"); |
36/* 37 * Copyright (C) 2000 Benno Rice. 38 * All rights reserved. 39 * 40 * Redistribution and use in source and binary forms, with or without 41 * modification, are permitted provided that the following conditions 42 * are met: 43 * 1. Redistributions of source code must retain the above copyright --- 19 unchanged lines hidden (view full) --- 63#include <sys/kernel.h> 64#include <sys/malloc.h> 65#include <sys/systm.h> 66 67#include <machine/stdarg.h> 68 69#include <dev/ofw/openfirm.h> 70 |
71MALLOC_DEFINE(M_OFWPROP, "openfirm", "Open Firmware properties"); |
72 73static ihandle_t stdin; 74static ihandle_t stdout; 75 76char *OF_buf; 77 78void ofbcopy(const void *, void *, size_t); 79 --- 658 unchanged lines hidden (view full) --- 738 0, 739 }; 740 741 args.bootspec = (cell_t)bootspec; 742 openfirmware(&args); 743 for (;;); /* just in case */ 744} 745 |
746/* Suspend and drop back to the Open Firmware interface. */ |
747void 748OF_enter() 749{ 750 static struct { 751 cell_t name; 752 cell_t nargs; 753 cell_t nreturns; 754 } args = { 755 (cell_t)"enter", 756 0, 757 0 758 }; 759 760 openfirmware(&args); 761 return; /* We may come back. */ 762} 763 |
764/* Shut down and drop back to the Open Firmware interface. */ |
765void 766OF_exit() 767{ 768 static struct { 769 cell_t name; 770 cell_t nargs; 771 cell_t nreturns; 772 } args = { --- 63 unchanged lines hidden --- |