From: Sandrine Bailleux Date: Mon, 2 Dec 2013 15:45:07 +0000 (+0000) Subject: BL2: Sanity check value in x0 in the entry point code X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=34edaed563e78081ce17ff1f682628c11d337bf2;p=project%2Fbcm63xx%2Fatf.git BL2: Sanity check value in x0 in the entry point code Change-Id: Icef68e314e6ba0f3694189b57f4b1dbbea5ba255 --- 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 @@ -77,6 +77,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;