1 #ifndef _TYPE_H
2 #define _TYPE_H
3
4 #ifndef _MINIX_SYS_CONFIG_H
5 #include <minix/sys_config.h>
6 #endif
7
8 #ifndef _TYPES_H
9 #include <sys/types.h>
10 #endif
11
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
17 #if (_MINIX_CHIP == _CHIP_INTEL)
18 typedef unsigned int vir_bytes; /* virtual addresses and lengths in bytes */
19 #endif
20
21 #if (_MINIX_CHIP == _CHIP_M68000)
22 typedef unsigned long vir_bytes;/* virtual addresses and lengths in bytes */
23 #endif
24
25 #if (_MINIX_CHIP == _CHIP_SPARC)
26 typedef unsigned long vir_bytes;/* virtual addresses and lengths in bytes */
27 #endif
28
29 /* Memory map for local text, stack, data segments. */
30 struct mem_map {
31 vir_clicks mem_vir; /* virtual address */
32 phys_clicks mem_phys; /* physical address */
33 vir_clicks mem_len; /* length */
34 };
35
36 /* Memory map for remote memory areas, e.g., for the RAM disk. */
37 struct far_mem {
38 int in_use; /* entry in use, unless zero */
39 phys_clicks mem_phys; /* physical address */
40 vir_clicks mem_len; /* length */
41 };
42
43 /* Structure for virtual copying by means of a vector with requests. */
44 struct vir_addr {
45 int proc_nr;
46 int segment;
47 vir_bytes offset;
48 };
49
50 /* Memory allocation by PM. */
51 struct hole {
52 struct hole *h_next; /* pointer to next entry on the list */
53 phys_clicks h_base; /* where does the hole begin? */
54 phys_clicks h_len; /* how big is the hole? */
55 };
56
57 /* Memory info from PM. */
58 struct pm_mem_info {
59 struct hole pmi_holes[_NR_HOLES];/* memory (un)allocations */
60 u32_t pmi_hi_watermark; /* highest ever-used click + 1 */
61 };
62
63 #define phys_cp_req vir_cp_req
64 struct vir_cp_req {
65 struct vir_addr src;
66 struct vir_addr dst;
67 phys_bytes count;
68 };
69
70 typedef struct {
71 vir_bytes iov_addr; /* address of an I/O buffer */
72 vir_bytes iov_size; /* sizeof an I/O buffer */
73 } iovec_t;
74
75 /* PM passes the address of a structure of this type to KERNEL when
76 * sys_sendsig() is invoked as part of the signal catching mechanism.
77 * The structure contain all the information that KERNEL needs to build
78 * the signal stack.
79 */
80 struct sigmsg {
81 int sm_signo; /* signal number being caught */
82 unsigned long sm_mask; /* mask to restore when handler returns */
83 vir_bytes sm_sighandler; /* address of handler */
84 vir_bytes sm_sigreturn; /* address of _sigreturn in C library */
85 vir_bytes sm_stkptr; /* user stack pointer */
86 };
87
88 /* This is used to obtain system information through SYS_GETINFO. */
89 struct kinfo {
90 phys_bytes code_base; /* base of kernel code */
91 phys_bytes code_size;
92 phys_bytes data_base; /* base of kernel data */
93 phys_bytes data_size;
94 vir_bytes proc_addr; /* virtual address of process table */
95 phys_bytes kmem_base; /* kernel memory layout (/dev/kmem) */
96 phys_bytes kmem_size;
97 phys_bytes bootdev_base; /* boot device from boot image (/dev/boot) */
98 phys_bytes bootdev_size;
99 phys_bytes ramdev_base; /* boot device from boot image (/dev/boot) */
100 phys_bytes ramdev_size;
101 phys_bytes params_base; /* parameters passed by boot monitor */
102 phys_bytes params_size;
103 int nr_procs; /* number of user processes */
104 int nr_tasks; /* number of kernel tasks */
105 char release[6]; /* kernel release number */
106 char version[6]; /* kernel version number */
107 int relocking; /* relocking check (for debugging) */
108 };
109
110 struct machine {
111 int pc_at;
112 int ps_mca;
113 int processor;
114 int protected;
115 int vdu_ega;
116 int vdu_vga;
117 };
118
119 #endif /* _TYPE_H */
Cache object: 04da5f70d513372b39bc6396bd405df8
|