Fix building the m68k kernel

* Restructured the vm support code to align with the changes done to other archs.
* Not completely finished, but the kernel loads and panics. I had this sitting on the disk anyway.
* Only support 040 for now, 030 will need to be added back.
* This commit is dedicated to Jack Tramiel who passed away away last sunday:
http://www.forbes.com/sites/davidthier/2012/04/09/computer-legend-and-gaming-pioneer-jack-tramiel-dies-at-age-83/
This commit is contained in:
François Revol
2012-04-13 00:53:09 +02:00
parent abbd8f3516
commit 599f30f93d
23 changed files with 3800 additions and 146 deletions
@@ -20,6 +20,8 @@ void m68k_push_iframe(struct iframe_stack *stack, struct iframe *frame);
void m68k_pop_iframe(struct iframe_stack *stack);
struct iframe *m68k_get_user_iframe(void);
uint32 m68k_next_page_directory(Thread *from, Thread *to);
/* as we won't support SMP on m68k (yet?) we can use a global here */
extern Thread *gCurrentThread;
@@ -14,39 +14,4 @@
#define PAGE_SHIFT 12
struct m68k_vm_ops {
void *(*m68k_translation_map_get_pgdir)(VMTranslationMap *map);
status_t (*arch_vm_translation_map_init_map)(VMTranslationMap *map, bool kernel);
status_t (*arch_vm_translation_map_init_kernel_map_post_sem)(VMTranslationMap *map);
status_t (*arch_vm_translation_map_init)(kernel_args *args);
status_t (*arch_vm_translation_map_init_post_area)(kernel_args *args);
status_t (*arch_vm_translation_map_init_post_sem)(kernel_args *args);
status_t (*arch_vm_translation_map_early_map)(kernel_args *ka, addr_t virtualAddress, addr_t physicalAddress,
uint8 attributes, addr_t (*get_free_page)(kernel_args *));
status_t (*arch_vm_translation_map_early_query)(addr_t va, addr_t *out_physical);
void (*m68k_set_pgdir)(void *);
#if 0 /* ppc stuff only ? */
status_t (*m68k_map_address_range)(addr_t virtualAddress, addr_t physicalAddress,
size_t size);
void (*m68k_unmap_address_range)(addr_t virtualAddress, size_t size);
status_t (*m68k_remap_address_range)(addr_t *_virtualAddress, size_t size, bool unmap);
#endif
bool (*arch_vm_translation_map_is_kernel_page_accessible)(addr_t virtualAddress, uint32 protection);
};
#ifdef __cplusplus
extern "C" {
#endif
extern struct m68k_vm_ops *get_vm_ops();
extern void *m68k_translation_map_get_pgdir(VMTranslationMap *map);
extern void m68k_set_pgdir(void *rt);
#ifdef __cplusplus
}
#endif
#endif /* ARCH_M68K_VM_H */