[edk2,v2,0/3] EmbeddedPkg: revert DTB loading to platform lib

Message ID 20170331105607.3477-1-ard.biesheuvel@linaro.org
Headers show
Series
  • EmbeddedPkg: revert DTB loading to platform lib
Related show

Message

Ard Biesheuvel March 31, 2017, 10:56 a.m.
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

Comments

Ard Biesheuvel March 31, 2017, 12:26 p.m. | #1
On 31 March 2017 at 11:56, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> 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

>


Committed as

f07cc45883d0 EmbeddedPkg: add DtPlatformDxe to .dsc file
449a5df455ed EmbeddedPkg: add DtPlatformDtbLoaderLib library class
4c725c895990 EmbeddedPkg: add base DtPlatformDtbLoaderLib implementation
12c71010b84a EmbeddedPkg/DtPlatformDxe: load platform DTB via new library

Thanks,
Ard.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel