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:
parent
e8bfc82801
commit
50808915da
@ -18,15 +18,26 @@
|
|||||||
|
|
||||||
#include <arch/x86/interrupts.h>
|
#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;
|
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
|
// account for BIOS area and mark the pages unusable
|
||||||
vm_mark_page_range_inuse(0xa0000 / PAGE_SIZE, (0x100000 - 0xa0000) / PAGE_SIZE);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int arch_vm_init_endvm(kernel_args *ka)
|
|
||||||
|
int
|
||||||
|
arch_vm_init_endvm(kernel_args *ka)
|
||||||
{
|
{
|
||||||
region_id id;
|
region_id id;
|
||||||
void *ptr;
|
void *ptr;
|
||||||
|
|
||||||
dprintf("arch_vm_init_endvm: entry\n");
|
TRACE(("arch_vm_init_endvm: entry\n"));
|
||||||
|
|
||||||
// map 0 - 0xa0000 directly
|
// map 0 - 0xa0000 directly
|
||||||
id = vm_map_physical_memory(vm_get_kernel_aspace_id(), "dma_region", &ptr,
|
id = vm_map_physical_memory(vm_get_kernel_aspace_id(), "dma_region", &ptr,
|
||||||
REGION_ADDR_ANY_ADDRESS, 0xa0000, LOCK_RW|LOCK_KERNEL, 0x0);
|
REGION_ADDR_ANY_ADDRESS, 0xa0000, LOCK_RW | LOCK_KERNEL, 0x0);
|
||||||
if(id < 0) {
|
if (id < 0) {
|
||||||
panic("arch_vm_init_endvm: unable to map dma region\n");
|
panic("arch_vm_init_endvm: unable to map dma region\n");
|
||||||
return ENOMEM;
|
return B_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
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));
|
i386_swap_pgdir(vm_translation_map_get_pgdir(&aspace->translation_map));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -676,8 +676,6 @@ vm_translation_map_create(vm_translation_map *new_map, bool kernel)
|
|||||||
int
|
int
|
||||||
vm_translation_map_module_init(kernel_args *ka)
|
vm_translation_map_module_init(kernel_args *ka)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
TRACE(("vm_translation_map_module_init: entry\n"));
|
TRACE(("vm_translation_map_module_init: entry\n"));
|
||||||
|
|
||||||
// page hole set up in stage2
|
// page hole set up in stage2
|
||||||
@ -723,6 +721,7 @@ vm_translation_map_module_init(kernel_args *ka)
|
|||||||
addr phys_pgtable;
|
addr phys_pgtable;
|
||||||
addr virt_pgtable;
|
addr virt_pgtable;
|
||||||
pdentry *e;
|
pdentry *e;
|
||||||
|
int i;
|
||||||
|
|
||||||
virt_pgtable = (addr)iospace_pgtables;
|
virt_pgtable = (addr)iospace_pgtables;
|
||||||
for (i = 0; i < (IOSPACE_SIZE / (PAGE_SIZE * 1024)); i++, virt_pgtable += PAGE_SIZE) {
|
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
|
int
|
||||||
vm_translation_map_module_init2(kernel_args *ka)
|
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
|
// the page hole
|
||||||
void *temp;
|
void *temp;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user