xeon phi: adding more debug printfs to the driver
authorReto Achermann <reto.achermann@inf.ethz.ch>
Thu, 20 Aug 2015 16:21:51 +0000 (18:21 +0200)
committerReto Achermann <reto.achermann@inf.ethz.ch>
Thu, 20 Aug 2015 16:22:13 +0000 (18:22 +0200)
Signed-off-by: Reto Achermann <reto.achermann@inf.ethz.ch>

usr/drivers/xeon_phi/boot.c
usr/drivers/xeon_phi/interphi.c

index 4fe45ab..77d581b 100644 (file)
@@ -296,6 +296,8 @@ static errval_t download_bootloader_generic(struct xeon_phi *phi, char *bootload
     buf[517] = 0x53;
     buf[0x1f1] = SETUP_SECTORS-1;
 
+    XBOOT_DEBUG("loading %s @ 0x%lx\n", bootloader, loadoffset);
+
     err = loadfn(bootloader, buf + HEADER_SIZE, args, &imgsize);
     if (err_is_fail(err)) {
         return err;
index b5597f2..389566e 100644 (file)
@@ -885,7 +885,8 @@ static void interphi_bind_cb(void *st,
                              errval_t err,
                              struct interphi_binding *_binding)
 {
-    XINTER_DEBUG("interphi_bind_cb: driver bound  %s\n", err_getstring(err));
+    XINTER_DEBUG("interphi_bind_cb: driver bound %p  %s\n", _binding,
+                 err_getstring(err));
 
     assert(_binding);
 
@@ -907,7 +908,7 @@ static void interphi_connect_cb(void *st,
                                 errval_t err,
                                 struct interphi_binding *_binding)
 {
-    XINTER_DEBUG("interphi_connect_cb: client driver connected\n");
+    XINTER_DEBUG("interphi_connect_cb: client driver connected %p\n", _binding);
 
     struct xnode *node = st;
 
@@ -1054,6 +1055,8 @@ errval_t interphi_init_xphi(uint8_t xphi,
         mi->fi.outbuf = addr;
         mi->fi.sendbase = id.base;
 
+        XINTER_DEBUG("client mode: connecting to server. %s\n", __FUNCTION__);
+
         err = interphi_connect(&mi->fi, interphi_bind_cb, node,
                                ws, IDC_EXPORT_FLAGS_DEFAULT);
     } else {
@@ -1061,6 +1064,8 @@ errval_t interphi_init_xphi(uint8_t xphi,
         mi->fi.outbuf = ((uint8_t*) addr) + mi->fi.outbufsize;
         mi->fi.sendbase = id.base + mi->fi.outbufsize;
 
+        XINTER_DEBUG("server mode: accepting connections. %s\n", __FUNCTION__);
+
         err = interphi_accept(&mi->fi, node, interphi_connect_cb,
                               ws, IDC_EXPORT_FLAGS_DEFAULT);
     }
@@ -1173,6 +1178,8 @@ errval_t interphi_init(struct xeon_phi *phi,
         mi->fi.outbuf = addr;
         mi->fi.sendbase = id.base;
 
+        XINTER_DEBUG("client mode: connecting to server. %s\n", __FUNCTION__);
+
         err = interphi_connect(&mi->fi, interphi_bind_cb, &phi->topology[phi->id],
                                ws, IDC_EXPORT_FLAGS_DEFAULT);
     } else {
@@ -1180,6 +1187,8 @@ errval_t interphi_init(struct xeon_phi *phi,
         mi->fi.outbuf = ((uint8_t*) addr) + mi->fi.outbufsize;
         mi->fi.sendbase = id.base + mi->fi.outbufsize;
 
+        XINTER_DEBUG("server mode: accepting connections. %s\n", __FUNCTION__);
+
         err = interphi_accept(&mi->fi, &phi->topology[phi->id],
                               interphi_connect_cb, ws, IDC_EXPORT_FLAGS_DEFAULT);
     }