Author: ian
Date: Mon Jan  6 16:07:27 2014
New Revision: 260372
URL: http://svnweb.freebsd.org/changeset/base/260372

Log:
  Allow 'no static device mappings' to potentially work.  It's not clear that
  every arm system must have some static mappings to work correctly (although
  currently they all do), so remove some panic() calls (which would never
  been seen anyway, because they would happen before a console is available).

Modified:
  head/sys/arm/arm/devmap.c

Modified: head/sys/arm/arm/devmap.c
==============================================================================
--- head/sys/arm/arm/devmap.c   Mon Jan  6 15:48:16 2014        (r260371)
+++ head/sys/arm/arm/devmap.c   Mon Jan  6 16:07:27 2014        (r260372)
@@ -67,11 +67,8 @@ arm_devmap_lastaddr()
        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) {
+       for (pd = devmap_table; pd != NULL && pd->pd_size != 0; ++pd) {
                if (lowaddr > pd->pd_va)
                        lowaddr = pd->pd_va;
        }
@@ -145,22 +142,21 @@ arm_devmap_bootstrap(vm_offset_t l1pt, c
 {
        const struct arm_devmap_entry *pd;
 
+       devmap_bootstrap_done = true;
+
        /*
-        * If given a table pointer, use it, else ensure a table was previously
-        * registered.  This happens early in boot, and there's a good chance
-        * the panic message won't be seen, but there's not much we can do.
+        * If given a table pointer, use it.  Otherwise, if a table was
+        * previously registered, use it.  Otherwise, no work to do.
         */
        if (table != NULL)
                devmap_table = table;
        else if (devmap_table == NULL)
-               panic("arm_devmap_bootstrap(): No devmap table registered");
+               return;
 
        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;
 }
 
 /*
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to