From owner-svn-src-all@FreeBSD.ORG Mon Oct 20 01:52:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A742236; Mon, 20 Oct 2014 01:52:18 +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 26CB16CB; Mon, 20 Oct 2014 01:52:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9K1qIpX003933; Mon, 20 Oct 2014 01:52:18 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9K1qIF0003932; Mon, 20 Oct 2014 01:52:18 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201410200152.s9K1qIF0003932@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 20 Oct 2014 01:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273298 - head/sys/boot/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2014 01:52:18 -0000 Author: ian Date: Mon Oct 20 01:52:17 2014 New Revision: 273298 URL: https://svnweb.freebsd.org/changeset/base/273298 Log: The U-Boot README says fdt_addr_r is the right env var for fdt data loaded into ram, but vendors also use fdtaddr and fdt_addr. Check the recommended variable first and fall back to the others. Modified: head/sys/boot/fdt/fdt_loader_cmd.c Modified: head/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- head/sys/boot/fdt/fdt_loader_cmd.c Mon Oct 20 01:45:40 2014 (r273297) +++ head/sys/boot/fdt/fdt_loader_cmd.c Mon Oct 20 01:52:17 2014 (r273298) @@ -310,10 +310,13 @@ fdt_setup_fdtp() /* * If the U-boot environment contains a variable giving the address of a - * valid blob in memory, use it. Board vendors use both fdtaddr and - * fdt_addr names. + * valid blob in memory, use it. The U-boot README says the right + * variable for fdt data loaded into ram is fdt_addr_r, so try that + * first. Board vendors also use both fdtaddr and fdt_addr names. */ - s = ub_env_get("fdtaddr"); + s = ub_env_get("fdt_addr_r"); + if (s == NULL) + s = ub_env_get("fdtaddr"); if (s == NULL) s = ub_env_get("fdt_addr"); if (s != NULL && *s != '\0') {