#define REBOOT 76
#define SVRCTL 77
#define SYSUNAME 78
-#define GETSYSINFO 79 /* to PM or VFS (obsolete) */
#define GETDENTS 80 /* to VFS */
#define LLSEEK 81 /* to VFS */
#define FSTATFS 82 /* to VFS */
#define FTRUNCATE 94 /* to VFS */
#define FCHMOD 95 /* to VFS */
#define FCHOWN 96 /* to VFS */
-#define GETSYSINFO_UP 97 /* to PM (obsolete) */
#define SPROF 98 /* to PM */
#define CPROF 99 /* to PM */
#define is_notify(a) ((unsigned) ((a) - NOTIFY_MESSAGE) < 0x100)
#define is_ipc_asynch(ipc_status) \
(is_ipc_notify(ipc_status) || IPC_STATUS_CALL(ipc_status) == SENDA)
-#define NOTIFY_FROM(p_nr) (NOTIFY_MESSAGE | ((p_nr) + NR_TASKS))
/* Shorthands for message parameters passed with notifications. */
#define NOTIFY_ARG m2_l1
*/
-
/*===========================================================================*
* Messages for BLOCK and CHARACTER device drivers *
*===========================================================================*/
#define CANCEL (DEV_RQ_BASE + 0) /* force a task to cancel */
#define DEV_OPEN (DEV_RQ_BASE + 6) /* open a minor device */
#define DEV_CLOSE (DEV_RQ_BASE + 7) /* close a minor device */
-#define TTY_SETPGRP (DEV_RQ_BASE + 10) /* set process group */
-#define TTY_EXIT (DEV_RQ_BASE + 11) /* process group leader exited */
#define DEV_SELECT (DEV_RQ_BASE + 12) /* request select() attention */
#define DEV_STATUS (DEV_RQ_BASE + 13) /* request driver status */
#define DEV_REOPEN (DEV_RQ_BASE + 14) /* reopen a minor device */
#define DEV_SCATTER_S (DEV_RQ_BASE + 22) /* (safecopy) write from a vector */
#define DEV_GATHER_S (DEV_RQ_BASE + 23) /* (safecopy) read into a vector */
#define DEV_IOCTL_S (DEV_RQ_BASE + 24) /* (safecopy) I/O control code */
-#define DEV_MMAP_S (DEV_RQ_BASE + 25) /* (safecopy) mmap interface */
#define IS_DEV_RQ(type) (((type) & ~0xff) == DEV_RQ_BASE)
-#define DEV_REPLY (DEV_RS_BASE + 0) /* general task reply */
-#define DEV_CLONED (DEV_RS_BASE + 1) /* return cloned minor */
#define DEV_REVIVE (DEV_RS_BASE + 2) /* driver revives process */
#define DEV_IO_READY (DEV_RS_BASE + 3) /* selected device ready */
#define DEV_NO_STATUS (DEV_RS_BASE + 4) /* empty status reply */
#define TTY_SPEK POSITION/* message parameter: ioctl speed, erasing */
#define TTY_PGRP m2_i3 /* message parameter: process group */
-/* Field names for the QIC 02 status reply from tape driver */
-#define TAPE_STAT0 m2_l1
-#define TAPE_STAT1 m2_l2
-
-/* Field names for the fstatvfs call */
-#define FSTATVFS_FD m1_i1
-#define FSTATVFS_BUF m1_p1
-
-/* Field names for the statvfs call */
-#define STATVFS_LEN m1_i1
-#define STATVFS_NAME m1_p1
-#define STATVFS_BUF m1_p2
-
-#define PM_GETSID_PID m1_i1
-
/*===========================================================================*
* Messages for networking layer *
*===========================================================================*/
#define DL_TASK_REPLY (DL_RS_BASE + 2)
/* Field names for data link layer messages. */
-#define DL_ENDPT_LEGACY m2_i2 /* obsolete; will be removed */
#define DL_COUNT m2_i3
#define DL_MODE m2_l1
#define DL_FLAGS m2_l1
*/
/*===========================================================================*
- * Miscellaneous field names *
+ * Common requests and miscellaneous field names *
*===========================================================================*/
+#define COMMON_RQ_BASE 0xE00
+
+/* Field names for system signals (sent by a signal manager). */
+#define SIGS_SIGNAL_RECEIVED (COMMON_RQ_BASE+0)
+# define SIGS_SIG_NUM m2_i1
+
+/* Common request to all processes: gcov data. */
+#define COMMON_REQ_GCOV_DATA (COMMON_RQ_BASE+1)
+# define GCOV_GRANT m1_i2
+# define GCOV_PID m1_i3
+# define GCOV_BUFF_P m1_p1
+# define GCOV_BUFF_SZ m1_i1
+
+/* Common request to several system servers: retrieve system information. */
+#define COMMON_GETSYSINFO (COMMON_RQ_BASE+2)
+# define SI_WHAT m1_i1
+# define SI_WHERE m1_p1
+
/* PM field names */
/* BRK */
#define PMBRK_ADDR m1_p1
#define PM_NUID m2_i1
#define PM_NGID m2_i2
-/* Field names for GETSYSINFO_UP (PM) (obsolete). */
-#define SIU_WHAT m2_i1
-# define SIU_LOADINFO 1 /* retrieve load info data */
-# define SIU_SYSTEMHZ 2 /* retrieve system clock frequency */
-#define SIU_LEN m2_i2
-#define SIU_WHERE m2_p1
+#define PM_GETSID_PID m1_i1
/* Field names for SELECT (FS). */
#define SEL_NFDS m8_i1
#define SEL_ERRORFDS m8_p3
#define SEL_TIMEOUT m8_p4
-#define COMMON_RQ_BASE 0xE00
-
-/* Field names for system signals (sent by a signal manager). */
-#define SIGS_SIGNAL_RECEIVED (COMMON_RQ_BASE+0)
-# define SIGS_SIG_NUM m2_i1
-
-/* Common request to all processes: gcov data. */
-#define COMMON_REQ_GCOV_DATA (COMMON_RQ_BASE+1)
-# define GCOV_GRANT m1_i2
-# define GCOV_PID m1_i3
-# define GCOV_BUFF_P m1_p1
-# define GCOV_BUFF_SZ m1_i1
+/* Field names for the fstatvfs call */
+#define FSTATVFS_FD m1_i1
+#define FSTATVFS_BUF m1_p1
-/* Common request to several system servers: retrieve system information.
- * The GETSYSINFO userland call is an (old and deprecated) alias of this, so do
- * not change the fields or old userland applications may break.
- */
-#define COMMON_GETSYSINFO (COMMON_RQ_BASE+2)
-# define SI_WHAT m1_i1
-# define SI_WHERE m1_p1
+/* Field names for the statvfs call */
+#define STATVFS_LEN m1_i1
+#define STATVFS_NAME m1_p1
+#define STATVFS_BUF m1_p2
/*===========================================================================*
* Messages for VM server *
#define PICK_HIGHERONLY 2
#define BuildNotifyMessage(m_ptr, src, dst_ptr) \
- (m_ptr)->m_type = NOTIFY_FROM(src); \
+ (m_ptr)->m_type = NOTIFY_MESSAGE; \
(m_ptr)->NOTIFY_TIMESTAMP = get_uptime(); \
switch (src) { \
case HARDWARE: \
size_t len;
/* Only su may call do_getsysinfo. This call may leak information (and is not
- * stable enough to be part of the API/ABI).
+ * stable enough to be part of the API/ABI). In the future, requests from
+ * non-system processes should be denied.
*/
if (!super_user) return(EPERM);
- /* This call should no longer be used by user applications. In the future,
- * requests from non-system processes should be denied. For now, just warn.
- */
- if (call_nr == GETSYSINFO) {
- printf("VFS: obsolete call of do_getsysinfo() by proc %d\n",
- fp->fp_endpoint);
- }
-
switch(m_in.info_what) {
case SI_PROC_TAB:
src_addr = (vir_bytes) fproc;
no_sys, /* 76 = (reboot) */
do_svrctl, /* 77 = svrctl */
no_sys, /* 78 = (sysuname) */
- do_getsysinfo, /* 79 = getsysinfo */
+ no_sys, /* 79 = unused */
do_getdents, /* 80 = getdents */
do_llseek, /* 81 = llseek */
do_fstatfs, /* 82 = fstatfs */
do_ftruncate, /* 94 = truncate */
do_chmod, /* 95 = fchmod */
do_chown, /* 96 = fchown */
- no_sys, /* 97 = (getsysinfo_up) */
+ no_sys, /* 97 = unused */
no_sys, /* 98 = (sprofile) */
no_sys, /* 99 = (cprofile) */
/* THE MINIX3 ABI ENDS HERE */
errno));
}
m.m_type= DL_WRITEV_S;
- m.DL_ENDPT_LEGACY= this_proc; /* FIXME: legacy support */
m.DL_COUNT= i;
m.DL_GRANT= eth_port->etp_osdep.etp_wr_vec_grant;
}
mess.m_type= DL_READV_S;
- mess.DL_ENDPT_LEGACY= this_proc; /* FIXME: legacy support */
mess.DL_COUNT= i;
mess.DL_GRANT= eth_port->etp_osdep.etp_rd_vec_grant;
message mess;
mess.m_type= DL_GETSTAT_S;
- mess.DL_ENDPT_LEGACY= this_proc; /* FIXME: legacy support */
mess.DL_GRANT= eth_port->etp_osdep.etp_stat_gid;
assert(eth_port->etp_osdep.etp_state == OEPS_IDLE);
nic->rx_iovec[0].iov_size = nic->rx_pbuf->len;
m.m_type = DL_READV_S;
- m.DL_ENDPT_LEGACY = lwip_ep; /* FIXME: legacy support */
m.DL_COUNT = 1;
m.DL_GRANT = nic->rx_iogrant;
panic("Failed to set grant");
m.m_type = DL_WRITEV_S;
- m.DL_ENDPT_LEGACY = lwip_ep; /* FIXME: legacy support */
m.DL_COUNT = 1;
m.DL_GRANT = nic->tx_iogrant;
size_t len;
int s;
- /* This call leaks important information (the contents of registers). */
+ /* This call leaks important information. In the future, requests from
+ * non-system processes should be denied.
+ */
if (mp->mp_effuid != 0)
{
printf("PM: unauthorized call of do_getsysinfo by proc %d '%s'\n",
return EPERM;
}
- /* This call should no longer be used by user applications. In the future,
- * requests from non-system processes should be denied. For now, just warn.
- */
- if (call_nr == GETSYSINFO)
- {
- printf("PM: obsolete call of do_getsysinfo() by proc %d '%s'\n",
- mp->mp_endpoint, mp->mp_name);
- }
-
switch(m_in.info_what) {
case SI_PROC_TAB: /* copy entire process table */
src_addr = (vir_bytes) mproc;
return(OK);
}
-/*===========================================================================*
- * do_getsysinfo_up *
- *===========================================================================*/
-PUBLIC int do_getsysinfo_up()
-{
- vir_bytes src_addr, dst_addr;
- struct loadinfo loadinfo;
- size_t len, real_len;
- int s;
-
- printf("PM: obsolete call of do_getsysinfo_up() by proc %d '%s'\n",
- mp->mp_endpoint, mp->mp_name);
-
- switch(m_in.SIU_WHAT) {
- case SIU_LOADINFO: /* loadinfo is obtained via PM */
- if ((s = sys_getloadinfo(&loadinfo)) != OK)
- return s;
- src_addr = (vir_bytes) &loadinfo;
- real_len = sizeof(struct loadinfo);
- break;
- case SIU_SYSTEMHZ:
- src_addr = (vir_bytes) &system_hz;
- real_len = sizeof(system_hz);
- break;
- default:
- return(EINVAL);
- }
-
- /* Let application know what the length was. */
- len = real_len;
- if(len > m_in.SIU_LEN)
- len = m_in.SIU_LEN;
-
- dst_addr = (vir_bytes) m_in.SIU_WHERE;
- if (OK != (s=sys_datacopy(SELF, src_addr, who_e, dst_addr, len)))
- return(s);
- return(real_len);
-}
-
/*===========================================================================*
* do_getprocnr *
*===========================================================================*/
_PROTOTYPE( int do_procstat, (void) );
_PROTOTYPE( int do_sysuname, (void) );
_PROTOTYPE( int do_getsysinfo, (void) );
-_PROTOTYPE( int do_getsysinfo_up, (void) );
_PROTOTYPE( int do_getprocnr, (void) );
_PROTOTYPE( int do_getepinfo, (void) );
_PROTOTYPE( int do_getepinfo_o, (void) );
do_reboot, /* 76 = reboot */
do_svrctl, /* 77 = svrctl */
do_sysuname, /* 78 = sysuname */
- do_getsysinfo, /* 79 = getsysinfo */
+ no_sys, /* 79 = unused */
no_sys, /* 80 = (getdents) */
no_sys, /* 81 = unused */
no_sys, /* 82 = (fstatfs) */
no_sys, /* 94 = (ftruncate) */
no_sys, /* 95 = (fchmod) */
no_sys, /* 96 = (fchown) */
- do_getsysinfo_up,/* 97 = getsysinfo_up */
+ no_sys, /* 97 = unused */
do_sprofile, /* 98 = sprofile */
do_cprofile, /* 99 = cprofile */
/* THE MINIX3 ABI ENDS HERE */
int s;
/* Only su may call do_getsysinfo. This call may leak information (and is not
- * stable enough to be part of the API/ABI).
+ * stable enough to be part of the API/ABI). In the future, requests from
+ * non-system processes should be denied.
*/
if (!super_user) return(EPERM);
- /* This call should no longer be used by user applications. In the future,
- * requests from non-system processes should be denied. For now, just warn.
- */
- if (call_nr == GETSYSINFO) {
- printf("VFS: obsolete call of do_getsysinfo() by proc %d\n",
- fp->fp_endpoint);
- }
-
switch(m_in.info_what) {
case SI_PROC_TAB:
src_addr = (vir_bytes) fproc;
no_sys, /* 76 = (reboot) */
do_svrctl, /* 77 = svrctl */
no_sys, /* 78 = (sysuname) */
- do_getsysinfo, /* 79 = getsysinfo */
+ no_sys, /* 79 = unused */
do_getdents, /* 80 = getdents */
do_llseek, /* 81 = llseek */
do_fstatfs, /* 82 = fstatfs */
do_ftruncate, /* 94 = truncate */
do_chmod, /* 95 = fchmod */
do_chown, /* 96 = fchown */
- no_sys, /* 97 = (getsysinfo_up) */
+ no_sys, /* 97 = unused */
no_sys, /* 98 = (sprofile) */
no_sys, /* 99 = (cprofile) */
/* THE MINIX3 ABI ENDS HERE */