summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Fdt/FdtTableDxe/FdtTableDxe.c
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2014-10-03 17:18:58 +0100
committerLeif Lindholm <leif.lindholm@linaro.org>2014-10-03 17:18:58 +0100
commit8725d97537a51f7a59510f78e3503c2ca3bdb59b (patch)
tree03e76ee792fbed62daa05325dc07243773102b12 /MdeModulePkg/Universal/Fdt/FdtTableDxe/FdtTableDxe.c
parent08a774815034162bac84807c6b62eef6e3dba978 (diff)
parent160ce34a0053f0da424a88e798a3cafd0c6dd46e (diff)
Merge remote-tracking branch 'rmt-1/linaro-topic-leg' into release-preplinaro-edk2-2014.10-a2
Conflicts: MdeModulePkg/MdeModulePkg.dsc
Diffstat (limited to 'MdeModulePkg/Universal/Fdt/FdtTableDxe/FdtTableDxe.c')
-rw-r--r--MdeModulePkg/Universal/Fdt/FdtTableDxe/FdtTableDxe.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Fdt/FdtTableDxe/FdtTableDxe.c b/MdeModulePkg/Universal/Fdt/FdtTableDxe/FdtTableDxe.c
new file mode 100644
index 0000000000..c9b8b4c424
--- /dev/null
+++ b/MdeModulePkg/Universal/Fdt/FdtTableDxe/FdtTableDxe.c
@@ -0,0 +1,33 @@
+
+#include <Library/BaseLib.h>
+#include <Library/DebugLib.h>
+#include <Library/UefiLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/UefiDriverEntryPoint.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/PcdLib.h>
+#include <Library/DxeServicesLib.h>
+
+#include <Guid/FdtTable.h>
+
+EFI_STATUS
+EFIAPI
+InitializeFdtTableDxe (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+ EFI_STATUS Status;
+ VOID *FdtImageData;
+ UINTN FdtImageSize;
+
+ Status = GetSectionFromAnyFv(PcdGetPtr(PcdFdtImage), EFI_SECTION_RAW, 0,
+ &FdtImageData, &FdtImageSize);
+ if (EFI_ERROR(Status))
+ return Status;
+
+ DEBUG((EFI_D_ERROR, "InitializeFdtTableDxe: DTB @ 0x%08x\n", FdtImageData));
+
+ return gBS->InstallConfigurationTable(&gEfiFdtTableGuid, FdtImageData);
+}