From patchwork Fri Mar 31 10:56:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 96354 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp666289qgd; Fri, 31 Mar 2017 03:56:19 -0700 (PDT) X-Received: by 10.84.139.40 with SMTP id 37mr2836787plq.10.1490957779200; Fri, 31 Mar 2017 03:56:19 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id i3si4880844pfk.165.2017.03.31.03.56.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Mar 2017 03:56:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A50DA21DFA7B7; Fri, 31 Mar 2017 03:56:18 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wr0-x232.google.com (mail-wr0-x232.google.com [IPv6:2a00:1450:400c:c0c::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9DD2821BC6A24 for ; Fri, 31 Mar 2017 03:56:16 -0700 (PDT) Received: by mail-wr0-x232.google.com with SMTP id w43so100163902wrb.0 for ; Fri, 31 Mar 2017 03:56:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=C3/ULJybpmZP6Kv6nruFVXzMxjTE4KpxWU/EMavjH3M=; b=R7HU6PzOWpHYK4Afg8ZirHRoXwjyw2gmJwTsfuZoNgHDfPuy9sfsBsuR0VemvpCxeI 8ydL9/Bfpc6bj1YRVz2iiSwlpj0Qkk17pN3Vhlp0aHswyM3Yfpz7lXhFr2ZnBn8Yy4Ga cchAvnLsMiYW03fUlS8JwbCPP0yO4w4Yc+Yn8= 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; bh=C3/ULJybpmZP6Kv6nruFVXzMxjTE4KpxWU/EMavjH3M=; b=rBYqfUcmYKpslTbHSRtUciDtHFRY+QFwqOGjWYoozVNTvy6DtX1Z5Y9plmyoBmm44d RuiDdmZPmNUJjj75HJRaq2GkVzF7WLIBGLuvK7IwPrbr2phhEtz/CwK3MIGfyfSuIrnN X/f7aGE8YN/FJZCkH2FJMoqBHyZ8ny/bDprBsUsNdFNGoNUlJb5wD6JAyRYd9wjs4tBN 3Uz0028kLSwSDunsKA34iA3x45yarA3eYVj9OEFBQPv9f1hrwCNXWpFHdgzhYXPRC0Dc WL3k30VzsxZf3dCXCut9Eu7Enzj5XoTqbPzuC7jlPbZPEleyJ2uugC1YkNoqFfBx47QO KN3w== X-Gm-Message-State: AFeK/H1pvmp0Cs39lcfFpzb3AoJPxnyXhSIxxh/zXxivvX1EI8zXBz7JB0wBSACmP9hQT9y4 X-Received: by 10.28.234.71 with SMTP id i68mr2288772wmh.81.1490957775201; Fri, 31 Mar 2017 03:56:15 -0700 (PDT) Received: from localhost.localdomain ([160.171.180.74]) by smtp.gmail.com with ESMTPSA id 92sm6300006wrh.8.2017.03.31.03.56.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Mar 2017 03:56:14 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Fri, 31 Mar 2017 11:56:04 +0100 Message-Id: <20170331105607.3477-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 Subject: [edk2] [PATCH v2 0/3] EmbeddedPkg: revert DTB loading to platform lib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" This updates the recently added DtPlatformDxe to indirect loading of the actual DTB binary to a separate library. A base implementation is provided that preserves the original behavior. This way, we can allow platforms such as FVP or Juno (which use the same firmware image but different DTB images) to override this library class and insert its own logic to select the correct DTB, without resorting to BEFORE depexes and dynamic PCDs, and the associated load order issues. v2: - drop ArmPlatformPkg changes for now Ard Biesheuvel (3): EmbeddedPkg: add DtPlatformDtbLoaderLib library class EmbeddedPkg: add base DtPlatformDtbLoaderLib implementation EmbeddedPkg/DtPlatformDxe: load platform DTB via new library EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.c | 26 ++++----- EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf | 2 +- EmbeddedPkg/EmbeddedPkg.dec | 1 + EmbeddedPkg/EmbeddedPkg.dsc | 6 ++ EmbeddedPkg/Include/Library/DtPlatformDtbLoaderLib.h | 37 ++++++++++++ EmbeddedPkg/Library/DtPlatformDtbLoaderBaseLib/DtPlatformDtbLoaderBaseLib.c | 60 ++++++++++++++++++++ EmbeddedPkg/Library/DtPlatformDtbLoaderBaseLib/DtPlatformDtbLoaderBaseLib.inf | 36 ++++++++++++ 7 files changed, 154 insertions(+), 14 deletions(-) create mode 100644 EmbeddedPkg/Include/Library/DtPlatformDtbLoaderLib.h create mode 100644 EmbeddedPkg/Library/DtPlatformDtbLoaderBaseLib/DtPlatformDtbLoaderBaseLib.c create mode 100644 EmbeddedPkg/Library/DtPlatformDtbLoaderBaseLib/DtPlatformDtbLoaderBaseLib.inf -- 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel