From owner-svn-src-head@FreeBSD.ORG Sun Sep 19 09:18:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AE5E106566C; Sun, 19 Sep 2010 09:18:07 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A9D48FC19; Sun, 19 Sep 2010 09:18:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8J9I7op095577; Sun, 19 Sep 2010 09:18:07 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8J9I7PD095575; Sun, 19 Sep 2010 09:18:07 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201009190918.o8J9I7PD095575@svn.freebsd.org> From: Juli Mallett Date: Sun, 19 Sep 2010 09:18:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212842 - head/sys/mips/cavium X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2010 09:18:07 -0000 Author: jmallett Date: Sun Sep 19 09:18:07 2010 New Revision: 212842 URL: http://svn.freebsd.org/changeset/base/212842 Log: Don't use memory that can't be direct-mapped on !n64. Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Sun Sep 19 09:03:11 2010 (r212841) +++ head/sys/mips/cavium/octeon_machdep.c Sun Sep 19 09:18:07 2010 (r212842) @@ -286,6 +286,18 @@ octeon_memory_init(void) if (addr == -1) break; + /* + * The SDK needs to be able to easily map any memory that might + * come to it e.g. in the form of an mbuf. Because on !n64 we + * can't direct-map some addresses and we don't want to manage + * temporary mappings within the SDK, don't feed memory that + * can't be direct-mapped to the kernel. + */ +#if !defined(__mips_n64) + if (!MIPS_DIRECT_MAPPABLE(addr + (1 << 20) - 1)) + continue; +#endif + physmem += btoc(1 << 20); if (i > 0 && phys_avail[i - 1] == addr) {