From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=mb0FUqmz; spf=pass (domain: linaro.org, ip: 209.85.221.65, mailfrom: leif.lindholm@linaro.org) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by groups.io with SMTP; Tue, 23 Jul 2019 04:17:31 -0700 Received: by mail-wr1-f65.google.com with SMTP id 31so42784301wrm.1 for ; Tue, 23 Jul 2019 04:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TLaJaMFxDoNfmX4AP1bnECWoDVG50c8CISvnYoxQj2s=; b=mb0FUqmzDfi45gIMzPKgaaWR9wY/aEc2dsprs2hi3WrzFPjs9nQhG7dH63ZkSQOdYM 4Km/bqt9K5YxQnAhZkL56POXsE8yx3FajH71vUCwCTBvu2j9VQUSyFfFGUsBeyTW7abq iUKeOFm/U38FSp8T5X1AbNfem+wfKRiCWVGLwuL0k+hmhj63CKzph78QZmEf+lZGw0bS FXojfiR63AteDtamaahsaUvW60AEkoJ9WBu2rIAA282n91LrQ5DfooZQ9ulmWZrVmTNp /Uq3fkc8x5lRVKQG1kqLtazlEWx7Cq3QQXuLAkWQlrU1yVuxdJDI0tUgylo5Pk9V02TW dBBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TLaJaMFxDoNfmX4AP1bnECWoDVG50c8CISvnYoxQj2s=; b=EJazdNOhn07wk4PxZ65nGPhOw22pVZOXuhFBAp4qo7A+Ux+QPBf9bNtJbUS8fK3xdQ 2mjqO+zRryBO17vk4OInqW328HIRX46HYrJCsZVUo28xA3v02uZxY4Vj1aBcrWxT6huO QmUbhx2SRfamsInEBCstkgqrlUFvQhPSkAm6uS4vjHHeJ1LJuleTKlhPbDKSqSsHyLBb 9dvHM8FhGIrftg5bPX6rkRD3EAzA+qH5msUkqTWTdmYo5qzijPfmrPLracAZR2SfB2CU hl1o7Do3tkKQowkI0YxL4nikwIG1x4dnSLWq3m7CsQpqMTQttzrOUKk1jDS+mayf9z1O ohAg== X-Gm-Message-State: APjAAAVYtNSwlbnfrSWaT+bUjlWhGWdQTMps0Z/GgnWJeQ1eDF3FWy0k 2hKfGb6e0hnR/vv8bicrIKZeGw== X-Google-Smtp-Source: APXvYqz+yLlEFZBnUHmjVPC7gSBwp7DVYzLiOD/OWQeW/kwth47IdEbH9N1+zXjhVb15/NOgGVfvyQ== X-Received: by 2002:a5d:428a:: with SMTP id k10mr74889019wrq.329.1563880649740; Tue, 23 Jul 2019 04:17:29 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id j6sm62589758wrx.46.2019.07.23.04.17.28 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Jul 2019 04:17:28 -0700 (PDT) Date: Tue, 23 Jul 2019 12:17:27 +0100 From: "Leif Lindholm" To: Michael Brown Cc: devel@edk2.groups.io, ard.biesheuvel@linaro.org, pete@akeo.ie Subject: Re: [edk2-platforms: PATCH 1/1] Platform/RPi3: Accept "ethernet" or "ethernet0" aliases in device tree Message-ID: <20190723111727.GG11541@bivouac.eciton.net> References: <20190719172907.788170-1-mbrown@fensystems.co.uk> <20190719172907.788170-2-mbrown@fensystems.co.uk> <20190723103436.GF11541@bivouac.eciton.net> <19dd2d90-18b0-7ff2-cc21-a3d33a32d5e1@fensystems.co.uk> MIME-Version: 1.0 In-Reply-To: <19dd2d90-18b0-7ff2-cc21-a3d33a32d5e1@fensystems.co.uk> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 23, 2019 at 12:00:04PM +0100, Michael Brown wrote: > > Why is this patch useful? > > I understand the problem, but we include the .dtb from our own > > edk2-non-osi tree. And it seems that device tree already provides an > > alias to support both: > > https://github.com/tianocore/edk2-non-osi/blob/master/Platform/RaspberryPi/RPi3/DeviceTree/bcm2710-rpi-3-b.dts > > > > Would it be more useful to warn loudly if "ethernet" isn't present? > > (And just *replace* ethernet[0] with ethernet below.) > > The device tree can also be provided by the VC4 firmware, e.g. with a > config.txt containing e.g. > > device_tree_address=0x10000 > device_tree_end=0x20000 > device_tree=bcm2710-rpi-3-b-plus.dtb Ah, right. > It is also possible to omit the explicit "device_tree=..." and have just > > device_tree_address=0x10000 > device_tree_end=0x20000 > > This configuration will cause the VC4 firmware to automatically load the > appropriate device tree file. I have tested that this allows me to boot > from a 3B or 3B+ using a single SD card image that contains all of the .dtb > files from > > https://github.com/raspberrypi/firmware/tree/master/boot > > These "official" raspberrypi-firmware .dtb files are built from the stock > Linux kernel .dts files, and contain only "ethernet0". *facepalm* > To address your specific questions: > > > Why is this patch useful? > > It allows us to boot using the "official" .dtb files without any unexpected > behaviour. > > This in turn allows us to boot with the VC4 firmware automatically selecting > the appropriate .dtb file for the hardware. This is extremely useful when > trying to provide a single SD card image that will work on a wide range of > hardware. Yeah, understood. I just have a poor understanding of the esoteric boot architecture of the Pis. > > Would it be more useful to warn loudly if "ethernet" isn't present? > > (And just *replace* ethernet[0] with ethernet below.) > > This would also solve the problem. I would find it mildly surprising > behaviour if I were debugging around it, since the "official" .dtb files > have moved in the other direction (going from "ethernet" to "ethernet0"), > but I would not expect it to break anything. > > Another option would be to have UpdateMacAddress() ensure that both > "ethernet" and "ethernet0" aliases exist. Yeah, that would probably be my preferred option. > I am happy to work up a new version of the patch: just let me know which > option you prefer. As mentioned. And thank you for the explanation. Best Regards, Leif