diff options
-rw-r--r-- | sys/arm/allwinner/a10_machdep.c | 8 | ||||
-rw-r--r-- | sys/arm/arm/devmap.c | 84 | ||||
-rw-r--r-- | sys/arm/arm/machdep.c | 7 | ||||
-rw-r--r-- | sys/arm/broadcom/bcm2835/bcm2835_machdep.c | 8 | ||||
-rw-r--r-- | sys/arm/freescale/imx/imx51_machdep.c | 48 | ||||
-rw-r--r-- | sys/arm/freescale/imx/imx53_machdep.c | 47 | ||||
-rw-r--r-- | sys/arm/freescale/imx/imx6_machdep.c | 46 | ||||
-rw-r--r-- | sys/arm/freescale/imx/imx_machdep.c | 100 | ||||
-rw-r--r-- | sys/arm/include/devmap.h | 27 | ||||
-rw-r--r-- | sys/arm/include/machdep.h | 32 | ||||
-rw-r--r-- | sys/arm/include/pmap.h | 1 | ||||
-rw-r--r-- | sys/arm/lpc/lpc_machdep.c | 12 | ||||
-rw-r--r-- | sys/arm/mv/mv_machdep.c | 12 | ||||
-rw-r--r-- | sys/arm/rockchip/rk30xx_machdep.c | 8 | ||||
-rw-r--r-- | sys/arm/samsung/exynos/exynos5_machdep.c | 8 | ||||
-rw-r--r-- | sys/arm/tegra/tegra2_machdep.c | 11 | ||||
-rw-r--r-- | sys/arm/ti/ti_machdep.c | 10 | ||||
-rw-r--r-- | sys/arm/versatile/versatile_machdep.c | 8 | ||||
-rw-r--r-- | sys/arm/xilinx/zy7_machdep.c | 8 |
19 files changed, 330 insertions, 155 deletions
diff --git a/sys/arm/allwinner/a10_machdep.c b/sys/arm/allwinner/a10_machdep.c index e9f93e8..c77a2a5 100644 --- a/sys/arm/allwinner/a10_machdep.c +++ b/sys/arm/allwinner/a10_machdep.c @@ -62,6 +62,12 @@ initarm_lastaddr(void) } void +initarm_early_init(void) +{ + +} + +void initarm_gpio_init(void) { } @@ -80,7 +86,7 @@ static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { int i = 0; diff --git a/sys/arm/arm/devmap.c b/sys/arm/arm/devmap.c index a8819bd..42e1298 100644 --- a/sys/arm/arm/devmap.c +++ b/sys/arm/arm/devmap.c @@ -36,9 +36,89 @@ __FBSDID("$FreeBSD$"); #include <vm/vm.h> #include <vm/vm_extern.h> #include <vm/pmap.h> +#include <machine/armreg.h> #include <machine/devmap.h> static const struct arm_devmap_entry *devmap_table; +static boolean_t devmap_bootstrap_done = false; + +/* + * The allocated-kva (akva) devmap table and metadata. Platforms can call + * arm_devmap_add_entry() to add static device mappings to this table using + * automatically allocated virtual addresses carved out of the top of kva space. + * Allocation begins immediately below the ARM_VECTORS_HIGH address. + */ +#define AKVA_DEVMAP_MAX_ENTRIES 32 +static struct arm_devmap_entry akva_devmap_entries[AKVA_DEVMAP_MAX_ENTRIES]; +static u_int akva_devmap_idx; +static vm_offset_t akva_devmap_vaddr = ARM_VECTORS_HIGH; + +/* + * Return the "last" kva address used by the registered devmap table. It's + * actually the lowest address used by the static mappings, i.e., the address of + * the first unusable byte of KVA. + */ +vm_offset_t +arm_devmap_lastaddr() +{ + const struct arm_devmap_entry *pd; + vm_offset_t lowaddr; + + if (akva_devmap_idx > 0) + return (akva_devmap_vaddr); + + if (devmap_table == NULL) + panic("arm_devmap_lastaddr(): No devmap table registered."); + + lowaddr = ARM_VECTORS_HIGH; + for (pd = devmap_table; pd->pd_size != 0; ++pd) { + if (lowaddr > pd->pd_va) + lowaddr = pd->pd_va; + } + + return (lowaddr); +} + +/* + * Add an entry to the internal "akva" static devmap table using the given + * physical address and size and a virtual address allocated from the top of + * kva. This automatically registers the akva table on the first call, so all a + * platform has to do is call this routine to install as many mappings as it + * needs and when initarm() calls arm_devmap_bootstrap() it will pick up all the + * entries in the akva table automatically. + */ +void +arm_devmap_add_entry(vm_paddr_t pa, vm_size_t sz) +{ + struct arm_devmap_entry *m; + + if (devmap_bootstrap_done) + panic("arm_devmap_add_entry() after arm_devmap_bootstrap()"); + + if (akva_devmap_idx == (AKVA_DEVMAP_MAX_ENTRIES - 1)) + panic("AKVA_DEVMAP_MAX_ENTRIES is too small"); + + if (akva_devmap_idx == 0) + arm_devmap_register_table(akva_devmap_entries); + + /* + * Allocate virtual address space from the top of kva downwards. If the + * range being mapped is aligned and sized to 1MB boundaries then also + * align the virtual address to the next-lower 1MB boundary so that we + * end up with a nice efficient section mapping. + */ + if ((pa & 0x000fffff) == 0 && (sz & 0x000fffff) == 0) { + akva_devmap_vaddr = trunc_1mpage(akva_devmap_vaddr - sz); + } else { + akva_devmap_vaddr = trunc_page(akva_devmap_vaddr - sz); + } + m = &akva_devmap_entries[akva_devmap_idx++]; + m->pd_va = akva_devmap_vaddr; + m->pd_pa = pa; + m->pd_size = sz; + m->pd_prot = VM_PROT_READ | VM_PROT_WRITE; + m->pd_cache = PTE_DEVICE; +} /* * Register the given table as the one to use in arm_devmap_bootstrap(). @@ -73,12 +153,14 @@ arm_devmap_bootstrap(vm_offset_t l1pt, const struct arm_devmap_entry *table) if (table != NULL) devmap_table = table; else if (devmap_table == NULL) - panic("arm_devmap_bootstrap: No devmap table registered."); + 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, pd->pd_prot,pd->pd_cache); } + + devmap_bootstrap_done = true; } /* diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c index 6ab5529..7348fc2 100644 --- a/sys/arm/arm/machdep.c +++ b/sys/arm/arm/machdep.c @@ -1299,7 +1299,7 @@ initarm(struct arm_boot_params *abp) availmem_regions_sz = curr; /* Platform-specific initialisation */ - vm_max_kernel_address = initarm_lastaddr(); + initarm_early_init(); pcpu0_init(); @@ -1415,9 +1415,10 @@ initarm(struct arm_boot_params *abp) pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa, VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE, PTE_CACHE); - /* Map pmap_devmap[] entries */ - err_devmap = platform_devmap_init(); + /* Establish static device mappings. */ + err_devmap = initarm_devmap_init(); arm_devmap_bootstrap(l1pagetable, NULL); + vm_max_kernel_address = initarm_lastaddr(); cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)) | DOMAIN_CLIENT); pmap_pa = kernel_l1pt.pv_pa; diff --git a/sys/arm/broadcom/bcm2835/bcm2835_machdep.c b/sys/arm/broadcom/bcm2835/bcm2835_machdep.c index dcf8178..a203e12 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_machdep.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_machdep.c @@ -70,6 +70,12 @@ initarm_lastaddr(void) } void +initarm_early_init(void) +{ + +} + +void initarm_gpio_init(void) { } @@ -103,7 +109,7 @@ static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { int i = 0; diff --git a/sys/arm/freescale/imx/imx51_machdep.c b/sys/arm/freescale/imx/imx51_machdep.c index 5150e9a..53a722a 100644 --- a/sys/arm/freescale/imx/imx51_machdep.c +++ b/sys/arm/freescale/imx/imx51_machdep.c @@ -34,26 +34,58 @@ __FBSDID("$FreeBSD$"); #include <sys/bus.h> #include <sys/reboot.h> +#include <vm/vm.h> + +#include <machine/bus.h> +#include <machine/devmap.h> #include <machine/machdep.h> + #include <arm/freescale/imx/imx_machdep.h> +vm_offset_t +initarm_lastaddr(void) +{ + + return (arm_devmap_lastaddr()); +} + +void +initarm_early_init(void) +{ + + /* XXX - Get rid of this stuff soon. */ + boothowto |= RB_VERBOSE|RB_MULTIPLE; + bootverbose = 1; +} + +void +initarm_gpio_init(void) +{ + +} + +void +initarm_late_init(void) +{ + +} + /* * Set up static device mappings. This is hand-optimized platform-specific * config data which covers most of the common on-chip devices with a few 1MB * section mappings. * * Notably missing are entries for GPU, IPU, in general anything video related. - * - * Note that for imx this is called from initarm_lastaddr() so that the lowest - * kva address used for static device mapping can be known at that point. */ -void -imx_devmap_init(void) +int +initarm_devmap_init(void) { - imx_devmap_addentry(0x70000000, 0x00100000); - imx_devmap_addentry(0x73f00000, 0x00100000); - imx_devmap_addentry(0x83f00000, 0x00100000); + arm_devmap_add_entry(0x70000000, 0x00100000); + arm_devmap_add_entry(0x73f00000, 0x00100000); + arm_devmap_add_entry(0x83f00000, 0x00100000); + + return (0); } void diff --git a/sys/arm/freescale/imx/imx53_machdep.c b/sys/arm/freescale/imx/imx53_machdep.c index a40bb37..50d8d52 100644 --- a/sys/arm/freescale/imx/imx53_machdep.c +++ b/sys/arm/freescale/imx/imx53_machdep.c @@ -34,26 +34,57 @@ __FBSDID("$FreeBSD$"); #include <sys/bus.h> #include <sys/reboot.h> +#include <vm/vm.h> + +#include <machine/bus.h> +#include <machine/devmap.h> #include <machine/machdep.h> #include <arm/freescale/imx/imx_machdep.h> +vm_offset_t +initarm_lastaddr(void) +{ + + return (arm_devmap_lastaddr()); +} + +void +initarm_early_init(void) +{ + + /* XXX - Get rid of this stuff soon. */ + boothowto |= RB_VERBOSE|RB_MULTIPLE; + bootverbose = 1; +} + +void +initarm_gpio_init(void) +{ + +} + +void +initarm_late_init(void) +{ + +} + /* * Set up static device mappings. This is hand-optimized platform-specific * config data which covers most of the common on-chip devices with a few 1MB * section mappings. * * Notably missing are entries for GPU, IPU, in general anything video related. - * - * Note that for imx this is called from initarm_lastaddr() so that the lowest - * kva address used for static device mapping can be known at that point. */ -void -imx_devmap_init(void) +int +initarm_devmap_init(void) { - imx_devmap_addentry(0x50000000, 0x00100000); - imx_devmap_addentry(0x53f00000, 0x00100000); - imx_devmap_addentry(0x63f00000, 0x00100000); + arm_devmap_add_entry(0x50000000, 0x00100000); + arm_devmap_add_entry(0x53f00000, 0x00100000); + arm_devmap_add_entry(0x63f00000, 0x00100000); + + return (0); } void diff --git a/sys/arm/freescale/imx/imx6_machdep.c b/sys/arm/freescale/imx/imx6_machdep.c index d009adc..57c9c35 100644 --- a/sys/arm/freescale/imx/imx6_machdep.c +++ b/sys/arm/freescale/imx/imx6_machdep.c @@ -35,19 +35,45 @@ __FBSDID("$FreeBSD$"); #include <sys/reboot.h> #include <vm/vm.h> -#include <vm/pmap.h> #include <machine/bus.h> #include <machine/devmap.h> +#include <machine/machdep.h> #include <arm/freescale/imx/imx6_anatopreg.h> #include <arm/freescale/imx/imx6_anatopvar.h> #include <arm/freescale/imx/imx_machdep.h> +vm_offset_t +initarm_lastaddr(void) +{ + + return (arm_devmap_lastaddr()); +} + +void +initarm_early_init(void) +{ + + /* XXX - Get rid of this stuff soon. */ + boothowto |= RB_VERBOSE|RB_MULTIPLE; + bootverbose = 1; +} + +void +initarm_gpio_init(void) +{ + +} + +void +initarm_late_init(void) +{ + +} + /* - * Set up static device mappings. Note that for imx this is called from - * initarm_lastaddr() so that it can return the lowest address used for static - * device mapping, maximizing kva space. + * Set up static device mappings. * * This attempts to cover the most-used devices with 1MB section mappings, which * is good for performance (uses fewer TLB entries for device access). @@ -62,8 +88,8 @@ __FBSDID("$FreeBSD$"); * static map some of that area. Be careful with other things in that area such * as OCRAM that probably shouldn't be mapped as PTE_DEVICE memory. */ -void -imx_devmap_init(void) +int +initarm_devmap_init(void) { const uint32_t IMX6_ARMMP_PHYS = 0x00a00000; const uint32_t IMX6_ARMMP_SIZE = 0x00100000; @@ -72,9 +98,11 @@ imx_devmap_init(void) const uint32_t IMX6_AIPS2_PHYS = 0x02100000; const uint32_t IMX6_AIPS2_SIZE = 0x00100000; - imx_devmap_addentry(IMX6_ARMMP_PHYS, IMX6_ARMMP_SIZE); - imx_devmap_addentry(IMX6_AIPS1_PHYS, IMX6_AIPS1_SIZE); - imx_devmap_addentry(IMX6_AIPS2_PHYS, IMX6_AIPS2_SIZE); + arm_devmap_add_entry(IMX6_ARMMP_PHYS, IMX6_ARMMP_SIZE); + arm_devmap_add_entry(IMX6_AIPS1_PHYS, IMX6_AIPS1_SIZE); + arm_devmap_add_entry(IMX6_AIPS2_PHYS, IMX6_AIPS2_SIZE); + + return (0); } void diff --git a/sys/arm/freescale/imx/imx_machdep.c b/sys/arm/freescale/imx/imx_machdep.c index de0eb68..3618637 100644 --- a/sys/arm/freescale/imx/imx_machdep.c +++ b/sys/arm/freescale/imx/imx_machdep.c @@ -45,106 +45,6 @@ __FBSDID("$FreeBSD$"); #include <arm/freescale/imx/imx_machdep.h> #include <arm/freescale/imx/imx_wdogreg.h> -#define IMX_MAX_DEVMAP_ENTRIES 8 - -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 arm_devmap_entry *m; - - /* - * The last table entry is the all-zeroes end-of-table marker. If we're - * about to overwrite it the world is coming to an end. This code runs - * too early for the panic to be printed unless a special early-debug - * console is in use, but there's nothing else we can do. - */ - if (devmap_idx == (IMX_MAX_DEVMAP_ENTRIES - 1)) - panic("IMX_MAX_DEVMAP_ENTRIES is too small!\n"); - - /* - * Allocate virtual address space from the top of kva downwards. If the - * range being mapped is aligned and sized to 1MB boundaries then also - * align the virtual address to the next-lower 1MB boundary so that we - * end up with a section mapping. - */ - if ((pa & 0x000fffff) == 0 && (sz & 0x000fffff) == 0) { - devmap_vaddr = (devmap_vaddr - sz) & ~0x000fffff; - } else { - devmap_vaddr = (devmap_vaddr - sz) & ~0x00000fff; - } - m = &devmap_entries[devmap_idx++]; - m->pd_va = devmap_vaddr; - m->pd_pa = pa; - m->pd_size = sz; - m->pd_prot = VM_PROT_READ | VM_PROT_WRITE; - m->pd_cache = PTE_DEVICE; -} - -vm_offset_t -initarm_lastaddr(void) -{ - - /* XXX - Get rid of this stuff soon. */ - boothowto |= RB_VERBOSE|RB_MULTIPLE; - bootverbose = 1; - - /* - * Normally initarm() calls platform_devmap_init() much later in the - * init process to set up static device mappings. To calculate the - * highest available kva address we have to do that setup first. It - * maps downwards from ARM_VECTORS_HIGH and the last usable kva address - * is the point right before the virtual address of the first static - * mapping. So go set up the static mapping table now, then we can - * return the lowest static devmap vaddr as the end of usable kva. - */ - imx_devmap_init(); - - arm_devmap_register_table(devmap_entries); - - return (devmap_vaddr); -} - -int -platform_devmap_init(void) -{ - - /* On imx this work is done during initarm_lastaddr(). */ - return (0); -} - -/* - * Set initial values of GPIO output ports - */ -void -initarm_gpio_init(void) -{ - -} - -void -initarm_late_init(void) -{ - struct arm_devmap_entry *m; - - /* - * We did the static devmap setup earlier, during initarm_lastaddr(), - * but now the console should be working and we can be verbose about - * what we did. - */ - if (bootverbose) { - for (m = devmap_entries; m->pd_va != 0; ++m) { - printf("Devmap: phys 0x%08x virt 0x%08x size %uK\n", - m->pd_pa, m->pd_va, m->pd_size / 1024); - } - } - - -} - struct arm32_dma_range * bus_dma_get_range(void) { diff --git a/sys/arm/include/devmap.h b/sys/arm/include/devmap.h index ee16b67..028f40d 100644 --- a/sys/arm/include/devmap.h +++ b/sys/arm/include/devmap.h @@ -42,6 +42,22 @@ struct arm_devmap_entry { }; /* + * Return the lowest KVA address used in any entry in the registered devmap + * table. This works with whatever table is registered, including the internal + * table used by arm_devmap_add_entry() if that routine was used. Platforms can + * implement initarm_lastaddr() by calling this if static device mappings are + * their only use of high KVA space. + */ +vm_offset_t arm_devmap_lastaddr(void); + +/* + * Automatically allocate KVA (from the top of the address space downwards) and + * make static device mapping entries in an internal table. The internal table + * is automatically registered on the first call to this. + */ +void arm_devmap_add_entry(vm_paddr_t pa, vm_size_t sz); + +/* * 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. @@ -49,16 +65,17 @@ struct arm_devmap_entry { 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(). + * Establish mappings for all the entries in the table. This is called + * automatically from the common initarm() in arm/machdep.c, and also from the + * custom initarm() routines in older code. 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 + * Translate between virtual and physical addresses within a region that is + * static-mapped by the devmap code. If the given address range isn't * static-mapped, then ptov returns NULL and vtop returns DEVMAP_PADDR_NOTFOUND. * The latter implies that you can't vtop just the last byte of physical address * space. This is not as limiting as it might sound, because even if a device diff --git a/sys/arm/include/machdep.h b/sys/arm/include/machdep.h index 08e9e21..46d7e66 100644 --- a/sys/arm/include/machdep.h +++ b/sys/arm/include/machdep.h @@ -33,11 +33,39 @@ vm_offset_t linux_parse_boot_param(struct arm_boot_params *abp); vm_offset_t fake_preload_metadata(struct arm_boot_params *abp); vm_offset_t parse_boot_param(struct arm_boot_params *abp); -/* Called by initarm */ +/* + * Initialization functions called by the common initarm() function in + * arm/machdep.c (but not necessarily from the custom initarm() functions of + * older code). + * + * - initarm_early_init() is called very early, after parsing the boot params + * and after physical memory has been located and sized. + * + * - platform_devmap_init() is called as one of the last steps of early virtual + * memory initialization, shortly before the new page tables are installed. + * + * - initarm_lastaddr() is called after platform_devmap_init(), and must return + * the address of the first byte of unusable KVA space. This allows a + * platform to carve out of the top of the KVA space whatever reserves it + * needs for things like static device mapping, and this is called to get the + * value before calling pmap_bootstrap() which uses the value to size the + * available KVA. + * + * - initarm_gpio_init() is called after the static device mappings are + * established and just before cninit(). The intention is that the routine + * can do any hardware setup (such as gpio or pinmux) necessary to make the + * console functional. + * + * - initarm_late_init() is called just after cninit(). This is the first of + * the init routines that can use printf() and expect the output to appear on + * a standard console. + * + */ +void initarm_early_init(void); +int initarm_devmap_init(void); vm_offset_t initarm_lastaddr(void); void initarm_gpio_init(void); void initarm_late_init(void); -int platform_devmap_init(void); /* Board-specific attributes */ void board_set_serial(uint64_t); diff --git a/sys/arm/include/pmap.h b/sys/arm/include/pmap.h index 9dee28d..9374ab5 100644 --- a/sys/arm/include/pmap.h +++ b/sys/arm/include/pmap.h @@ -67,6 +67,7 @@ #else #define PTE_NOCACHE 1 #define PTE_CACHE 2 +#define PTE_DEVICE PTE_NOCACHE #define PTE_PAGETABLE 3 #endif diff --git a/sys/arm/lpc/lpc_machdep.c b/sys/arm/lpc/lpc_machdep.c index 576eda4..a900997 100644 --- a/sys/arm/lpc/lpc_machdep.c +++ b/sys/arm/lpc/lpc_machdep.c @@ -63,11 +63,15 @@ vm_offset_t initarm_lastaddr(void) { + return (fdt_immr_va); +} + +void +initarm_early_init(void) +{ + if (fdt_immr_addr(LPC_DEV_BASE) != 0) while (1); - - /* Platform-specific initialisation */ - return (fdt_immr_va); } void @@ -94,7 +98,7 @@ static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { /* diff --git a/sys/arm/mv/mv_machdep.c b/sys/arm/mv/mv_machdep.c index 5002839..d31a512 100644 --- a/sys/arm/mv/mv_machdep.c +++ b/sys/arm/mv/mv_machdep.c @@ -203,11 +203,15 @@ vm_offset_t initarm_lastaddr(void) { + return (fdt_immr_va); +} + +void +initarm_early_init(void) +{ + if (fdt_immr_addr(MV_BASE) != 0) while (1); - - /* Platform-specific initialisation */ - return (fdt_immr_va); } void @@ -316,7 +320,7 @@ __weak_reference(mv_default_fdt_pci_devmap, fdt_pci_devmap); * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { phandle_t root, child; pcell_t bank_count; diff --git a/sys/arm/rockchip/rk30xx_machdep.c b/sys/arm/rockchip/rk30xx_machdep.c index e4eb162..daba99f 100644 --- a/sys/arm/rockchip/rk30xx_machdep.c +++ b/sys/arm/rockchip/rk30xx_machdep.c @@ -60,6 +60,12 @@ initarm_lastaddr(void) } void +initarm_early_init(void) +{ + +} + +void initarm_gpio_init(void) { } @@ -82,7 +88,7 @@ static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { int i = 0; diff --git a/sys/arm/samsung/exynos/exynos5_machdep.c b/sys/arm/samsung/exynos/exynos5_machdep.c index 1c5a879..742d63d 100644 --- a/sys/arm/samsung/exynos/exynos5_machdep.c +++ b/sys/arm/samsung/exynos/exynos5_machdep.c @@ -54,6 +54,12 @@ initarm_lastaddr(void) } void +initarm_early_init(void) +{ + +} + +void initarm_gpio_init(void) { } @@ -72,7 +78,7 @@ static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { int i; diff --git a/sys/arm/tegra/tegra2_machdep.c b/sys/arm/tegra/tegra2_machdep.c index 92ca04a..8904250 100644 --- a/sys/arm/tegra/tegra2_machdep.c +++ b/sys/arm/tegra/tegra2_machdep.c @@ -107,10 +107,15 @@ vm_offset_t initarm_lastaddr(void) { + return (fdt_immr_va); +} + +void +initarm_early_init(void) +{ + if (fdt_immr_addr(TEGRA2_BASE) != 0) /* FIXME ???? */ while (1); - - return (fdt_immr_va); } void @@ -132,7 +137,7 @@ static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { int i = 0; fdt_devmap[i].pd_va = 0xe0000000; diff --git a/sys/arm/ti/ti_machdep.c b/sys/arm/ti/ti_machdep.c index 8a3184a..2f78a48 100644 --- a/sys/arm/ti/ti_machdep.c +++ b/sys/arm/ti/ti_machdep.c @@ -63,11 +63,17 @@ vm_offset_t initarm_lastaddr(void) { - ti_cpu_reset = NULL; return (DEVMAP_BOOTSTRAP_MAP_START); } void +initarm_early_init(void) +{ + + ti_cpu_reset = NULL; +} + +void initarm_gpio_init(void) { } @@ -87,7 +93,7 @@ static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { int i = 0; #if defined(SOC_OMAP4) diff --git a/sys/arm/versatile/versatile_machdep.c b/sys/arm/versatile/versatile_machdep.c index 08ce039..0be0ad5 100644 --- a/sys/arm/versatile/versatile_machdep.c +++ b/sys/arm/versatile/versatile_machdep.c @@ -65,6 +65,12 @@ initarm_lastaddr(void) } void +initarm_early_init(void) +{ + +} + +void initarm_gpio_init(void) { } @@ -85,7 +91,7 @@ static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { int i = 0; fdt_devmap[i].pd_va = 0xf0100000; diff --git a/sys/arm/xilinx/zy7_machdep.c b/sys/arm/xilinx/zy7_machdep.c index a2b01b5..8461fca 100644 --- a/sys/arm/xilinx/zy7_machdep.c +++ b/sys/arm/xilinx/zy7_machdep.c @@ -64,6 +64,12 @@ initarm_lastaddr(void) } void +initarm_early_init(void) +{ + +} + +void initarm_gpio_init(void) { } @@ -80,7 +86,7 @@ static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_SIZE]; * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { int i = 0; |