Added SI_CALL_STATS and ENABLE_SYSCALL_STATS for system call statistics.

Added BUSC_PCI_DEV_NAME_S and BUSC_PCI_SLOT_NAME_S to support safecopies in PCI.
Added DL_WRITEV_S, DL_READV_S, DL_GETSTAT_S, DL_GRANT, and iovec_s_t to support
safecopies in ethernet drviers. Renamed DL_INIT to DL_CONF, and DL_INIT_REPLY
to DL_CONF_REPLY.
Added SYS_READBIOS and sys_readbios to read from BIOS data areas.
Added GET_KMESS_S for safecopy support in LOG.
Added sys_safe_insb and sys_safe_outsb.
This commit is contained in:
Philip Homburg 2006-07-10 12:13:29 +00:00
parent cac387bc1e
commit d7174ec0ab
5 changed files with 37 additions and 3 deletions

View file

@ -123,6 +123,13 @@
* attribute value
*/
#define BUSC_PCI_RESCAN (BUSC_RQ_BASE + 14) /* Rescan bus */
#define BUSC_PCI_DEV_NAME_S (BUSC_RQ_BASE + 15) /* Get the name of a
* PCI device
* (safecopy)
*/
#define BUSC_PCI_SLOT_NAME_S (BUSC_RQ_BASE + 16) /* Get the name of a
* PCI slot (safecopy)
*/
/*===========================================================================*
* Messages for BLOCK and CHARACTER device drivers *
@ -209,13 +216,16 @@
#define DL_WRITEV (DL_RQ_BASE + 4)
#define DL_READ (DL_RQ_BASE + 5)
#define DL_READV (DL_RQ_BASE + 6)
#define DL_INIT (DL_RQ_BASE + 7)
#define DL_CONF (DL_RQ_BASE + 7)
#define DL_STOP (DL_RQ_BASE + 8)
#define DL_GETSTAT (DL_RQ_BASE + 9)
#define DL_GETNAME (DL_RQ_BASE +10)
#define DL_WRITEV_S (DL_RQ_BASE +11)
#define DL_READV_S (DL_RQ_BASE +12)
#define DL_GETSTAT_S (DL_RQ_BASE +13)
/* Message type for data link layer replies. */
#define DL_INIT_REPLY (DL_RS_BASE + 20)
#define DL_CONF_REPLY (DL_RS_BASE + 20)
#define DL_TASK_REPLY (DL_RS_BASE + 21)
#define DL_NAME_REPLY (DL_RS_BASE + 22)
@ -227,6 +237,7 @@
#define DL_CLCK m2_l2
#define DL_ADDR m2_p1
#define DL_STAT m2_l1
#define DL_GRANT m2_l2
#define DL_NAME m3_ca1
/* Bits in 'DL_STAT' field of DL replies. */
@ -290,8 +301,9 @@
# define SYS_SAFECOPYTO (KERNEL_CALL + 32) /* sys_safecopyto() */
# define SYS_VSAFECOPY (KERNEL_CALL + 33) /* sys_vsafecopy() */
# define SYS_SETGRANT (KERNEL_CALL + 34) /* sys_setgrant() */
# define SYS_READBIOS (KERNEL_CALL + 35) /* sys_readbios() */
#define NR_SYS_CALLS 35 /* number of system calls */
#define NR_SYS_CALLS 36 /* number of system calls */
/* Pseudo call for use in kernel/table.c. */
#define SYS_ALL_CALLS (NR_SYS_CALLS)
@ -503,6 +515,11 @@
#define SEL_ERRORFDS m8_p3
#define SEL_TIMEOUT m8_p4
/* Message for SYS_READBIOS */
#define RDB_SIZE m2_i1
#define RDB_ADDR m2_l1
#define RDB_BUF m2_p1
/*===========================================================================*
* Messages for the Reincarnation Server *
*===========================================================================*/
@ -559,6 +576,8 @@
# define DIAG_BUF_COUNT m1_i1
#define GET_KMESS (DIAG_BASE+3) /* get kmess from TTY */
# define GETKM_PTR m1_p1
#define GET_KMESS_S (DIAG_BASE+4) /* get kmess from TTY */
# define GETKM_GRANT m1_i1
#define PM_BASE 0x900
#define PM_GET_WORK (PM_BASE + 1) /* Get work from PM */

View file

@ -99,6 +99,9 @@
#define NR_RS_LINES 4 /* # rs232 terminals (0 to 4) */
#define NR_PTYS 32 /* # pseudo terminals (0 to 64) */
/* This feature enable the counting of system calls in PM and FS */
#define ENABLE_SYSCALL_STATS 0
/*===========================================================================*
* There are no user-settable parameters after this line *
*===========================================================================*/

View file

@ -46,6 +46,8 @@ _PROTOTYPE( int sys_vm_setbuf, (phys_bytes base, phys_bytes size,
_PROTOTYPE( int sys_vm_map, (endpoint_t proc_nr, int do_map,
phys_bytes base, phys_bytes size, phys_bytes offset));
_PROTOTYPE( int sys_readbios, (phys_bytes address, void *buf, size_t size));
/* Shorthands for sys_sdevio() system call. */
#define sys_insb(port, proc_nr, buffer, count) \
sys_sdevio(DIO_INPUT_BYTE, port, proc_nr, buffer, count, 0)
@ -55,6 +57,10 @@ _PROTOTYPE( int sys_vm_map, (endpoint_t proc_nr, int do_map,
sys_sdevio(DIO_OUTPUT_BYTE, port, proc_nr, buffer, count, 0)
#define sys_outsw(port, proc_nr, buffer, count) \
sys_sdevio(DIO_OUTPUT_WORD, port, proc_nr, buffer, count, 0)
#define sys_safe_insb(port, ept, grant, offset, count) \
sys_sdevio(DIO_SAFE_INPUT_BYTE, port, ept, (void*)grant, count, offset)
#define sys_safe_outsb(port, ept, grant, offset, count) \
sys_sdevio(DIO_SAFE_OUTPUT_BYTE, port, ept, (void*)grant, count, offset)
#define sys_safe_insw(port, ept, grant, offset, count) \
sys_sdevio(DIO_SAFE_INPUT_WORD, port, ept, (void*)grant, count, offset)
#define sys_safe_outsw(port, ept, grant, offset, count) \

View file

@ -73,6 +73,11 @@ typedef struct {
vir_bytes iov_size; /* sizeof an I/O buffer */
} iovec_t;
typedef struct {
int iov_grant; /* grant ID of an I/O buffer */
vir_bytes iov_size; /* sizeof an I/O buffer */
} iovec_s_t;
/* PM passes the address of a structure of this type to KERNEL when
* sys_sendsig() is invoked as part of the signal catching mechanism.
* The structure contain all the information that KERNEL needs to build

View file

@ -47,6 +47,7 @@
#define SI_DATA_STORE 5 /* get copy of data store */
#define SI_LOADINFO 6 /* get copy of load average structure */
#define SI_KPROC_TAB 7 /* copy of kernel process table */
#define SI_CALL_STATS 8 /* system call statistics */
/* NULL must be defined in <unistd.h> according to POSIX Sec. 2.7.1. */
#define NULL ((void *)0)