svn commit: r257208 - in projects/arm_eabi_vfp: contrib/libpcap lib/libutil sys/arm/allwinner sys/arm/allwinner/a20 sys/arm/arm sys/arm/at91 sys/arm/broadcom/bcm2835 sys/arm/econa sys/arm/freescale...
Andrew Turner
andrew at FreeBSD.org
Sun Oct 27 10:51:42 UTC 2013
Author: andrew
Date: Sun Oct 27 10:51:34 2013
New Revision: 257208
URL: http://svnweb.freebsd.org/changeset/base/257208
Log:
MFS to r257207
Added:
projects/arm_eabi_vfp/sys/arm/freescale/imx/imx_machdep.c
- copied unchanged from r257207, head/sys/arm/freescale/imx/imx_machdep.c
projects/arm_eabi_vfp/sys/arm/freescale/imx/imx_machdep.h
- copied unchanged from r257207, head/sys/arm/freescale/imx/imx_machdep.h
projects/arm_eabi_vfp/sys/net/pf.h
- copied unchanged from r257207, head/sys/net/pf.h
projects/arm_eabi_vfp/sys/net/pf_altq.h
- copied unchanged from r257207, head/sys/net/pf_altq.h
Modified:
projects/arm_eabi_vfp/contrib/libpcap/grammar.y
projects/arm_eabi_vfp/lib/libutil/login.conf.5
projects/arm_eabi_vfp/sys/arm/allwinner/a10_clk.c
projects/arm_eabi_vfp/sys/arm/allwinner/a10_gpio.c
projects/arm_eabi_vfp/sys/arm/allwinner/a10_machdep.c
projects/arm_eabi_vfp/sys/arm/allwinner/a20/a20_cpu_cfg.c
projects/arm_eabi_vfp/sys/arm/allwinner/timer.c
projects/arm_eabi_vfp/sys/arm/arm/busdma_machdep.c
projects/arm_eabi_vfp/sys/arm/arm/genassym.c
projects/arm_eabi_vfp/sys/arm/arm/generic_timer.c
projects/arm_eabi_vfp/sys/arm/arm/machdep.c
projects/arm_eabi_vfp/sys/arm/arm/minidump_machdep.c
projects/arm_eabi_vfp/sys/arm/arm/mpcore_timer.c
projects/arm_eabi_vfp/sys/arm/arm/nexus.c
projects/arm_eabi_vfp/sys/arm/arm/pmap-v6.c
projects/arm_eabi_vfp/sys/arm/arm/pmap.c
projects/arm_eabi_vfp/sys/arm/arm/vfp.c
projects/arm_eabi_vfp/sys/arm/arm/vm_machdep.c
projects/arm_eabi_vfp/sys/arm/at91/at91_mci.c
projects/arm_eabi_vfp/sys/arm/at91/at91_pmc.c
projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_dma.c
projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_fb.c
projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_gpio.c
projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_mbox.c
projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_spi.c
projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_systimer.c
projects/arm_eabi_vfp/sys/arm/econa/timer.c
projects/arm_eabi_vfp/sys/arm/freescale/imx/files.imx51
projects/arm_eabi_vfp/sys/arm/freescale/imx/files.imx53
projects/arm_eabi_vfp/sys/arm/freescale/imx/imx51_ipuv3.c
projects/arm_eabi_vfp/sys/arm/freescale/imx/imx51_machdep.c
projects/arm_eabi_vfp/sys/arm/freescale/imx/imx53_machdep.c
projects/arm_eabi_vfp/sys/arm/freescale/imx/imx_gpt.c
projects/arm_eabi_vfp/sys/arm/include/atomic.h
projects/arm_eabi_vfp/sys/arm/include/cpu.h
projects/arm_eabi_vfp/sys/arm/include/fdt.h
projects/arm_eabi_vfp/sys/arm/include/pcb.h
projects/arm_eabi_vfp/sys/arm/include/pcpu.h
projects/arm_eabi_vfp/sys/arm/include/pmap.h
projects/arm_eabi_vfp/sys/arm/include/undefined.h
projects/arm_eabi_vfp/sys/arm/lpc/lpc_fb.c
projects/arm_eabi_vfp/sys/arm/lpc/lpc_gpio.c
projects/arm_eabi_vfp/sys/arm/lpc/lpc_machdep.c
projects/arm_eabi_vfp/sys/arm/lpc/lpc_mmc.c
projects/arm_eabi_vfp/sys/arm/lpc/lpc_spi.c
projects/arm_eabi_vfp/sys/arm/lpc/lpc_timer.c
projects/arm_eabi_vfp/sys/arm/mv/mv_machdep.c
projects/arm_eabi_vfp/sys/arm/mv/mvvar.h
projects/arm_eabi_vfp/sys/arm/mv/orion/db88f5xxx.c
projects/arm_eabi_vfp/sys/arm/mv/timer.c
projects/arm_eabi_vfp/sys/arm/rockchip/rk30xx_gpio.c
projects/arm_eabi_vfp/sys/arm/rockchip/rk30xx_grf.c
projects/arm_eabi_vfp/sys/arm/rockchip/rk30xx_machdep.c
projects/arm_eabi_vfp/sys/arm/rockchip/rk30xx_pmu.c
projects/arm_eabi_vfp/sys/arm/sa11x0/sa11x0_io.c
projects/arm_eabi_vfp/sys/arm/samsung/exynos/arch_timer.c
projects/arm_eabi_vfp/sys/arm/samsung/exynos/exynos5_machdep.c
projects/arm_eabi_vfp/sys/arm/tegra/tegra2_machdep.c
projects/arm_eabi_vfp/sys/arm/ti/am335x/am335x_dmtimer.c
projects/arm_eabi_vfp/sys/arm/ti/am335x/am335x_lcd_syscons.c
projects/arm_eabi_vfp/sys/arm/ti/am335x/am335x_prcm.c
projects/arm_eabi_vfp/sys/arm/ti/am335x/am335x_scm_padconf.c
projects/arm_eabi_vfp/sys/arm/ti/omap4/omap4_prcm_clks.c
projects/arm_eabi_vfp/sys/arm/ti/omap4/omap4_scm_padconf.c
projects/arm_eabi_vfp/sys/arm/ti/omap4/pandaboard/pandaboard.c
projects/arm_eabi_vfp/sys/arm/ti/ti_cpuid.c
projects/arm_eabi_vfp/sys/arm/ti/ti_machdep.c
projects/arm_eabi_vfp/sys/arm/ti/ti_mmchs.c
projects/arm_eabi_vfp/sys/arm/ti/ti_prcm.c
projects/arm_eabi_vfp/sys/arm/ti/ti_scm.c
projects/arm_eabi_vfp/sys/arm/ti/twl/twl.c
projects/arm_eabi_vfp/sys/arm/ti/twl/twl_clks.c
projects/arm_eabi_vfp/sys/arm/ti/twl/twl_vreg.c
projects/arm_eabi_vfp/sys/arm/versatile/pl050.c
projects/arm_eabi_vfp/sys/arm/versatile/sp804.c
projects/arm_eabi_vfp/sys/arm/versatile/versatile_clcd.c
projects/arm_eabi_vfp/sys/arm/versatile/versatile_machdep.c
projects/arm_eabi_vfp/sys/arm/versatile/versatile_pci.c
projects/arm_eabi_vfp/sys/arm/versatile/versatile_timer.c
projects/arm_eabi_vfp/sys/arm/xilinx/zy7_machdep.c
projects/arm_eabi_vfp/sys/arm/xscale/i80321/i80321_pci.c
projects/arm_eabi_vfp/sys/arm/xscale/i8134x/i81342_pci.c
projects/arm_eabi_vfp/sys/arm/xscale/ixp425/ixp425_pci.c
projects/arm_eabi_vfp/sys/arm/xscale/ixp425/ixp425_wdog.c
projects/arm_eabi_vfp/sys/boot/powerpc/ps3/start.S
projects/arm_eabi_vfp/sys/contrib/altq/altq/altq_cbq.c
projects/arm_eabi_vfp/sys/contrib/altq/altq/altq_cdnr.c
projects/arm_eabi_vfp/sys/contrib/altq/altq/altq_hfsc.c
projects/arm_eabi_vfp/sys/contrib/altq/altq/altq_priq.c
projects/arm_eabi_vfp/sys/contrib/altq/altq/altq_red.c
projects/arm_eabi_vfp/sys/contrib/altq/altq/altq_rio.c
projects/arm_eabi_vfp/sys/contrib/altq/altq/altq_rmclass.c
projects/arm_eabi_vfp/sys/contrib/altq/altq/altq_subr.c
projects/arm_eabi_vfp/sys/dev/uart/uart_cpu_fdt.c
projects/arm_eabi_vfp/sys/dev/usb/usb_dev.c
projects/arm_eabi_vfp/sys/dev/usb/usb_device.h
projects/arm_eabi_vfp/sys/dev/usb/usb_generic.c
projects/arm_eabi_vfp/sys/dev/usb/usb_hub.c
projects/arm_eabi_vfp/sys/net/pfvar.h
projects/arm_eabi_vfp/sys/powerpc/booke/locore.S
projects/arm_eabi_vfp/sys/powerpc/booke/machdep.c
projects/arm_eabi_vfp/sys/powerpc/booke/pmap.c
projects/arm_eabi_vfp/usr.sbin/pkg/pkg.c
Directory Properties:
projects/arm_eabi_vfp/ (props changed)
projects/arm_eabi_vfp/contrib/libpcap/ (props changed)
projects/arm_eabi_vfp/lib/libutil/ (props changed)
projects/arm_eabi_vfp/sys/ (props changed)
projects/arm_eabi_vfp/sys/boot/ (props changed)
Modified: projects/arm_eabi_vfp/contrib/libpcap/grammar.y
==============================================================================
--- projects/arm_eabi_vfp/contrib/libpcap/grammar.y Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/contrib/libpcap/grammar.y Sun Oct 27 10:51:34 2013 (r257208)
@@ -56,7 +56,7 @@ struct rtentry;
#include "gencode.h"
#ifdef HAVE_NET_PFVAR_H
#include <net/if.h>
-#include <net/pfvar.h>
+#include <net/pf.h>
#include <net/if_pflog.h>
#endif
#include "ieee80211.h"
Modified: projects/arm_eabi_vfp/lib/libutil/login.conf.5
==============================================================================
--- projects/arm_eabi_vfp/lib/libutil/login.conf.5 Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/lib/libutil/login.conf.5 Sun Oct 27 10:51:34 2013 (r257208)
@@ -50,9 +50,7 @@ non-root user without a valid login clas
A user with a uid of 0 without a valid login class will use the record
"root" if it exists, or "default" if not.
.Pp
-In
-.Fx ,
-users may individually create a file called
+Users may individually create a file called
.Pa .login_conf
in their home directory using the same format, consisting of a single
entry with a record id of "me".
@@ -132,6 +130,7 @@ tag being delimited from the value by '=
Whichever method is used, then all records in the database must use the
same method to allow values to be correctly overridden in interpolated
records.
+A numeric value may be infinite.
.It size
A number which expresses a size.
The default interpretation of a value is the number of bytes, but a
@@ -150,6 +149,7 @@ represents terabytes.
.El
A size value is a numeric quantity and case of the suffix is not significant.
Concatenated values are added together.
+A size value may be infinite.
.It time
A period of time, by default in seconds.
A prefix may specify a different unit:
@@ -170,8 +170,16 @@ the number of seconds.
Concatenated values are added together.
For example, 2 hours and 40 minutes may be written either as
9600s, 160m or 2h40m.
+A time value may be infinite.
.El
.Pp
+.Dq infinity ,
+.Dq inf ,
+.Dq unlimited ,
+.Dq unlimit,
+and -1
+are considered infinite values.
+.Pp
The usual convention to interpolate capability entries using the special
.Em tc=value
notation may be used.
Modified: projects/arm_eabi_vfp/sys/arm/allwinner/a10_clk.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/allwinner/a10_clk.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/allwinner/a10_clk.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$");
#include <sys/watchdog.h>
#include <machine/bus.h>
#include <machine/cpu.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include <dev/fdt/fdt_common.h>
Modified: projects/arm_eabi_vfp/sys/arm/allwinner/a10_gpio.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/allwinner/a10_gpio.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/allwinner/a10_gpio.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
#include <machine/cpufunc.h>
#include <machine/resource.h>
#include <machine/fdt.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include <dev/fdt/fdt_common.h>
Modified: projects/arm_eabi_vfp/sys/arm/allwinner/a10_machdep.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/allwinner/a10_machdep.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/allwinner/a10_machdep.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -43,9 +43,7 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <machine/bus.h>
-#include <machine/frame.h> /* For trapframe_t, used in <machine/machdep.h> */
#include <machine/machdep.h>
-#include <machine/pmap.h>
#include <dev/fdt/fdt_common.h>
@@ -59,7 +57,7 @@ vm_offset_t
initarm_lastaddr(void)
{
- return (DEVMAP_BOOTSTRAP_MAP_START - ARM_NOCACHE_KVA_SIZE);
+ return (DEVMAP_BOOTSTRAP_MAP_START);
}
void
Modified: projects/arm_eabi_vfp/sys/arm/allwinner/a20/a20_cpu_cfg.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/allwinner/a20/a20_cpu_cfg.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/allwinner/a20/a20_cpu_cfg.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$");
#include <sys/watchdog.h>
#include <machine/bus.h>
#include <machine/cpu.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include <dev/fdt/fdt_common.h>
Modified: projects/arm_eabi_vfp/sys/arm/allwinner/timer.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/allwinner/timer.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/allwinner/timer.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
#include <sys/watchdog.h>
#include <machine/bus.h>
#include <machine/cpu.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include <dev/fdt/fdt_common.h>
Modified: projects/arm_eabi_vfp/sys/arm/arm/busdma_machdep.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/arm/busdma_machdep.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/arm/busdma_machdep.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -122,7 +122,6 @@ struct bus_dma_tag {
struct bounce_page {
vm_offset_t vaddr; /* kva of bounce buffer */
- vm_offset_t vaddr_nocache; /* kva of bounce buffer uncached */
bus_addr_t busaddr; /* Physical address */
vm_offset_t datavaddr; /* kva of client data */
bus_addr_t dataaddr; /* client physical address */
@@ -808,7 +807,7 @@ _bus_dmamap_count_phys(bus_dma_tag_t dma
bus_addr_t curaddr;
bus_size_t sgsize;
- if ((map->pagesneeded == 0)) {
+ if (map->pagesneeded == 0) {
CTR3(KTR_BUSDMA, "lowaddr= %d, boundary= %d, alignment= %d",
dmat->lowaddr, dmat->boundary, dmat->alignment);
CTR2(KTR_BUSDMA, "map= %p, pagesneeded= %d",
@@ -839,7 +838,7 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm
vm_offset_t vendaddr;
bus_addr_t paddr;
- if ((map->pagesneeded == 0)) {
+ if (map->pagesneeded == 0) {
CTR3(KTR_BUSDMA, "lowaddr= %d, boundary= %d, alignment= %d",
dmat->lowaddr, dmat->boundary, dmat->alignment);
CTR2(KTR_BUSDMA, "map= %p, pagesneeded= %d",
@@ -1196,39 +1195,23 @@ _bus_dmamap_sync_bp(bus_dma_tag_t dmat,
STAILQ_FOREACH(bpage, &map->bpages, links) {
if (op & BUS_DMASYNC_PREWRITE) {
if (bpage->datavaddr != 0)
- bcopy((void *)bpage->datavaddr,
- (void *)(bpage->vaddr_nocache != 0 ?
- bpage->vaddr_nocache :
- bpage->vaddr),
- bpage->datacount);
+ bcopy((void *)bpage->datavaddr,
+ (void *)bpage->vaddr, bpage->datacount);
else
physcopyout(bpage->dataaddr,
- (void *)(bpage->vaddr_nocache != 0 ?
- bpage->vaddr_nocache :
- bpage->vaddr),
- bpage->datacount);
- if (bpage->vaddr_nocache == 0) {
- cpu_dcache_wb_range(bpage->vaddr,
- bpage->datacount);
- cpu_l2cache_wb_range(bpage->vaddr,
- bpage->datacount);
- }
+ (void *)bpage->vaddr,bpage->datacount);
+ cpu_dcache_wb_range(bpage->vaddr, bpage->datacount);
+ cpu_l2cache_wb_range(bpage->vaddr, bpage->datacount);
dmat->bounce_zone->total_bounced++;
}
if (op & BUS_DMASYNC_POSTREAD) {
- if (bpage->vaddr_nocache == 0) {
- cpu_dcache_inv_range(bpage->vaddr,
- bpage->datacount);
- cpu_l2cache_inv_range(bpage->vaddr,
- bpage->datacount);
- }
+ cpu_dcache_inv_range(bpage->vaddr, bpage->datacount);
+ cpu_l2cache_inv_range(bpage->vaddr, bpage->datacount);
if (bpage->datavaddr != 0)
- bcopy((void *)(bpage->vaddr_nocache != 0 ?
- bpage->vaddr_nocache : bpage->vaddr),
+ bcopy((void *)bpage->vaddr,
(void *)bpage->datavaddr, bpage->datacount);
else
- physcopyin((void *)(bpage->vaddr_nocache != 0 ?
- bpage->vaddr_nocache : bpage->vaddr),
+ physcopyin((void *)bpage->vaddr,
bpage->dataaddr, bpage->datacount);
dmat->bounce_zone->total_bounced++;
}
@@ -1385,8 +1368,6 @@ alloc_bounce_pages(bus_dma_tag_t dmat, u
break;
}
bpage->busaddr = pmap_kextract(bpage->vaddr);
- bpage->vaddr_nocache = (vm_offset_t)arm_remap_nocache(
- (void *)bpage->vaddr, PAGE_SIZE);
mtx_lock(&bounce_lock);
STAILQ_INSERT_TAIL(&bz->bounce_page_list, bpage, links);
total_bpages++;
Modified: projects/arm_eabi_vfp/sys/arm/arm/genassym.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/arm/genassym.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/arm/genassym.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_map.h>
#include <machine/vmparam.h>
#include <machine/armreg.h>
+#include <machine/frame.h>
#include <machine/pcb.h>
#include <machine/cpu.h>
#include <machine/proc.h>
Modified: projects/arm_eabi_vfp/sys/arm/arm/generic_timer.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/arm/generic_timer.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/arm/generic_timer.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$");
#include <sys/watchdog.h>
#include <machine/bus.h>
#include <machine/cpu.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include <dev/fdt/fdt_common.h>
Modified: projects/arm_eabi_vfp/sys/arm/arm/machdep.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/arm/machdep.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/arm/machdep.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -90,11 +90,11 @@ __FBSDID("$FreeBSD$");
#include <machine/armreg.h>
#include <machine/atags.h>
#include <machine/cpu.h>
+#include <machine/frame.h>
#include <machine/machdep.h>
#include <machine/md_var.h>
#include <machine/metadata.h>
#include <machine/pcb.h>
-#include <machine/pmap.h>
#include <machine/reg.h>
#include <machine/trap.h>
#include <machine/undefined.h>
Modified: projects/arm_eabi_vfp/sys/arm/arm/minidump_machdep.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/arm/minidump_machdep.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/arm/minidump_machdep.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$");
#endif
#include <vm/vm.h>
#include <vm/pmap.h>
-#include <machine/pmap.h>
#include <machine/atomic.h>
#include <machine/elf.h>
#include <machine/md_var.h>
Modified: projects/arm_eabi_vfp/sys/arm/arm/mpcore_timer.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/arm/mpcore_timer.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/arm/mpcore_timer.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$");
#include <sys/watchdog.h>
#include <machine/bus.h>
#include <machine/cpu.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include <dev/fdt/fdt_common.h>
Modified: projects/arm_eabi_vfp/sys/arm/arm/nexus.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/arm/nexus.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/arm/nexus.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$");
#include <machine/pcb.h>
#include <vm/vm.h>
#include <vm/pmap.h>
-#include <machine/pmap.h>
#include <machine/resource.h>
#include <machine/intr.h>
Modified: projects/arm_eabi_vfp/sys/arm/arm/pmap-v6.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/arm/pmap-v6.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/arm/pmap-v6.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -1951,7 +1951,6 @@ pmap_bootstrap(vm_offset_t firstaddr, st
virtual_avail = round_page(virtual_avail);
virtual_end = vm_max_kernel_address;
kernel_vm_end = pmap_curmaxkvaddr;
- arm_nocache_startaddr = vm_max_kernel_address;
mtx_init(&cmtx, "TMP mappings mtx", NULL, MTX_DEF);
pmap_set_pcb_pagedir(kernel_pmap, thread0.td_pcb);
Modified: projects/arm_eabi_vfp/sys/arm/arm/pmap.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/arm/pmap.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/arm/pmap.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -2423,7 +2423,6 @@ pmap_bootstrap(vm_offset_t firstaddr, st
virtual_avail = round_page(virtual_avail);
virtual_end = vm_max_kernel_address;
kernel_vm_end = pmap_curmaxkvaddr;
- arm_nocache_startaddr = vm_max_kernel_address;
mtx_init(&cmtx, "TMP mappings mtx", NULL, MTX_DEF);
#ifdef ARM_USE_SMALL_ALLOC
Modified: projects/arm_eabi_vfp/sys/arm/arm/vfp.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/arm/vfp.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/arm/vfp.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
#include <sys/proc.h>
#include <sys/kernel.h>
+#include <machine/frame.h>
#include <machine/fp.h>
#include <machine/pcb.h>
#include <machine/undefined.h>
Modified: projects/arm_eabi_vfp/sys/arm/arm/vm_machdep.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/arm/vm_machdep.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/arm/vm_machdep.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
#include <sys/sysent.h>
#include <sys/unistd.h>
#include <machine/cpu.h>
+#include <machine/frame.h>
#include <machine/pcb.h>
#include <machine/sysarch.h>
#include <sys/lock.h>
@@ -481,80 +482,6 @@ cpu_exit(struct thread *td)
{
}
-#define BITS_PER_INT (8 * sizeof(int))
-vm_offset_t arm_nocache_startaddr;
-static int arm_nocache_allocated[ARM_NOCACHE_KVA_SIZE / (PAGE_SIZE *
- BITS_PER_INT)];
-
-/*
- * Functions to map and unmap memory non-cached into KVA the kernel won't try
- * to allocate. The goal is to provide uncached memory to busdma, to honor
- * BUS_DMA_COHERENT.
- * We can allocate at most ARM_NOCACHE_KVA_SIZE bytes.
- * The allocator is rather dummy, each page is represented by a bit in
- * a bitfield, 0 meaning the page is not allocated, 1 meaning it is.
- * As soon as it finds enough contiguous pages to satisfy the request,
- * it returns the address.
- */
-void *
-arm_remap_nocache(void *addr, vm_size_t size)
-{
- int i, j;
-
- size = round_page(size);
- for (i = 0; i < ARM_NOCACHE_KVA_SIZE / PAGE_SIZE; i++) {
- if (!(arm_nocache_allocated[i / BITS_PER_INT] & (1 << (i %
- BITS_PER_INT)))) {
- for (j = i; j < i + (size / (PAGE_SIZE)); j++)
- if (arm_nocache_allocated[j / BITS_PER_INT] &
- (1 << (j % BITS_PER_INT)))
- break;
- if (j == i + (size / (PAGE_SIZE)))
- break;
- }
- }
- if (i < ARM_NOCACHE_KVA_SIZE / PAGE_SIZE) {
- vm_offset_t tomap = arm_nocache_startaddr + i * PAGE_SIZE;
- void *ret = (void *)tomap;
- vm_paddr_t physaddr = vtophys((vm_offset_t)addr);
- vm_offset_t vaddr = (vm_offset_t) addr;
-
- vaddr = vaddr & ~PAGE_MASK;
- for (; tomap < (vm_offset_t)ret + size; tomap += PAGE_SIZE,
- vaddr += PAGE_SIZE, physaddr += PAGE_SIZE, i++) {
- cpu_idcache_wbinv_range(vaddr, PAGE_SIZE);
-#ifdef ARM_L2_PIPT
- cpu_l2cache_wbinv_range(physaddr, PAGE_SIZE);
-#else
- cpu_l2cache_wbinv_range(vaddr, PAGE_SIZE);
-#endif
- pmap_kenter_nocache(tomap, physaddr);
- cpu_tlb_flushID_SE(vaddr);
- arm_nocache_allocated[i / BITS_PER_INT] |= 1 << (i %
- BITS_PER_INT);
- }
- return (ret);
- }
-
- return (NULL);
-}
-
-void
-arm_unmap_nocache(void *addr, vm_size_t size)
-{
- vm_offset_t raddr = (vm_offset_t)addr;
- int i;
-
- size = round_page(size);
- i = (raddr - arm_nocache_startaddr) / (PAGE_SIZE);
- for (; size > 0; size -= PAGE_SIZE, i++) {
- arm_nocache_allocated[i / BITS_PER_INT] &= ~(1 << (i %
- BITS_PER_INT));
- pmap_kremove(raddr);
- raddr += PAGE_SIZE;
- }
-}
-
#ifdef ARM_USE_SMALL_ALLOC
static TAILQ_HEAD(,arm_small_page) pages_normal =
Modified: projects/arm_eabi_vfp/sys/arm/at91/at91_mci.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/at91/at91_mci.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/at91/at91_mci.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
#include <machine/cpu.h>
#include <machine/cpufunc.h>
#include <machine/resource.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include <arm/at91/at91var.h>
Modified: projects/arm_eabi_vfp/sys/arm/at91/at91_pmc.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/at91/at91_pmc.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/at91/at91_pmc.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
#include <machine/cpu.h>
#include <machine/cpufunc.h>
#include <machine/resource.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include <arm/at91/at91reg.h>
#include <arm/at91/at91var.h>
Modified: projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_dma.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_dma.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_dma.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$");
#include <machine/bus.h>
#include <machine/cpu.h>
#include <machine/cpufunc.h>
-#include <machine/pmap.h>
#include "bcm2835_dma.h"
#include "bcm2835_vcbus.h"
Modified: projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_fb.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_fb.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_fb.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
#include <machine/cpu.h>
#include <machine/cpufunc.h>
#include <machine/resource.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include <dev/fdt/fdt_common.h>
Modified: projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_gpio.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
#include <machine/cpufunc.h>
#include <machine/resource.h>
#include <machine/fdt.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include <dev/fdt/fdt_common.h>
Modified: projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -52,9 +52,7 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <machine/bus.h>
-#include <machine/frame.h> /* For trapframe_t, used in <machine/machdep.h> */
#include <machine/machdep.h>
-#include <machine/pmap.h>
#include <dev/fdt/fdt_common.h>
@@ -67,7 +65,7 @@ vm_offset_t
initarm_lastaddr(void)
{
- return (DEVMAP_BOOTSTRAP_MAP_START - ARM_NOCACHE_KVA_SIZE);
+ return (DEVMAP_BOOTSTRAP_MAP_START);
}
void
Modified: projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_mbox.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
#include <sys/watchdog.h>
#include <machine/bus.h>
#include <machine/cpu.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include <dev/fdt/fdt_common.h>
Modified: projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
#include <machine/cpu.h>
#include <machine/cpufunc.h>
#include <machine/resource.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include <dev/fdt/fdt_common.h>
Modified: projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_spi.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_spi.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_spi.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$");
#include <machine/cpufunc.h>
#include <machine/resource.h>
#include <machine/fdt.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include <dev/fdt/fdt_common.h>
Modified: projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_systimer.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$");
#include <sys/watchdog.h>
#include <machine/bus.h>
#include <machine/cpu.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include <dev/fdt/fdt_common.h>
Modified: projects/arm_eabi_vfp/sys/arm/econa/timer.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/econa/timer.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/econa/timer.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$");
#include <sys/watchdog.h>
#include <machine/bus.h>
#include <machine/cpu.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include "econa_reg.h"
Modified: projects/arm_eabi_vfp/sys/arm/freescale/imx/files.imx51
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/freescale/imx/files.imx51 Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/freescale/imx/files.imx51 Sun Oct 27 10:51:34 2013 (r257208)
@@ -8,6 +8,7 @@ arm/arm/irq_dispatch.S standard
kern/kern_clocksource.c standard
# Init
+arm/freescale/imx/imx_machdep.c standard
arm/freescale/imx/imx51_machdep.c standard
arm/freescale/imx/common.c standard
arm/freescale/imx/bus_space.c standard
Modified: projects/arm_eabi_vfp/sys/arm/freescale/imx/files.imx53
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/freescale/imx/files.imx53 Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/freescale/imx/files.imx53 Sun Oct 27 10:51:34 2013 (r257208)
@@ -8,6 +8,7 @@ arm/arm/irq_dispatch.S standard
kern/kern_clocksource.c standard
# Init
+arm/freescale/imx/imx_machdep.c standard
arm/freescale/imx/imx53_machdep.c standard
arm/freescale/imx/common.c standard
arm/freescale/imx/bus_space.c standard
Modified: projects/arm_eabi_vfp/sys/arm/freescale/imx/imx51_ipuv3.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/freescale/imx/imx51_ipuv3.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/freescale/imx/imx51_ipuv3.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$");
#include <machine/cpu.h>
#include <machine/cpufunc.h>
#include <machine/resource.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include <dev/fdt/fdt_common.h>
Modified: projects/arm_eabi_vfp/sys/arm/freescale/imx/imx51_machdep.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/freescale/imx/imx51_machdep.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/freescale/imx/imx51_machdep.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -1,14 +1,7 @@
/*-
- * Copyright (c) 1994-1998 Mark Brinicombe.
- * Copyright (c) 1994 Brini.
- * Copyright (c) 2012, 2013 The FreeBSD Foundation
+ * Copyright (c) 2013 Ian Lepore <ian at freebsd.org>
* All rights reserved.
*
- *
- * This code is derived from software written for Brini by Mark Brinicombe
- * Portions of this software were developed by Oleksandr Rybalko
- * under sponsorship from the FreeBSD Foundation.
- *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -17,26 +10,18 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Brini.
- * 4. The name of the company nor the name of the author may be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * from: FreeBSD: //depot/projects/arm/src/sys/arm/at91/kb920x_machdep.c, rev 45
*/
#include "opt_platform.h"
@@ -44,99 +29,42 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/reboot.h>
-#include <vm/vm.h>
-#include <vm/pmap.h>
-
-#include <machine/bus.h>
-#include <machine/frame.h> /* For trapframe_t, used in <machine/machdep.h> */
#include <machine/machdep.h>
-#include <machine/pmap.h>
-
-#include <dev/fdt/fdt_common.h>
-
-#define IMX51_DEV_VIRT_BASE 0xe0000000
-vm_offset_t
-initarm_lastaddr(void)
-{
-
- boothowto |= RB_VERBOSE|RB_MULTIPLE;
- bootverbose = 1;
-
- if (fdt_immr_addr(IMX51_DEV_VIRT_BASE) != 0)
- while (1);
-
- /* Platform-specific initialisation */
- return (fdt_immr_va - ARM_NOCACHE_KVA_SIZE);
-}
+#include <arm/freescale/imx/imx_machdep.h>
/*
- * Set initial values of GPIO output ports
+ * 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
-initarm_gpio_init(void)
+imx_devmap_init(void)
{
+ imx_devmap_addentry(0x70000000, 0x00100000);
+ imx_devmap_addentry(0x73f00000, 0x00100000);
+ imx_devmap_addentry(0x83f00000, 0x00100000);
}
void
-initarm_late_init(void)
-{
-
-}
-
-#define FDT_DEVMAP_MAX 2
-static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
- { 0, 0, 0, 0, 0, },
- { 0, 0, 0, 0, 0, }
-};
-
-/*
- * Construct pmap_devmap[] with DT-derived config data.
- */
-int
-platform_devmap_init(void)
-{
-
- /*
- * Map segment where UART1 and UART2 located.
- */
- fdt_devmap[0].pd_va = IMX51_DEV_VIRT_BASE + 0x03f00000;
- fdt_devmap[0].pd_pa = 0x73f00000;
- fdt_devmap[0].pd_size = 0x00100000;
- 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];
- return (0);
-}
-
-struct arm32_dma_range *
-bus_dma_get_range(void)
+cpu_reset(void)
{
- return (NULL);
+ imx_wdog_cpu_reset(0x73F98000);
}
-int
-bus_dma_get_range_nb(void)
+u_int imx_soc_type()
{
-
- return (0);
+ return (IMXSOC_51);
}
-void
-cpu_reset(void)
-{
-
- printf("Reset ...\n");
- /* Clear n_reset flag */
- *((volatile u_int16_t *)(IMX51_DEV_VIRT_BASE + 0x03f98000)) =
- (u_int16_t)0;
- while (1);
-}
Modified: projects/arm_eabi_vfp/sys/arm/freescale/imx/imx53_machdep.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/freescale/imx/imx53_machdep.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/freescale/imx/imx53_machdep.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -1,13 +1,7 @@
/*-
- * Copyright (c) 1994-1998 Mark Brinicombe.
- * Copyright (c) 1994 Brini.
- * Copyright (c) 2012, 2013 The FreeBSD Foundation
+ * Copyright (c) 2013 Ian Lepore <ian at freebsd.org>
* All rights reserved.
*
- * This code is derived from software written for Brini by Mark Brinicombe
- * Portions of this software were developed by Oleksandr Rybalko
- * under sponsorship from the FreeBSD Foundation.
- *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -16,20 +10,14 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Brini.
- * 4. The name of the company nor the name of the author may be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
@@ -41,101 +29,43 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/reboot.h>
-#include <vm/vm.h>
-#include <vm/pmap.h>
-
-#include <machine/bus.h>
-#include <machine/frame.h> /* For trapframe_t, used in <machine/machdep.h> */
#include <machine/machdep.h>
-#include <machine/pmap.h>
-
-#include <dev/fdt/fdt_common.h>
-
-#define IMX53_DEV_VIRT_BASE 0xe0000000
-
-vm_offset_t
-initarm_lastaddr(void)
-{
-
- boothowto |= RB_VERBOSE|RB_MULTIPLE;
- bootverbose = 1;
-
- if (fdt_immr_addr(IMX53_DEV_VIRT_BASE) != 0)
- while (1);
-
- /* Platform-specific initialisation */
- return (fdt_immr_va - ARM_NOCACHE_KVA_SIZE);
-}
+#include <arm/freescale/imx/imx_machdep.h>
/*
- * Set initial values of GPIO output ports
+ * 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
-initarm_gpio_init(void)
+imx_devmap_init(void)
{
+ imx_devmap_addentry(0x50000000, 0x00100000);
+ imx_devmap_addentry(0x53f00000, 0x00100000);
+ imx_devmap_addentry(0x63f00000, 0x00100000);
}
void
-initarm_late_init(void)
-{
-
-}
-
-#define FDT_DEVMAP_MAX 2
-static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
- { 0, 0, 0, 0, 0, },
- { 0, 0, 0, 0, 0, }
-};
-
-/*
- * Construct pmap_devmap[] with DT-derived config data.
- */
-int
-platform_devmap_init(void)
-{
-
- /*
- * Map segment where UART1 and UART2 located.
- */
- fdt_devmap[0].pd_va = IMX53_DEV_VIRT_BASE + 0x03f00000;
- fdt_devmap[0].pd_pa = 0x53f00000;
- fdt_devmap[0].pd_size = 0x00100000;
- 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];
-
- return (0);
-}
-
-struct arm32_dma_range *
-bus_dma_get_range(void)
+cpu_reset(void)
{
- return (NULL);
+ imx_wdog_cpu_reset(0x53F98000);
}
-int
-bus_dma_get_range_nb(void)
+u_int imx_soc_type()
{
-
- return (0);
+ return (IMXSOC_53);
}
-void
-cpu_reset(void)
-{
- printf("Reset ...\n");
- /* Clear n_reset flag */
- *((volatile u_int16_t *)(IMX53_DEV_VIRT_BASE + 0x03f98000)) =
- (u_int16_t)0;
- while (1);
-}
Modified: projects/arm_eabi_vfp/sys/arm/freescale/imx/imx_gpt.c
==============================================================================
--- projects/arm_eabi_vfp/sys/arm/freescale/imx/imx_gpt.c Sun Oct 27 10:44:22 2013 (r257207)
+++ projects/arm_eabi_vfp/sys/arm/freescale/imx/imx_gpt.c Sun Oct 27 10:51:34 2013 (r257208)
@@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
#include <sys/watchdog.h>
#include <machine/bus.h>
#include <machine/cpu.h>
-#include <machine/frame.h>
#include <machine/intr.h>
#include <machine/fdt.h>
Copied: projects/arm_eabi_vfp/sys/arm/freescale/imx/imx_machdep.c (from r257207, head/sys/arm/freescale/imx/imx_machdep.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/arm_eabi_vfp/sys/arm/freescale/imx/imx_machdep.c Sun Oct 27 10:51:34 2013 (r257208, copy of r257207, head/sys/arm/freescale/imx/imx_machdep.c)
@@ -0,0 +1,198 @@
+/*-
+ * Copyright (c) 2013 Ian Lepore <ian at freebsd.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "opt_platform.h"
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#define _ARM32_BUS_DMA_PRIVATE
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/reboot.h>
+
+#include <vm/vm.h>
+#include <vm/pmap.h>
+
+#include <machine/armreg.h>
+#include <machine/bus.h>
+#include <machine/machdep.h>
+
+#include <arm/freescale/imx/imx_machdep.h>
+#include <arm/freescale/imx/imx_wdogreg.h>
+
+#define IMX_MAX_DEVMAP_ENTRIES 8
+
+static struct pmap_devmap 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;
+
+ /*
+ * 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();
+
+ pmap_devmap_bootstrap_table = devmap_entries;
+
+ return (devmap_vaddr);
+}
+
+int
+platform_devmap_init(void)
+{
+
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list