Deleted Added
full compact
pxa_machdep.c (194784) pxa_machdep.c (217688)
1/* $NetBSD: hpc_machdep.c,v 1.70 2003/09/16 08:18:22 agc Exp $ */
2
3/*-
4 * Copyright (c) 1994-1998 Mark Brinicombe.
5 * Copyright (c) 1994 Brini.
6 * All rights reserved.
7 *
8 * This code is derived from software written for Brini by Mark Brinicombe

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

40 *
41 * Machine dependant functions for kernel setup
42 *
43 * This file needs a lot of work.
44 *
45 * Created : 17/09/94
46 */
47
1/* $NetBSD: hpc_machdep.c,v 1.70 2003/09/16 08:18:22 agc Exp $ */
2
3/*-
4 * Copyright (c) 1994-1998 Mark Brinicombe.
5 * Copyright (c) 1994 Brini.
6 * All rights reserved.
7 *
8 * This code is derived from software written for Brini by Mark Brinicombe

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

40 *
41 * Machine dependant functions for kernel setup
42 *
43 * This file needs a lot of work.
44 *
45 * Created : 17/09/94
46 */
47
48#include "opt_msgbuf.h"
49#include "opt_ddb.h"
50
51#include <sys/cdefs.h>
48#include "opt_ddb.h"
49
50#include <sys/cdefs.h>
52__FBSDID("$FreeBSD: head/sys/arm/xscale/pxa/pxa_machdep.c 194784 2009-06-23 22:42:39Z jeff $");
51__FBSDID("$FreeBSD: head/sys/arm/xscale/pxa/pxa_machdep.c 217688 2011-01-21 10:26:26Z pluknet $");
53
54#define _ARM32_BUS_DMA_PRIVATE
55#include <sys/param.h>
56#include <sys/systm.h>
57#include <sys/sysproto.h>
58#include <sys/signalvar.h>
59#include <sys/imgact.h>
60#include <sys/kernel.h>

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

224 dpcpu_init((void *)dpcpu.pv_va, 0);
225
226 /* Allocate stacks for all modes */
227 valloc_pages(irqstack, IRQ_STACK_SIZE);
228 valloc_pages(abtstack, ABT_STACK_SIZE);
229 valloc_pages(undstack, UND_STACK_SIZE);
230 valloc_pages(kernelstack, KSTACK_PAGES);
231 alloc_pages(minidataclean.pv_pa, 1);
52
53#define _ARM32_BUS_DMA_PRIVATE
54#include <sys/param.h>
55#include <sys/systm.h>
56#include <sys/sysproto.h>
57#include <sys/signalvar.h>
58#include <sys/imgact.h>
59#include <sys/kernel.h>

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

223 dpcpu_init((void *)dpcpu.pv_va, 0);
224
225 /* Allocate stacks for all modes */
226 valloc_pages(irqstack, IRQ_STACK_SIZE);
227 valloc_pages(abtstack, ABT_STACK_SIZE);
228 valloc_pages(undstack, UND_STACK_SIZE);
229 valloc_pages(kernelstack, KSTACK_PAGES);
230 alloc_pages(minidataclean.pv_pa, 1);
232 valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE);
231 valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE);
233#ifdef ARM_USE_SMALL_ALLOC
234 freemempos -= PAGE_SIZE;
235 freemem_pt = trunc_page(freemem_pt);
236 freemem_after = freemempos - ((freemem_pt - 0xa0100000) /
237 PAGE_SIZE) * sizeof(struct arm_small_page);
238 arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000)
239 , (void *)0xc0100000, freemem_pt - 0xa0100000, 1);
240 freemem_after -= ((freemem_after - 0xa0001000) / PAGE_SIZE) *

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

388 dump_avail[i++] =
389 trunc_page(memstart[j] + memsize[j]);
390 }
391 }
392 dump_avail[i] = 0;
393 dump_avail[i] = 0;
394 pmap_bootstrap(pmap_curmaxkvaddr, 0xd0000000, &kernel_l1pt);
395 msgbufp = (void*)msgbufpv.pv_va;
232#ifdef ARM_USE_SMALL_ALLOC
233 freemempos -= PAGE_SIZE;
234 freemem_pt = trunc_page(freemem_pt);
235 freemem_after = freemempos - ((freemem_pt - 0xa0100000) /
236 PAGE_SIZE) * sizeof(struct arm_small_page);
237 arm_add_smallalloc_pages((void *)(freemem_after + 0x20000000)
238 , (void *)0xc0100000, freemem_pt - 0xa0100000, 1);
239 freemem_after -= ((freemem_after - 0xa0001000) / PAGE_SIZE) *

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

387 dump_avail[i++] =
388 trunc_page(memstart[j] + memsize[j]);
389 }
390 }
391 dump_avail[i] = 0;
392 dump_avail[i] = 0;
393 pmap_bootstrap(pmap_curmaxkvaddr, 0xd0000000, &kernel_l1pt);
394 msgbufp = (void*)msgbufpv.pv_va;
396 msgbufinit(msgbufp, MSGBUF_SIZE);
395 msgbufinit(msgbufp, msgbufsize);
397 mutex_init();
398
399 i = 0;
400#ifdef ARM_USE_SMALL_ALLOC
401 phys_avail[i++] = 0xa0000000;
402 phys_avail[i++] = 0xa0001000; /*
403 *XXX: Gross hack to get our
404 * pages in the vm_page_array

--- 119 unchanged lines hidden ---
396 mutex_init();
397
398 i = 0;
399#ifdef ARM_USE_SMALL_ALLOC
400 phys_avail[i++] = 0xa0000000;
401 phys_avail[i++] = 0xa0001000; /*
402 *XXX: Gross hack to get our
403 * pages in the vm_page_array

--- 119 unchanged lines hidden ---