Commit e9285940 authored by Anton Burtsev's avatar Anton Burtsev Committed by Vikram Narayanan

Both ping and pong

parent 65fc6485
......@@ -38,11 +38,25 @@ int module_execution_loop(void) {
return ret;
};
// printk(KERN_INFO "Receiver: %c%c%c%c%c%c", (char) msg->regs[0], (char) msg->regs[1],
// (char) msg->regs[2], (char) msg->regs[3], (char) msg->regs[4], (char) msg->regs[5]);
printk(KERN_INFO "Receiver: %d%d%d%d%d%d", msg->regs[0], msg->regs[1],
printk(KERN_INFO "Receiver got: %lld,%lld,%lld,%lld,%lld,%lld", msg->regs[0], msg->regs[1],
msg->regs[2], msg->regs[3], msg->regs[4], msg->regs[5]);
msg->regs[0] = 7;
msg->regs[1] = 8;
msg->regs[2] = 9;
msg->regs[3] = 10;
msg->regs[4] = 11;
msg->regs[5] = 12;
msg->regs[6] = 13;
msg->regs[7] = 14;
msg->valid_regs = 8;
ret = ipc_send(rvp_cap, msg);
if (ret) {
printk(KERN_ERR "receiver failed to send:%d\n", ret);
return ret;
};
return 0;
};
......
......@@ -102,14 +102,6 @@ int module_execution_loop(void) {
msg->regs[4] = 5;
msg->regs[5] = 6;
#if 0
msg->regs[0] = (uint64_t)"H";
msg->regs[1] = (uint64_t)"e";
msg->regs[2] = (uint64_t)"l";
msg->regs[3] = (uint64_t)"l";
msg->regs[4] = (uint64_t)"o";
msg->regs[5] = (uint64_t)"\n";
#endif
msg->valid_regs = 6;
ret = ipc_send(rvp_cap, msg);
......@@ -118,6 +110,20 @@ int module_execution_loop(void) {
return ret;
};
msg->valid_regs = 8;
ret = ipc_recv(rvp_cap, msg);
if (ret) {
printk(KERN_ERR "sender failed to recv:%d\n", ret);
return ret;
};
printk(KERN_INFO "Sender got: %lld,%lld,%lld,%lld,%lld,%lld,%lld,%lld\n",
msg->regs[0], msg->regs[1], msg->regs[2], msg->regs[3],
msg->regs[4], msg->regs[5], msg->regs[6], msg->regs[7]);
return 0;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment