summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2014-12-12 02:23:21 +0100
committerWei Xu <xuwei5@huawei.com>2014-12-17 16:58:52 +0800
commitc7f5d6f79c1c7f1e790c5e6b5477d5c60dd91459 (patch)
tree3e2dab21a0f4e537c20d7fa62e099a5879bf3bd8
parentf9bbfcb9ee24e9d3540b03a3b10352c05d7b36ac (diff)
HisiPkg: D01: Add support for dynamic target bootwrapper
The bootwrapper code improved slightly and it can now handle parameters as kernel entry point. Add awareness of this and tell the bootwrapper where to jump to. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Wei Xu <xuwei5@huawei.com>
-rw-r--r--HisiPkg/D01BoardPkg/Bds/BootMenu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/HisiPkg/D01BoardPkg/Bds/BootMenu.c b/HisiPkg/D01BoardPkg/Bds/BootMenu.c
index c5380cb2b..3cbafb5bf 100644
--- a/HisiPkg/D01BoardPkg/Bds/BootMenu.c
+++ b/HisiPkg/D01BoardPkg/Bds/BootMenu.c
@@ -784,7 +784,7 @@ EFI_STATUS LoadLinuxAtSecEnd()
return Status;
}
-EFI_STATUS RunBootwrapper()
+EFI_STATUS RunBootwrapper(unsigned long kernel_entry)
{
EFI_STATUS Status;
@@ -792,6 +792,7 @@ EFI_STATUS RunBootwrapper()
*(UINTN*)(UINTN)(0xe302b000 + 0x1c) = 0;
*(volatile UINT32 *)(0xe0000000 + 0x100) = TEXT_SRAM_BASE;
+ *(volatile UINT32 *)(TEXT_SRAM_BASE + 0x800) = kernel_entry;
ArmCleanDataCache();
*(UINT8*)(0xf4007000) = 'G';
@@ -816,7 +817,7 @@ BootGo (
DEBUG((EFI_D_ERROR,"ERROR: Can not shutdown UEFI boot services. Status=0x%X\n", Status));
}
- Status = RunBootwrapper();
+ Status = RunBootwrapper(KERNEL_DDR_BASE);
return Status;
}