From nobody Sat Nov 2 12:22:17 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; dkim=fail spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1490957782348304.3816962825323; Fri, 31 Mar 2017 03:56:22 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E25222050AB0C; Fri, 31 Mar 2017 03:56:19 -0700 (PDT) Received: from mail-wr0-x229.google.com (mail-wr0-x229.google.com [IPv6:2a00:1450:400c:c0c::229]) (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 CBAD92050AB07 for ; Fri, 31 Mar 2017 03:56:18 -0700 (PDT) Received: by mail-wr0-x229.google.com with SMTP id w43so100165288wrb.0 for ; Fri, 31 Mar 2017 03:56:18 -0700 (PDT) Received: from localhost.localdomain ([160.171.180.74]) by smtp.gmail.com with ESMTPSA id 92sm6300006wrh.8.2017.03.31.03.56.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Mar 2017 03:56:16 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=89287JPmINkGiku6/A/HPcvnIw9kYhRW40Yeqov+Ysw=; b=MwM/16IVvoChbsvHNcW7IsT7gzUxcU4/VU01M0rYM6qUgSrZ8keuOOUhm9DYDllDeS OZhIIwHDVU84Mdwq8AetnxmGecdfOb3oWLA43/eEIRj3grzPfUsFJ3A3kshAIUgYYd3r h6S60o89EZjJt0VvDJtKm1kSuRzkivRDPocKo= 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:in-reply-to :references; bh=89287JPmINkGiku6/A/HPcvnIw9kYhRW40Yeqov+Ysw=; b=tHuS3zXxQ7FNs7BTyhgDxBlEDswucs6V0Ps7pvGa0uQbMEhjIzDi7WFN/DTNOvgeye suh+jXTi/PVij7N9iEMmKKfHfYEuoyr/B5vniNqnbokJf19mHdkXrELGvEtL8/3RktsR Kt8FDUZmXXXREe0v9/4qcYFcF/sFw95qSzj3Nwtzwcu5QlOT8uZUq4WQ9UTReBk77ul+ pUvxm9fafEf/2iCkJDItrPMCiMLqgp2/aRIYfEByl4UEKW9A3rYyqXZMXAgfIe7Qp8ey ExwtEGN/XVzqq9jJqiwHcZh6//F8aW3bcoryCv5Tkmvo910d8O8p+dG2IxRDy0lHsjS1 q7dg== X-Gm-Message-State: AFeK/H0HcSWPKuqrY+hGYHxPjizPylzTJDw7x1/Lh1UmWZ5k+nPf3YkSXYYc5XxKK+PTrpMH X-Received: by 10.28.172.7 with SMTP id v7mr2788735wme.78.1490957777106; Fri, 31 Mar 2017 03:56:17 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Fri, 31 Mar 2017 11:56:05 +0100 Message-Id: <20170331105607.3477-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170331105607.3477-1-ard.biesheuvel@linaro.org> References: <20170331105607.3477-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v2 1/3] EmbeddedPkg: add DtPlatformDtbLoaderLib library class 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 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" To abstract the way a platform reasons about which DTB is appropriate, and the way it ultimately supplies the DTB image, introduce a new library class to encapsulate this functionality. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- EmbeddedPkg/EmbeddedPkg.dec | 1 + EmbeddedPkg/Include/Library/DtPlatformDtbLoaderLib.h | 37 ++++++++++++++++= ++++ 2 files changed, 38 insertions(+) diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec index 871fc5ff4016..0bed2736c8c3 100644 --- a/EmbeddedPkg/EmbeddedPkg.dec +++ b/EmbeddedPkg/EmbeddedPkg.dec @@ -45,6 +45,7 @@ [LibraryClasses.common] GdbSerialLib|Include/Library/GdbSerialLib.h DebugAgentTimerLib|Include/Library/DebugAgentTimerLib.h =20 + DtPlatformDtbLoaderLib|Include/Library/DtPlatformDtbLoaderLib.h =20 [Guids.common] gEmbeddedTokenSpaceGuid =3D { 0xe0d8ca17, 0x4276, 0x4386, { 0xbb, = 0x79, 0x48, 0xcb, 0x81, 0x3d, 0x3c, 0x4f }} diff --git a/EmbeddedPkg/Include/Library/DtPlatformDtbLoaderLib.h b/Embedde= dPkg/Include/Library/DtPlatformDtbLoaderLib.h new file mode 100644 index 000000000000..bb79d2a190f4 --- /dev/null +++ b/EmbeddedPkg/Include/Library/DtPlatformDtbLoaderLib.h @@ -0,0 +1,37 @@ +/** @file +* +* Copyright (c) 2017, Linaro, Ltd. All rights reserved. +* +* This program and the accompanying materials +* are licensed and made available under the terms and conditions of the B= SD License +* which accompanies this distribution. The full text of the license may = be found at +* http://opensource.org/licenses/bsd-license.php +* +* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IM= PLIED. +* +**/ + +#ifndef __DT_PLATFORM_DTB_LOADER_LIB_H__ +#define __DT_PLATFORM_DTB_LOADER_LIB_H__ + +/** + Return a pool allocated copy of the DTB image that is appropriate for + booting the current platform via DT. + + @param[out] Dtb Pointer to the DTB copy + @param[out] DtbSize Size of the DTB copy + + @retval EFI_SUCCESS Operation completed successfully + @retval EFI_NOT_FOUND No suitable DTB image could be locat= ed + @retval EFI_OUT_OF_RESOURCES No pool memory available + +**/ +EFI_STATUS +EFIAPI +DtPlatformLoadDtb ( + OUT VOID **Dtb, + OUT UINTN *DtbSize + ); + +#endif --=20 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel