Date: Mon, 6 Jan 2014 15:48:16 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260371 - head/sys/arm/broadcom/bcm2835 Message-ID: <201401061548.s06FmGZM015555@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Mon Jan 6 15:48:16 2014 New Revision: 260371 URL: http://svnweb.freebsd.org/changeset/base/260371 Log: Switch to using arm_devmap_add_entry() to set up static device mapping. This eliminates the hard-coded max kva and roughly doubles the available kva space. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Mon Jan 6 14:56:00 2014 (r260370) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Mon Jan 6 15:48:16 2014 (r260371) @@ -59,14 +59,11 @@ __FBSDID("$FreeBSD$"); #include <arm/broadcom/bcm2835/bcm2835_wdog.h> -/* Start of address space used for bootstrap map */ -#define DEVMAP_BOOTSTRAP_MAP_START 0xE0000000 - vm_offset_t initarm_lastaddr(void) { - return (DEVMAP_BOOTSTRAP_MAP_START); + return (arm_devmap_lastaddr()); } void @@ -99,28 +96,16 @@ initarm_late_init(void) } } -#define FDT_DEVMAP_MAX (2) // FIXME -static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { - { 0, 0, 0, 0, 0, } -}; - - /* - * Construct pmap_devmap[] with DT-derived config data. + * Set up static device mappings. + * All on-chip peripherals exist in a 16MB range starting at 0x20000000. + * Map the entire range using 1MB section mappings. */ int initarm_devmap_init(void) { - int i = 0; - - fdt_devmap[i].pd_va = 0xf2000000; - fdt_devmap[i].pd_pa = 0x20000000; - fdt_devmap[i].pd_size = 0x01000000; /* 1 MB */ - fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE; - fdt_devmap[i].pd_cache = PTE_DEVICE; - i++; - arm_devmap_register_table(&fdt_devmap[0]); + arm_devmap_add_entry(0x20000000, 0x01000000); return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401061548.s06FmGZM015555>