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
64 lines
2.5 KiB
C
Executable file
64 lines
2.5 KiB
C
Executable file
#ifndef GLO_H
|
|
#define GLO_H
|
|
|
|
/* Global variables used in the kernel. This file contains the declarations;
|
|
* storage space for the variables is allocated in table.c, because EXTERN is
|
|
* defined as extern unless the _TABLE definition is seen. We rely on the
|
|
* compiler's default initialization (0) for several global variables.
|
|
*/
|
|
#ifdef _TABLE
|
|
#undef EXTERN
|
|
#define EXTERN
|
|
#endif
|
|
|
|
#include <minix/config.h>
|
|
#include <archtypes.h>
|
|
#include "config.h"
|
|
|
|
/* Variables relating to shutting down MINIX. */
|
|
EXTERN char kernel_exception; /* TRUE after system exceptions */
|
|
EXTERN char shutdown_started; /* TRUE after shutdowns / reboots */
|
|
|
|
/* Kernel information structures. This groups vital kernel information. */
|
|
EXTERN phys_bytes aout; /* address of a.out headers */
|
|
EXTERN struct kinfo kinfo; /* kernel information for users */
|
|
EXTERN struct machine machine; /* machine information for users */
|
|
EXTERN struct kmessages kmess; /* diagnostic messages in kernel */
|
|
EXTERN struct randomness krandom; /* gather kernel random information */
|
|
EXTERN struct loadinfo kloadinfo; /* status of load average */
|
|
|
|
/* Process scheduling information and the kernel reentry count. */
|
|
EXTERN struct proc *prev_ptr; /* previously running process */
|
|
EXTERN struct proc *proc_ptr; /* pointer to currently running process */
|
|
EXTERN struct proc *next_ptr; /* next process to run after restart() */
|
|
EXTERN struct proc *bill_ptr; /* process to bill for clock ticks */
|
|
EXTERN char k_reenter; /* kernel reentry count (entry count less 1) */
|
|
EXTERN unsigned lost_ticks; /* clock ticks counted outside clock task */
|
|
|
|
|
|
/* Interrupt related variables. */
|
|
EXTERN irq_hook_t irq_hooks[NR_IRQ_HOOKS]; /* hooks for general use */
|
|
EXTERN int irq_actids[NR_IRQ_VECTORS]; /* IRQ ID bits active */
|
|
EXTERN int irq_use; /* map of all in-use irq's */
|
|
|
|
/* Miscellaneous. */
|
|
EXTERN reg_t mon_ss, mon_sp; /* boot monitor stack */
|
|
EXTERN int mon_return; /* true if we can return to monitor */
|
|
EXTERN int do_serial_debug;
|
|
EXTERN endpoint_t who_e; /* message source endpoint */
|
|
EXTERN int who_p; /* message source proc */
|
|
EXTERN int sys_call_code; /* kernel call number in SYSTEM */
|
|
|
|
/* VM */
|
|
EXTERN phys_bytes vm_base;
|
|
EXTERN phys_bytes vm_size;
|
|
EXTERN phys_bytes vm_mem_high;
|
|
|
|
/* Variables that are initialized elsewhere are just extern here. */
|
|
extern struct boot_image image[]; /* system image processes */
|
|
extern char *t_stack[]; /* task stack space */
|
|
extern struct segdesc_s gdt[]; /* global descriptor table */
|
|
|
|
EXTERN _PROTOTYPE( void (*level0_func), (void) );
|
|
|
|
#endif /* GLO_H */
|