Date: Sun, 23 Sep 2012 19:48:29 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r240869 - head/sys/arm/broadcom/bcm2835 Message-ID: <201209231948.q8NJmTlN063895@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Sun Sep 23 19:48:29 2012 New Revision: 240869 URL: http://svn.freebsd.org/changeset/base/240869 Log: Clean up the bcm2835 initarm. It is now identical to the other ARMv6 copies Tested by: Alexander Yerenkow 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 Sun Sep 23 19:40:58 2012 (r240868) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Sun Sep 23 19:48:29 2012 (r240869) @@ -308,9 +308,9 @@ initarm(struct arm_boot_params *abp) uint32_t memsize, l2size; void *kmdp; u_int l1pagetable; - int i = 0, j = 0; + int i = 0, j = 0, err_devmap = 0; - lastaddr = fake_preload_metadata(abp); + lastaddr = parse_boot_param(abp); memsize = 0; set_cpufuncs(); @@ -440,6 +440,7 @@ initarm(struct arm_boot_params *abp) (((uint32_t)(lastaddr) - KERNVIRTADDR) + PAGE_MASK) & ~PAGE_MASK, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); + /* Map L1 directory and allocated L2 page tables */ pmap_map_chunk(l1pagetable, kernel_l1pt.pv_va, kernel_l1pt.pv_pa, L1_TABLE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE); @@ -454,12 +455,6 @@ initarm(struct arm_boot_params *abp) freemempos - dpcpu.pv_va, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); - - /* Map allocated DPCPU, stacks and msgbuf */ - pmap_map_chunk(l1pagetable, 0xf2200000, 0x20200000, - 0x00100000, - VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); - /* Link and map the vector page */ pmap_link_l2pt(l1pagetable, ARM_VECTORS_HIGH, &kernel_pt_table[l2size - 1]); @@ -467,8 +462,7 @@ initarm(struct arm_boot_params *abp) VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE, PTE_CACHE); /* Map pmap_devmap[] entries */ - if (platform_devmap_init() != 0) - while (1); + err_devmap = platform_devmap_init(); pmap_devmap_bootstrap(l1pagetable, pmap_devmap_bootstrap_table); cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)) | @@ -497,6 +491,10 @@ initarm(struct arm_boot_params *abp) print_kernel_section_addr(); print_kenv(); + if (err_devmap != 0) + printf("WARNING: could not fully configure devmap, error=%d\n", + err_devmap); + initarm_late_init(); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209231948.q8NJmTlN063895>