Message type for PM_EXEC_RESTART
Change-Id: I0b7abd7b20a56a7982bccd0f677c1cf9d6bf7d3b
This commit is contained in:
parent
aeedd5c718
commit
7fb63c6182
4 changed files with 20 additions and 14 deletions
|
@ -122,12 +122,6 @@
|
||||||
/* Field names for the reboot(2) call. */
|
/* Field names for the reboot(2) call. */
|
||||||
#define PM_REBOOT_HOW m1_i1 /* int */
|
#define PM_REBOOT_HOW m1_i1 /* int */
|
||||||
|
|
||||||
/* Field names for the PM_EXEC_RESTART call. */
|
|
||||||
#define PM_EXEC_RESTART_ENDPT m1_i1 /* endpoint_t */
|
|
||||||
#define PM_EXEC_RESTART_RESULT m1_i2 /* int */
|
|
||||||
#define PM_EXEC_RESTART_PC m1_p1 /* vir_bytes */
|
|
||||||
#define PM_EXEC_RESTART_PS_STR m1_p2 /* vir_bytes */
|
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* Calls to VFS *
|
* Calls to VFS *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
|
|
|
@ -522,6 +522,16 @@ typedef struct {
|
||||||
} mess_lsys_vfs_mapdriver;
|
} mess_lsys_vfs_mapdriver;
|
||||||
_ASSERT_MSG_SIZE(mess_lsys_vfs_mapdriver);
|
_ASSERT_MSG_SIZE(mess_lsys_vfs_mapdriver);
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
endpoint_t endpt;
|
||||||
|
int result;
|
||||||
|
vir_bytes pc;
|
||||||
|
vir_bytes ps_str;
|
||||||
|
|
||||||
|
uint8_t padding[40];
|
||||||
|
} mess_rs_pm_exec_restart;
|
||||||
|
_ASSERT_MSG_SIZE(mess_rs_pm_exec_restart);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
dev_t device;
|
dev_t device;
|
||||||
off_t seek_pos;
|
off_t seek_pos;
|
||||||
|
@ -1022,6 +1032,8 @@ typedef struct {
|
||||||
mess_pm_lsys_getepinfo m_pm_lsys_getepinfo;
|
mess_pm_lsys_getepinfo m_pm_lsys_getepinfo;
|
||||||
mess_pm_lsys_getprocnr m_pm_lsys_getprocnr;
|
mess_pm_lsys_getprocnr m_pm_lsys_getprocnr;
|
||||||
|
|
||||||
|
mess_rs_pm_exec_restart m_rs_pm_exec_restart;
|
||||||
|
|
||||||
mess_vfs_fs_breadwrite m_vfs_fs_breadwrite;
|
mess_vfs_fs_breadwrite m_vfs_fs_breadwrite;
|
||||||
mess_vfs_fs_chmod m_vfs_fs_chmod;
|
mess_vfs_fs_chmod m_vfs_fs_chmod;
|
||||||
mess_vfs_fs_chown m_vfs_fs_chown;
|
mess_vfs_fs_chown m_vfs_fs_chown;
|
||||||
|
|
|
@ -131,14 +131,14 @@ int do_execrestart(void)
|
||||||
if (who_e != RS_PROC_NR)
|
if (who_e != RS_PROC_NR)
|
||||||
return EPERM;
|
return EPERM;
|
||||||
|
|
||||||
proc_e = m_in.PM_EXEC_RESTART_ENDPT;
|
proc_e = m_in.m_rs_pm_exec_restart.endpt;
|
||||||
if (pm_isokendpt(proc_e, &proc_n) != OK) {
|
if (pm_isokendpt(proc_e, &proc_n) != OK) {
|
||||||
panic("do_execrestart: got bad endpoint: %d", proc_e);
|
panic("do_execrestart: got bad endpoint: %d", proc_e);
|
||||||
}
|
}
|
||||||
rmp = &mproc[proc_n];
|
rmp = &mproc[proc_n];
|
||||||
result = m_in.PM_EXEC_RESTART_RESULT;
|
result = m_in.m_rs_pm_exec_restart.result;
|
||||||
pc = (vir_bytes)m_in.PM_EXEC_RESTART_PC;
|
pc = m_in.m_rs_pm_exec_restart.pc;
|
||||||
ps_str = (vir_bytes)m_in.PM_EXEC_RESTART_PS_STR;
|
ps_str = m_in.m_rs_pm_exec_restart.ps_str;
|
||||||
|
|
||||||
exec_restart(rmp, result, pc, rmp->mp_frame_addr, ps_str);
|
exec_restart(rmp, result, pc, rmp->mp_frame_addr, ps_str);
|
||||||
|
|
||||||
|
|
|
@ -129,10 +129,10 @@ static int exec_restart(int proc_e, int result, vir_bytes pc, vir_bytes ps_str)
|
||||||
|
|
||||||
memset(&m, 0, sizeof(m));
|
memset(&m, 0, sizeof(m));
|
||||||
m.m_type = PM_EXEC_RESTART;
|
m.m_type = PM_EXEC_RESTART;
|
||||||
m.PM_EXEC_RESTART_ENDPT = proc_e;
|
m.m_rs_pm_exec_restart.endpt = proc_e;
|
||||||
m.PM_EXEC_RESTART_RESULT = result;
|
m.m_rs_pm_exec_restart.result = result;
|
||||||
m.PM_EXEC_RESTART_PC = (void *)pc;
|
m.m_rs_pm_exec_restart.pc = pc;
|
||||||
m.PM_EXEC_RESTART_PS_STR = (void *)ps_str;
|
m.m_rs_pm_exec_restart.ps_str = ps_str;
|
||||||
|
|
||||||
r = ipc_sendrec(PM_PROC_NR, &m);
|
r = ipc_sendrec(PM_PROC_NR, &m);
|
||||||
if (r != OK)
|
if (r != OK)
|
||||||
|
|
Loading…
Reference in a new issue