public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>, edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org
Subject: Re: [PATCH v2 1/3] EmbeddedPkg: add DtPlatformDtbLoaderLib library class
Date: Fri, 31 Mar 2017 13:15:51 +0200	[thread overview]
Message-ID: <2ef72128-d556-5c54-c3b8-6f918c1992c2@redhat.com> (raw)
In-Reply-To: <20170331105607.3477-2-ard.biesheuvel@linaro.org>

On 03/31/17 12:56, Ard Biesheuvel wrote:
> 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 <ard.biesheuvel@linaro.org>
> ---
>  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
>  
> +  DtPlatformDtbLoaderLib|Include/Library/DtPlatformDtbLoaderLib.h
>  
>  [Guids.common]
>    gEmbeddedTokenSpaceGuid       = { 0xe0d8ca17, 0x4276, 0x4386, { 0xbb, 0x79, 0x48, 0xcb, 0x81, 0x3d, 0x3c, 0x4f }}
> diff --git a/EmbeddedPkg/Include/Library/DtPlatformDtbLoaderLib.h b/EmbeddedPkg/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 BSD 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 IMPLIED.
> +*
> +**/
> +
> +#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 located
> +  @retval       EFI_OUT_OF_RESOURCES  No pool memory available
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +DtPlatformLoadDtb (
> +  OUT   VOID        **Dtb,
> +  OUT   UINTN       *DtbSize
> +  );
> +
> +#endif
> 

Please #include <Uefi/UefiBaseType.h> for the EFI_STATUS type here. With
that change:

Reviewed-by: Laszlo Ersek <lersek@redhat.com>




  reply	other threads:[~2017-03-31 11:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 10:56 [PATCH v2 0/3] EmbeddedPkg: revert DTB loading to platform lib Ard Biesheuvel
2017-03-31 10:56 ` [PATCH v2 1/3] EmbeddedPkg: add DtPlatformDtbLoaderLib library class Ard Biesheuvel
2017-03-31 11:15   ` Laszlo Ersek [this message]
2017-03-31 10:56 ` [PATCH v2 2/3] EmbeddedPkg: add base DtPlatformDtbLoaderLib implementation Ard Biesheuvel
2017-03-31 11:29   ` Laszlo Ersek
2017-03-31 10:56 ` [PATCH v2 3/3] EmbeddedPkg/DtPlatformDxe: load platform DTB via new library Ard Biesheuvel
2017-03-31 11:39   ` Laszlo Ersek
2017-03-31 12:22     ` Ard Biesheuvel
2017-03-31 13:38       ` Laszlo Ersek
2017-03-31 12:26 ` [PATCH v2 0/3] EmbeddedPkg: revert DTB loading to platform lib Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ef72128-d556-5c54-c3b8-6f918c1992c2@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox