From 51e107617a53e1828528a5be8e0f4159b8a526c1 Mon Sep 17 00:00:00 2001 From: ian Date: Mon, 6 Jan 2014 16:07:27 +0000 Subject: [PATCH] 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). --- sys/arm/arm/devmap.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sys/arm/arm/devmap.c b/sys/arm/arm/devmap.c index aec2761e6986..d9bdd9cac200 100644 --- a/sys/arm/arm/devmap.c +++ b/sys/arm/arm/devmap.c @@ -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, const struct arm_devmap_entry *table) { 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; } /*