* The OF memory management callback is now set in arch_mmu_init().

According to the spec we need to set it before taking over the MMU,
  but we can't call it before arch_mmu_init(), since we need the OF
  to allocate the page table. So we do it after we have allocated
  the new page table.
* Added PPC specific kernel_args: The virtual address ranges we want
  to keep in the kernel. We fill that in with the translations we
  find when initializing the MMU stuff. We remove the memory the
  boot loader occupies from those. Besides the stack for the boot
  loader only the OF stuff remains.
* arch_mmu_allocate() now starts to search at KERNEL_BASE for a free
  virtual address when no particular address is requested. This saves
  us further trouble in the kernel, since those allocations would
  need to be remapped otherwise.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15780 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2006-01-02 01:56:37 +00:00
parent 35cf9ee250
commit a1bcf2c880
3 changed files with 132 additions and 16 deletions
@@ -11,13 +11,20 @@
#define _PACKED __attribute__((packed))
#define MAX_VIRTUAL_RANGES_TO_KEEP 32
// kernel args
typedef struct {
// architecture specific
addr_range page_table; // virtual address and size of the page table
addr_range exception_handlers;
addr_range framebuffer; // maps where the framebuffer is located, in physical memory
int screen_x, screen_y, screen_depth;
addr_range page_table; // virtual address and size of the page table
addr_range exception_handlers;
addr_range framebuffer; // maps where the framebuffer is located, in physical memory
int screen_x, screen_y, screen_depth;
// The virtual ranges we want to keep in the kernel. E.g. those belonging
// to the Open Firmware.
uint32 num_virtual_ranges_to_keep;
addr_range virtual_ranges_to_keep[MAX_VIRTUAL_RANGES_TO_KEEP];
} arch_kernel_args;
#endif /* KERNEL_ARCH_PPC_KERNEL_ARGS_H */