Tue Mar 30 01:47:45 2021 UTC ()
Remove unused "startkernel" argument for openbios_board_init().


(rin)
diff -r1.23 -r1.24 src/sys/arch/evbppc/obs405/obs266_machdep.c
diff -r1.5 -r1.6 src/sys/arch/powerpc/ibm4xx/openbios/openbios.c
diff -r1.2 -r1.3 src/sys/arch/powerpc/include/ibm4xx/openbios.h

cvs diff -r1.23 -r1.24 src/sys/arch/evbppc/obs405/obs266_machdep.c (expand / switch to unified diff)

--- src/sys/arch/evbppc/obs405/obs266_machdep.c 2021/03/30 01:33:50 1.23
+++ src/sys/arch/evbppc/obs405/obs266_machdep.c 2021/03/30 01:47:44 1.24
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: obs266_machdep.c,v 1.23 2021/03/30 01:33:50 rin Exp $ */ 1/* $NetBSD: obs266_machdep.c,v 1.24 2021/03/30 01:47:44 rin Exp $ */
2/* Original: md_machdep.c,v 1.3 2005/01/24 18:47:37 shige Exp $ */ 2/* Original: md_machdep.c,v 1.3 2005/01/24 18:47:37 shige Exp $ */
3 3
4/* 4/*
5 * Copyright 2001, 2002 Wasabi Systems, Inc. 5 * Copyright 2001, 2002 Wasabi Systems, Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc. 8 * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -58,27 +58,27 @@ @@ -58,27 +58,27 @@
58 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 58 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
59 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 59 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
60 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 60 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
61 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 61 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
62 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 62 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
63 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 63 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
64 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 64 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
65 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 65 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
66 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 66 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
67 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 67 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
68 */ 68 */
69 69
70#include <sys/cdefs.h> 70#include <sys/cdefs.h>
71__KERNEL_RCSID(0, "$NetBSD: obs266_machdep.c,v 1.23 2021/03/30 01:33:50 rin Exp $"); 71__KERNEL_RCSID(0, "$NetBSD: obs266_machdep.c,v 1.24 2021/03/30 01:47:44 rin Exp $");
72 72
73#include "opt_compat_netbsd.h" 73#include "opt_compat_netbsd.h"
74#include "opt_ddb.h" 74#include "opt_ddb.h"
75 75
76#include <sys/param.h> 76#include <sys/param.h>
77#include <sys/kernel.h> 77#include <sys/kernel.h>
78#include <sys/ksyms.h> 78#include <sys/ksyms.h>
79#include <sys/mount.h> 79#include <sys/mount.h>
80#include <sys/reboot.h> 80#include <sys/reboot.h>
81#include <sys/systm.h> 81#include <sys/systm.h>
82#include <sys/device.h> 82#include <sys/device.h>
83#include <sys/module.h> 83#include <sys/module.h>
84#include <sys/bus.h> 84#include <sys/bus.h>
@@ -121,27 +121,27 @@ __KERNEL_RCSID(0, "$NetBSD: obs266_machd @@ -121,27 +121,27 @@ __KERNEL_RCSID(0, "$NetBSD: obs266_machd
121#endif /* NCOM */ 121#endif /* NCOM */
122 122
123#define TLB_PG_SIZE (16*1024*1024) 123#define TLB_PG_SIZE (16*1024*1024)
124 124
125void initppc(vaddr_t, vaddr_t, char *, void *); 125void initppc(vaddr_t, vaddr_t, char *, void *);
126 126
127void 127void
128initppc(vaddr_t startkernel, vaddr_t endkernel, char *args, void *info_block) 128initppc(vaddr_t startkernel, vaddr_t endkernel, char *args, void *info_block)
129{ 129{
130 vaddr_t va; 130 vaddr_t va;
131 u_int memsize; 131 u_int memsize;
132 132
133 /* Setup board from OpenBIOS */ 133 /* Setup board from OpenBIOS */
134 openbios_board_init(info_block, startkernel); 134 openbios_board_init(info_block);
135 memsize = openbios_board_memsize_get(); 135 memsize = openbios_board_memsize_get();
136 136
137 /* Linear map kernel memory */ 137 /* Linear map kernel memory */
138 for (va = 0; va < endkernel; va += TLB_PG_SIZE) 138 for (va = 0; va < endkernel; va += TLB_PG_SIZE)
139 ppc4xx_tlb_reserve(va, va, TLB_PG_SIZE, TLB_EX); 139 ppc4xx_tlb_reserve(va, va, TLB_PG_SIZE, TLB_EX);
140 140
141 /* Map console after RAM (see pmap_tlbmiss()) */ 141 /* Map console after RAM (see pmap_tlbmiss()) */
142 ppc4xx_tlb_reserve(CONADDR, roundup(memsize, TLB_PG_SIZE), TLB_PG_SIZE, 142 ppc4xx_tlb_reserve(CONADDR, roundup(memsize, TLB_PG_SIZE), TLB_PG_SIZE,
143 TLB_I | TLB_G); 143 TLB_I | TLB_G);
144 144
145 /* Initialize IBM405GPr CPU */ 145 /* Initialize IBM405GPr CPU */
146 ibm40x_memsize_init(memsize, startkernel); 146 ibm40x_memsize_init(memsize, startkernel);
147 ibm4xx_init(startkernel, endkernel, pic_ext_intr); 147 ibm4xx_init(startkernel, endkernel, pic_ext_intr);

cvs diff -r1.5 -r1.6 src/sys/arch/powerpc/ibm4xx/openbios/openbios.c (expand / switch to unified diff)

--- src/sys/arch/powerpc/ibm4xx/openbios/openbios.c 2011/06/18 06:41:42 1.5
+++ src/sys/arch/powerpc/ibm4xx/openbios/openbios.c 2021/03/30 01:47:45 1.6
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: openbios.c,v 1.5 2011/06/18 06:41:42 matt Exp $ */ 1/* $NetBSD: openbios.c,v 1.6 2021/03/30 01:47:45 rin Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2004 Shigeyuki Fukushima. 4 * Copyright (c) 2004 Shigeyuki Fukushima.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above 12 * 2. Redistributions in binary form must reproduce the above
13 * copyright notice, this list of conditions and the following 13 * copyright notice, this list of conditions and the following
14 * disclaimer in the documentation and/or other materials provided 14 * disclaimer in the documentation and/or other materials provided
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 23 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
24 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
26 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32 32
33#include <sys/cdefs.h> 33#include <sys/cdefs.h>
34__KERNEL_RCSID(0, "$NetBSD: openbios.c,v 1.5 2011/06/18 06:41:42 matt Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: openbios.c,v 1.6 2021/03/30 01:47:45 rin Exp $");
35 35
36#include <sys/param.h> 36#include <sys/param.h>
37#include <sys/systm.h> 37#include <sys/systm.h>
38#include <sys/cpu.h> 38#include <sys/cpu.h>
39 39
40#include <powerpc/ibm4xx/cpu.h> 40#include <powerpc/ibm4xx/cpu.h>
41#include <powerpc/ibm4xx/openbios.h> 41#include <powerpc/ibm4xx/openbios.h>
42 42
43/* 43/*
44 * Board configuration structure from the OpenBIOS. 44 * Board configuration structure from the OpenBIOS.
45 * 45 *
46 * Supported (XXX): 46 * Supported (XXX):
47 * 405GPr 1.2 ROM Monitor (5/25/02) 47 * 405GPr 1.2 ROM Monitor (5/25/02)
@@ -50,27 +50,27 @@ struct board_bios_data { @@ -50,27 +50,27 @@ struct board_bios_data {
50 unsigned char usr_config_ver[4]; 50 unsigned char usr_config_ver[4];
51 unsigned char rom_sw_ver[30]; 51 unsigned char rom_sw_ver[30];
52 unsigned int mem_size; 52 unsigned int mem_size;
53 unsigned char mac_address_local[6]; 53 unsigned char mac_address_local[6];
54 unsigned char mac_address_pci[6]; 54 unsigned char mac_address_pci[6];
55 unsigned int processor_speed; 55 unsigned int processor_speed;
56 unsigned int plb_speed; 56 unsigned int plb_speed;
57 unsigned int pci_speed; 57 unsigned int pci_speed;
58}; 58};
59 59
60static struct board_bios_data board_bios; 60static struct board_bios_data board_bios;
61 61
62void 62void
63openbios_board_init(void *info_block, u_int startkernel) 63openbios_board_init(void *info_block)
64{ 64{
65 65
66 /* Initialize cache info for memcpy, etc. */ 66 /* Initialize cache info for memcpy, etc. */
67 cpu_probe_cache(); 67 cpu_probe_cache();
68 68
69 /* Save info block */ 69 /* Save info block */
70 memcpy(&board_bios, info_block, sizeof(board_bios)); 70 memcpy(&board_bios, info_block, sizeof(board_bios));
71} 71}
72 72
73unsigned int 73unsigned int
74openbios_board_memsize_get(void) 74openbios_board_memsize_get(void)
75{ 75{
76 return board_bios.mem_size; 76 return board_bios.mem_size;

cvs diff -r1.2 -r1.3 src/sys/arch/powerpc/include/ibm4xx/openbios.h (expand / switch to unified diff)

--- src/sys/arch/powerpc/include/ibm4xx/openbios.h 2005/12/11 12:18:43 1.2
+++ src/sys/arch/powerpc/include/ibm4xx/openbios.h 2021/03/30 01:47:45 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: openbios.h,v 1.2 2005/12/11 12:18:43 christos Exp $ */ 1/* $NetBSD: openbios.h,v 1.3 2021/03/30 01:47:45 rin Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2004 Shigeyuki Fukushima. 4 * Copyright (c) 2004 Shigeyuki Fukushima.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above 12 * 2. Redistributions in binary form must reproduce the above
13 * copyright notice, this list of conditions and the following 13 * copyright notice, this list of conditions and the following
14 * disclaimer in the documentation and/or other materials provided 14 * disclaimer in the documentation and/or other materials provided
@@ -25,19 +25,19 @@ @@ -25,19 +25,19 @@
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
26 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32 32
33#ifndef _IBM4XX_OPENBIOS_H_ 33#ifndef _IBM4XX_OPENBIOS_H_
34#define _IBM4XX_OPENBIOS_H_ 34#define _IBM4XX_OPENBIOS_H_
35 35
36#include <sys/param.h> 36#include <sys/param.h>
37 37
38extern void openbios_board_init(void *, u_int); 38extern void openbios_board_init(void *);
39extern unsigned int openbios_board_memsize_get(void); 39extern unsigned int openbios_board_memsize_get(void);
40extern void openbios_board_info_set(void); 40extern void openbios_board_info_set(void);
41extern void openbios_board_print(void); 41extern void openbios_board_print(void);
42 42
43#endif /* _IBM4XX_OPENBIOS_H_ */ 43#endif /* _IBM4XX_OPENBIOS_H_ */