[haiku-commits] Re: haiku: hrev48109 - src/system/kernel/arch/arm

  • From: Paweł Dziepak <pdziepak@xxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 26 Oct 2014 17:30:32 -0700

2014-10-26 15:23 GMT-07:00 <ithamar@xxxxxxxxxxxxxxxxxxx>:

> hrev48109 adds 1 changeset to branch 'master'
> old head: 4ce1f197fa00403fd786e391ae0c3ed71d9c5954
> new head: a17ff8279b73be1ef933a7873c5a392a6f70d655
> overview:
> http://cgit.haiku-os.org/haiku/log/?qt=range&q=a17ff82+%5E4ce1f19
>
>
> ----------------------------------------------------------------------------
>
> a17ff82: 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!
>
>                           [ Ithamar R. Adema <ithamar@xxxxxxxxxxxxxxxxxxx>
> ]
>
>
> ----------------------------------------------------------------------------
>
> Revision:    hrev48109
> Commit:      a17ff8279b73be1ef933a7873c5a392a6f70d655
> URL:         http://cgit.haiku-os.org/haiku/commit/?id=a17ff82
> Author:      Ithamar R. Adema <ithamar@xxxxxxxxxxxxxxxxxxx>
> Date:        Sun Oct 26 22:21:40 2014 UTC
>
>
> ----------------------------------------------------------------------------
>
> 1 file changed, 15 insertions(+), 11 deletions(-)
> src/system/kernel/arch/arm/arch_vm.cpp | 26 +++++++++++++++-----------
>
>
> ----------------------------------------------------------------------------
>
> diff --git a/src/system/kernel/arch/arm/arch_vm.cpp
> b/src/system/kernel/arch/arm/arch_vm.cpp
> index bdde3ce..a17f317 100644
> --- a/src/system/kernel/arch/arm/arch_vm.cpp
> +++ b/src/system/kernel/arch/arm/arch_vm.cpp
> @@ -28,12 +28,11 @@
>  #      define TRACE(x) ;
>  #endif
>
> -#warning ARM: WRITEME
> -
>
>  status_t
>  arch_vm_init(kernel_args *args)
>  {
> +       TRACE(("arch_vm_init: entry\n"));
>         return B_OK;
>  }
>
> @@ -41,12 +40,6 @@ arch_vm_init(kernel_args *args)
>  status_t
>  arch_vm_init2(kernel_args *args)
>  {
> -       //      int bats[8];
> -       //      int i;
> -
> -       /**/
> -       #warning ARM: WRITEME
> -
>         return B_OK;
>  }
>
> @@ -54,6 +47,7 @@ arch_vm_init2(kernel_args *args)
>  status_t
>  arch_vm_init_post_area(kernel_args *args)
>  {
> +       TRACE(("arch_vm_init_post_area: entry\n"));
>         return B_OK;
>  }
>
> @@ -61,7 +55,9 @@ arch_vm_init_post_area(kernel_args *args)
>  status_t
>  arch_vm_init_end(kernel_args *args)
>  {
> -       #warning ARM: WRITEME
>

These warnings are pretty uselss, aren't they? I mean, all they do is to
produce a number of build messages so big that nobody is going to pay any
attention to them. It would be probably a good idea to replace all of these
with something like:

panic("Function %s is not implemented yet.", __PRETTY_FUNCTION__);

This way we would only get an information when the function is actually
needed and, unlike compile time warnings, that information would be hard to
miss (what hopefully would prevent problems similar to the one this patch
fixes).


> +       // Throw away all mappings that are unused by the kernel
> +       vm_free_unused_boot_loader_range(KERNEL_LOAD_BASE, KERNEL_SIZE);
> +
>         return B_OK;
>  }
>
> @@ -76,14 +72,21 @@ arch_vm_init_post_modules(kernel_args *args)
>  void
>  arch_vm_aspace_swap(struct VMAddressSpace *from, struct VMAddressSpace
> *to)
>  {
> -       #warning ARM:WRITEME
> -       //
> m68k_set_pgdir(m68k_translation_map_get_pgdir(&to->TranslationMap()));
> +       // This functions is only invoked when a userland thread is in the
> process
> +       // 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
>  arch_vm_supports_protection(uint32 protection)
>  {
> +       // TODO check ARM protection possibilities
>         return true;
>  }
>
> @@ -91,6 +94,7 @@ arch_vm_supports_protection(uint32 protection)
>  void
>  arch_vm_unset_memory_type(VMArea *area)
>  {
> +       // TODO
>  }
>
>
>
>
>

Other related posts: