Move remaining code and data related to static device mapping into the

new devmap.[ch] files.  Emphasize the MD nature of these things by using
the prefix arm_devmap_ on the function and type names (already a few of
these things found their way into MI code, hopefully it will be harder to
do by accident in the future).
This commit is contained in:
Ian Lepore 2013-11-04 22:45:26 +00:00
parent 756950a148
commit 3110e7eed8
30 changed files with 137 additions and 82 deletions

View file

@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <machine/bus.h>
#include <machine/devmap.h>
#include <machine/machdep.h>
#include <dev/fdt/fdt_common.h>
@ -71,7 +72,7 @@ initarm_late_init(void)
}
#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1)
static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = {
{ 0, 0, 0, 0, 0, }
};
@ -91,7 +92,7 @@ platform_devmap_init(void)
i++;
pmap_devmap_bootstrap_table = &fdt_devmap[0];
arm_devmap_register_table(&fdt_devmap[0]);
return (0);
}

View file

@ -38,18 +38,42 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <machine/devmap.h>
static const struct pmap_devmap *devmap_table;
static const struct arm_devmap_entry *devmap_table;
/*
* Map all of the static regions in the devmap table, and remember
* the devmap table so other parts of the kernel can do lookups later.
* Register the given table as the one to use in arm_devmap_bootstrap().
*/
void
pmap_devmap_bootstrap(vm_offset_t l1pt, const struct pmap_devmap *table)
arm_devmap_register_table(const struct arm_devmap_entry *table)
{
const struct pmap_devmap *pd;
devmap_table = table;
}
/*
* Map all of the static regions in the devmap table, and remember the devmap
* table so the mapdev, ptov, and vtop functions can do lookups later.
*
* If a non-NULL table pointer is given it is used unconditionally, otherwise
* the previously-registered table is used. This smooths transition from legacy
* code that fills in a local table then calls this function passing that table,
* and newer code that uses arm_devmap_register_table() in platform-specific
* code, then lets the common initarm() call this function with a NULL pointer.
*/
void
arm_devmap_bootstrap(vm_offset_t l1pt, const struct arm_devmap_entry *table)
{
const struct arm_devmap_entry *pd;
/*
* If given a table pointer, use it, else ensure a table was previously
* registered. This happens early in boot, and there's a good chance
* the panic message won't be seen, but there's not much we can do.
*/
if (table != NULL)
devmap_table = table;
else if (devmap_table == NULL)
panic("arm_devmap_bootstrap: No devmap table registered.");
for (pd = devmap_table; pd->pd_size != 0; ++pd) {
pmap_map_chunk(l1pt, pd->pd_va, pd->pd_pa, pd->pd_size,
@ -64,7 +88,7 @@ pmap_devmap_bootstrap(vm_offset_t l1pt, const struct pmap_devmap *table)
void *
arm_devmap_ptov(vm_paddr_t pa, vm_size_t size)
{
const struct pmap_devmap *pd;
const struct arm_devmap_entry *pd;
if (devmap_table == NULL)
return (NULL);
@ -84,7 +108,7 @@ arm_devmap_ptov(vm_paddr_t pa, vm_size_t size)
vm_paddr_t
arm_devmap_vtop(void * vpva, vm_size_t size)
{
const struct pmap_devmap *pd;
const struct arm_devmap_entry *pd;
vm_offset_t va;
if (devmap_table == NULL)

View file

@ -159,7 +159,6 @@ struct pv_addr undstack;
struct pv_addr abtstack;
static struct pv_addr kernelstack;
const struct pmap_devmap *pmap_devmap_bootstrap_table;
#endif
#if defined(LINUX_BOOT_ABI)
@ -1422,7 +1421,7 @@ initarm(struct arm_boot_params *abp)
/* Map pmap_devmap[] entries */
err_devmap = platform_devmap_init();
pmap_devmap_bootstrap(l1pagetable, pmap_devmap_bootstrap_table);
arm_devmap_bootstrap(l1pagetable, NULL);
cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)) | DOMAIN_CLIENT);
pmap_pa = kernel_l1pt.pv_pa;

View file

@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
#define _ARM32_BUS_DMA_PRIVATE
#include <machine/bus.h>
#include <machine/devmap.h>
#include <machine/intr.h>
#include <arm/at91/at91var.h>
@ -52,7 +53,7 @@ static struct at91_softc *at91_softc;
static void at91_eoi(void *);
extern const struct pmap_devmap at91_devmap[];
extern const struct arm_devmap_entry at91_devmap[];
uint32_t at91_master_clock;
@ -257,7 +258,7 @@ static int
at91_attach(device_t dev)
{
struct at91_softc *sc = device_get_softc(dev);
const struct pmap_devmap *pdevmap;
const struct arm_devmap_entry *pdevmap;
int i;
arm_post_filter = at91_eoi;

View file

@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_object.h>
#include <vm/vm_page.h>
#include <vm/vm_map.h>
#include <machine/devmap.h>
#include <machine/vmparam.h>
#include <machine/pcb.h>
#include <machine/undefined.h>
@ -128,7 +129,7 @@ struct pv_addr abtstack;
struct pv_addr kernelstack;
/* Static device mappings. */
const struct pmap_devmap at91_devmap[] = {
const struct arm_devmap_entry at91_devmap[] = {
/*
* Map the on-board devices VA == PA so that we can access them
* with the MMU on or off.
@ -566,7 +567,7 @@ initarm(struct arm_boot_params *abp)
VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
}
pmap_devmap_bootstrap(l1pagetable, at91_devmap);
arm_devmap_bootstrap(l1pagetable, at91_devmap);
cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)) | DOMAIN_CLIENT);
setttb(kernel_l1pt.pv_pa);
cpu_tlb_flushID();

View file

@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <machine/bus.h>
#include <machine/devmap.h>
#include <machine/machdep.h>
#include <dev/fdt/fdt_common.h>
@ -93,7 +94,7 @@ initarm_late_init(void)
}
#define FDT_DEVMAP_MAX (2) // FIXME
static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = {
{ 0, 0, 0, 0, 0, }
};
@ -113,7 +114,7 @@ platform_devmap_init(void)
fdt_devmap[i].pd_cache = PTE_DEVICE;
i++;
pmap_devmap_bootstrap_table = &fdt_devmap[0];
arm_devmap_register_table(&fdt_devmap[0]);
return (0);
}

View file

@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_object.h>
#include <vm/vm_page.h>
#include <vm/vm_map.h>
#include <machine/devmap.h>
#include <machine/vmparam.h>
#include <machine/pcb.h>
#include <machine/undefined.h>
@ -108,7 +109,7 @@ struct pv_addr abtstack;
struct pv_addr kernelstack;
/* Static device mappings. */
static const struct pmap_devmap econa_devmap[] = {
static const struct arm_devmap_entry econa_devmap[] = {
{
/*
* This maps DDR SDRAM
@ -275,7 +276,7 @@ initarm(struct arm_boot_params *abp)
VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
}
pmap_devmap_bootstrap(l1pagetable, econa_devmap);
arm_devmap_bootstrap(l1pagetable, econa_devmap);
cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT);
setttb(kernel_l1pt.pv_pa);
cpu_tlb_flushID();

View file

@ -47,14 +47,14 @@ __FBSDID("$FreeBSD$");
#define IMX_MAX_DEVMAP_ENTRIES 8
static struct pmap_devmap devmap_entries[IMX_MAX_DEVMAP_ENTRIES];
static struct arm_devmap_entry devmap_entries[IMX_MAX_DEVMAP_ENTRIES];
static u_int devmap_idx;
static vm_offset_t devmap_vaddr = ARM_VECTORS_HIGH;
void
imx_devmap_addentry(vm_paddr_t pa, vm_size_t sz)
{
struct pmap_devmap *m;
struct arm_devmap_entry *m;
/*
* The last table entry is the all-zeroes end-of-table marker. If we're
@ -103,7 +103,7 @@ initarm_lastaddr(void)
*/
imx_devmap_init();
pmap_devmap_bootstrap_table = devmap_entries;
arm_devmap_register_table(devmap_entries);
return (devmap_vaddr);
}
@ -128,7 +128,7 @@ initarm_gpio_init(void)
void
initarm_late_init(void)
{
struct pmap_devmap *m;
struct arm_devmap_entry *m;
/*
* We did the static devmap setup earlier, during initarm_lastaddr(),

View file

@ -29,6 +29,33 @@
#ifndef _MACHINE_DEVMAP_H_
#define _MACHINE_DEVMAP_H_
/*
* This structure is used by MD code to describe static mappings of devices
* which are established as part of bringing up the MMU early in the boot.
*/
struct arm_devmap_entry {
vm_offset_t pd_va; /* virtual address */
vm_paddr_t pd_pa; /* physical address */
vm_size_t pd_size; /* size of region */
vm_prot_t pd_prot; /* protection code */
int pd_cache; /* cache attributes */
};
/*
* Register a platform-local table to be bootstrapped by the generic
* initarm() in arm/machdep.c. This is used by newer code that allocates and
* fills in its own local table but does not have its own initarm() routine.
*/
void arm_devmap_register_table(const struct arm_devmap_entry * _table);
/*
* Directly process a table; called from initarm() of older platforms that don't
* use the generic initarm() in arm/machdep.c. If the table pointer is NULL,
* this will use the table installed previously by arm_devmap_register_table().
*/
void arm_devmap_bootstrap(vm_offset_t _l1pt,
const struct arm_devmap_entry *_table);
/*
* Routines to translate between virtual and physical addresses within a region
* that is static-mapped by the devmap code. If the given address range isn't

View file

@ -56,10 +56,10 @@ struct mem_region {
vm_size_t mr_size;
};
struct pmap_devmap;
struct arm_devmap_entry;
int fdt_localbus_devmap(phandle_t, struct pmap_devmap *, int, int *);
int fdt_pci_devmap(phandle_t, struct pmap_devmap *devmap, vm_offset_t,
int fdt_localbus_devmap(phandle_t, struct arm_devmap_entry *, int, int *);
int fdt_pci_devmap(phandle_t, struct arm_devmap_entry *devmap, vm_offset_t,
vm_offset_t);
#endif /* _MACHINE_FDT_H_ */

View file

@ -43,9 +43,6 @@ int platform_devmap_init(void);
void board_set_serial(uint64_t);
void board_set_revision(uint32_t);
/* Needs to be initialised by platform_devmap_init */
extern const struct pmap_devmap *pmap_devmap_bootstrap_table;
/* Setup standard arrays */
void arm_dump_avail_init( vm_offset_t memsize, size_t max);

View file

@ -696,20 +696,6 @@ void pmap_use_minicache(vm_offset_t, vm_size_t);
void vector_page_setprot(int);
/*
* This structure is used by machine-dependent code to describe
* static mappings of devices, created at bootstrap time.
*/
struct pmap_devmap {
vm_offset_t pd_va; /* virtual address */
vm_paddr_t pd_pa; /* physical address */
vm_size_t pd_size; /* size of region */
vm_prot_t pd_prot; /* protection code */
int pd_cache; /* cache attributes */
};
void pmap_devmap_bootstrap(vm_offset_t, const struct pmap_devmap *);
#define SECTION_CACHE 0x1
#define SECTION_PT 0x2
void pmap_kenter_section(vm_offset_t, vm_paddr_t, int flags);

View file

@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <machine/bus.h>
#include <machine/devmap.h>
#include <machine/machdep.h>
#include <arm/lpc/lpcreg.h>
@ -85,7 +86,7 @@ initarm_late_init(void)
}
#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1)
static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = {
{ 0, 0, 0, 0, 0, }
};
@ -105,7 +106,7 @@ platform_devmap_init(void)
fdt_devmap[0].pd_prot = VM_PROT_READ | VM_PROT_WRITE;
fdt_devmap[0].pd_cache = PTE_NOCACHE;
pmap_devmap_bootstrap_table = &fdt_devmap[0];
arm_devmap_register_table(&fdt_devmap[0]);
return (0);
}

View file

@ -37,6 +37,9 @@ __FBSDID("$FreeBSD$");
#include <sys/rman.h>
#include <sys/malloc.h>
#include <vm/vm.h>
#include <machine/devmap.h>
#include <machine/fdt.h>
#include <dev/ofw/ofw_bus.h>
@ -380,7 +383,7 @@ localbus_get_devinfo(device_t bus, device_t child)
}
int
fdt_localbus_devmap(phandle_t dt_node, struct pmap_devmap *fdt_devmap,
fdt_localbus_devmap(phandle_t dt_node, struct arm_devmap_entry *fdt_devmap,
int banks_max_num, int *banks_added)
{
pcell_t ranges[MV_LOCALBUS_MAX_BANKS * MV_LOCALBUS_MAX_BANK_CELLS];

View file

@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <machine/bus.h>
#include <machine/devmap.h>
#include <machine/machdep.h>
#include <arm/mv/mvreg.h> /* XXX */
@ -245,12 +246,12 @@ initarm_late_init(void)
}
#define FDT_DEVMAP_MAX (MV_WIN_CPU_MAX + 2)
static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = {
{ 0, 0, 0, 0, 0, }
};
static int
platform_sram_devmap(struct pmap_devmap *map)
platform_sram_devmap(struct arm_devmap_entry *map)
{
#if !defined(SOC_MV_ARMADAXP)
phandle_t child, root;
@ -295,10 +296,10 @@ out:
* real implementation of this function in dev/fdt/fdt_pci.c overrides the weak
* alias defined here.
*/
int mv_default_fdt_pci_devmap(phandle_t node, struct pmap_devmap *devmap,
int mv_default_fdt_pci_devmap(phandle_t node, struct arm_devmap_entry *devmap,
vm_offset_t io_va, vm_offset_t mem_va);
int
mv_default_fdt_pci_devmap(phandle_t node, struct pmap_devmap *devmap,
mv_default_fdt_pci_devmap(phandle_t node, struct arm_devmap_entry *devmap,
vm_offset_t io_va, vm_offset_t mem_va)
{
@ -322,7 +323,7 @@ platform_devmap_init(void)
int i, num_mapped;
i = 0;
pmap_devmap_bootstrap_table = &fdt_devmap[0];
arm_devmap_register_table(&fdt_devmap[0]);
#ifdef SOC_MV_ARMADAXP
vm_paddr_t cur_immr_pa;

View file

@ -66,7 +66,6 @@ struct decode_win {
vm_paddr_t remap;
};
extern const struct pmap_devmap pmap_devmap[];
extern const struct gpio_config mv_gpio_config[];
extern const struct decode_win *cpu_wins;
extern const struct decode_win *idma_wins;

View file

@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
#include <machine/armreg.h>
#include <machine/bus.h>
#include <machine/devmap.h>
#include <machine/machdep.h>
#include <dev/fdt/fdt_common.h>
@ -73,7 +74,7 @@ initarm_late_init(void)
}
#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1)
static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = {
{ 0, 0, 0, 0, 0, }
};
@ -92,8 +93,8 @@ platform_devmap_init(void)
fdt_devmap[i].pd_cache = PTE_DEVICE;
i++;
pmap_devmap_bootstrap_table = &fdt_devmap[0];
arm_devmap_register_table(&fdt_devmap[0]);
return (0);
}

View file

@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_object.h>
#include <vm/vm_page.h>
#include <vm/vm_map.h>
#include <machine/devmap.h>
#include <machine/vmparam.h>
#include <machine/pcb.h>
#include <machine/undefined.h>
@ -126,7 +127,7 @@ struct pv_addr kernelstack;
#define _S(s) (((s) + L1_S_SIZE - 1) & ~(L1_S_SIZE-1))
/* Static device mappings. */
static const struct pmap_devmap s3c24x0_devmap[] = {
static const struct arm_devmap_entry s3c24x0_devmap[] = {
/*
* Map the devices we need early on.
*/
@ -324,7 +325,7 @@ initarm(struct arm_boot_params *abp)
VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
}
pmap_devmap_bootstrap(l1pagetable, s3c24x0_devmap);
arm_devmap_bootstrap(l1pagetable, s3c24x0_devmap);
cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT);
setttb(kernel_l1pt.pv_pa);

View file

@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_object.h>
#include <vm/vm_page.h>
#include <vm/vm_map.h>
#include <machine/devmap.h>
#include <machine/vmparam.h>
#include <machine/pcb.h>
#include <machine/undefined.h>
@ -134,7 +135,7 @@ struct pv_addr abtstack;
struct pv_addr kernelstack;
/* Static device mappings. */
static const struct pmap_devmap assabet_devmap[] = {
static const struct arm_devmap_entry assabet_devmap[] = {
/*
* Map the on-board devices VA == PA so that we can access them
* with the MMU on or off.
@ -324,7 +325,7 @@ initarm(struct arm_boot_params *abp)
pmap_map_entry(l1pagetable, vector_page, systempage.pv_pa,
VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
/* Map the statically mapped devices. */
pmap_devmap_bootstrap(l1pagetable, assabet_devmap);
arm_devmap_bootstrap(l1pagetable, assabet_devmap);
pmap_map_chunk(l1pagetable, sa1_cache_clean_addr, 0xf0000000,
CPU_SA110_CACHE_CLEAN_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);

View file

@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <machine/bus.h>
#include <machine/devmap.h>
#include <machine/machdep.h>
#include <dev/fdt/fdt_common.h>
@ -63,7 +64,7 @@ initarm_late_init(void)
}
#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) /* FIXME */
static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = {
{ 0, 0, 0, 0, 0, }
};
@ -83,7 +84,7 @@ platform_devmap_init(void)
fdt_devmap[i].pd_cache = PTE_NOCACHE;
i++;
pmap_devmap_bootstrap_table = &fdt_devmap[0];
arm_devmap_register_table(&fdt_devmap[0]);
return (0);
}

View file

@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <machine/bus.h>
#include <machine/devmap.h>
#include <machine/machdep.h>
#include <dev/fdt/fdt_common.h>
@ -123,7 +124,7 @@ initarm_late_init(void)
}
#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) /* FIXME */
static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = {
{ 0, 0, 0, 0, 0, }
};
@ -141,7 +142,7 @@ platform_devmap_init(void)
fdt_devmap[i].pd_cache = PTE_NOCACHE;
i++;
pmap_devmap_bootstrap_table = &fdt_devmap[0];
arm_devmap_register_table(&fdt_devmap[0]);
return (0);
}

View file

@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <machine/bus.h>
#include <machine/devmap.h>
#include <machine/machdep.h>
#include <arm/ti/omap4/omap4_reg.h>
@ -77,7 +78,7 @@ initarm_late_init(void)
}
#define FDT_DEVMAP_MAX (2) // FIXME
static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = {
{ 0, 0, 0, 0, 0, }
};
@ -107,7 +108,7 @@ platform_devmap_init(void)
#error "Unknown SoC"
#endif
pmap_devmap_bootstrap_table = &fdt_devmap[0];
arm_devmap_register_table(&fdt_devmap[0]);
return (0);
}

View file

@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <machine/bus.h>
#include <machine/devmap.h>
#include <machine/machdep.h>
#include <dev/fdt/fdt_common.h>
@ -74,7 +75,7 @@ initarm_late_init(void)
}
#define FDT_DEVMAP_MAX (2) /* FIXME */
static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = {
{ 0, 0, 0, 0, 0, },
{ 0, 0, 0, 0, 0, }
};
@ -93,7 +94,7 @@ platform_devmap_init(void)
fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE;
fdt_devmap[i].pd_cache = PTE_DEVICE;
pmap_devmap_bootstrap_table = &fdt_devmap[0];
arm_devmap_register_table(&fdt_devmap[0]);
return (0);
}

View file

@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$");
#include <dev/fdt/fdt_common.h>
#include <machine/bus.h>
#include <machine/devmap.h>
#include <machine/machdep.h>
#include <arm/xilinx/zy7_reg.h>
@ -73,7 +74,7 @@ initarm_late_init(void)
}
#define FDT_DEVMAP_SIZE 3
static struct pmap_devmap fdt_devmap[FDT_DEVMAP_SIZE];
static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_SIZE];
/*
* Construct pmap_devmap[] with DT-derived config data.
@ -104,7 +105,7 @@ platform_devmap_init(void)
fdt_devmap[i].pd_prot = 0;
fdt_devmap[i].pd_cache = 0;
pmap_devmap_bootstrap_table = &fdt_devmap[0];
arm_devmap_register_table(&fdt_devmap[0]);
return (0);
}

View file

@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_object.h>
#include <vm/vm_page.h>
#include <vm/vm_map.h>
#include <machine/devmap.h>
#include <machine/vmparam.h>
#include <machine/pcb.h>
#include <machine/undefined.h>
@ -125,7 +126,7 @@ struct pv_addr minidataclean;
/* #define IQ80321_OBIO_SIZE 0x00100000UL */
/* Static device mappings. */
static const struct pmap_devmap ep80219_devmap[] = {
static const struct arm_devmap_entry ep80219_devmap[] = {
/*
* Map the on-board devices VA == PA so that we can access them
* with the MMU on or off.
@ -300,7 +301,7 @@ initarm(struct arm_boot_params *abp)
/* Map the vector page. */
pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa,
VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
pmap_devmap_bootstrap(l1pagetable, ep80219_devmap);
arm_devmap_bootstrap(l1pagetable, ep80219_devmap);
/*
* Give the XScale global cache clean code an appropriately
* sized chunk of unmapped VA space starting at 0xff000000

View file

@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_object.h>
#include <vm/vm_page.h>
#include <vm/vm_map.h>
#include <machine/devmap.h>
#include <machine/vmparam.h>
#include <machine/pcb.h>
#include <machine/undefined.h>
@ -123,7 +124,7 @@ struct pv_addr minidataclean;
#define IQ80321_OBIO_BASE 0xfe800000UL
#define IQ80321_OBIO_SIZE 0x00100000UL
/* Static device mappings. */
static const struct pmap_devmap iq80321_devmap[] = {
static const struct arm_devmap_entry iq80321_devmap[] = {
/*
* Map the on-board devices VA == PA so that we can access them
* with the MMU on or off.
@ -301,7 +302,7 @@ initarm(struct arm_boot_params *abp)
/* Map the vector page. */
pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa,
VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
pmap_devmap_bootstrap(l1pagetable, iq80321_devmap);
arm_devmap_bootstrap(l1pagetable, iq80321_devmap);
/*
* Give the XScale global cache clean code an appropriately
* sized chunk of unmapped VA space starting at 0xff000000

View file

@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_object.h>
#include <vm/vm_page.h>
#include <vm/vm_map.h>
#include <machine/devmap.h>
#include <machine/vmparam.h>
#include <machine/pcb.h>
#include <machine/undefined.h>
@ -123,7 +124,7 @@ struct pv_addr abtstack;
struct pv_addr kernelstack;
/* Static device mappings. */
static const struct pmap_devmap iq81342_devmap[] = {
static const struct arm_devmap_entry iq81342_devmap[] = {
{
IOP34X_VADDR,
IOP34X_HWADDR,
@ -285,7 +286,7 @@ initarm(struct arm_boot_params *abp)
/* Map the vector page. */
pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa,
VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
pmap_devmap_bootstrap(l1pagetable, iq81342_devmap);
arm_devmap_bootstrap(l1pagetable, iq81342_devmap);
/*
* Give the XScale global cache clean code an appropriately
* sized chunk of unmapped VA space starting at 0xff000000

View file

@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_object.h>
#include <vm/vm_page.h>
#include <vm/vm_map.h>
#include <machine/devmap.h>
#include <machine/vmparam.h>
#include <machine/pcb.h>
#include <machine/undefined.h>
@ -125,7 +126,7 @@ struct pv_addr kernelstack;
struct pv_addr minidataclean;
/* Static device mappings. */
static const struct pmap_devmap ixp425_devmap[] = {
static const struct arm_devmap_entry ixp425_devmap[] = {
/* Physical/Virtual address for I/O space */
{ IXP425_IO_VBASE, IXP425_IO_HWBASE, IXP425_IO_SIZE,
VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, },
@ -158,7 +159,7 @@ static const struct pmap_devmap ixp425_devmap[] = {
};
/* Static device mappings. */
static const struct pmap_devmap ixp435_devmap[] = {
static const struct arm_devmap_entry ixp435_devmap[] = {
/* Physical/Virtual address for I/O space */
{ IXP425_IO_VBASE, IXP425_IO_HWBASE, IXP425_IO_SIZE,
VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, },
@ -368,9 +369,9 @@ initarm(struct arm_boot_params *abp)
pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa,
VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
if (cpu_is_ixp43x())
pmap_devmap_bootstrap(l1pagetable, ixp435_devmap);
arm_devmap_bootstrap(l1pagetable, ixp435_devmap);
else
pmap_devmap_bootstrap(l1pagetable, ixp425_devmap);
arm_devmap_bootstrap(l1pagetable, ixp425_devmap);
/*
* Give the XScale global cache clean code an appropriately
* sized chunk of unmapped VA space starting at 0xff000000

View file

@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_object.h>
#include <vm/vm_page.h>
#include <vm/vm_map.h>
#include <machine/devmap.h>
#include <machine/vmparam.h>
#include <machine/pcb.h>
#include <machine/undefined.h>
@ -124,7 +125,7 @@ static void pxa_probe_sdram(bus_space_tag_t, bus_space_handle_t,
uint32_t *, uint32_t *);
/* Static device mappings. */
static const struct pmap_devmap pxa_devmap[] = {
static const struct arm_devmap_entry pxa_devmap[] = {
/*
* Map the on-board devices up into the KVA region so we don't muck
* up user-space.
@ -281,7 +282,7 @@ initarm(struct arm_boot_params *abp)
/* Map the vector page. */
pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa,
VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
pmap_devmap_bootstrap(l1pagetable, pxa_devmap);
arm_devmap_bootstrap(l1pagetable, pxa_devmap);
/*
* Give the XScale global cache clean code an appropriately

View file

@ -335,7 +335,7 @@ next:
#if defined(__arm__)
int
fdt_pci_devmap(phandle_t node, struct pmap_devmap *devmap, vm_offset_t io_va,
fdt_pci_devmap(phandle_t node, struct arm_devmap_entry *devmap, vm_offset_t io_va,
vm_offset_t mem_va)
{
struct fdt_pci_range io_space, mem_space;