Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/aim/mmu_oea64.h
Show All 26 Lines | |||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _POWERPC_AIM_MMU_OEA64_H | #ifndef _POWERPC_AIM_MMU_OEA64_H | ||||
#define _POWERPC_AIM_MMU_OEA64_H | #define _POWERPC_AIM_MMU_OEA64_H | ||||
#include "opt_pmap.h" | #include "opt_pmap.h" | ||||
#include <vm/vm_extern.h> | |||||
#include <machine/mmuvar.h> | #include <machine/mmuvar.h> | ||||
struct dump_context { | struct dump_context { | ||||
u_long ptex; | u_long ptex; | ||||
u_long ptex_end; | u_long ptex_end; | ||||
size_t blksz; | size_t blksz; | ||||
}; | }; | ||||
extern mmu_def_t oea64_mmu; | extern const struct mmu_kobj oea64_mmu; | ||||
/* | /* | ||||
* Helper routines | * Helper routines | ||||
*/ | */ | ||||
/* Allocate physical memory for use in moea64_bootstrap. */ | /* Allocate physical memory for use in moea64_bootstrap. */ | ||||
vm_offset_t moea64_bootstrap_alloc(vm_size_t size, vm_size_t align); | vm_offset_t moea64_bootstrap_alloc(vm_size_t size, vm_size_t align); | ||||
/* Set an LPTE structure to match the contents of a PVO */ | /* Set an LPTE structure to match the contents of a PVO */ | ||||
Show All 12 Lines | |||||
* An MMU_BOOTSTRAP() implementation looks like this: | * An MMU_BOOTSTRAP() implementation looks like this: | ||||
* moea64_early_bootstrap(); | * moea64_early_bootstrap(); | ||||
* Allocate Page Table | * Allocate Page Table | ||||
* moea64_mid_bootstrap(); | * moea64_mid_bootstrap(); | ||||
* Add mappings for MMU resources | * Add mappings for MMU resources | ||||
* moea64_late_bootstrap(); | * moea64_late_bootstrap(); | ||||
*/ | */ | ||||
void moea64_early_bootstrap(mmu_t mmup, vm_offset_t kernelstart, | void moea64_early_bootstrap(vm_offset_t kernelstart, | ||||
vm_offset_t kernelend); | vm_offset_t kernelend); | ||||
void moea64_mid_bootstrap(mmu_t mmup, vm_offset_t kernelstart, | void moea64_mid_bootstrap(vm_offset_t kernelstart, | ||||
vm_offset_t kernelend); | vm_offset_t kernelend); | ||||
void moea64_late_bootstrap(mmu_t mmup, vm_offset_t kernelstart, | void moea64_late_bootstrap(vm_offset_t kernelstart, | ||||
vm_offset_t kernelend); | vm_offset_t kernelend); | ||||
int64_t moea64_pte_replace(struct pvo_entry *, int); | |||||
int64_t moea64_pte_insert(struct pvo_entry *); | |||||
int64_t moea64_pte_unset(struct pvo_entry *); | |||||
int64_t moea64_pte_clear(struct pvo_entry *, uint64_t); | |||||
int64_t moea64_pte_synch(struct pvo_entry *); | |||||
typedef int64_t (*moea64_pte_replace_t)(struct pvo_entry *, int); | |||||
typedef int64_t (*moea64_pte_insert_t)(struct pvo_entry *); | |||||
typedef int64_t (*moea64_pte_unset_t)(struct pvo_entry *); | |||||
typedef int64_t (*moea64_pte_clear_t)(struct pvo_entry *, uint64_t); | |||||
typedef int64_t (*moea64_pte_synch_t)(struct pvo_entry *); | |||||
struct moea64_funcs { | |||||
moea64_pte_replace_t pte_replace; | |||||
moea64_pte_insert_t pte_insert; | |||||
moea64_pte_unset_t pte_unset; | |||||
moea64_pte_clear_t pte_clear; | |||||
moea64_pte_synch_t pte_synch; | |||||
}; | |||||
extern struct moea64_funcs *moea64_ops; | |||||
static inline uint64_t | static inline uint64_t | ||||
moea64_pte_vpn_from_pvo_vpn(const struct pvo_entry *pvo) | moea64_pte_vpn_from_pvo_vpn(const struct pvo_entry *pvo) | ||||
{ | { | ||||
return ((pvo->pvo_vpn >> (ADDR_API_SHFT64 - ADDR_PIDX_SHFT)) & | return ((pvo->pvo_vpn >> (ADDR_API_SHFT64 - ADDR_PIDX_SHFT)) & | ||||
LPTE_AVPN_MASK); | LPTE_AVPN_MASK); | ||||
} | } | ||||
Show All 25 Lines |