ARMv7: Add SKB records for ARMv7 cores in Kaluga.
authorDavid Cock <david.cock@inf.ethz.ch>
Thu, 28 Jul 2016 17:53:02 +0000 (19:53 +0200)
committerDavid Cock <david.cock@inf.ethz.ch>
Tue, 2 Aug 2016 07:19:49 +0000 (09:19 +0200)
Signed-off-by: David Cock <david.cock@inf.ethz.ch>

hake/menu.lst.armv7_a15ve
hake/menu.lst.armv7_a15ve_gem5
hake/menu.lst.armv7_pandaboard
hake/menu.lst.armv7_zynq7
include/arch/arm/hw_records_arch.h [new file with mode: 0644]
platforms/Hakefile
usr/kaluga/armv7.c

index e728233..94a6715 100644 (file)
@@ -29,6 +29,7 @@ module /armv7/sbin/startd boot
 # Device drivers
 # module /armv7/sbin/serial_pl011 auto
 module /armv7/sbin/serial_kernel irq=37
+module /armv7/sbin/corectrl nospawn
 
 # General user domains
 module /armv7/sbin/angler serial0.terminal dumb
index 96d4dc6..df48f1a 100644 (file)
@@ -29,6 +29,7 @@ module /armv7/sbin/startd boot
 # Device drivers
 # module /armv7/sbin/serial_pl011 auto
 module /armv7/sbin/serial_kernel irq=37
+module /armv7/sbin/corectrl nospawn
 
 # General user domains
 module /armv7/sbin/angler serial0.terminal dumb
index bb5d724..2e93dce 100644 (file)
@@ -27,6 +27,7 @@ module /armv7/sbin/startd boot
 # Device drivers
 # module /armv7/sbin/serial_omap44xx
 module /armv7/sbin/serial_kernel irq=106
+module /armv7/sbin/corectrl nospawn
 
 # General user domains
 module /armv7/sbin/angler serial0.terminal dumb
index dc1c0a1..6983f12 100644 (file)
@@ -27,6 +27,7 @@ module /armv7/sbin/startd boot
 
 # Device drivers
 module /armv7/sbin/serial_kernel irq=82
+module /armv7/sbin/corectrl nospawn
 
 # General user domains
 module /armv7/sbin/angler serial0.terminal dumb
diff --git a/include/arch/arm/hw_records_arch.h b/include/arch/arm/hw_records_arch.h
new file mode 100644 (file)
index 0000000..d59e561
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2016, ETH Zurich.
+ * All rights reserved.
+ *
+ * This file is distributed under the terms in the attached LICENSE file.
+ * If you do not find this file, copies can be found by writing to:
+ * ETH Zurich D-INFK, Universitaetstr. 6, CH-8092 Zurich. Attn: Systems Group.
+ */
+
+#ifndef INCLUDE_ARCH_ARM_HW_RECORDS_ARCH_H_
+#define INCLUDE_ARCH_ARM_HW_RECORDS_ARCH_H_
+
+#include <hw_records.h>
+
+#define HW_PROCESSOR_ARM_FIELDS "{ " HW_PROCESSOR_GENERIC_FIELDS " }"
+
+#define HW_PROCESSOR_ARM_RECORD_FORMAT \
+            "hw.processor.%d " HW_PROCESSOR_ARM_FIELDS
+
+#define HW_PROCESSOR_ARM_REGEX  "r'hw\\.processor\\.[0-9]+' { " \
+                                      "enabled: 1, " \
+                                      "barrelfish_id: _, " \
+                                      "type: _ }"
+
+#endif /* INCLUDE_ARCH_ARM_HW_RECORDS_ARCH_H_ */
index ef47c16..6a18b79 100644 (file)
@@ -285,8 +285,8 @@ let bin_rcce_lu = [ "/sbin/" ++ f | f <- [
                         "usb_keyboard",
                         "serial_omap44xx",
                         "serial_kernel",
-                        "angler"
-                        -- "corectrl"
+                        "angler",
+                        "corectrl"
                         ] ]
 
     -- ARMv7-A modules for Versatile Express EMM board (GEM5, qemu)
@@ -301,7 +301,7 @@ let bin_rcce_lu = [ "/sbin/" ++ f | f <- [
                                "serial_kernel",
                                "spawnd",
                                "startd",
-                               -- "corectrl",
+                               "corectrl",
                                "skb",
                                "angler",
                                "fish",
@@ -338,7 +338,7 @@ let bin_rcce_lu = [ "/sbin/" ++ f | f <- [
                      "serial_kernel",
                      "spawnd",
                      "startd",
-                     -- "corectrl",
+                     "corectrl",
                      "skb",
                      "angler",
                      "fish",
index 4272020..71b1e1a 100644 (file)
  * ETH Zurich D-INFK, Universitaetstr. 6, CH-8092 Zurich. Attn: Systems Group.
  */
 
+#include <hw_records_arch.h>
 #include <barrelfish/barrelfish.h>
 #include <barrelfish_kpi/platform.h>
 #include <if/monitor_blocking_rpcclient_defs.h>
+
+#include <skb/skb.h>
+#include <octopus/getset.h>
+
 #include "kaluga.h"
 
 static errval_t omap44xx_startup(void)
@@ -127,6 +132,11 @@ errval_t arch_startup(char * add_device_db_file)
 
     debug_printf("CPU driver reports %u core(s).\n", arch_info->ncores);
 
+    /* Add SKB records for all cores. */
+    for(coreid_t i= 0; i < arch_info->ncores; i++) {
+        oct_set(HW_PROCESSOR_ARM_RECORD_FORMAT, i, 1, i, i, CPU_ARM7);
+    }
+
     switch(platform) {
         case PI_PLATFORM_OMAP44XX:
             debug_printf("Kaluga running on Pandaboard\n");