mcexec forward signal to MIC process.

This commit is contained in:
Tomoki Shirasawa
2013-08-19 12:17:23 +09:00
parent 591f398768
commit 1d69225532
14 changed files with 148 additions and 37 deletions

View File

@@ -209,6 +209,22 @@ static long mcexec_start_image(ihk_os_t os,
return 0;
}
static long mcexec_send_signal(ihk_os_t os, unsigned long sigparam)
{
struct ikc_scd_packet isp;
struct mcctrl_channel *c;
struct mcctrl_usrdata *usrdata = ihk_host_os_get_usrdata(os);
c = usrdata->channels;
isp.msg = SCD_MSG_SEND_SIGNAL;
isp.ref = 0;
isp.arg = sigparam;
mcctrl_ikc_send(os, 0, &isp);
return 0;
}
int mcexec_syscall(struct mcctrl_channel *c, unsigned long arg)
{
c->req = 1;
@@ -536,6 +552,9 @@ long __mcctrl_control(ihk_os_t os, unsigned int req, unsigned long arg)
case MCEXEC_UP_LOAD_SYSCALL:
return mcexec_load_syscall(os, (struct syscall_load_desc *)arg);
case MCEXEC_UP_SEND_SIGNAL:
return mcexec_send_signal(os, arg);
case MCEXEC_UP_PREPARE_DMA:
return mcexec_pin_region(os, (unsigned long *)arg);

View File

@@ -31,6 +31,7 @@ static struct ihk_os_user_call_handler mcctrl_uchs[] = {
{ .request = MCEXEC_UP_WAIT_SYSCALL, .func = mcctrl_ioctl },
{ .request = MCEXEC_UP_RET_SYSCALL, .func = mcctrl_ioctl },
{ .request = MCEXEC_UP_LOAD_SYSCALL, .func = mcctrl_ioctl },
{ .request = MCEXEC_UP_SEND_SIGNAL, .func = mcctrl_ioctl },
{ .request = MCEXEC_UP_PREPARE_DMA, .func = mcctrl_ioctl },
{ .request = MCEXEC_UP_FREE_DMA, .func = mcctrl_ioctl },
};

View File

@@ -16,6 +16,7 @@
#define SCD_MSG_INIT_CHANNEL_ACKED 0x6
#define SCD_MSG_SYSCALL_ONESIDE 0x4
#define SCD_MSG_SEND_SIGNAL 0x8
#define DMA_PIN_SHIFT 21