Deleted Added
full compact
s5_machdep.c (183372) s5_machdep.c (202036)
1/*-
2 * Copyright (c) 2007 Bruce M. Simpson.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2007 Bruce M. Simpson.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/mips/sentry5/s5_machdep.c 183372 2008-09-26 04:45:56Z imp $");
28__FBSDID("$FreeBSD: head/sys/mips/sentry5/s5_machdep.c 202036 2010-01-10 20:09:30Z imp $");
29
30#include <sys/param.h>
31#include <machine/cpuregs.h>
32
33#include <mips/sentry5/s5reg.h>
34
35#include "opt_ddb.h"
36

--- 37 unchanged lines hidden (view full) ---

74#include <machine/sigframe.h>
75#include <machine/trap.h>
76#include <machine/vmparam.h>
77
78#ifdef CFE
79#include <dev/cfe/cfe_api.h>
80#endif
81
29
30#include <sys/param.h>
31#include <machine/cpuregs.h>
32
33#include <mips/sentry5/s5reg.h>
34
35#include "opt_ddb.h"
36

--- 37 unchanged lines hidden (view full) ---

74#include <machine/sigframe.h>
75#include <machine/trap.h>
76#include <machine/vmparam.h>
77
78#ifdef CFE
79#include <dev/cfe/cfe_api.h>
80#endif
81
82#ifdef CFE
83extern uint32_t cfe_handle;
84extern uint32_t cfe_vector;
85#endif
86
87extern int *edata;
88extern int *end;
89
82extern int *edata;
83extern int *end;
84
85void
86platform_cpu_init()
87{
88 /* Nothing special */
89}
90
90static void
91mips_init(void)
92{
93 int i;
94
95 printf("entry: mips_init()\n");
96
97#ifdef CFE

--- 74 unchanged lines hidden (view full) ---

172
173void
174platform_trap_exit(void)
175{
176
177}
178
179void
91static void
92mips_init(void)
93{
94 int i;
95
96 printf("entry: mips_init()\n");
97
98#ifdef CFE

--- 74 unchanged lines hidden (view full) ---

173
174void
175platform_trap_exit(void)
176{
177
178}
179
180void
180platform_start(__register_t a0 __unused, __register_t a1 __unused,
181 __register_t a2 __unused, __register_t a3 __unused)
181platform_start(__register_t a0, __register_t a1, __register_t a2,
182 __register_t a3)
182{
183 vm_offset_t kernend;
184 uint64_t platform_counter_freq;
185
186 /* clear the BSS and SBSS segments */
187 kernend = round_page((vm_offset_t)&end);
188 memset(&edata, 0, kernend - (vm_offset_t)(&edata));
189
183{
184 vm_offset_t kernend;
185 uint64_t platform_counter_freq;
186
187 /* clear the BSS and SBSS segments */
188 kernend = round_page((vm_offset_t)&end);
189 memset(&edata, 0, kernend - (vm_offset_t)(&edata));
190
191 /* Initialize pcpu stuff */
192 mips_pcpu0_init();
193
190#ifdef CFE
191 /*
192 * Initialize CFE firmware trampolines before
193 * we initialize the low-level console.
194#ifdef CFE
195 /*
196 * Initialize CFE firmware trampolines before
197 * we initialize the low-level console.
198 *
199 * CFE passes the following values in registers:
200 * a0: firmware handle
201 * a2: firmware entry point
202 * a3: entry point seal
194 */
203 */
195 if (cfe_handle != 0)
196 cfe_init(cfe_handle, cfe_vector);
204 if (a3 == CFE_EPTSEAL)
205 cfe_init(a0, a2);
197#endif
198 cninit();
199
206#endif
207 cninit();
208
200#ifdef CFE
201 if (cfe_handle == 0)
202 panic("CFE was not detected by locore.\n");
203#endif
204 mips_init();
205
206# if 0
207 /*
208 * Probe the Broadcom Sentry5's on-chip PLL clock registers
209 * and discover the CPU pipeline clock and bus clock
210 * multipliers from this.
211 * XXX: Wrong place. You have to ask the ChipCommon

--- 29 unchanged lines hidden ---
209 mips_init();
210
211# if 0
212 /*
213 * Probe the Broadcom Sentry5's on-chip PLL clock registers
214 * and discover the CPU pipeline clock and bus clock
215 * multipliers from this.
216 * XXX: Wrong place. You have to ask the ChipCommon

--- 29 unchanged lines hidden ---