rem: (addr_t)map->arch_data->pgdir_virt = kernel_pgdir_virt; (addr_t)map->arch_data->pgdir_phys = kernel_pgdir_phys;
add: map->arch_data->pgdir_virt = kernel_pgdir_virt; map->arch_data->pgdir_phys = kernel_pgdir_phys;
context: arch_vm_translation_map_init_map(vm_translation_map *map, bool kernel){	if (map == NULL)		return B_BAD_VALUE;	TRACE(("vm_translation_map_create\n"));	// initialize the new object	map->ops = &tmap_ops;	map->map_count = 0;	if (!kernel) {		// During the boot process, there are no semaphores available at this		// point, so we only try to create the translation map lock if we're		// initialize a user translation map.		// vm_translation_map_init_kernel_map_post_sem() is used to complete		// the kernel translation map.		if (recursive_lock_init(&map->lock, "translation map") < B_OK)			return map->lock.sem;	}	map->arch_data = (vm_translation_map_arch_info *)malloc(sizeof(vm_translation_map_arch_info));	if (map == NULL) {		recursive_lock_destroy(&map->lock);		return B_NO_MEMORY;	}	map->arch_data->num_invalidate_pages = 0;	if (!kernel) {		// user		// allocate a pgdir		map->arch_data->pgdir_virt = memalign(B_PAGE_SIZE, B_PAGE_SIZE);		if (map->arch_data->pgdir_virt == NULL) {			free(map->arch_data);			recursive_lock_destroy(&map->lock);			return B_NO_MEMORY;		}		vm_get_page_mapping(vm_get_kernel_aspace_id(), (addr_t)map->arch_data->pgdir_virt, (addr_t *)&map->arch_data->pgdir_phys);	} else {		// kernel		// we already know the kernel pgdir mapping		(addr_t)map->arch_data->pgdir_virt = kernel_pgdir_virt;		(addr_t)map->arch_data->pgdir_phys = kernel_pgdir_phys;	}	// zero out the bottom portion of the new pgdir	memset(map->arch_data->pgdir_virt + FIRST_USER_PGDIR_ENT, 0, NUM_USER_PGDIR_ENTS * sizeof(page_directory_entry));	// insert this new map into the map list	{		int state = disable_interrupts();		acquire_spinlock(&tmap_list_lock);		// copy the top portion of the pgdir from the current one		memcpy(map->arch_data->pgdir_virt + FIRST_KERNEL_PGDIR_ENT, kernel_pgdir_virt + FIRST_KERNEL_PGDIR_ENT,			NUM_KERNEL_PGDIR_ENTS * sizeof(page_directory_entry));		map->next = tmap_list;		tmap_list = map;		release_spinlock(&tmap_list_lock);		restore_interrupts(state);	}	return B_OK;}