From 8e4f82c9800e85f1515ee16df0512fd4d984cbe7 Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Fri, 1 Jun 2012 13:51:41 -0500 Subject: Add some of the initialization from freeBSD vm_init.c needed for Nic. --- rtemsbsd/src/rtems-bsd-vm_glue.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/rtemsbsd/src/rtems-bsd-vm_glue.c b/rtemsbsd/src/rtems-bsd-vm_glue.c index 298e5885..6aba59aa 100644 --- a/rtemsbsd/src/rtems-bsd-vm_glue.c +++ b/rtemsbsd/src/rtems-bsd-vm_glue.c @@ -52,11 +52,15 @@ static int boot_pages = UMA_BOOT_PAGES; static void vm_mem_init(void *); SYSINIT(vm_mem, SI_SUB_VM, SI_ORDER_FIRST, vm_mem_init, NULL); + static void vm_mem_init(dummy) void *dummy; { - void *mapped; + void *mapped; + static void *callwheel_array[270]; + caddr_t c; + caddr_t p; /* * The values for mapped came from the freeBSD method @@ -65,6 +69,16 @@ vm_mem_init(dummy) */ mapped = calloc( boot_pages * UMA_SLAB_SIZE, 1 ); uma_startup((void *)mapped, boot_pages); + + /* + * The following is doing a minimal amount of work from + * the method vm_ksubmap_init() in freeBSD vm_init.c. + */ + c = (caddr_t) callwheel_array; + p = kern_timeout_callwheel_alloc(c); + printf( "*** callwheel 0x%x 0x%x 0x%x\n", c, p, (c + sizeof(callwheel_array)) ); + if ( p > (c + sizeof(callwheel_array)) ) + panic( "*** not enough memory for callwheel_array ***" ); kern_timeout_callwheel_init(); } -- cgit v1.2.3