diff options
author | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2013-12-02 15:45:07 +0000 |
---|---|---|
committer | Dan Handley <dan.handley@arm.com> | 2013-12-12 16:06:48 +0000 |
commit | 34edaed563e78081ce17ff1f682628c11d337bf2 (patch) | |
tree | 9e12df147d801ba67d1a03b42b278eb1c02a3315 /bl2 | |
parent | ba6980a8db0215ba42c103b80f8981cfda80171c (diff) | |
download | arm-trusted-firmware-34edaed563e78081ce17ff1f682628c11d337bf2.tar.gz |
BL2: Sanity check value in x0 in the entry point code
Change-Id: Icef68e314e6ba0f3694189b57f4b1dbbea5ba255
Diffstat (limited to 'bl2')
-rw-r--r-- | bl2/aarch64/bl2_entrypoint.S | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bl2/aarch64/bl2_entrypoint.S b/bl2/aarch64/bl2_entrypoint.S index 75970f74..03d08480 100644 --- a/bl2/aarch64/bl2_entrypoint.S +++ b/bl2/aarch64/bl2_entrypoint.S @@ -78,6 +78,14 @@ bl2_entrypoint:; .type bl2_entrypoint, %function isb /* --------------------------------------------- + * Check the opcodes out of paranoia. + * --------------------------------------------- + */ + mov x0, #RUN_IMAGE + cmp x0, x20 + b.ne _panic + + /* --------------------------------------------- * Zero out NOBITS sections. There are 2 of them: * - the .bss section; * - the coherent memory section. |