ARM: make sure we cleanup after the bootloader
The "2nd" assert that we always ran into was due to bootloader mappings still being active after VM init. Turns out we missed a call in the architecture specific code for cleaning this up. Many thanks to Ingo for spending the time to figure this out!
This commit is contained in:
@@ -28,12 +28,11 @@
|
|||||||
# define TRACE(x) ;
|
# define TRACE(x) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#warning ARM: WRITEME
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
arch_vm_init(kernel_args *args)
|
arch_vm_init(kernel_args *args)
|
||||||
{
|
{
|
||||||
|
TRACE(("arch_vm_init: entry\n"));
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,12 +40,6 @@ arch_vm_init(kernel_args *args)
|
|||||||
status_t
|
status_t
|
||||||
arch_vm_init2(kernel_args *args)
|
arch_vm_init2(kernel_args *args)
|
||||||
{
|
{
|
||||||
// int bats[8];
|
|
||||||
// int i;
|
|
||||||
|
|
||||||
/**/
|
|
||||||
#warning ARM: WRITEME
|
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,6 +47,7 @@ arch_vm_init2(kernel_args *args)
|
|||||||
status_t
|
status_t
|
||||||
arch_vm_init_post_area(kernel_args *args)
|
arch_vm_init_post_area(kernel_args *args)
|
||||||
{
|
{
|
||||||
|
TRACE(("arch_vm_init_post_area: entry\n"));
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +55,9 @@ arch_vm_init_post_area(kernel_args *args)
|
|||||||
status_t
|
status_t
|
||||||
arch_vm_init_end(kernel_args *args)
|
arch_vm_init_end(kernel_args *args)
|
||||||
{
|
{
|
||||||
#warning ARM: WRITEME
|
// Throw away all mappings that are unused by the kernel
|
||||||
|
vm_free_unused_boot_loader_range(KERNEL_LOAD_BASE, KERNEL_SIZE);
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,14 +72,21 @@ arch_vm_init_post_modules(kernel_args *args)
|
|||||||
void
|
void
|
||||||
arch_vm_aspace_swap(struct VMAddressSpace *from, struct VMAddressSpace *to)
|
arch_vm_aspace_swap(struct VMAddressSpace *from, struct VMAddressSpace *to)
|
||||||
{
|
{
|
||||||
#warning ARM:WRITEME
|
// This functions is only invoked when a userland thread is in the process
|
||||||
// m68k_set_pgdir(m68k_translation_map_get_pgdir(&to->TranslationMap()));
|
// of dying. It switches to the kernel team and does whatever cleanup is
|
||||||
|
// necessary (in case it is the team's main thread, it will delete the
|
||||||
|
// team).
|
||||||
|
// It is however not necessary to change the page directory. Userland team's
|
||||||
|
// page directories include all kernel mappings as well. Furthermore our
|
||||||
|
// arch specific translation map data objects are ref-counted, so they won't
|
||||||
|
// go away as long as they are still used on any CPU.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
arch_vm_supports_protection(uint32 protection)
|
arch_vm_supports_protection(uint32 protection)
|
||||||
{
|
{
|
||||||
|
// TODO check ARM protection possibilities
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,6 +94,7 @@ arch_vm_supports_protection(uint32 protection)
|
|||||||
void
|
void
|
||||||
arch_vm_unset_memory_type(VMArea *area)
|
arch_vm_unset_memory_type(VMArea *area)
|
||||||
{
|
{
|
||||||
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user