2007-10-22 03:42:09 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef ARCH_M68K_VM_H
|
|
|
|
#define ARCH_M68K_VM_H
|
|
|
|
|
2008-01-20 20:21:01 +03:00
|
|
|
#include <vm_translation_map.h>
|
|
|
|
|
2007-10-22 03:42:09 +04:00
|
|
|
/* This many pages will be read/written on I/O if possible */
|
|
|
|
|
|
|
|
#define NUM_IO_PAGES 4
|
|
|
|
/* 16 kB */
|
|
|
|
|
|
|
|
#define PAGE_SHIFT 12
|
|
|
|
|
2007-11-04 00:02:03 +03:00
|
|
|
|
|
|
|
struct m68k_vm_ops {
|
|
|
|
void *(*m68k_translation_map_get_pgdir)(vm_translation_map *map);
|
|
|
|
status_t (*arch_vm_translation_map_init_map)(vm_translation_map *map, bool kernel);
|
|
|
|
status_t (*arch_vm_translation_map_init_kernel_map_post_sem)(vm_translation_map *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);
|
2008-06-23 07:28:18 +04:00
|
|
|
void (*m68k_set_pgdir)(void *);
|
2007-11-04 00:02:03 +03:00
|
|
|
#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
|
|
|
|
};
|
|
|
|
|
2008-06-23 07:28:18 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern struct m68k_vm_ops *get_vm_ops();
|
|
|
|
|
|
|
|
extern void *m68k_translation_map_get_pgdir(vm_translation_map *map);
|
|
|
|
extern void m68k_set_pgdir(void *rt);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2007-11-04 00:02:03 +03:00
|
|
|
|
2007-10-22 03:42:09 +04:00
|
|
|
#endif /* ARCH_M68K_VM_H */
|