Removed unused file int.c.

Minor style changes in arch_vm*.c


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2352 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2003-01-02 13:56:53 +00:00
parent e8bfc82801
commit 50808915da
3 changed files with 28 additions and 14 deletions

View File

@ -18,15 +18,26 @@
#include <arch/x86/interrupts.h>
int arch_vm_init(kernel_args *ka)
#define TRACE_ARCH_VM 0
#if TRACE_ARCH_VM
# define TRACE(x) dprintf x
#else
# define TRACE(x) ;
#endif
int
arch_vm_init(kernel_args *ka)
{
dprintf("arch_vm_init: entry\n");
TRACE(("arch_vm_init: entry\n"));
return 0;
}
int arch_vm_init2(kernel_args *ka)
int
arch_vm_init2(kernel_args *ka)
{
dprintf("arch_vm_init2: entry\n");
TRACE(("arch_vm_init2: entry\n"));
// account for BIOS area and mark the pages unusable
vm_mark_page_range_inuse(0xa0000 / PAGE_SIZE, (0x100000 - 0xa0000) / PAGE_SIZE);
@ -37,26 +48,30 @@ int arch_vm_init2(kernel_args *ka)
return 0;
}
int arch_vm_init_endvm(kernel_args *ka)
int
arch_vm_init_endvm(kernel_args *ka)
{
region_id id;
void *ptr;
dprintf("arch_vm_init_endvm: entry\n");
TRACE(("arch_vm_init_endvm: entry\n"));
// map 0 - 0xa0000 directly
id = vm_map_physical_memory(vm_get_kernel_aspace_id(), "dma_region", &ptr,
REGION_ADDR_ANY_ADDRESS, 0xa0000, LOCK_RW|LOCK_KERNEL, 0x0);
if(id < 0) {
REGION_ADDR_ANY_ADDRESS, 0xa0000, LOCK_RW | LOCK_KERNEL, 0x0);
if (id < 0) {
panic("arch_vm_init_endvm: unable to map dma region\n");
return ENOMEM;
return B_NO_MEMORY;
}
return 0;
}
void arch_vm_aspace_swap(vm_address_space *aspace)
void
arch_vm_aspace_swap(vm_address_space *aspace)
{
i386_swap_pgdir(vm_translation_map_get_pgdir(&aspace->translation_map));
}

View File

@ -676,8 +676,6 @@ vm_translation_map_create(vm_translation_map *new_map, bool kernel)
int
vm_translation_map_module_init(kernel_args *ka)
{
int i;
TRACE(("vm_translation_map_module_init: entry\n"));
// page hole set up in stage2
@ -723,6 +721,7 @@ vm_translation_map_module_init(kernel_args *ka)
addr phys_pgtable;
addr virt_pgtable;
pdentry *e;
int i;
virt_pgtable = (addr)iospace_pgtables;
for (i = 0; i < (IOSPACE_SIZE / (PAGE_SIZE * 1024)); i++, virt_pgtable += PAGE_SIZE) {
@ -749,7 +748,7 @@ vm_translation_map_module_init_post_sem(kernel_args *ka)
int
vm_translation_map_module_init2(kernel_args *ka)
{
// now that the vm is initialized, create an region that represents
// now that the vm is initialized, create a region that represents
// the page hole
void *temp;