Make errata reporting mandatory for CPU files
authorSoby Mathew <soby.mathew@arm.com>
Mon, 17 Sep 2018 03:34:35 +0000 (04:34 +0100)
committerSoby Mathew <soby.mathew@arm.com>
Mon, 29 Oct 2018 09:54:32 +0000 (09:54 +0000)
Previously the errata reporting was optional for CPU operation
files and this was achieved by making use of weak reference to
resolve to 0 if the symbol is not defined. This is error prone
when adding new CPU operation files and weak references are
problematic when fixing up dynamic relocations. Hence this patch
removes the weak reference and makes it mandatory for the CPU
operation files to define the errata reporting function.

Change-Id: I8af192e19b85b7cd8c7579e52f8f05a4294e5396
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
include/lib/cpus/aarch32/cpu_macros.S
include/lib/cpus/aarch64/cpu_macros.S
lib/cpus/aarch32/aem_generic.S
lib/cpus/aarch32/cortex_a12.S
lib/cpus/aarch32/cortex_a32.S
lib/cpus/aarch32/cortex_a5.S
lib/cpus/aarch32/cortex_a7.S
lib/cpus/aarch64/aem_generic.S
lib/cpus/aarch64/cortex_a35.S
lib/cpus/aarch64/cortex_deimos.S
lib/cpus/aarch64/cortex_helios.S

index 525e18caf415d1664bd3eaf62c8826054fd37d9e..aa728b2415d16653b9270eddf8fc82f3249969bf 100644 (file)
        .endif
 
        /*
-        * Weakly-bound, optional errata status printing function for CPUs of
+        * Mandatory errata status printing function for CPUs of
         * this class.
         */
-       .weak \_name\()_errata_report
        .word \_name\()_errata_report
 
 #ifdef IMAGE_BL32
index 4672cbc061623e07e503ae2b71ec4b460680709f..14616ace4f516b4b6a700a58b1fc6b7bf98733f0 100644 (file)
        .endif
 
        /*
-        * Weakly-bound, optional errata status printing function for CPUs of
+        * Mandatory errata status printing function for CPUs of
         * this class.
         */
-       .weak \_name\()_errata_report
        .quad \_name\()_errata_report
 
 #ifdef IMAGE_BL31
index 5f3d744701cb594b4f5933669df78f6642b5ba44..7bd586ad9abac0f245fc6d85c192e16f144a8fc3 100644 (file)
@@ -40,6 +40,15 @@ func aem_generic_cluster_pwr_dwn
        b       dcsw_op_all
 endfunc aem_generic_cluster_pwr_dwn
 
+#if REPORT_ERRATA
+/*
+ * Errata printing function for AEM. Must follow AAPCS.
+ */
+func aem_generic_errata_report
+       bx      lr
+endfunc aem_generic_errata_report
+#endif
+
 /* cpu_ops for Base AEM FVP */
 declare_cpu_ops aem_generic, BASE_AEM_MIDR, CPU_NO_RESET_FUNC, \
        aem_generic_core_pwr_dwn, \
index 73c9750722963685d987254dd2056cbc5b13b73c..5300fe00907763823e3c5c3f7133b72d7d19381d 100644 (file)
@@ -69,6 +69,15 @@ func cortex_a12_cluster_pwr_dwn
        b       cortex_a12_disable_smp
 endfunc cortex_a12_cluster_pwr_dwn
 
+#if REPORT_ERRATA
+/*
+ * Errata printing function for Cortex-A12. Must follow AAPCS.
+ */
+func cortex_a12_errata_report
+       bx      lr
+endfunc cortex_a12_errata_report
+#endif
+
 declare_cpu_ops cortex_a12, CORTEX_A12_MIDR, \
        cortex_a12_reset_func, \
        cortex_a12_core_pwr_dwn, \
index 2b6df272d289ff31970aa62ec1ca7ed87f0c74ce..c262276224607ba9a6dd442b45fc82960a601842 100644 (file)
@@ -117,6 +117,15 @@ func cortex_a32_cluster_pwr_dwn
        b       cortex_a32_disable_smp
 endfunc cortex_a32_cluster_pwr_dwn
 
+#if REPORT_ERRATA
+/*
+ * Errata printing function for Cortex-A32. Must follow AAPCS.
+ */
+func cortex_a32_errata_report
+       bx      lr
+endfunc cortex_a32_errata_report
+#endif
+
 declare_cpu_ops cortex_a32, CORTEX_A32_MIDR, \
        cortex_a32_reset_func, \
        cortex_a32_core_pwr_dwn, \
index c07c13ea1dcb0962fc228385b48603852d56d9ce..8abb66f0e527d917750e92c5835594448c0ae265 100644 (file)
@@ -69,6 +69,15 @@ func cortex_a5_cluster_pwr_dwn
        b       cortex_a5_disable_smp
 endfunc cortex_a5_cluster_pwr_dwn
 
+#if REPORT_ERRATA
+/*
+ * Errata printing function for Cortex-A5. Must follow AAPCS.
+ */
+func cortex_a5_errata_report
+       bx      lr
+endfunc cortex_a5_errata_report
+#endif
+
 declare_cpu_ops cortex_a5, CORTEX_A5_MIDR, \
        cortex_a5_reset_func, \
        cortex_a5_core_pwr_dwn, \
index 0278d1fdaab99dd89b912073aafea138aa4185c9..4d4bb77bb8a30fd4bf9b70ffb77b9e505d658f47 100644 (file)
@@ -69,6 +69,15 @@ func cortex_a7_cluster_pwr_dwn
        b       cortex_a7_disable_smp
 endfunc cortex_a7_cluster_pwr_dwn
 
+#if REPORT_ERRATA
+/*
+ * Errata printing function for Cortex-A7. Must follow AAPCS.
+ */
+func cortex_a7_errata_report
+       bx      lr
+endfunc cortex_a7_errata_report
+#endif
+
 declare_cpu_ops cortex_a7, CORTEX_A7_MIDR, \
        cortex_a7_reset_func, \
        cortex_a7_core_pwr_dwn, \
index 7592e3dc99d1027a969b7eafc8653620accbf222..51b5ce91cb744b49701cad9b5442cb75c4f20104 100644 (file)
@@ -46,6 +46,15 @@ func aem_generic_cluster_pwr_dwn
        b       dcsw_op_all
 endfunc aem_generic_cluster_pwr_dwn
 
+#if REPORT_ERRATA
+/*
+ * Errata printing function for AEM. Must follow AAPCS.
+ */
+func aem_generic_errata_report
+       ret
+endfunc aem_generic_errata_report
+#endif
+
        /* ---------------------------------------------
         * This function provides cpu specific
         * register information for crash reporting.
index b22189c8042a145029a12d22412d9e731c9ca26d..2e0d63161ad81102fa093de09fc615992ae29ae6 100644 (file)
@@ -114,6 +114,16 @@ func cortex_a35_cluster_pwr_dwn
        b       cortex_a35_disable_smp
 endfunc cortex_a35_cluster_pwr_dwn
 
+#if REPORT_ERRATA
+/*
+ * Errata printing function for Cortex A35. Must follow AAPCS.
+ */
+func cortex_a35_errata_report
+       ret
+endfunc cortex_a35_errata_report
+#endif
+
+
        /* ---------------------------------------------
         * This function provides cortex_a35 specific
         * register information for crash reporting.
index aec62a28708c3ca04cd69b200a2786ab405b5de4..cad906f65cbf882794a7f4016572270aeb97bec9 100644 (file)
@@ -27,6 +27,16 @@ func cortex_deimos_core_pwr_dwn
        ret
 endfunc cortex_deimos_core_pwr_dwn
 
+#if REPORT_ERRATA
+/*
+ * Errata printing function for Cortex Deimos. Must follow AAPCS.
+ */
+func cortex_deimos_errata_report
+       ret
+endfunc cortex_deimos_errata_report
+#endif
+
+
        /* ---------------------------------------------
         * This function provides Cortex-Deimos specific
         * register information for crash reporting.
index bcda74114ebb6f50d2e2283d070ed86da89bb746..4812ac47ca73b8867d8c9ef66753d919fd063167 100644 (file)
@@ -19,6 +19,16 @@ func cortex_helios_cpu_pwr_dwn
        ret
 endfunc cortex_helios_cpu_pwr_dwn
 
+#if REPORT_ERRATA
+/*
+ * Errata printing function for Cortex Helios. Must follow AAPCS.
+ */
+func cortex_helios_errata_report
+       ret
+endfunc cortex_helios_errata_report
+#endif
+
+
 .section .rodata.cortex_helios_regs, "aS"
 cortex_helios_regs:  /* The ascii list of register names to be reported */
        .asciz  "cpuectlr_el1", ""