From owner-svn-src-head@FreeBSD.ORG Thu Oct 23 21:02:41 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17AB27C; Thu, 23 Oct 2014 21:02:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04250C4; Thu, 23 Oct 2014 21:02:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9NL2eWA059694; Thu, 23 Oct 2014 21:02:40 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9NL2edr059693; Thu, 23 Oct 2014 21:02:40 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201410232102.s9NL2edr059693@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 23 Oct 2014 21:02:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273558 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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: Thu, 23 Oct 2014 21:02:41 -0000 Author: alc Date: Thu Oct 23 21:02:40 2014 New Revision: 273558 URL: https://svnweb.freebsd.org/changeset/base/273558 Log: Under PAE ULONG is insufficient for representing the physical memory size. Use QUAD for "hw.physmem" so that a physical memory size greater than 4 GB can be specified from the boot loader. Modified: head/sys/i386/i386/machdep.c Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Thu Oct 23 20:43:16 2014 (r273557) +++ head/sys/i386/i386/machdep.c Thu Oct 23 21:02:40 2014 (r273558) @@ -2463,10 +2463,10 @@ static void getmemsize(int first) { int has_smap, off, physmap_idx, pa_indx, da_indx; - u_long physmem_tunable, memtest; + u_long memtest; vm_paddr_t physmap[PHYSMAP_SIZE]; pt_entry_t *pte; - quad_t dcons_addr, dcons_size; + quad_t dcons_addr, dcons_size, physmem_tunable; #ifndef XEN int hasbrokenint12, i, res; u_int extmem; @@ -2650,7 +2650,7 @@ physmap_done: Maxmem = MAXMEM / 4; #endif - if (TUNABLE_ULONG_FETCH("hw.physmem", &physmem_tunable)) + if (TUNABLE_QUAD_FETCH("hw.physmem", &physmem_tunable)) Maxmem = atop(physmem_tunable); /*