1993-07-27 16:04:41 +04:00
|
|
|
#ifndef _PMAP_MACHINE_
|
|
|
|
#define _PMAP_MACHINE_
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Pmap stuff
|
|
|
|
* [some ideas borrowed from torek, but no code]
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct context_state {
|
|
|
|
queue_chain_t context_link;
|
|
|
|
int context_num;
|
1993-07-30 21:02:44 +04:00
|
|
|
struct pmap *context_upmap;
|
1993-07-27 16:04:41 +04:00
|
|
|
};
|
|
|
|
|
1993-07-30 21:02:44 +04:00
|
|
|
typedef struct context_state *context_t;
|
|
|
|
|
1993-07-27 16:04:41 +04:00
|
|
|
struct pmap {
|
|
|
|
int pm_refcount; /* pmap reference count */
|
|
|
|
simple_lock_data_t pm_lock; /* lock on pmap */
|
|
|
|
struct pmap_statistics pm_stats; /* pmap statistics */
|
|
|
|
context_t pm_context; /* context if any */
|
|
|
|
int pm_version;
|
|
|
|
unsigned char *pm_segmap;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct pmap *pmap_t;
|
|
|
|
|
|
|
|
extern pmap_t kernel_pmap;
|
|
|
|
|
|
|
|
struct pmeg_state {
|
|
|
|
queue_chain_t pmeg_link;
|
|
|
|
int pmeg_index;
|
|
|
|
pmap_t pmeg_owner;
|
|
|
|
int pmeg_owner_version;
|
|
|
|
vm_offset_t pmeg_va;
|
|
|
|
int pmeg_wired_count;
|
|
|
|
int pmeg_reserved;
|
|
|
|
int pmeg_vpages;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct pmeg_state *pmeg_t;
|
|
|
|
|
|
|
|
#define PMAP_ACTIVATE(pmap, pcbp, iscurproc) \
|
1993-08-21 06:16:07 +04:00
|
|
|
pmap_activate(pmap, pcbp)
|
1993-07-27 16:04:41 +04:00
|
|
|
#define PMAP_DEACTIVATE(pmap, pcbp) \
|
|
|
|
pmap_deactivate(pmap, pcbp)
|
|
|
|
|
|
|
|
#define pmap_kernel() (kernel_pmap)
|
|
|
|
|
|
|
|
/* like the sparc port, use the lower bits of a pa which must be page
|
|
|
|
* aligned anyway to pass memtype, caching information.
|
|
|
|
*/
|
|
|
|
#define PMAP_MMEM 0x0
|
|
|
|
#define PMAP_OBIO 0x1
|
|
|
|
#define PMAP_VME16D 0x2
|
|
|
|
#define PMAP_VME32D 0x3
|
|
|
|
#define PMAP_MEMMASK 0x3
|
|
|
|
#define PMAP_NC 0x4
|
|
|
|
#define PMAP_SPECMASK 0x7
|
|
|
|
|
1993-08-02 06:04:30 +04:00
|
|
|
extern vm_offset_t virtual_avail, virtual_end;
|
|
|
|
extern vm_offset_t avail_start, avail_end;
|
|
|
|
|
1993-07-27 16:04:41 +04:00
|
|
|
#endif _PMAP_MACHINE_
|