2005-04-21 16:53:53 +02:00
|
|
|
/* Function prototypes. */
|
|
|
|
|
|
|
|
#ifndef PROTO_H
|
|
|
|
#define PROTO_H
|
|
|
|
|
2006-06-20 11:57:00 +02:00
|
|
|
#include <minix/safecopies.h>
|
Split of architecture-dependent and -independent functions for i386,
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
2006-12-22 16:22:27 +01:00
|
|
|
#include <archtypes.h>
|
2008-11-19 13:26:10 +01:00
|
|
|
#include <a.out.h>
|
2006-06-20 11:57:00 +02:00
|
|
|
|
2005-04-21 16:53:53 +02:00
|
|
|
/* Struct declarations. */
|
|
|
|
struct proc;
|
|
|
|
struct timer;
|
|
|
|
|
|
|
|
/* clock.c */
|
|
|
|
_PROTOTYPE( void clock_task, (void) );
|
|
|
|
_PROTOTYPE( clock_t get_uptime, (void) );
|
|
|
|
_PROTOTYPE( void set_timer, (struct timer *tp, clock_t t, tmr_func_t f) );
|
2005-07-14 17:12:12 +02:00
|
|
|
_PROTOTYPE( void reset_timer, (struct timer *tp) );
|
2007-04-23 15:36:11 +02:00
|
|
|
_PROTOTYPE( void ser_dump_proc, (void) );
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
/* main.c */
|
|
|
|
_PROTOTYPE( void main, (void) );
|
2005-07-27 16:32:16 +02:00
|
|
|
_PROTOTYPE( void prepare_shutdown, (int how) );
|
2008-11-19 13:26:10 +01:00
|
|
|
_PROTOTYPE( void minix_shutdown, (struct timer *tp) );
|
Split of architecture-dependent and -independent functions for i386,
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
2006-12-22 16:22:27 +01:00
|
|
|
_PROTOTYPE( void idle_task, (void) );
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2005-07-14 17:12:12 +02:00
|
|
|
/* utility.c */
|
2006-03-15 17:15:23 +01:00
|
|
|
_PROTOTYPE( int kprintf, (const char *fmt, ...) );
|
2008-11-19 13:26:10 +01:00
|
|
|
_PROTOTYPE( void minix_panic, (char *s, int n) );
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
/* proc.c */
|
2006-03-10 17:10:05 +01:00
|
|
|
_PROTOTYPE( int sys_call, (int call_nr, int src_dst,
|
|
|
|
message *m_ptr, long bit_map) );
|
2008-11-19 13:26:10 +01:00
|
|
|
_PROTOTYPE( void sys_call_restart, (struct proc *caller) );
|
2005-09-11 18:44:06 +02:00
|
|
|
_PROTOTYPE( int lock_notify, (int src, int dst) );
|
2008-11-19 13:26:10 +01:00
|
|
|
_PROTOTYPE( int soft_notify, (int dst) );
|
2005-05-24 16:35:58 +02:00
|
|
|
_PROTOTYPE( int lock_send, (int dst, message *m_ptr) );
|
2005-09-11 18:44:06 +02:00
|
|
|
_PROTOTYPE( void lock_enqueue, (struct proc *rp) );
|
2005-08-19 18:43:28 +02:00
|
|
|
_PROTOTYPE( void lock_dequeue, (struct proc *rp) );
|
2008-11-19 13:26:10 +01:00
|
|
|
_PROTOTYPE( void enqueue, (struct proc *rp) );
|
|
|
|
_PROTOTYPE( void dequeue, (struct proc *rp) );
|
2006-03-10 17:10:05 +01:00
|
|
|
_PROTOTYPE( void balance_queues, (struct timer *tp) );
|
2008-11-19 13:26:10 +01:00
|
|
|
_PROTOTYPE( struct proc *endpoint_lookup, (endpoint_t ep) );
|
'proc number' is process slot, 'endpoint' are generation-aware process
instance numbers, encoded and decoded using macros in <minix/endpoint.h>.
proc number -> endpoint migration
. proc_nr in the interrupt hook is now an endpoint, proc_nr_e.
. m_source for messages and notifies is now an endpoint, instead of
proc number.
. isokendpt() converts an endpoint to a process number, returns
success (but fails if the process number is out of range, the
process slot is not a living process, or the given endpoint
number does not match the endpoint number in the process slot,
indicating an old process).
. okendpt() is the same as isokendpt(), but panic()s if the conversion
fails. This is mainly used for decoding message.m_source endpoints,
and other endpoint numbers in kernel data structures, which should
always be correct.
. if DEBUG_ENABLE_IPC_WARNINGS is enabled, isokendpt() and okendpt()
get passed the __FILE__ and __LINE__ of the calling lines, and
print messages about what is wrong with the endpoint number
(out of range proc, empty proc, or inconsistent endpoint number),
with the caller, making finding where the conversion failed easy
without having to include code for every call to print where things
went wrong. Sometimes this is harmless (wrong arg to a kernel call),
sometimes it's a fatal internal inconsistency (bogus m_source).
. some process table fields have been appended an _e to indicate it's
become and endpoint.
. process endpoint is stored in p_endpoint, without generation number.
it turns out the kernel never needs the generation number, except
when fork()ing, so it's decoded then.
. kernel calls all take endpoints as arguments, not proc numbers.
the one exception is sys_fork(), which needs to know in which slot
to put the child.
2006-03-03 11:00:02 +01:00
|
|
|
#if DEBUG_ENABLE_IPC_WARNINGS
|
2006-06-20 11:57:00 +02:00
|
|
|
_PROTOTYPE( int isokendpt_f, (char *file, int line, endpoint_t e, int *p, int f));
|
'proc number' is process slot, 'endpoint' are generation-aware process
instance numbers, encoded and decoded using macros in <minix/endpoint.h>.
proc number -> endpoint migration
. proc_nr in the interrupt hook is now an endpoint, proc_nr_e.
. m_source for messages and notifies is now an endpoint, instead of
proc number.
. isokendpt() converts an endpoint to a process number, returns
success (but fails if the process number is out of range, the
process slot is not a living process, or the given endpoint
number does not match the endpoint number in the process slot,
indicating an old process).
. okendpt() is the same as isokendpt(), but panic()s if the conversion
fails. This is mainly used for decoding message.m_source endpoints,
and other endpoint numbers in kernel data structures, which should
always be correct.
. if DEBUG_ENABLE_IPC_WARNINGS is enabled, isokendpt() and okendpt()
get passed the __FILE__ and __LINE__ of the calling lines, and
print messages about what is wrong with the endpoint number
(out of range proc, empty proc, or inconsistent endpoint number),
with the caller, making finding where the conversion failed easy
without having to include code for every call to print where things
went wrong. Sometimes this is harmless (wrong arg to a kernel call),
sometimes it's a fatal internal inconsistency (bogus m_source).
. some process table fields have been appended an _e to indicate it's
become and endpoint.
. process endpoint is stored in p_endpoint, without generation number.
it turns out the kernel never needs the generation number, except
when fork()ing, so it's decoded then.
. kernel calls all take endpoints as arguments, not proc numbers.
the one exception is sys_fork(), which needs to know in which slot
to put the child.
2006-03-03 11:00:02 +01:00
|
|
|
#define isokendpt_d(e, p, f) isokendpt_f(__FILE__, __LINE__, (e), (p), (f))
|
|
|
|
#else
|
2006-06-20 11:57:00 +02:00
|
|
|
_PROTOTYPE( int isokendpt_f, (endpoint_t e, int *p, int f) );
|
'proc number' is process slot, 'endpoint' are generation-aware process
instance numbers, encoded and decoded using macros in <minix/endpoint.h>.
proc number -> endpoint migration
. proc_nr in the interrupt hook is now an endpoint, proc_nr_e.
. m_source for messages and notifies is now an endpoint, instead of
proc number.
. isokendpt() converts an endpoint to a process number, returns
success (but fails if the process number is out of range, the
process slot is not a living process, or the given endpoint
number does not match the endpoint number in the process slot,
indicating an old process).
. okendpt() is the same as isokendpt(), but panic()s if the conversion
fails. This is mainly used for decoding message.m_source endpoints,
and other endpoint numbers in kernel data structures, which should
always be correct.
. if DEBUG_ENABLE_IPC_WARNINGS is enabled, isokendpt() and okendpt()
get passed the __FILE__ and __LINE__ of the calling lines, and
print messages about what is wrong with the endpoint number
(out of range proc, empty proc, or inconsistent endpoint number),
with the caller, making finding where the conversion failed easy
without having to include code for every call to print where things
went wrong. Sometimes this is harmless (wrong arg to a kernel call),
sometimes it's a fatal internal inconsistency (bogus m_source).
. some process table fields have been appended an _e to indicate it's
become and endpoint.
. process endpoint is stored in p_endpoint, without generation number.
it turns out the kernel never needs the generation number, except
when fork()ing, so it's decoded then.
. kernel calls all take endpoints as arguments, not proc numbers.
the one exception is sys_fork(), which needs to know in which slot
to put the child.
2006-03-03 11:00:02 +01:00
|
|
|
#define isokendpt_d(e, p, f) isokendpt_f((e), (p), (f))
|
|
|
|
#endif
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
/* start.c */
|
|
|
|
_PROTOTYPE( void cstart, (U16_t cs, U16_t ds, U16_t mds,
|
|
|
|
U16_t parmoff, U16_t parmsize) );
|
|
|
|
|
|
|
|
/* system.c */
|
2005-08-04 11:26:36 +02:00
|
|
|
_PROTOTYPE( int get_priv, (register struct proc *rc, int proc_type) );
|
2005-07-19 14:21:36 +02:00
|
|
|
_PROTOTYPE( void send_sig, (int proc_nr, int sig_nr) );
|
2005-04-21 16:53:53 +02:00
|
|
|
_PROTOTYPE( void cause_sig, (int proc_nr, int sig_nr) );
|
|
|
|
_PROTOTYPE( void sys_task, (void) );
|
2005-08-04 11:26:36 +02:00
|
|
|
#define numap_local(proc_nr, vir_addr, bytes) \
|
|
|
|
umap_local(proc_addr(proc_nr), D, (vir_addr), (bytes))
|
2006-06-20 11:57:00 +02:00
|
|
|
_PROTOTYPE( phys_bytes umap_grant, (struct proc *, cp_grant_id_t,
|
|
|
|
vir_bytes));
|
2008-11-19 13:26:10 +01:00
|
|
|
_PROTOTYPE( vir_bytes vir_verify_grant, (struct proc *, endpoint_t,
|
|
|
|
cp_grant_id_t, vir_bytes, vir_bytes, int, endpoint_t *));
|
2006-03-15 13:01:59 +01:00
|
|
|
_PROTOTYPE( void clear_endpoint, (struct proc *rc) );
|
2008-11-19 13:26:10 +01:00
|
|
|
_PROTOTYPE( phys_bytes umap_bios, (vir_bytes vir_addr, vir_bytes bytes));
|
|
|
|
_PROTOTYPE( phys_bytes umap_verify_grant, (struct proc *rp, endpoint_t grantee, cp_grant_id_t grant, vir_bytes offset, vir_bytes bytes, int access));
|
|
|
|
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2006-05-11 16:49:46 +02:00
|
|
|
/* system/do_newmap.c */
|
|
|
|
_PROTOTYPE( int newmap, (struct proc *rp, struct mem_map *map_ptr) );
|
|
|
|
|
Split of architecture-dependent and -independent functions for i386,
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
2006-12-22 16:22:27 +01:00
|
|
|
/* interrupt.c */
|
|
|
|
_PROTOTYPE( void intr_handle, (irq_hook_t *hook) );
|
2005-04-21 16:53:53 +02:00
|
|
|
_PROTOTYPE( void put_irq_handler, (irq_hook_t *hook, int irq,
|
Split of architecture-dependent and -independent functions for i386,
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
2006-12-22 16:22:27 +01:00
|
|
|
irq_handler_t handler) );
|
|
|
|
_PROTOTYPE( void rm_irq_handler, (irq_hook_t *hook) );
|
|
|
|
_PROTOTYPE( void enable_irq, (irq_hook_t *hook) );
|
|
|
|
_PROTOTYPE( int disable_irq, (irq_hook_t *hook) );
|
2007-04-23 15:36:11 +02:00
|
|
|
_PROTOTYPE( void cons_setc, (int pos, int c) );
|
|
|
|
_PROTOTYPE( void cons_seth, (int pos, int n) );
|
Split of architecture-dependent and -independent functions for i386,
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
2006-12-22 16:22:27 +01:00
|
|
|
|
|
|
|
/* debug.c */
|
|
|
|
#if DEBUG_SCHED_CHECK
|
2008-11-19 13:26:10 +01:00
|
|
|
#define CHECK_RUNQUEUES check_runqueues_f(__FILE__, __LINE__)
|
|
|
|
_PROTOTYPE( void check_runqueues_f, (char *file, int line) );
|
Split of architecture-dependent and -independent functions for i386,
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
2006-12-22 16:22:27 +01:00
|
|
|
#endif
|
2005-09-30 14:54:59 +02:00
|
|
|
|
2006-06-20 11:57:00 +02:00
|
|
|
/* system/do_safecopy.c */
|
|
|
|
_PROTOTYPE( int verify_grant, (endpoint_t, endpoint_t, cp_grant_id_t, vir_bytes,
|
|
|
|
int, vir_bytes, vir_bytes *, endpoint_t *));
|
|
|
|
|
2009-01-26 18:43:59 +01:00
|
|
|
/* system/do_sysctl.c */
|
|
|
|
_PROTOTYPE( int do_sysctl, (message *m));
|
|
|
|
|
Split of architecture-dependent and -independent functions for i386,
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
2006-12-22 16:22:27 +01:00
|
|
|
#if SPROFILE
|
|
|
|
/* profile.c */
|
|
|
|
_PROTOTYPE( void init_profile_clock, (u32_t) );
|
|
|
|
_PROTOTYPE( void stop_profile_clock, (void) );
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* functions defined in architecture-dependent files. */
|
|
|
|
_PROTOTYPE( void phys_copy, (phys_bytes source, phys_bytes dest,
|
|
|
|
phys_bytes count) );
|
2008-11-19 13:26:10 +01:00
|
|
|
#define virtual_copy(src, dst, bytes) virtual_copy_f(src, dst, bytes, 0)
|
|
|
|
#define virtual_copy_vmcheck(src, dst, bytes) virtual_copy_f(src, dst, bytes, 1)
|
|
|
|
_PROTOTYPE( int virtual_copy_f, (struct vir_addr *src, struct vir_addr *dst,
|
|
|
|
vir_bytes bytes, int vmcheck) );
|
|
|
|
_PROTOTYPE( int data_copy, (endpoint_t from, vir_bytes from_addr,
|
|
|
|
endpoint_t to, vir_bytes to_addr, size_t bytes));
|
|
|
|
#define data_copy_to(d, p, v, n) data_copy(SYSTEM, (d), (p), (v), (n));
|
|
|
|
#define data_copy_from(d, p, v, n) data_copy((p), (v), SYSTEM, (d), (n));
|
Split of architecture-dependent and -independent functions for i386,
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
2006-12-22 16:22:27 +01:00
|
|
|
_PROTOTYPE( void alloc_segments, (struct proc *rp) );
|
|
|
|
_PROTOTYPE( void vm_init, (void) );
|
|
|
|
_PROTOTYPE( void vm_map_range, (u32_t base, u32_t size, u32_t offset) );
|
2008-11-19 13:26:10 +01:00
|
|
|
_PROTOTYPE( int vm_copy, (vir_bytes src, struct proc *srcproc,
|
|
|
|
vir_bytes dst, struct proc *dstproc, phys_bytes bytes));
|
Split of architecture-dependent and -independent functions for i386,
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
2006-12-22 16:22:27 +01:00
|
|
|
_PROTOTYPE( phys_bytes umap_local, (register struct proc *rp, int seg,
|
|
|
|
vir_bytes vir_addr, vir_bytes bytes));
|
|
|
|
_PROTOTYPE( void cp_mess, (int src,phys_clicks src_clicks,
|
|
|
|
vir_bytes src_offset, phys_clicks dst_clicks, vir_bytes dst_offset));
|
|
|
|
_PROTOTYPE( phys_bytes umap_remote, (struct proc* rp, int seg,
|
|
|
|
vir_bytes vir_addr, vir_bytes bytes) );
|
2008-11-19 13:26:10 +01:00
|
|
|
_PROTOTYPE( phys_bytes umap_virtual, (struct proc* rp, int seg,
|
|
|
|
vir_bytes vir_addr, vir_bytes bytes) );
|
Split of architecture-dependent and -independent functions for i386,
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
2006-12-22 16:22:27 +01:00
|
|
|
_PROTOTYPE( phys_bytes seg2phys, (U16_t) );
|
|
|
|
_PROTOTYPE( void phys_memset, (phys_bytes source, unsigned long pattern,
|
|
|
|
phys_bytes count) );
|
|
|
|
_PROTOTYPE( vir_bytes alloc_remote_segment, (u32_t *, segframe_t *,
|
|
|
|
int, phys_bytes, vir_bytes, int));
|
|
|
|
_PROTOTYPE( int arch_init_clock, (void) );
|
|
|
|
_PROTOTYPE( clock_t read_clock, (void) );
|
|
|
|
_PROTOTYPE( void clock_stop, (void) );
|
|
|
|
_PROTOTYPE( int intr_init, (int) );
|
|
|
|
_PROTOTYPE( int intr_disabled, (void) );
|
|
|
|
_PROTOTYPE( int intr_unmask, (irq_hook_t* hook) );
|
|
|
|
_PROTOTYPE( int intr_mask, (irq_hook_t* hook) );
|
|
|
|
_PROTOTYPE( void idle_task, (void) );
|
|
|
|
_PROTOTYPE( void system_init, (void) );
|
|
|
|
_PROTOTYPE( void ser_putc, (char) );
|
|
|
|
_PROTOTYPE( void arch_shutdown, (int) );
|
2008-11-19 13:26:10 +01:00
|
|
|
_PROTOTYPE( void arch_get_aout_headers, (int i, struct exec *h) );
|
Split of architecture-dependent and -independent functions for i386,
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
2006-12-22 16:22:27 +01:00
|
|
|
_PROTOTYPE( void restart, (void) );
|
|
|
|
_PROTOTYPE( void idle_task, (void) );
|
|
|
|
_PROTOTYPE( void read_tsc, (unsigned long *high, unsigned long *low) );
|
|
|
|
_PROTOTYPE( int arch_init_profile_clock, (u32_t freq) );
|
|
|
|
_PROTOTYPE( void arch_stop_profile_clock, (void) );
|
|
|
|
_PROTOTYPE( void arch_ack_profile_clock, (void) );
|
2007-04-23 17:59:16 +02:00
|
|
|
_PROTOTYPE( void do_ser_debug, (void) );
|
2008-11-19 13:26:10 +01:00
|
|
|
_PROTOTYPE( int arch_get_params, (char *parm, int max));
|
|
|
|
_PROTOTYPE( int arch_set_params, (char *parm, int max));
|
|
|
|
_PROTOTYPE( int arch_pre_exec, (struct proc *pr, u32_t, u32_t));
|
|
|
|
_PROTOTYPE( int arch_umap, (struct proc *pr, vir_bytes, vir_bytes,
|
|
|
|
int, phys_bytes *));
|
|
|
|
_PROTOTYPE( int arch_do_vmctl, (message *m_ptr, struct proc *p));
|
|
|
|
_PROTOTYPE( int vm_contiguous, (struct proc *targetproc, u32_t vir_buf, size_t count));
|
|
|
|
_PROTOTYPE( int vm_checkrange, (struct proc *caller, struct proc *target,
|
|
|
|
vir_bytes start, vir_bytes length, int writeflag, int checkonly));
|
|
|
|
_PROTOTYPE( void proc_stacktrace, (struct proc *proc) );
|
|
|
|
_PROTOTYPE( int vm_lookup, (struct proc *proc, vir_bytes virtual, vir_bytes *result, u32_t *ptent));
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
#endif /* PROTO_H */
|