From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=k7tV/GRb; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.221.66, mailfrom: pete@akeo.ie) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by groups.io with SMTP; Mon, 12 Aug 2019 06:06:48 -0700 Received: by mail-wr1-f66.google.com with SMTP id p13so29913120wru.10 for ; Mon, 12 Aug 2019 06:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+/FEZg6IL33xSajb0N24vo7bFIgcrluo+B7Qb8WSvSY=; b=k7tV/GRbu/Dv29h4qzNwQHSXl21tW0m+KYFKyeDa5YWyqYTh1qvi5YhH5EyI/5ATAp tdOy7vDmt3KuhL4Frlv+o8JGD/m1SDLfrDH8YuE80yXsBJIr64WyXWzahTUMJKQzWsE9 ve7/Q11OcsF58RXxWh2NurYbsMolu3S++jSoTpaa3dUlFcglYVS//t2VZU5TFdvEc08T ziV/HUvar6vlKkuIPTNp8hJ7he95QmyrwchGUO8QiTBwg/yd5YW6aHHtJvDBTiqlRYOw 8ZrAeD6MlHzUFhLzgEZA1r3o29ECPm8ILyfRKm0AgnyoaIfMjU5OB26dowT0OPrs8gLu 0sCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+/FEZg6IL33xSajb0N24vo7bFIgcrluo+B7Qb8WSvSY=; b=bWeYaAufE4yEvy8BYCxJ3mFJ6UHIq6UzWDxkZOAFbeai2CbRUsjJ4N6kuKGGP3AvWm XqwUREQmwdXm1pqEDeNTQ8hexxMiyamP7ecSJSaTIEKgBcp59vYQlg3zeN27nSm6OpdC TndE3R/tgUPkV3n1ObhdmUQYC05K+eiTUxu3cN+rRCd22UMwl48suMbZ+ix8ZLpoqD7k 6RWB/WOsWc8p3WyK0WJ7yh8g0lX94zfmEbcrQPMRnhoYZ9mkMauHvKGk0wShFSFRymd0 vyfPqr0uMscONjFi7+CEbgwu4YpIQ4mxZIPIQJ2tUe+pnkhNQZpuHSfrNGtenCWQWyVu U0Zw== X-Gm-Message-State: APjAAAXTQJc3Guj6THcPF8OY8dkowQbJvnJHOzXQE5qpcs8UadNyE7tS on7FzUiLmMdqbINhL4gsiGY7qHpR8Fc= X-Google-Smtp-Source: APXvYqwJ4kpkyvk1M2ZgR4RXc9RYZw7FeR4QWc4izosK7iFvM/um3Y+7Tq4s4O+goPuYbeihN+Rbug== X-Received: by 2002:adf:e2c7:: with SMTP id d7mr28934552wrj.68.1565615206137; Mon, 12 Aug 2019 06:06:46 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([84.203.61.230]) by smtp.gmail.com with ESMTPSA id n2sm11330167wmi.38.2019.08.12.06.06.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Aug 2019 06:06:45 -0700 (PDT) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org Subject: [edk2-platforms: PATCH 0/1] Platforms/RPi3: Add multiple embedded Device Tree selection Date: Mon, 12 Aug 2019 14:06:33 +0100 Message-Id: <20190812130634.7224-1-pete@akeo.ie> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The purpose of this patch is to enable the automatic provision of a relevant Raspberry Pi 3 Device Tree at runtime, as there currently exists 2 models of Raspberry Pi 3 (model B and model B+) but we only embed the Device Tree for a single one (model B). Obviously, the provision of only a single Device Tree is inconvenient, as it currently forces users of the model B+ to locate and provide their own Device Tree in config.txt, which might not be a straightforward operation. It also adds to the number of extra files that must be copied to the boot media. With this patch, both Device Tree binaries are embedded in the firmware, with the relevant being served at runtime according to the detected hardware. Note that we tried to future-proof the modified code with regards to expected introduction of new Raspberry Pi platforms (such as the Pi 4). Therefore, while the switch in FdtDxe.c may seem like overkill for now (with cases that could be merged), it should make the reuse of that driver easier. We also tried to harmonize debug output if FtdDxe (avoid acronyms and provide human readable error codes). Pete Batard (1): Platforms/RPi3: Add multiple embedded Device Tree selection Platform/RaspberryPi/RPi3/Drivers/FdtDxe/FdtDxe.c | 54 ++++++++++++++++---- Platform/RaspberryPi/RPi3/Drivers/FdtDxe/FdtDxe.inf | 3 +- Platform/RaspberryPi/RPi3/RPi3.dec | 3 +- Platform/RaspberryPi/RPi3/RPi3.fdf | 6 ++- 4 files changed, 52 insertions(+), 14 deletions(-) -- 2.21.0.windows.1