Deleted Added
full compact
malta_machdep.c (249589) malta_machdep.c (255088)
1/*-
2 * Copyright (c) 2006 Wojciech A. Koszek <wkoszek@FreeBSD.org>
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 *
1/*-
2 * Copyright (c) 2006 Wojciech A. Koszek <wkoszek@FreeBSD.org>
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 * $FreeBSD: head/sys/mips/malta/malta_machdep.c 249589 2013-04-17 18:26:01Z adrian $
26 * $FreeBSD: head/sys/mips/malta/malta_machdep.c 255088 2013-08-31 01:24:05Z gonzo $
27 */
28#include <sys/cdefs.h>
27 */
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/mips/malta/malta_machdep.c 249589 2013-04-17 18:26:01Z adrian $");
29__FBSDID("$FreeBSD: head/sys/mips/malta/malta_machdep.c 255088 2013-08-31 01:24:05Z gonzo $");
30
31#include "opt_ddb.h"
32
33#include <sys/param.h>
34#include <sys/conf.h>
35#include <sys/kernel.h>
36#include <sys/systm.h>
37#include <sys/imgact.h>

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

264
265void
266platform_start(__register_t a0, __register_t a1, __register_t a2,
267 __register_t a3)
268{
269 vm_offset_t kernend;
270 uint64_t platform_counter_freq;
271 int argc = a0;
30
31#include "opt_ddb.h"
32
33#include <sys/param.h>
34#include <sys/conf.h>
35#include <sys/kernel.h>
36#include <sys/systm.h>
37#include <sys/imgact.h>

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

264
265void
266platform_start(__register_t a0, __register_t a1, __register_t a2,
267 __register_t a3)
268{
269 vm_offset_t kernend;
270 uint64_t platform_counter_freq;
271 int argc = a0;
272 char **argv = (char **)a1;
273 char **envp = (char **)a2;
272 int32_t *argv = (int32_t*)a1;
273 int32_t *envp = (int32_t*)a2;
274 unsigned int memsize = a3;
275 int i;
276
277 /* clear the BSS and SBSS segments */
278 kernend = (vm_offset_t)&end;
279 memset(&edata, 0, kernend - (vm_offset_t)(&edata));
280
281 mips_postboot_fixup();
282
283 mips_pcpu0_init();
284 platform_counter_freq = malta_cpu_freq();
285 mips_timer_early_init(platform_counter_freq);
286 init_static_kenv(boot1_env, sizeof(boot1_env));
287
288 cninit();
289 printf("entry: platform_start()\n");
290
291 bootverbose = 1;
274 unsigned int memsize = a3;
275 int i;
276
277 /* clear the BSS and SBSS segments */
278 kernend = (vm_offset_t)&end;
279 memset(&edata, 0, kernend - (vm_offset_t)(&edata));
280
281 mips_postboot_fixup();
282
283 mips_pcpu0_init();
284 platform_counter_freq = malta_cpu_freq();
285 mips_timer_early_init(platform_counter_freq);
286 init_static_kenv(boot1_env, sizeof(boot1_env));
287
288 cninit();
289 printf("entry: platform_start()\n");
290
291 bootverbose = 1;
292 /*
293 * YAMON uses 32bit pointers to strings so
294 * convert them to proper type manually
295 */
292 if (bootverbose) {
293 printf("cmd line: ");
294 for (i = 0; i < argc; i++)
296 if (bootverbose) {
297 printf("cmd line: ");
298 for (i = 0; i < argc; i++)
295 printf("%s ", argv[i]);
299 printf("%s ", (char*)(intptr_t)argv[i]);
296 printf("\n");
297
298 printf("envp:\n");
299 for (i = 0; envp[i]; i += 2)
300 printf("\n");
301
302 printf("envp:\n");
303 for (i = 0; envp[i]; i += 2)
300 printf("\t%s = %s\n", envp[i], envp[i+1]);
304 printf("\t%s = %s\n", (char*)(intptr_t)envp[i],
305 (char*)(intptr_t)envp[i+1]);
301
302 printf("memsize = %08x\n", memsize);
303 }
304
305 realmem = btoc(memsize);
306 mips_init();
307
308 mips_timer_init_params(platform_counter_freq, 0);
309}
306
307 printf("memsize = %08x\n", memsize);
308 }
309
310 realmem = btoc(memsize);
311 mips_init();
312
313 mips_timer_init_params(platform_counter_freq, 0);
314}