aarch32: Implement cpu_rev_var_hs()
authorDimitris Papastamos <dimitris.papastamos@arm.com>
Mon, 5 Jun 2017 12:36:34 +0000 (13:36 +0100)
committerDimitris Papastamos <dimitris.papastamos@arm.com>
Tue, 20 Jun 2017 14:14:01 +0000 (15:14 +0100)
Helper function to assist with errata workaround application.

Change-Id: Idba42ca238442cc826f43444dbfa754e433a5e5e
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
lib/cpus/aarch32/cpu_helpers.S

index dc78f6ee8fe307a628a063e340f7b920325dc9ee..bfdc1e4f9ab362eddec7f096df880c6eaea81b9d 100644 (file)
@@ -182,6 +182,19 @@ func cpu_rev_var_ls
        bx      lr
 endfunc cpu_rev_var_ls
 
+/*
+ * Compare the CPU's revision-variant (r0) with a given value (r1), for errata
+ * application purposes. If the revision-variant is higher than or same as a
+ * given value, indicates that errata applies; otherwise not.
+ */
+       .globl  cpu_rev_var_hs
+func cpu_rev_var_hs
+       cmp     r0, r1
+       movge   r0, #ERRATA_APPLIES
+       movlt   r0, #ERRATA_NOT_APPLIES
+       bx      lr
+endfunc cpu_rev_var_hs
+
 #if REPORT_ERRATA
 /*
  * void print_errata_status(void);