2005-04-21 16:53:53 +02:00
|
|
|
#ifndef TYPE_H
|
|
|
|
#define TYPE_H
|
|
|
|
|
2006-06-20 11:56:06 +02:00
|
|
|
#include <minix/com.h>
|
2010-03-08 12:04:59 +01:00
|
|
|
#include <machine/interrupt.h>
|
2006-06-20 11:56:06 +02:00
|
|
|
|
2005-07-14 17:12:12 +02:00
|
|
|
/* 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;
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2011-05-04 18:51:43 +02:00
|
|
|
struct boot_image_memmap {
|
|
|
|
phys_bytes text_vaddr; /* Virtual start address of text */
|
|
|
|
phys_bytes text_paddr; /* Physical start address of text */
|
|
|
|
phys_bytes text_bytes; /* Text segment's size (bytes) */
|
|
|
|
phys_bytes data_vaddr; /* Virtual start address of data */
|
|
|
|
phys_bytes data_paddr; /* Physical start address of data */
|
|
|
|
phys_bytes data_bytes; /* Data segment's size (bytes) */
|
|
|
|
phys_bytes stack_bytes; /* Size of stack set aside (bytes) */
|
|
|
|
phys_bytes entry; /* Entry point of executable */
|
|
|
|
};
|
|
|
|
|
2005-07-29 17:26:23 +02:00
|
|
|
struct boot_image {
|
2005-05-19 11:36:44 +02:00
|
|
|
proc_nr_t proc_nr; /* process number to use */
|
2005-06-30 17:55:19 +02:00
|
|
|
int flags; /* process flags */
|
2011-05-04 18:51:43 +02:00
|
|
|
int stack_kbytes; /* stack size (in KB) */
|
2005-05-31 11:50:51 +02:00
|
|
|
char proc_name[P_NAME_LEN]; /* name in process table */
|
2006-06-20 11:56:06 +02:00
|
|
|
endpoint_t endpoint; /* endpoint number when started */
|
2011-05-04 18:51:43 +02:00
|
|
|
struct boot_image_memmap memmap; /* memory map info for boot image */
|
2005-04-21 16:53:53 +02:00
|
|
|
};
|
|
|
|
|
2005-05-02 16:30:04 +02:00
|
|
|
typedef unsigned long irq_policy_t;
|
2005-07-29 14:44:42 +02:00
|
|
|
typedef unsigned long irq_id_t;
|
2005-05-02 16:30:04 +02:00
|
|
|
|
2005-04-21 16:53:53 +02:00
|
|
|
typedef struct irq_hook {
|
2005-05-02 16:30:04 +02:00
|
|
|
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 */
|
2010-03-22 21:43:06 +01:00
|
|
|
endpoint_t proc_nr_e; /* (endpoint) NONE if not in use */
|
2005-07-29 14:44:42 +02:00
|
|
|
irq_id_t notify_id; /* id to return on interrupt */
|
2005-05-02 16:30:04 +02:00
|
|
|
irq_policy_t policy; /* bit mask for policy */
|
2005-04-21 16:53:53 +02:00
|
|
|
} irq_hook_t;
|
|
|
|
|
|
|
|
typedef int (*irq_handler_t)(struct irq_hook *);
|
|
|
|
|
|
|
|
#endif /* TYPE_H */
|