예제 #1
0
파일: unix_startup.c 프로젝트: Prajna/xnu
void
bsd_bufferinit(void)
{
	kern_return_t   ret;

	/*
	 * Note: Console device initialized in kminit() from bsd_autoconf()
	 * prior to call to us in bsd_init().
	 */

	bsd_startupearly();

#if SOCKETS
	ret = kmem_suballoc(kernel_map,
			    (vm_offset_t *) & mbutl,
			    (vm_size_t) (nmbclusters * MCLBYTES),
			    FALSE,
			    VM_FLAGS_ANYWHERE,
			    &mb_map);

	if (ret != KERN_SUCCESS)
		panic("Failed to allocate mb_map\n");
#endif /* SOCKETS */

	/*
	 * Set up buffers, so they can be used to read disk labels.
	 */
	bufinit();
}
예제 #2
0
void
bsd_bufferinit()
{
    kern_return_t	ret;

    cons.t_dev = makedev(12, 0);

	bsd_startupearly();

   	ret = kmem_suballoc(kernel_map,
			(vm_offset_t *) &mbutl,
			(vm_size_t) (nmbclusters * MCLBYTES),
			FALSE,
			TRUE,
			&mb_map);

	if (ret != KERN_SUCCESS) 
		panic("Failed to allocate mb_map\n");
	
    /*
     * Set up buffers, so they can be used to read disk labels.
     */
    bufinit();
}