From owner-freebsd-arm@freebsd.org Tue Aug 11 19:47:16 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A2CE3B5D3D for ; Tue, 11 Aug 2020 19:47:16 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BR3JN0PBGz3yMH for ; Tue, 11 Aug 2020 19:47:16 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from localhost (p4fd3ae86.dip0.t-ipconnect.de [79.211.174.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 928FB21C78 for ; Tue, 11 Aug 2020 19:47:15 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Tue, 11 Aug 2020 21:47:13 +0200 From: Gordon Bergling To: freebsd-arm@freebsd.org Subject: RPi4B only allocates 1GB instead of 4GB Message-ID: <20200811194713.GA54090@lion.0xfce3.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Url: X-Operating-System: FreeBSD 12.1-STABLE amd64 X-Host-Uptime: 9:46PM up 1:50, 2 users, load averages: 0.18, 0.62, 1.98 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Aug 2020 19:47:16 -0000 Hi, I am currently working on an issue [1] of FreeBSD regarding the memory allocation on the RPi4B. I have a 4GB model running a very recent version of -CURRENT, but FreeBSD only recognizes 1GB instead of the installed 4GB of memory. I spent some time today looking through the general determination of physical memory in FreeBSD in sys/vm/vm_phys.c, but my initial try to simply the issue by building a kernel without NUMA support wasn't that successful. The next part I was thinking about was the firmware -> kernel interface, lets say UEFI vs. 'plain u-boot'. But after the study of information I found on the net, that is a far different story, compared to read C-sources. Has anyone a RPi4 or RPi4B with memory != 1GB, who could verify that issue? I found some information on a chinese website where somebody posted a dmesg output of FreeBSD 13-CURRENT on an RPi4B (8 GB version) where the memory allocation was correct. --Gordon [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247012