6f77685609
mainly in the kernel and headers. This split based on work by Ingmar Alting <iaalting@cs.vu.nl> done for his Minix PowerPC architecture port. . kernel does not program the interrupt controller directly, do any other architecture-dependent operations, or contain assembly any more, but uses architecture-dependent functions in arch/$(ARCH)/. . architecture-dependent constants and types defined in arch/$(ARCH)/include. . <ibm/portio.h> moved to <minix/portio.h>, as they have become, for now, architecture-independent functions. . int86, sdevio, readbios, and iopenable are now i386-specific kernel calls and live in arch/i386/do_* now. . i386 arch now supports even less 86 code; e.g. mpx86.s and klib86.s have gone, and 'machine.protected' is gone (and always taken to be 1 in i386). If 86 support is to return, it should be a new architecture. . prototypes for the architecture-dependent functions defined in kernel/arch/$(ARCH)/*.c but used in kernel/ are in kernel/proto.h . /etc/make.conf included in makefiles and shell scripts that need to know the building architecture; it defines ARCH=<arch>, currently only i386. . some basic per-architecture build support outside of the kernel (lib) . in clock.c, only dequeue a process if it was ready . fixes for new include files files deleted: . mpx/klib.s - only for choosing between mpx/klib86 and -386 . klib86.s - only for 86 i386-specific files files moved (or arch-dependent stuff moved) to arch/i386/: . mpx386.s (entry point) . klib386.s . sconst.h . exception.c . protect.c . protect.h . i8269.c
65 lines
2 KiB
C
Executable file
65 lines
2 KiB
C
Executable file
#ifndef TYPE_H
|
|
#define TYPE_H
|
|
|
|
#include <minix/com.h>
|
|
|
|
typedef _PROTOTYPE( void task_t, (void) );
|
|
|
|
/* Process table and system property related types. */
|
|
typedef int proc_nr_t; /* process table entry number */
|
|
typedef short sys_id_t; /* system process index */
|
|
typedef struct { /* bitmap for system indexes */
|
|
bitchunk_t chunk[BITMAP_CHUNKS(NR_SYS_PROCS)];
|
|
} sys_map_t;
|
|
|
|
struct boot_image {
|
|
proc_nr_t proc_nr; /* process number to use */
|
|
task_t *initial_pc; /* start function for tasks */
|
|
int flags; /* process flags */
|
|
unsigned char quantum; /* quantum (tick count) */
|
|
int priority; /* scheduling priority */
|
|
int stksize; /* stack size for tasks */
|
|
short trap_mask; /* allowed system call traps */
|
|
bitchunk_t ipc_to; /* send mask protection */
|
|
int *k_calls; /* kern. call protection */
|
|
int nr_k_calls;
|
|
char proc_name[P_NAME_LEN]; /* name in process table */
|
|
endpoint_t endpoint; /* endpoint number when started */
|
|
};
|
|
|
|
struct memory {
|
|
phys_clicks base; /* start address of chunk */
|
|
phys_clicks size; /* size of memory chunk */
|
|
};
|
|
|
|
/* The kernel outputs diagnostic messages in a circular buffer. */
|
|
struct kmessages {
|
|
int km_next; /* next index to write */
|
|
int km_size; /* current size in buffer */
|
|
char km_buf[KMESS_BUF_SIZE]; /* buffer for messages */
|
|
};
|
|
|
|
struct randomness {
|
|
struct {
|
|
int r_next; /* next index to write */
|
|
int r_size; /* number of random elements */
|
|
unsigned short r_buf[RANDOM_ELEMENTS]; /* buffer for random info */
|
|
} bin[RANDOM_SOURCES];
|
|
};
|
|
|
|
typedef unsigned long irq_policy_t;
|
|
typedef unsigned long irq_id_t;
|
|
|
|
typedef struct irq_hook {
|
|
struct irq_hook *next; /* next hook in chain */
|
|
int (*handler)(struct irq_hook *); /* interrupt handler */
|
|
int irq; /* IRQ vector number */
|
|
int id; /* id of this hook */
|
|
int proc_nr_e; /* (endpoint) NONE if not in use */
|
|
irq_id_t notify_id; /* id to return on interrupt */
|
|
irq_policy_t policy; /* bit mask for policy */
|
|
} irq_hook_t;
|
|
|
|
typedef int (*irq_handler_t)(struct irq_hook *);
|
|
|
|
#endif /* TYPE_H */
|