summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-06-22 23:42:45 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-06-22 23:42:45 -0700
commit0b2912fe122f9c1f815e2f2a1f7817f25fc32ad2 (patch)
tree4c27d95b7522edaab2933e6f05ee156508d08f5f
parent17264c4e8ec8acadb7c1ca2cdbb532f827767f6b (diff)
parentde3bf20ca2eb8ff627ff414bdb86a31d1ec2e03b (diff)
Merge "QcomModulePkg: Clear the old DTB magic in DTBO boot path"
-rw-r--r--QcomModulePkg/Library/BootLib/BootLinux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/QcomModulePkg/Library/BootLib/BootLinux.c b/QcomModulePkg/Library/BootLib/BootLinux.c
index 34315eb77..ca8348130 100644
--- a/QcomModulePkg/Library/BootLib/BootLinux.c
+++ b/QcomModulePkg/Library/BootLib/BootLinux.c
@@ -270,6 +270,9 @@ DTBImgCheckAndAppendDT (BootInfo *Info,
}
gBS->CopyMem ((VOID *)BootParamlistPtr->DeviceTreeLoadAddr, FinalDtbHdr,
fdt_totalsize (FinalDtbHdr));
+ /* Clear out the old DTB magic so kernel doesn't find it */
+ *((UINT32 *)((BootParamlistPtr->ImageBuffer + BootParamlistPtr->PageSize +
+ BootParamlistPtr->PatchedKernelHdrSize) + DtbOffset)) = 0;
post_overlay_free ();
}
return EFI_SUCCESS;