diff --git a/rtemsbsd/src/rtems-bsd-vm_glue.c b/rtemsbsd/src/rtems-bsd-vm_glue.c index 30f618b6..298e5885 100644 --- a/rtemsbsd/src/rtems-bsd-vm_glue.c +++ b/rtemsbsd/src/rtems-bsd-vm_glue.c @@ -32,14 +32,42 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ - -#include -__FBSDID("$FreeBSD$"); +#include #include #include #include +#include +__FBSDID("$FreeBSD$"); +#include +#include +#include +#include + +/* + * System initialization + */ +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; + + /* + * The values for mapped came from the freeBSD method + * vm_page_startup() in the freeBSD file vm_page.c. + * XXX - This may need to be adjusted for our system. + */ + mapped = calloc( boot_pages * UMA_SLAB_SIZE, 1 ); + uma_startup((void *)mapped, boot_pages); + kern_timeout_callwheel_init(); +} + /* * MPSAFE *