From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: leif.lindholm@linaro.org, Ard Biesheuvel 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: [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: , X-List-Received-Date: Fri, 31 Mar 2017 10:56:17 -0000 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