summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/src/rtems-bsd-vm_glue.c
diff options
context:
space:
mode:
Diffstat (limited to 'rtemsbsd/src/rtems-bsd-vm_glue.c')
-rw-r--r--rtemsbsd/src/rtems-bsd-vm_glue.c34
1 files changed, 31 insertions, 3 deletions
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 <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+#include <freebsd/machine/rtems-bsd-config.h>
#include <sys/param.h>
#include <sys/lock.h>
#include <sys/sched.h>
+#include <freebsd/sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+#include <freebsd/sys/kernel.h>
+#include <freebsd/vm/uma.h>
+#include <freebsd/vm/uma_int.h>
+#include <freebsd/sys/systm.h>
+
+/*
+ * 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
*