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__ */