From owner-freebsd-arm@freebsd.org Tue Nov 29 03:17:46 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C951C5AC9B for ; Tue, 29 Nov 2016 03:17:46 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (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 F1D031C37 for ; Tue, 29 Nov 2016 03:17:45 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 667555cb-b5e2-11e6-b17f-19517aec265d X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 667555cb-b5e2-11e6-b17f-19517aec265d; Tue, 29 Nov 2016 03:17:48 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id uAT3HYqc017173; Mon, 28 Nov 2016 20:17:34 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1480389454.1889.153.camel@freebsd.org> Subject: Re: FDT_DTB_STATIC and LINUX_BOOT_ABI From: Ian Lepore To: Mori Hiroki , "freebsd-arm@freebsd.org" Date: Mon, 28 Nov 2016 20:17:34 -0700 In-Reply-To: <105386.51359.qm@web101710.mail.ssk.yahoo.co.jp> References: <105386.51359.qm@web101710.mail.ssk.yahoo.co.jp> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2016 03:17:46 -0000 On Mon, 2016-11-28 at 23:33 +0900, Mori Hiroki wrote: > Hi. > > I have problem at u-boot arm module. > > I found double size memory. > > Because of u-boot parameter have ATAG_MEM and dts have memory entory. > It's doble count. > > I think check FDT_DTB_STATIC at linux_parse_boot_param() is good. > > #if !defined(FDT_DTB_STATIC) > >                 case ATAG_MEM:                        > arm_physmem_hardware_region(walker->u.tag_mem.start, >                             walker->u.tag_mem.size); >                         break; > #endif > > How about this? > > Regards > > Hiroki Mori What if someone wants to use a static dtb, but leaves the memory out of it so that u-boot can report the actual memory via atag? I think a better fix might be to have arm_physmem_hardware_region() handle the case where the same region is added twice. Can you do a verbose boot, or on a running system break into the kernel debugger using " ~ ^B" and do a "show physmem" (then you can "cont" to resume running the kernel).  I'm looking for this output: Physical memory chunk(s):   0x00001000 - 0x1dffffff,   479 MB ( 122879 pages) Excluded memory regions:   0x00400000 - 0x00d44fff,     9 MB (   2373 pages) NoAlloc   0x08000000 - 0x0fffffff,   128 MB (  32768 pages) NoAlloc NoDump -- Ian