4 #ifndef _MINIX_SYS_CONFIG_H
5 #include <minix/sys_config.h>
9 #include <minix/types.h>
12 /* Type definitions. */
13 typedef unsigned int vir_clicks
; /* virtual addr/length in clicks */
14 typedef unsigned long phys_bytes
; /* physical addr/length in bytes */
15 typedef unsigned int phys_clicks
; /* physical addr/length in clicks */
16 typedef int endpoint_t
; /* process identifier */
18 #if (_MINIX_CHIP == _CHIP_INTEL)
19 typedef long unsigned int vir_bytes
; /* virtual addresses/lengths in bytes */
22 #if (_MINIX_CHIP == _CHIP_M68000)
23 typedef unsigned long vir_bytes
;/* virtual addresses and lengths in bytes */
26 #if (_MINIX_CHIP == _CHIP_SPARC)
27 typedef unsigned long vir_bytes
;/* virtual addresses and lengths in bytes */
30 /* Memory map for local text, stack, data segments. */
32 vir_clicks mem_vir
; /* virtual address */
33 phys_clicks mem_phys
; /* physical address */
34 vir_clicks mem_len
; /* length */
37 /* Memory map for remote memory areas, e.g., for the RAM disk. */
39 int in_use
; /* entry in use, unless zero */
40 phys_clicks mem_phys
; /* physical address */
41 vir_clicks mem_len
; /* length */
44 /* Structure for virtual copying by means of a vector with requests. */
51 #define phys_cp_req vir_cp_req
59 vir_bytes iov_addr
; /* address of an I/O buffer */
60 vir_bytes iov_size
; /* sizeof an I/O buffer */
64 int iov_grant
; /* grant ID of an I/O buffer */
65 vir_bytes iov_size
; /* sizeof an I/O buffer */
68 /* PM passes the address of a structure of this type to KERNEL when
69 * sys_sigsend() is invoked as part of the signal catching mechanism.
70 * The structure contain all the information that KERNEL needs to build
74 int sm_signo
; /* signal number being caught */
75 unsigned long sm_mask
; /* mask to restore when handler returns */
76 vir_bytes sm_sighandler
; /* address of handler */
77 vir_bytes sm_sigreturn
; /* address of _sigreturn in C library */
78 vir_bytes sm_stkptr
; /* user stack pointer */
81 /* This is used to obtain system information through SYS_GETINFO. */
83 phys_bytes code_base
; /* base of kernel code */
85 phys_bytes data_base
; /* base of kernel data */
87 vir_bytes proc_addr
; /* virtual address of process table */
88 phys_bytes _kmem_base
; /* kernel memory layout (/dev/kmem) */
89 phys_bytes _kmem_size
;
90 phys_bytes bootdev_base
; /* boot device from boot image (/dev/boot) */
91 phys_bytes bootdev_size
;
92 phys_bytes ramdev_base
; /* boot device from boot image (/dev/boot) */
93 phys_bytes ramdev_size
;
94 phys_bytes _params_base
; /* parameters passed by boot monitor */
95 phys_bytes _params_size
;
96 int nr_procs
; /* number of user processes */
97 int nr_tasks
; /* number of kernel tasks */
98 char release
[6]; /* kernel release number */
99 char version
[6]; /* kernel version number */
102 /* Load data accounted every this no. of seconds. */
103 #define _LOAD_UNIT_SECS 6 /* Changing this breaks ABI. */
105 /* Load data history is kept for this long. */
106 #define _LOAD_HISTORY_MINUTES 15 /* Changing this breaks ABI. */
107 #define _LOAD_HISTORY_SECONDS (60*_LOAD_HISTORY_MINUTES)
109 /* We need this many slots to store the load history. */
110 #define _LOAD_HISTORY (_LOAD_HISTORY_SECONDS/_LOAD_UNIT_SECS)
112 /* Runnable processes and other load-average information. */
114 u16_t proc_load_history
[_LOAD_HISTORY
]; /* history of proc_s_cur */
115 u16_t proc_last_slot
;
123 int padding
; /* used to be protected */
130 unsigned ior_base
; /* Lowest I/O port in range */
131 unsigned ior_limit
; /* Highest I/O port in range */
136 phys_bytes mr_base
; /* Lowest memory address in range */
137 phys_bytes mr_limit
; /* Highest memory address in range */
140 /* For EXEC_NEWMEM */
143 vir_bytes text_bytes
;
144 vir_bytes data_bytes
;
147 vir_bytes args_bytes
;
154 char progname
[16]; /* Should be at least PROC_NAME_LEN */
163 #define STATICINIT(v, n) \
165 if(!((v) = alloc_contig(sizeof(*(v)) * (n), 0, NULL))) { \
166 panic(__FILE__, "allocating " #v " failed", n); \
170 /* The kernel outputs diagnostic messages in a circular buffer. */
172 int km_next
; /* next index to write */
173 int km_size
; /* current size in buffer */
174 char km_buf
[_KMESS_BUF_SIZE
]; /* buffer for messages */
177 #include <minix/config.h>
178 #include <ibm/interrupt.h>
180 /* randomness struct: random sources after interrupts: */
181 #define RANDOM_SOURCES NR_IRQ_VECTORS
182 #define RANDOM_ELEMENTS 64
184 typedef unsigned short rand_t
;
186 struct k_randomness
{
187 int random_elements
, random_sources
;
188 struct k_randomness_bin
{
189 int r_next
; /* next index to write */
190 int r_size
; /* number of random elements */
191 rand_t r_buf
[RANDOM_ELEMENTS
]; /* buffer for random info */
192 } bin
[RANDOM_SOURCES
];
195 /* information on PCI devices */
197 #define PCIINFO_ENTRY_SIZE 80
199 struct pciinfo_entry
{
202 char pie_name
[PCIINFO_ENTRY_SIZE
];
207 struct pciinfo_entry pi_entries
[NR_PCIDEV
];