Date: Mon, 16 Jun 2014 23:38:42 GMT From: astarasikov@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r269662 - in soc2014/astarasikov/head/sys/arm: conf goldfish Message-ID: <201406162338.s5GNcgsV030168@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: astarasikov Date: Mon Jun 16 23:38:41 2014 New Revision: 269662 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=269662 Log: arm: fix GOLDFISH compilation for HEAD Modified: soc2014/astarasikov/head/sys/arm/conf/GOLDFISH soc2014/astarasikov/head/sys/arm/goldfish/files.goldfish soc2014/astarasikov/head/sys/arm/goldfish/goldfish_fb.c soc2014/astarasikov/head/sys/arm/goldfish/goldfish_machdep.c soc2014/astarasikov/head/sys/arm/goldfish/if_smc_fdt.c Modified: soc2014/astarasikov/head/sys/arm/conf/GOLDFISH ============================================================================== --- soc2014/astarasikov/head/sys/arm/conf/GOLDFISH Mon Jun 16 22:59:18 2014 (r269661) +++ soc2014/astarasikov/head/sys/arm/conf/GOLDFISH Mon Jun 16 23:38:41 2014 (r269662) @@ -31,7 +31,6 @@ options KERNPHYSADDR=0x00100000 makeoptions KERNPHYSADDR=0x00100000 options PHYSADDR=0x00000000 -options STARTUP_PAGETABLE_ADDR=0x01000000 options FREEBSD_BOOT_LOADER options LINUX_BOOT_ABI @@ -59,6 +58,7 @@ options VFP # vfp/neon options PREEMPTION +options PLATFORM device bpf device loop Modified: soc2014/astarasikov/head/sys/arm/goldfish/files.goldfish ============================================================================== --- soc2014/astarasikov/head/sys/arm/goldfish/files.goldfish Mon Jun 16 22:59:18 2014 (r269661) +++ soc2014/astarasikov/head/sys/arm/goldfish/files.goldfish Mon Jun 16 23:38:41 2014 (r269662) @@ -5,7 +5,6 @@ arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/irq_dispatch.S standard kern/kern_clocksource.c standard arm/goldfish/goldfish_fb.c optional sc Modified: soc2014/astarasikov/head/sys/arm/goldfish/goldfish_fb.c ============================================================================== --- soc2014/astarasikov/head/sys/arm/goldfish/goldfish_fb.c Mon Jun 16 22:59:18 2014 (r269661) +++ soc2014/astarasikov/head/sys/arm/goldfish/goldfish_fb.c Mon Jun 16 23:38:41 2014 (r269662) @@ -36,12 +36,13 @@ #include <sys/malloc.h> #include <sys/rman.h> #include <sys/timetc.h> +#include <sys/fbio.h> +#include <sys/consio.h> + #include <machine/bus.h> +#include <machine/fdt.h> #include <machine/intr.h> - -#include <sys/fbio.h> #include <machine/frame.h> -#include <sys/consio.h> #include <dev/fb/fbreg.h> #include <dev/syscons/syscons.h> Modified: soc2014/astarasikov/head/sys/arm/goldfish/goldfish_machdep.c ============================================================================== --- soc2014/astarasikov/head/sys/arm/goldfish/goldfish_machdep.c Mon Jun 16 22:59:18 2014 (r269661) +++ soc2014/astarasikov/head/sys/arm/goldfish/goldfish_machdep.c Mon Jun 16 23:38:41 2014 (r269662) @@ -47,56 +47,30 @@ #include <vm/pmap.h> #include <machine/bus.h> -#include <machine/frame.h> /* For trapframe_t, used in <machine/machdep.h> */ +#include <machine/devmap.h> #include <machine/machdep.h> -#include <machine/pmap.h> +#include <machine/platform.h> +#include <machine/platformvar.h> #include <dev/fdt/fdt_common.h> -/* Start of address space used for bootstrap map */ -#define DEVMAP_BOOTSTRAP_MAP_START 0xF0000000 +#include "platform_if.h" -vm_offset_t -initarm_lastaddr(void) +static void +goldfish_late_init(platform_t plat) { - - return (DEVMAP_BOOTSTRAP_MAP_START - ARM_NOCACHE_KVA_SIZE); } -void -initarm_gpio_init(void) +static vm_offset_t +goldfish_lastaddr(platform_t plat) { + return (arm_devmap_lastaddr()); } -void -initarm_late_init(void) +static int +goldfish_devmap_init(platform_t plat) { -} - -#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) -{ - int i = 0; - - /* Map goldfish virtual peripherals - */ - - fdt_devmap[i].pd_va = DEVMAP_BOOTSTRAP_MAP_START + 0xf000000; - fdt_devmap[i].pd_pa = 0xff000000; - fdt_devmap[i].pd_size = 0x100000; /* 1 MB */ - 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_add_entry(0xff000000, 0x100000); return (0); } @@ -121,3 +95,12 @@ while (1); } +static platform_method_t goldfish_methods[] = { + PLATFORMMETHOD(platform_devmap_init, goldfish_devmap_init), + PLATFORMMETHOD(platform_lastaddr, goldfish_lastaddr), + PLATFORMMETHOD(platform_late_init, goldfish_late_init), + + PLATFORMMETHOD_END, +}; + +FDT_PLATFORM_DEF(goldfish, "goldfish", 0, "arm,goldfish"); Modified: soc2014/astarasikov/head/sys/arm/goldfish/if_smc_fdt.c ============================================================================== --- soc2014/astarasikov/head/sys/arm/goldfish/if_smc_fdt.c Mon Jun 16 22:59:18 2014 (r269661) +++ soc2014/astarasikov/head/sys/arm/goldfish/if_smc_fdt.c Mon Jun 16 23:38:41 2014 (r269662) @@ -28,11 +28,12 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> +#include <sys/bus.h> #include <sys/kernel.h> -#include <sys/socket.h> - #include <sys/module.h> -#include <sys/bus.h> +#include <sys/socket.h> +#include <sys/systm.h> +#include <sys/taskqueue.h> #include <machine/bus.h> #include <machine/resource.h>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406162338.s5GNcgsV030168>