Probe for GICv3 re-distributors on core bring-up
The GICv3 distributor can have more ports than CPUs are available in
the system. Probe all re-distributors and use the matching affinity
levels as specified by each core and re-distributor to decide which
re-distributor to use with which CPU core.
If a core cannot be matched with a re-distributor, the core panics and
is placed in an endless loop.
Change-Id: Ie393cfe07c7449a2383959e3c968664882e18afc
diff --git a/include/debug.h b/include/debug.h
index e3c3c93..e8ba7e2 100644
--- a/include/debug.h
+++ b/include/debug.h
@@ -55,5 +55,15 @@
#define ERROR(...) printf("ERROR: " __VA_ARGS__)
+
+/* For the moment this Panic function is very basic, Report an error and
+ * spin. This can be expanded in the future to provide more information.
+ */
+static inline void panic(void)
+{
+ ERROR("PANIC\n");
+ while (1);
+}
+
#endif /* __ASSEMBLY__ */
#endif /* __DEBUG_H__ */
diff --git a/include/mmio.h b/include/mmio.h
index b72daca..313448e 100644
--- a/include/mmio.h
+++ b/include/mmio.h
@@ -38,6 +38,9 @@
extern void mmio_write_32(uintptr_t addr, uint32_t value);
extern uint32_t mmio_read_32(uintptr_t addr);
+extern void mmio_write_64(uintptr_t addr, uint64_t value);
+extern uint64_t mmio_read_64(uintptr_t addr);
+
#endif /*__ASSEMBLY__*/
#endif /* __MMIO_H__ */