summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYatharth Kochar <yatharth.kochar@arm.com>2015-10-29 12:47:02 +0000
committerYatharth Kochar <yatharth.kochar@arm.com>2015-12-09 17:41:18 +0000
commit5698c5b3db083b70645ebd288a6957fe590a1d53 (patch)
tree77450d32306a5804a86580284386395bfa328d8e
parent5ba8f6697f3535aa92a5500927142d6892d5ad63 (diff)
Remove `RUN_IMAGE` usage as opcode passed to next EL.
The primary usage of `RUN_IMAGE` SMC function id, used by BL2 is to make a request to BL1 to execute BL31. But BL2 also uses it as opcode to check if it is allowed to execute which is not the intended usage of `RUN_IMAGE` SMC. This patch removes the usage of `RUN_IMAGE` as opcode passed to next EL to check if it is allowed to execute. Change-Id: I6aebe0415ade3f43401a4c8a323457f032673657
-rw-r--r--bl1/bl1_main.c3
-rw-r--r--bl2/aarch64/bl2_entrypoint.S21
-rw-r--r--include/common/bl_common.h1
3 files changed, 6 insertions, 19 deletions
diff --git a/bl1/bl1_main.c b/bl1/bl1_main.c
index 73f023ab..9c0927f8 100644
--- a/bl1/bl1_main.c
+++ b/bl1/bl1_main.c
@@ -51,9 +51,6 @@ static void __dead2 bl1_run_bl2(entry_point_info_t *bl2_ep)
bl1_arch_next_el_setup();
- /* Tell next EL what we want done */
- bl2_ep->args.arg0 = RUN_IMAGE;
-
write_spsr_el3(bl2_ep->spsr);
write_elr_el3(bl2_ep->pc);
diff --git a/bl2/aarch64/bl2_entrypoint.S b/bl2/aarch64/bl2_entrypoint.S
index 1d262297..75eb02a9 100644
--- a/bl2/aarch64/bl2_entrypoint.S
+++ b/bl2/aarch64/bl2_entrypoint.S
@@ -39,13 +39,12 @@
func bl2_entrypoint
/*---------------------------------------------
- * Store the extents of the tzram available to
- * BL2 for future use. Use the opcode param to
- * allow implement other functions if needed.
+ * Save from x1 the extents of the tzram
+ * available to BL2 for future use.
+ * x0 is not currently used.
* ---------------------------------------------
- */
- mov x20, x0
- mov x21, x1
+ */
+ mov x20, x1
/* ---------------------------------------------
* Set the exception vector to something sane.
@@ -74,14 +73,6 @@ func bl2_entrypoint
isb
/* ---------------------------------------------
- * Check the opcodes out of paranoia.
- * ---------------------------------------------
- */
- mov x0, #RUN_IMAGE
- cmp x0, x20
- b.ne _panic
-
- /* ---------------------------------------------
* Invalidate the RW memory used by the BL2
* image. This includes the data and NOBITS
* sections. This is done to safeguard against
@@ -126,7 +117,7 @@ func bl2_entrypoint
* specific early arch. setup e.g. mmu setup
* ---------------------------------------------
*/
- mov x0, x21
+ mov x0, x20
bl bl2_early_platform_setup
bl bl2_plat_arch_setup
diff --git a/include/common/bl_common.h b/include/common/bl_common.h
index c9a7a3da..0eec9899 100644
--- a/include/common/bl_common.h
+++ b/include/common/bl_common.h
@@ -46,7 +46,6 @@
#define BOTTOM !TOP
/******************************************************************************
- * Opcode passed in x0 to tell next EL that we want to run an image.
* Corresponds to the function ID of the only SMC that the BL1 exception
* handlers service. That's why the chosen value is the first function ID of
* the ARM SMC64 range.