FreeBSD kernel kern code
subr_devmap.c File Reference
#include <sys/cdefs.h>
#include "opt_ddb.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/devmap.h>
#include <vm/vm.h>
#include <vm/vm_extern.h>
#include <vm/pmap.h>
#include <machine/vmparam.h>
Include dependency graph for subr_devmap.c:

Go to the source code of this file.

Macros

#define AKVA_DEVMAP_MAX_ENTRIES   32
 

Functions

 __FBSDID ("$FreeBSD$")
 
static void devmap_dump_table (int(*prfunc)(const char *,...))
 
void devmap_print_table ()
 
vm_offset_t devmap_lastaddr ()
 
void devmap_add_entry (vm_paddr_t pa, vm_size_t sz)
 
void devmap_register_table (const struct devmap_entry *table)
 
void devmap_bootstrap (vm_offset_t l1pt, const struct devmap_entry *table)
 
void * devmap_ptov (vm_paddr_t pa, vm_size_t size)
 
vm_paddr_t devmap_vtop (void *vpva, vm_size_t size)
 
void * pmap_mapdev (vm_offset_t pa, vm_size_t size)
 
void pmap_unmapdev (vm_offset_t va, vm_size_t size)
 

Variables

static const struct devmap_entry * devmap_table
 
static boolean_t devmap_bootstrap_done = false
 
static struct devmap_entry akva_devmap_entries [AKVA_DEVMAP_MAX_ENTRIES]
 
static u_int akva_devmap_idx
 
static vm_offset_t akva_devmap_vaddr = DEVMAP_MAX_VADDR
 

Macro Definition Documentation

◆ AKVA_DEVMAP_MAX_ENTRIES

#define AKVA_DEVMAP_MAX_ENTRIES   32

Definition at line 51 of file subr_devmap.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ devmap_add_entry()

void devmap_add_entry ( vm_paddr_t  pa,
vm_size_t  sz 
)

Definition at line 124 of file subr_devmap.c.

References akva_devmap_entries, akva_devmap_idx, AKVA_DEVMAP_MAX_ENTRIES, akva_devmap_vaddr, devmap_bootstrap_done, devmap_register_table(), and panic().

Here is the call graph for this function:

◆ devmap_bootstrap()

void devmap_bootstrap ( vm_offset_t  l1pt,
const struct devmap_entry *  table 
)

Definition at line 179 of file subr_devmap.c.

References devmap_bootstrap_done, and devmap_table.

◆ devmap_dump_table()

static void devmap_dump_table ( int(*)(const char *,...)  prfunc)
static

Definition at line 65 of file subr_devmap.c.

References devmap_table.

Referenced by devmap_print_table().

Here is the caller graph for this function:

◆ devmap_lastaddr()

vm_offset_t devmap_lastaddr ( )

Definition at line 98 of file subr_devmap.c.

References akva_devmap_idx, akva_devmap_vaddr, and devmap_table.

◆ devmap_print_table()

void devmap_print_table ( )

Definition at line 87 of file subr_devmap.c.

References devmap_dump_table(), and printf().

Here is the call graph for this function:

◆ devmap_ptov()

void * devmap_ptov ( vm_paddr_t  pa,
vm_size_t  size 
)

Definition at line 214 of file subr_devmap.c.

References devmap_table.

Referenced by pmap_mapdev().

Here is the caller graph for this function:

◆ devmap_register_table()

void devmap_register_table ( const struct devmap_entry *  table)

Definition at line 161 of file subr_devmap.c.

References devmap_table.

Referenced by devmap_add_entry().

Here is the caller graph for this function:

◆ devmap_vtop()

vm_paddr_t devmap_vtop ( void *  vpva,
vm_size_t  size 
)

Definition at line 234 of file subr_devmap.c.

References devmap_table.

Referenced by pmap_unmapdev().

Here is the caller graph for this function:

◆ pmap_mapdev()

void * pmap_mapdev ( vm_offset_t  pa,
vm_size_t  size 
)

Definition at line 263 of file subr_devmap.c.

References akva_devmap_vaddr, devmap_ptov(), and panic().

Here is the call graph for this function:

◆ pmap_unmapdev()

void pmap_unmapdev ( vm_offset_t  va,
vm_size_t  size 
)

Definition at line 328 of file subr_devmap.c.

References devmap_vtop().

Here is the call graph for this function:

Variable Documentation

◆ akva_devmap_entries

struct devmap_entry akva_devmap_entries[AKVA_DEVMAP_MAX_ENTRIES]
static

Definition at line 52 of file subr_devmap.c.

Referenced by devmap_add_entry().

◆ akva_devmap_idx

u_int akva_devmap_idx
static

Definition at line 53 of file subr_devmap.c.

Referenced by devmap_add_entry(), and devmap_lastaddr().

◆ akva_devmap_vaddr

vm_offset_t akva_devmap_vaddr = DEVMAP_MAX_VADDR
static

Definition at line 54 of file subr_devmap.c.

Referenced by devmap_add_entry(), devmap_lastaddr(), and pmap_mapdev().

◆ devmap_bootstrap_done

boolean_t devmap_bootstrap_done = false
static

Definition at line 43 of file subr_devmap.c.

Referenced by devmap_add_entry(), and devmap_bootstrap().

◆ devmap_table

const struct devmap_entry* devmap_table
static