Wed Jun 6 23:50:29 2018 UTC ()
Provide commented out OF_enter() that comes in handy when debugging.


(uwe)
diff -r1.30 -r1.31 src/sys/arch/macppc/stand/ofwboot/Locore.c
diff -r1.7 -r1.8 src/sys/arch/macppc/stand/ofwboot/openfirm.h

cvs diff -r1.30 -r1.31 src/sys/arch/macppc/stand/ofwboot/Locore.c (expand / switch to unified diff)

--- src/sys/arch/macppc/stand/ofwboot/Locore.c 2018/06/06 22:56:25 1.30
+++ src/sys/arch/macppc/stand/ofwboot/Locore.c 2018/06/06 23:50:29 1.31
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: Locore.c,v 1.30 2018/06/06 22:56:25 uwe Exp $ */ 1/* $NetBSD: Locore.c,v 1.31 2018/06/06 23:50:29 uwe Exp $ */
2 2
3/* 3/*
4 * Copyright (C) 1995, 1996 Wolfgang Solfrank. 4 * Copyright (C) 1995, 1996 Wolfgang Solfrank.
5 * Copyright (C) 1995, 1996 TooLs GmbH. 5 * Copyright (C) 1995, 1996 TooLs GmbH.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -169,26 +169,44 @@ openfirmware(void *arg) @@ -169,26 +169,44 @@ openfirmware(void *arg)
169} 169}
170#endif 170#endif
171 171
172static void 172static void
173startup(void *vpd, int res, int (*openfirm)(void *), char *arg, int argl) 173startup(void *vpd, int res, int (*openfirm)(void *), char *arg, int argl)
174{ 174{
175 175
176 openfirmware = openfirm; 176 openfirmware = openfirm;
177 setup(); 177 setup();
178 main(); 178 main();
179 OF_exit(); 179 OF_exit();
180} 180}
181 181
 182#if 0
 183void
 184OF_enter(void)
 185{
 186 static struct {
 187 const char *name;
 188 int nargs;
 189 int nreturns;
 190 } args = {
 191 "enter",
 192 0,
 193 0
 194 };
 195
 196 openfirmware(&args);
 197}
 198#endif /* OF_enter */
 199
182__dead void 200__dead void
183OF_exit(void) 201OF_exit(void)
184{ 202{
185 static struct { 203 static struct {
186 const char *name; 204 const char *name;
187 int nargs; 205 int nargs;
188 int nreturns; 206 int nreturns;
189 } args = { 207 } args = {
190 "exit", 208 "exit",
191 0, 209 0,
192 0 210 0
193 }; 211 };
194 212

cvs diff -r1.7 -r1.8 src/sys/arch/macppc/stand/ofwboot/openfirm.h (expand / switch to unified diff)

--- src/sys/arch/macppc/stand/ofwboot/openfirm.h 2007/12/24 15:46:45 1.7
+++ src/sys/arch/macppc/stand/ofwboot/openfirm.h 2018/06/06 23:50:29 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: openfirm.h,v 1.7 2007/12/24 15:46:45 perry Exp $ */ 1/* $NetBSD: openfirm.h,v 1.8 2018/06/06 23:50:29 uwe Exp $ */
2 2
3/* 3/*
4 * Copyright (C) 1995, 1996 Wolfgang Solfrank. 4 * Copyright (C) 1995, 1996 Wolfgang Solfrank.
5 * Copyright (C) 1995, 1996 TooLs GmbH. 5 * Copyright (C) 1995, 1996 TooLs GmbH.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -29,26 +29,27 @@ @@ -29,26 +29,27 @@
29 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 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 30 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */ 32 */
33/* 33/*
34 * Prototypes for Openfirmware Interface Routines 34 * Prototypes for Openfirmware Interface Routines
35 */ 35 */
36 36
37#include <sys/cdefs.h> 37#include <sys/cdefs.h>
38#include <sys/types.h> 38#include <sys/types.h>
39 39
40#include "boot.h" 40#include "boot.h"
41 41
 42void OF_enter(void);
42__dead void OF_exit(void); 43__dead void OF_exit(void);
43int OF_finddevice(const char *); 44int OF_finddevice(const char *);
44int OF_instance_to_package(int); 45int OF_instance_to_package(int);
45int OF_getprop(int, const char *, void *, int); 46int OF_getprop(int, const char *, void *, int);
46#ifdef __notyet__ 47#ifdef __notyet__
47int OF_setprop(int, const char *, void *, int); 48int OF_setprop(int, const char *, void *, int);
48#endif 49#endif
49int OF_open(const char *); 50int OF_open(const char *);
50void OF_close(int); 51void OF_close(int);
51int OF_write(int, void *, int); 52int OF_write(int, void *, int);
52int OF_read(int, void *, int); 53int OF_read(int, void *, int);
53int OF_seek(int, u_quad_t); 54int OF_seek(int, u_quad_t);
54void *OF_claim(void *, u_int, u_int); 55void *OF_claim(void *, u_int, u_int);