Bug 180820 - FreeBSD v10.0 kernal panic on Raspberry Pi + Fix
Summary: FreeBSD v10.0 kernal panic on Raspberry Pi + Fix
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: 10.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-25 02:10 UTC by Samuel Seay
Modified: 2013-07-25 04:50 UTC (History)
0 users

See Also:


Attachments
file.diff (481 bytes, patch)
2013-07-25 02:10 UTC, Samuel Seay
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Seay 2013-07-25 02:10:00 UTC
Per the thread at http://lists.freebsd.org/pipermail/svn-src-head/2013-July/049735.html, I encountered the same issue when building a raspberry pi with the script at http://kernelnomicon.org/?p=275. After applying the patch I am able to fully boot the latest FreeBSD on my Raspberry Pi.

I do not see this patch in the latest tree nor do I see a bug report about the issue so I am filing this to bring attention to it and get the bug corrected, hopefully in the near future.

How-To-Repeat: Download the latest svn base head and compile the kernel for arm based on the script at http://kernelnomicon.org/?p=275. Attempt to boot the image on a raspberry pi after writing it to a sdcard.
Comment 1 dfilter service freebsd_committer freebsd_triage 2013-07-25 04:48:50 UTC
Author: kientzle
Date: Thu Jul 25 03:48:37 2013
New Revision: 253636
URL: http://svnweb.freebsd.org/changeset/base/253636

Log:
  Clear entire map structure including locks so that the
  locks don't accidentally appear to have been already
  initialized.
  
  In particular, this fixes a consistent kernel crash on
  armv6 with:
    panic: lock "vm map (user)" 0xc09cc050 already initialized
  that appeared with r251709.
  
  PR: arm/180820

Modified:
  head/sys/vm/vm_map.c

Modified: head/sys/vm/vm_map.c
==============================================================================
--- head/sys/vm/vm_map.c	Thu Jul 25 03:44:12 2013	(r253635)
+++ head/sys/vm/vm_map.c	Thu Jul 25 03:48:37 2013	(r253636)
@@ -239,8 +239,7 @@ vm_map_zinit(void *mem, int size, int fl
 	vm_map_t map;
 
 	map = (vm_map_t)mem;
-	map->nentries = 0;
-	map->size = 0;
+	memset(map, 0, sizeof(*map));
 	mtx_init(&map->system_mtx, "vm map (system)", NULL, MTX_DEF | MTX_DUPOK);
 	sx_init(&map->lock, "vm map (user)");
 	return (0);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 2 Tim Kientzle freebsd_committer freebsd_triage 2013-07-25 04:48:52 UTC
State Changed
From-To: open->closed

Committed patch.