retire _PROTOTYPE
. only good for obsolete K&R support . also remove a stray ansi.h and the proto cmd
This commit is contained in:
@@ -82,15 +82,15 @@ struct acpi_madt_nmi {
|
||||
u32_t global_int;
|
||||
};
|
||||
|
||||
_PROTOTYPE(void acpi_init, (void));
|
||||
void acpi_init(void);
|
||||
|
||||
/*
|
||||
* Returns a pointer to the io acpi structure in the MADT table in ACPI. The
|
||||
* pointer is valid only until paging is turned off. No memory is allocated in
|
||||
* this function thus no memory needs to be freed
|
||||
*/
|
||||
_PROTOTYPE(struct acpi_madt_ioapic * acpi_get_ioapic_next, (void));
|
||||
struct acpi_madt_ioapic * acpi_get_ioapic_next(void);
|
||||
/* same as above for local APICs */
|
||||
_PROTOTYPE(struct acpi_madt_lapic * acpi_get_lapic_next, (void));
|
||||
struct acpi_madt_lapic * acpi_get_lapic_next(void);
|
||||
|
||||
#endif /* __ACPI_H__ */
|
||||
|
||||
@@ -188,8 +188,8 @@ PRIVATE void ioapic_write(u32_t ioa_base, u8_t reg, u32_t val)
|
||||
*((u32_t *)(ioa_base + IOAPIC_IOWIN)) = val;
|
||||
}
|
||||
|
||||
_PROTOTYPE(void lapic_microsec_sleep, (unsigned count));
|
||||
_PROTOTYPE(void apic_idt_init, (const int reset));
|
||||
void lapic_microsec_sleep(unsigned count);
|
||||
void apic_idt_init(const int reset);
|
||||
|
||||
PRIVATE void ioapic_enable_pin(vir_bytes ioapic_addr, int pin)
|
||||
{
|
||||
|
||||
@@ -122,55 +122,55 @@ EXTERN unsigned nioapics;
|
||||
EXTERN u32_t lapic_addr_vaddr; /* we remember the virtual address here until we
|
||||
switch to paging */
|
||||
|
||||
_PROTOTYPE (int lapic_enable, (unsigned cpu));
|
||||
_PROTOTYPE (void ioapic_unmask_irq, (unsigned irq));
|
||||
_PROTOTYPE (void ioapic_mask_irq, (unsigned irq));
|
||||
_PROTOTYPE (void ioapic_reset_pic, (void));
|
||||
int lapic_enable(unsigned cpu);
|
||||
void ioapic_unmask_irq(unsigned irq);
|
||||
void ioapic_mask_irq(unsigned irq);
|
||||
void ioapic_reset_pic(void);
|
||||
|
||||
EXTERN int ioapic_enabled;
|
||||
EXTERN unsigned nioapics;
|
||||
|
||||
_PROTOTYPE (void lapic_microsec_sleep, (unsigned count));
|
||||
_PROTOTYPE (void ioapic_disable_irqs, (u32_t irqs));
|
||||
_PROTOTYPE (void ioapic_enable_irqs, (u32_t irqs));
|
||||
void lapic_microsec_sleep(unsigned count);
|
||||
void ioapic_disable_irqs(u32_t irqs);
|
||||
void ioapic_enable_irqs(u32_t irqs);
|
||||
|
||||
_PROTOTYPE (int lapic_enable, (unsigned cpu));
|
||||
_PROTOTYPE (void lapic_disable, (void));
|
||||
int lapic_enable(unsigned cpu);
|
||||
void lapic_disable(void);
|
||||
|
||||
_PROTOTYPE (void ioapic_disable_all, (void));
|
||||
_PROTOTYPE (int ioapic_enable_all, (void));
|
||||
void ioapic_disable_all(void);
|
||||
int ioapic_enable_all(void);
|
||||
|
||||
_PROTOTYPE(int detect_ioapics, (void));
|
||||
_PROTOTYPE(void apic_idt_init, (int reset));
|
||||
int detect_ioapics(void);
|
||||
void apic_idt_init(int reset);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
_PROTOTYPE(int apic_send_startup_ipi, (unsigned cpu, phys_bytes trampoline));
|
||||
_PROTOTYPE(int apic_send_init_ipi, (unsigned cpu, phys_bytes trampoline));
|
||||
_PROTOTYPE(unsigned int apicid, (void));
|
||||
_PROTOTYPE(void ioapic_set_id, (u32_t addr, unsigned int id));
|
||||
int apic_send_startup_ipi(unsigned cpu, phys_bytes trampoline);
|
||||
int apic_send_init_ipi(unsigned cpu, phys_bytes trampoline);
|
||||
unsigned int apicid(void);
|
||||
void ioapic_set_id(u32_t addr, unsigned int id);
|
||||
#else
|
||||
_PROTOTYPE(int apic_single_cpu_init, (void));
|
||||
int apic_single_cpu_init(void);
|
||||
#endif
|
||||
|
||||
_PROTOTYPE(void lapic_set_timer_periodic, (const unsigned freq));
|
||||
_PROTOTYPE(void lapic_set_timer_one_shot, (const u32_t value));
|
||||
_PROTOTYPE(void lapic_stop_timer, (void));
|
||||
_PROTOTYPE(void lapic_restart_timer, (void));
|
||||
void lapic_set_timer_periodic(const unsigned freq);
|
||||
void lapic_set_timer_one_shot(const u32_t value);
|
||||
void lapic_stop_timer(void);
|
||||
void lapic_restart_timer(void);
|
||||
|
||||
_PROTOTYPE(void ioapic_set_irq, (unsigned irq));
|
||||
_PROTOTYPE(void ioapic_unset_irq, (unsigned irq));
|
||||
void ioapic_set_irq(unsigned irq);
|
||||
void ioapic_unset_irq(unsigned irq);
|
||||
|
||||
/* signal the end of interrupt handler to apic */
|
||||
#define apic_eoi() do { *((volatile u32_t *) lapic_eoi_addr) = 0; } while(0)
|
||||
|
||||
_PROTOTYPE(void ioapic_eoi, (int irq));
|
||||
void ioapic_eoi(int irq);
|
||||
|
||||
_PROTOTYPE(void dump_apic_irq_state, (void));
|
||||
void dump_apic_irq_state(void);
|
||||
|
||||
_PROTOTYPE(void apic_send_ipi, (unsigned vector, unsigned cpu, int type));
|
||||
void apic_send_ipi(unsigned vector, unsigned cpu, int type);
|
||||
|
||||
_PROTOTYPE(void apic_ipi_sched_intr, (void));
|
||||
_PROTOTYPE(void apic_ipi_halt_intr, (void));
|
||||
void apic_ipi_sched_intr(void);
|
||||
void apic_ipi_halt_intr(void);
|
||||
|
||||
#define APIC_IPI_DEST 0
|
||||
#define APIC_IPI_SELF 1
|
||||
|
||||
@@ -5,75 +5,75 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
#include "kernel/kernel.h"
|
||||
|
||||
_PROTOTYPE( void apic_hwint0, (void) );
|
||||
_PROTOTYPE( void apic_hwint1, (void) );
|
||||
_PROTOTYPE( void apic_hwint2, (void) );
|
||||
_PROTOTYPE( void apic_hwint3, (void) );
|
||||
_PROTOTYPE( void apic_hwint4, (void) );
|
||||
_PROTOTYPE( void apic_hwint5, (void) );
|
||||
_PROTOTYPE( void apic_hwint6, (void) );
|
||||
_PROTOTYPE( void apic_hwint7, (void) );
|
||||
_PROTOTYPE( void apic_hwint8, (void) );
|
||||
_PROTOTYPE( void apic_hwint9, (void) );
|
||||
_PROTOTYPE( void apic_hwint10, (void) );
|
||||
_PROTOTYPE( void apic_hwint11, (void) );
|
||||
_PROTOTYPE( void apic_hwint12, (void) );
|
||||
_PROTOTYPE( void apic_hwint13, (void) );
|
||||
_PROTOTYPE( void apic_hwint14, (void) );
|
||||
_PROTOTYPE( void apic_hwint15, (void) );
|
||||
_PROTOTYPE( void apic_hwint16, (void) );
|
||||
_PROTOTYPE( void apic_hwint17, (void) );
|
||||
_PROTOTYPE( void apic_hwint18, (void) );
|
||||
_PROTOTYPE( void apic_hwint19, (void) );
|
||||
_PROTOTYPE( void apic_hwint20, (void) );
|
||||
_PROTOTYPE( void apic_hwint21, (void) );
|
||||
_PROTOTYPE( void apic_hwint22, (void) );
|
||||
_PROTOTYPE( void apic_hwint23, (void) );
|
||||
_PROTOTYPE( void apic_hwint24, (void) );
|
||||
_PROTOTYPE( void apic_hwint25, (void) );
|
||||
_PROTOTYPE( void apic_hwint26, (void) );
|
||||
_PROTOTYPE( void apic_hwint27, (void) );
|
||||
_PROTOTYPE( void apic_hwint28, (void) );
|
||||
_PROTOTYPE( void apic_hwint29, (void) );
|
||||
_PROTOTYPE( void apic_hwint30, (void) );
|
||||
_PROTOTYPE( void apic_hwint31, (void) );
|
||||
_PROTOTYPE( void apic_hwint32, (void) );
|
||||
_PROTOTYPE( void apic_hwint33, (void) );
|
||||
_PROTOTYPE( void apic_hwint34, (void) );
|
||||
_PROTOTYPE( void apic_hwint35, (void) );
|
||||
_PROTOTYPE( void apic_hwint36, (void) );
|
||||
_PROTOTYPE( void apic_hwint37, (void) );
|
||||
_PROTOTYPE( void apic_hwint38, (void) );
|
||||
_PROTOTYPE( void apic_hwint39, (void) );
|
||||
_PROTOTYPE( void apic_hwint40, (void) );
|
||||
_PROTOTYPE( void apic_hwint41, (void) );
|
||||
_PROTOTYPE( void apic_hwint42, (void) );
|
||||
_PROTOTYPE( void apic_hwint43, (void) );
|
||||
_PROTOTYPE( void apic_hwint44, (void) );
|
||||
_PROTOTYPE( void apic_hwint45, (void) );
|
||||
_PROTOTYPE( void apic_hwint46, (void) );
|
||||
_PROTOTYPE( void apic_hwint47, (void) );
|
||||
_PROTOTYPE( void apic_hwint48, (void) );
|
||||
_PROTOTYPE( void apic_hwint49, (void) );
|
||||
_PROTOTYPE( void apic_hwint50, (void) );
|
||||
_PROTOTYPE( void apic_hwint51, (void) );
|
||||
_PROTOTYPE( void apic_hwint52, (void) );
|
||||
_PROTOTYPE( void apic_hwint53, (void) );
|
||||
_PROTOTYPE( void apic_hwint54, (void) );
|
||||
_PROTOTYPE( void apic_hwint55, (void) );
|
||||
_PROTOTYPE( void apic_hwint56, (void) );
|
||||
_PROTOTYPE( void apic_hwint57, (void) );
|
||||
_PROTOTYPE( void apic_hwint58, (void) );
|
||||
_PROTOTYPE( void apic_hwint59, (void) );
|
||||
_PROTOTYPE( void apic_hwint60, (void) );
|
||||
_PROTOTYPE( void apic_hwint61, (void) );
|
||||
_PROTOTYPE( void apic_hwint62, (void) );
|
||||
_PROTOTYPE( void apic_hwint63, (void) );
|
||||
void apic_hwint0(void);
|
||||
void apic_hwint1(void);
|
||||
void apic_hwint2(void);
|
||||
void apic_hwint3(void);
|
||||
void apic_hwint4(void);
|
||||
void apic_hwint5(void);
|
||||
void apic_hwint6(void);
|
||||
void apic_hwint7(void);
|
||||
void apic_hwint8(void);
|
||||
void apic_hwint9(void);
|
||||
void apic_hwint10(void);
|
||||
void apic_hwint11(void);
|
||||
void apic_hwint12(void);
|
||||
void apic_hwint13(void);
|
||||
void apic_hwint14(void);
|
||||
void apic_hwint15(void);
|
||||
void apic_hwint16(void);
|
||||
void apic_hwint17(void);
|
||||
void apic_hwint18(void);
|
||||
void apic_hwint19(void);
|
||||
void apic_hwint20(void);
|
||||
void apic_hwint21(void);
|
||||
void apic_hwint22(void);
|
||||
void apic_hwint23(void);
|
||||
void apic_hwint24(void);
|
||||
void apic_hwint25(void);
|
||||
void apic_hwint26(void);
|
||||
void apic_hwint27(void);
|
||||
void apic_hwint28(void);
|
||||
void apic_hwint29(void);
|
||||
void apic_hwint30(void);
|
||||
void apic_hwint31(void);
|
||||
void apic_hwint32(void);
|
||||
void apic_hwint33(void);
|
||||
void apic_hwint34(void);
|
||||
void apic_hwint35(void);
|
||||
void apic_hwint36(void);
|
||||
void apic_hwint37(void);
|
||||
void apic_hwint38(void);
|
||||
void apic_hwint39(void);
|
||||
void apic_hwint40(void);
|
||||
void apic_hwint41(void);
|
||||
void apic_hwint42(void);
|
||||
void apic_hwint43(void);
|
||||
void apic_hwint44(void);
|
||||
void apic_hwint45(void);
|
||||
void apic_hwint46(void);
|
||||
void apic_hwint47(void);
|
||||
void apic_hwint48(void);
|
||||
void apic_hwint49(void);
|
||||
void apic_hwint50(void);
|
||||
void apic_hwint51(void);
|
||||
void apic_hwint52(void);
|
||||
void apic_hwint53(void);
|
||||
void apic_hwint54(void);
|
||||
void apic_hwint55(void);
|
||||
void apic_hwint56(void);
|
||||
void apic_hwint57(void);
|
||||
void apic_hwint58(void);
|
||||
void apic_hwint59(void);
|
||||
void apic_hwint60(void);
|
||||
void apic_hwint61(void);
|
||||
void apic_hwint62(void);
|
||||
void apic_hwint63(void);
|
||||
|
||||
/* The local APIC timer tick handlers */
|
||||
_PROTOTYPE(void lapic_timer_int_handler, (void));
|
||||
_PROTOTYPE(void apic_spurios_intr, (void));
|
||||
_PROTOTYPE(void apic_error_intr, (void));
|
||||
void lapic_timer_int_handler(void);
|
||||
void apic_spurios_intr(void);
|
||||
void apic_error_intr(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "glo.h"
|
||||
|
||||
_PROTOTYPE(void trampoline, (void));
|
||||
void trampoline(void);
|
||||
|
||||
/*
|
||||
* arguments for trampoline. We need to pass the logical cpu id, gdt and idt.
|
||||
@@ -48,7 +48,7 @@ PUBLIC unsigned char cpuid2apicid[CONFIG_MAX_CPUS];
|
||||
SPINLOCK_DEFINE(smp_cpu_lock)
|
||||
SPINLOCK_DEFINE(dispq_lock)
|
||||
|
||||
FORWARD _PROTOTYPE(void smp_reinit_vars, (void));
|
||||
FORWARD void smp_reinit_vars(void);
|
||||
|
||||
/*
|
||||
* copies the 16-bit AP trampoline code to the first 1M of memory
|
||||
|
||||
@@ -49,12 +49,12 @@ extern void poweroff16_end();
|
||||
|
||||
PUBLIC void * k_stacks;
|
||||
|
||||
FORWARD _PROTOTYPE( void ser_debug, (int c));
|
||||
FORWARD void ser_debug(int c);
|
||||
#ifdef CONFIG_SMP
|
||||
FORWARD _PROTOTYPE( void ser_dump_proc_cpu, (void));
|
||||
FORWARD void ser_dump_proc_cpu(void);
|
||||
#endif
|
||||
#if !CONFIG_OXPCIE
|
||||
FORWARD _PROTOTYPE( void ser_init, (void));
|
||||
FORWARD void ser_init(void);
|
||||
#endif
|
||||
|
||||
PUBLIC __dead void arch_monitor(void)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "../apic_asm.h"
|
||||
|
||||
_PROTOTYPE(int init_8253A_timer, (unsigned freq));
|
||||
_PROTOTYPE(void stop_8253A_timer, (void));
|
||||
int init_8253A_timer(unsigned freq);
|
||||
void stop_8253A_timer(void);
|
||||
|
||||
#endif /* __CLOCK_X86_H__ */
|
||||
|
||||
@@ -9,54 +9,54 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/* Hardware interrupt handlers. */
|
||||
_PROTOTYPE( void hwint00, (void) );
|
||||
_PROTOTYPE( void hwint01, (void) );
|
||||
_PROTOTYPE( void hwint02, (void) );
|
||||
_PROTOTYPE( void hwint03, (void) );
|
||||
_PROTOTYPE( void hwint04, (void) );
|
||||
_PROTOTYPE( void hwint05, (void) );
|
||||
_PROTOTYPE( void hwint06, (void) );
|
||||
_PROTOTYPE( void hwint07, (void) );
|
||||
_PROTOTYPE( void hwint08, (void) );
|
||||
_PROTOTYPE( void hwint09, (void) );
|
||||
_PROTOTYPE( void hwint10, (void) );
|
||||
_PROTOTYPE( void hwint11, (void) );
|
||||
_PROTOTYPE( void hwint12, (void) );
|
||||
_PROTOTYPE( void hwint13, (void) );
|
||||
_PROTOTYPE( void hwint14, (void) );
|
||||
_PROTOTYPE( void hwint15, (void) );
|
||||
void hwint00(void);
|
||||
void hwint01(void);
|
||||
void hwint02(void);
|
||||
void hwint03(void);
|
||||
void hwint04(void);
|
||||
void hwint05(void);
|
||||
void hwint06(void);
|
||||
void hwint07(void);
|
||||
void hwint08(void);
|
||||
void hwint09(void);
|
||||
void hwint10(void);
|
||||
void hwint11(void);
|
||||
void hwint12(void);
|
||||
void hwint13(void);
|
||||
void hwint14(void);
|
||||
void hwint15(void);
|
||||
|
||||
/* Exception handlers (real or protected mode), in numerical order. */
|
||||
void _PROTOTYPE( int00, (void) ), _PROTOTYPE( divide_error, (void) );
|
||||
void _PROTOTYPE( int01, (void) ), _PROTOTYPE( single_step_exception, (void) );
|
||||
void _PROTOTYPE( int02, (void) ), _PROTOTYPE( nmi, (void) );
|
||||
void _PROTOTYPE( int03, (void) ), _PROTOTYPE( breakpoint_exception, (void) );
|
||||
void _PROTOTYPE( int04, (void) ), _PROTOTYPE( overflow, (void) );
|
||||
void _PROTOTYPE( int05, (void) ), _PROTOTYPE( bounds_check, (void) );
|
||||
void _PROTOTYPE( int06, (void) ), _PROTOTYPE( inval_opcode, (void) );
|
||||
void _PROTOTYPE( int07, (void) ), _PROTOTYPE( copr_not_available, (void) );
|
||||
void _PROTOTYPE( double_fault, (void) );
|
||||
void _PROTOTYPE( copr_seg_overrun, (void) );
|
||||
void _PROTOTYPE( inval_tss, (void) );
|
||||
void _PROTOTYPE( segment_not_present, (void) );
|
||||
void _PROTOTYPE( stack_exception, (void) );
|
||||
void _PROTOTYPE( general_protection, (void) );
|
||||
void _PROTOTYPE( page_fault, (void) );
|
||||
void _PROTOTYPE( copr_error, (void) );
|
||||
void _PROTOTYPE( alignment_check, (void) );
|
||||
void _PROTOTYPE( machine_check, (void) );
|
||||
void _PROTOTYPE( simd_exception, (void) );
|
||||
void int00(void), divide_error (void);
|
||||
void int01(void), single_step_exception (void);
|
||||
void int02(void), nmi (void);
|
||||
void int03(void), breakpoint_exception (void);
|
||||
void int04(void), overflow (void);
|
||||
void int05(void), bounds_check (void);
|
||||
void int06(void), inval_opcode (void);
|
||||
void int07(void), copr_not_available (void);
|
||||
void double_fault(void);
|
||||
void copr_seg_overrun(void);
|
||||
void inval_tss(void);
|
||||
void segment_not_present(void);
|
||||
void stack_exception(void);
|
||||
void general_protection(void);
|
||||
void page_fault(void);
|
||||
void copr_error(void);
|
||||
void alignment_check(void);
|
||||
void machine_check(void);
|
||||
void simd_exception(void);
|
||||
|
||||
/* Software interrupt handlers, in numerical order. */
|
||||
_PROTOTYPE( void trp, (void) );
|
||||
_PROTOTYPE( void ipc_entry, (void) );
|
||||
_PROTOTYPE( void kernel_call_entry, (void) );
|
||||
_PROTOTYPE( void level0_call, (void) );
|
||||
void trp(void);
|
||||
void ipc_entry(void);
|
||||
void kernel_call_entry(void);
|
||||
void level0_call(void);
|
||||
|
||||
/* memory.c */
|
||||
_PROTOTYPE( void segmentation2paging, (struct proc * current));
|
||||
_PROTOTYPE( void i386_freepde, (int pde));
|
||||
_PROTOTYPE( void getcr3val, (void));
|
||||
void segmentation2paging(struct proc * current);
|
||||
void i386_freepde(int pde);
|
||||
void getcr3val(void);
|
||||
|
||||
|
||||
/* exception.c */
|
||||
@@ -70,54 +70,53 @@ struct exception_frame {
|
||||
reg_t ss; /* undefined if trap is nested */
|
||||
};
|
||||
|
||||
_PROTOTYPE( void exception, (struct exception_frame * frame));
|
||||
void exception(struct exception_frame * frame);
|
||||
|
||||
/* klib386.s */
|
||||
_PROTOTYPE( __dead void monitor, (void) );
|
||||
_PROTOTYPE( __dead void reset, (void) );
|
||||
_PROTOTYPE( __dead void x86_triplefault, (void) );
|
||||
_PROTOTYPE( void int86, (void) );
|
||||
_PROTOTYPE( reg_t read_cr0, (void) );
|
||||
_PROTOTYPE( reg_t read_cr2, (void) );
|
||||
_PROTOTYPE( void write_cr0, (unsigned long value) );
|
||||
_PROTOTYPE( unsigned long read_cr4, (void) );
|
||||
_PROTOTYPE( void write_cr4, (unsigned long value) );
|
||||
_PROTOTYPE( void write_cr3, (unsigned long value) );
|
||||
_PROTOTYPE( unsigned long read_cpu_flags, (void) );
|
||||
_PROTOTYPE( void phys_insb, (u16_t port, phys_bytes buf, size_t count) );
|
||||
_PROTOTYPE( void phys_insw, (u16_t port, phys_bytes buf, size_t count) );
|
||||
_PROTOTYPE( void phys_outsb, (u16_t port, phys_bytes buf, size_t count) );
|
||||
_PROTOTYPE( void phys_outsw, (u16_t port, phys_bytes buf, size_t count) );
|
||||
_PROTOTYPE( u32_t read_cr3, (void) );
|
||||
_PROTOTYPE( void reload_cr3, (void) );
|
||||
_PROTOTYPE( void i386_invlpg, (phys_bytes linaddr) );
|
||||
_PROTOTYPE( void phys_memset, (phys_bytes ph, u32_t c, phys_bytes bytes));
|
||||
_PROTOTYPE( void reload_ds, (void) );
|
||||
_PROTOTYPE( void ia32_msr_read, (u32_t reg, u32_t * hi, u32_t * lo) );
|
||||
_PROTOTYPE( void ia32_msr_write, (u32_t reg, u32_t hi, u32_t lo) );
|
||||
_PROTOTYPE( void fninit, (void));
|
||||
_PROTOTYPE( void clts, (void));
|
||||
_PROTOTYPE( void fxsave, (void *));
|
||||
_PROTOTYPE( void fnsave, (void *));
|
||||
_PROTOTYPE( int fxrstor, (void *));
|
||||
_PROTOTYPE( int __fxrstor_end, (void *));
|
||||
_PROTOTYPE( int frstor, (void *));
|
||||
_PROTOTYPE( int __frstor_end, (void *));
|
||||
_PROTOTYPE( int __frstor_failure, (void *));
|
||||
_PROTOTYPE( unsigned short fnstsw, (void));
|
||||
_PROTOTYPE( void fnstcw, (unsigned short* cw));
|
||||
__dead void monitor(void);
|
||||
__dead void reset(void);
|
||||
__dead void x86_triplefault(void);
|
||||
void int86(void);
|
||||
reg_t read_cr0(void);
|
||||
reg_t read_cr2(void);
|
||||
void write_cr0(unsigned long value);
|
||||
unsigned long read_cr4(void);
|
||||
void write_cr4(unsigned long value);
|
||||
void write_cr3(unsigned long value);
|
||||
unsigned long read_cpu_flags(void);
|
||||
void phys_insb(u16_t port, phys_bytes buf, size_t count);
|
||||
void phys_insw(u16_t port, phys_bytes buf, size_t count);
|
||||
void phys_outsb(u16_t port, phys_bytes buf, size_t count);
|
||||
void phys_outsw(u16_t port, phys_bytes buf, size_t count);
|
||||
u32_t read_cr3(void);
|
||||
void reload_cr3(void);
|
||||
void i386_invlpg(phys_bytes linaddr);
|
||||
void phys_memset(phys_bytes ph, u32_t c, phys_bytes bytes);
|
||||
void reload_ds(void);
|
||||
void ia32_msr_read(u32_t reg, u32_t * hi, u32_t * lo);
|
||||
void ia32_msr_write(u32_t reg, u32_t hi, u32_t lo);
|
||||
void fninit(void);
|
||||
void clts(void);
|
||||
void fxsave(void *);
|
||||
void fnsave(void *);
|
||||
int fxrstor(void *);
|
||||
int __fxrstor_end(void *);
|
||||
int frstor(void *);
|
||||
int __frstor_end(void *);
|
||||
int __frstor_failure(void *);
|
||||
unsigned short fnstsw(void);
|
||||
void fnstcw(unsigned short* cw);
|
||||
|
||||
_PROTOTYPE( void switch_k_stack, (void * esp, void (* continuation)(void)));
|
||||
void switch_k_stack(void * esp, void (* continuation)(void));
|
||||
|
||||
_PROTOTYPE(void __switch_address_space, (struct proc * p,
|
||||
struct proc ** __ptproc));
|
||||
void __switch_address_space(struct proc * p, struct proc ** __ptproc);
|
||||
#define switch_address_space(proc) \
|
||||
__switch_address_space(proc, get_cpulocal_var_ptr(ptproc))
|
||||
|
||||
_PROTOTYPE(void refresh_tlb, (void));
|
||||
void refresh_tlb(void);
|
||||
|
||||
/* multiboot.c */
|
||||
_PROTOTYPE( void multiboot_init, (void) );
|
||||
void multiboot_init(void);
|
||||
|
||||
/* protect.c */
|
||||
struct tss_s {
|
||||
@@ -151,20 +150,20 @@ struct tss_s {
|
||||
/* u8_t iomap[0]; */
|
||||
};
|
||||
|
||||
_PROTOTYPE( void prot_init, (void) );
|
||||
_PROTOTYPE( void idt_init, (void) );
|
||||
_PROTOTYPE( void init_dataseg, (struct segdesc_s *segdp, phys_bytes base,
|
||||
vir_bytes size, int privilege) );
|
||||
_PROTOTYPE( void enable_iop, (struct proc *pp) );
|
||||
_PROTOTYPE( int prot_set_kern_seg_limit, (vir_bytes limit) );
|
||||
_PROTOTYPE( void printseg, (char *banner, int iscs, struct proc *pr, u32_t selector) );
|
||||
_PROTOTYPE( u32_t read_cs, (void));
|
||||
_PROTOTYPE( u32_t read_ds, (void));
|
||||
_PROTOTYPE( u32_t read_ss, (void));
|
||||
void prot_init(void);
|
||||
void idt_init(void);
|
||||
void init_dataseg(struct segdesc_s *segdp, phys_bytes base, vir_bytes
|
||||
size, int privilege);
|
||||
void enable_iop(struct proc *pp);
|
||||
int prot_set_kern_seg_limit(vir_bytes limit);
|
||||
void printseg(char *banner, int iscs, struct proc *pr, u32_t selector);
|
||||
u32_t read_cs(void);
|
||||
u32_t read_ds(void);
|
||||
u32_t read_ss(void);
|
||||
|
||||
/* prototype of an interrupt vector table entry */
|
||||
struct gate_table_s {
|
||||
_PROTOTYPE( void (*gate), (void) );
|
||||
void(*gate) (void);
|
||||
unsigned char vec_nr;
|
||||
unsigned char privilege;
|
||||
};
|
||||
@@ -172,8 +171,8 @@ struct gate_table_s {
|
||||
extern struct gate_table_s gate_table_pic[];
|
||||
|
||||
/* copies an array of vectors to the IDT. The last vector must be zero filled */
|
||||
_PROTOTYPE(void idt_copy_vectors, (struct gate_table_s * first));
|
||||
_PROTOTYPE(void idt_reload,(void));
|
||||
void idt_copy_vectors(struct gate_table_s * first);
|
||||
void idt_reload(void);
|
||||
|
||||
EXTERN void * k_boot_stktop;
|
||||
EXTERN void * k_stacks_start;
|
||||
@@ -182,13 +181,13 @@ extern void * k_stacks;
|
||||
#define get_k_stack_top(cpu) ((void *)(((char*)(k_stacks)) \
|
||||
+ 2 * ((cpu) + 1) * K_STACK_SIZE))
|
||||
|
||||
_PROTOTYPE( void, mfence(void));
|
||||
void mfence(void);
|
||||
#define barrier() do { mfence(); } while(0)
|
||||
|
||||
|
||||
#ifndef __GNUC__
|
||||
/* call a function to read the stack fram pointer (%ebp) */
|
||||
_PROTOTYPE(reg_t read_ebp, (void));
|
||||
reg_t read_ebp(void);
|
||||
#define get_stack_frame(__X) ((reg_t)read_ebp())
|
||||
#else
|
||||
/* read %ebp directly */
|
||||
@@ -198,23 +197,18 @@ _PROTOTYPE(reg_t read_ebp, (void));
|
||||
/*
|
||||
* sets up TSS for a cpu and assigns kernel stack and cpu id
|
||||
*/
|
||||
_PROTOTYPE(void tss_init, (unsigned cpu, void * kernel_stack));
|
||||
void tss_init(unsigned cpu, void * kernel_stack);
|
||||
|
||||
_PROTOTYPE( void int_gate, (unsigned vec_nr, vir_bytes offset,
|
||||
unsigned dpl_type) );
|
||||
void int_gate(unsigned vec_nr, vir_bytes offset, unsigned dpl_type);
|
||||
|
||||
_PROTOTYPE(void __copy_msg_from_user_end, (void));
|
||||
_PROTOTYPE(void __copy_msg_to_user_end, (void));
|
||||
_PROTOTYPE(void __user_copy_msg_pointer_failure, (void));
|
||||
void __copy_msg_from_user_end(void);
|
||||
void __copy_msg_to_user_end(void);
|
||||
void __user_copy_msg_pointer_failure(void);
|
||||
|
||||
_PROTOTYPE(int platform_tbl_checksum_ok, (void *ptr, unsigned int length));
|
||||
_PROTOTYPE(int platform_tbl_ptr, (phys_bytes start,
|
||||
phys_bytes end,
|
||||
unsigned increment,
|
||||
void * buff,
|
||||
unsigned size,
|
||||
phys_bytes * phys_addr,
|
||||
int ((* cmp_f)(void *))));
|
||||
int platform_tbl_checksum_ok(void *ptr, unsigned int length);
|
||||
int platform_tbl_ptr(phys_bytes start, phys_bytes end, unsigned
|
||||
increment, void * buff, unsigned size, phys_bytes * phys_addr, int ((*
|
||||
cmp_f)(void *)));
|
||||
|
||||
/* breakpoints.c */
|
||||
#define BREAKPOINT_COUNT 4
|
||||
|
||||
@@ -21,7 +21,7 @@ struct nmi_frame {
|
||||
reg_t eflags;
|
||||
};
|
||||
|
||||
_PROTOTYPE(int i386_watchdog_start, (void));
|
||||
int i386_watchdog_start(void);
|
||||
|
||||
#define nmi_in_kernel(f) ((f)->cs == CS_SELECTOR)
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
#define __HW_INTR_X86_H__
|
||||
|
||||
#include "kernel/kernel.h"
|
||||
_PROTOTYPE(void irq_8259_unmask,(int irq));
|
||||
_PROTOTYPE(void irq_8259_mask,(int irq));
|
||||
_PROTOTYPE(void irq_8259_eoi, (int irq));
|
||||
_PROTOTYPE(void irq_handle,(int irq));
|
||||
_PROTOTYPE(void i8259_disable,(void));
|
||||
_PROTOTYPE(void eoi_8259_master,(void));
|
||||
_PROTOTYPE(void eoi_8259_slave,(void));
|
||||
void irq_8259_unmask(int irq);
|
||||
void irq_8259_mask(int irq);
|
||||
void irq_8259_eoi(int irq);
|
||||
void irq_handle(int irq);
|
||||
void i8259_disable(void);
|
||||
void eoi_8259_master(void);
|
||||
void eoi_8259_slave(void);
|
||||
|
||||
/*
|
||||
* we don't use IO APIC if not configured for SMP as we cannot read any info
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
#include "kernel/kernel.h"
|
||||
|
||||
_PROTOTYPE(void mb_cls, (void));
|
||||
_PROTOTYPE(void mb_print, (char*));
|
||||
_PROTOTYPE(void mb_print_char, (char));
|
||||
_PROTOTYPE(int mb_read_char, (unsigned char*));
|
||||
void mb_cls(void);
|
||||
void mb_print(char*);
|
||||
void mb_print_char(char);
|
||||
int mb_read_char(unsigned char*);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,8 +36,8 @@ PRIVATE int nfreepdes = 0, freepdes[MAX_FREEPDES];
|
||||
|
||||
#define HASPT(procptr) ((procptr)->p_seg.p_cr3 != 0)
|
||||
|
||||
FORWARD _PROTOTYPE( u32_t phys_get32, (phys_bytes v) );
|
||||
FORWARD _PROTOTYPE( void vm_enable_paging, (void) );
|
||||
FORWARD u32_t phys_get32(phys_bytes v);
|
||||
FORWARD void vm_enable_paging(void);
|
||||
|
||||
|
||||
PUBLIC void segmentation2paging(struct proc * current)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
_PROTOTYPE( void oxpcie_set_vaddr, (unsigned char *vaddr));
|
||||
_PROTOTYPE( void oxpcie_putc, (char c));
|
||||
_PROTOTYPE( int oxpcie_in, (void));
|
||||
void oxpcie_set_vaddr(unsigned char *vaddr);
|
||||
void oxpcie_putc(char c);
|
||||
int oxpcie_in(void);
|
||||
|
||||
#include "serial.h"
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@ PUBLIC struct segdesc_s gdt[GDT_SIZE]= /* used in klib.s and mpx.s */
|
||||
PRIVATE struct gatedesc_s idt[IDT_SIZE]; /* zero-init so none present */
|
||||
PUBLIC struct tss_s tss[CONFIG_MAX_CPUS]; /* zero init */
|
||||
|
||||
FORWARD _PROTOTYPE( void sdesc, (struct segdesc_s *segdp, phys_bytes base,
|
||||
vir_bytes size) );
|
||||
FORWARD void sdesc(struct segdesc_s *segdp, phys_bytes base, vir_bytes
|
||||
size);
|
||||
|
||||
/*===========================================================================*
|
||||
* enable_iop *
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
/* Function prototype for PRIVATE functions.
|
||||
*/
|
||||
FORWARD _PROTOTYPE( void load_update, (void));
|
||||
FORWARD void load_update(void);
|
||||
|
||||
/* The CLOCK's timers queue. The functions in <timers.h> operate on this.
|
||||
* Each system process possesses a single synchronous alarm timer. If other
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
#include "kernel.h"
|
||||
#include "arch_clock.h"
|
||||
|
||||
_PROTOTYPE(int boot_cpu_init_timer, (unsigned freq));
|
||||
_PROTOTYPE(int app_cpu_init_timer, (unsigned freq));
|
||||
int boot_cpu_init_timer(unsigned freq);
|
||||
int app_cpu_init_timer(unsigned freq);
|
||||
|
||||
_PROTOTYPE(int timer_int_handler, (void));
|
||||
int timer_int_handler(void);
|
||||
|
||||
_PROTOTYPE(int init_local_timer, (unsigned freq));
|
||||
int init_local_timer(unsigned freq);
|
||||
/* sto p the local timer ticking */
|
||||
_PROTOTYPE(void stop_local_timer, (void));
|
||||
void stop_local_timer(void);
|
||||
/* let the time tick again with the original settings after it was stopped */
|
||||
_PROTOTYPE(void restart_local_timer, (void));
|
||||
_PROTOTYPE(int register_local_timer_handler, (irq_handler_t handler));
|
||||
void restart_local_timer(void);
|
||||
int register_local_timer_handler(irq_handler_t handler);
|
||||
|
||||
_PROTOTYPE( u64_t ms_2_cpu_time, (unsigned ms));
|
||||
_PROTOTYPE( unsigned cpu_time_2_ms, (u64_t cpu_time));
|
||||
u64_t ms_2_cpu_time(unsigned ms);
|
||||
unsigned cpu_time_2_ms(u64_t cpu_time);
|
||||
|
||||
#endif /* __CLOCK_H__ */
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
char *** _penviron;
|
||||
|
||||
/* Prototype declarations for PRIVATE functions. */
|
||||
FORWARD _PROTOTYPE( void announce, (void));
|
||||
FORWARD void announce(void);
|
||||
|
||||
PUBLIC void bsp_finish_booting(void)
|
||||
{
|
||||
|
||||
@@ -48,22 +48,22 @@
|
||||
#include "arch_proto.h"
|
||||
|
||||
/* Scheduling and message passing functions */
|
||||
FORWARD _PROTOTYPE( void idle, (void));
|
||||
FORWARD void idle(void);
|
||||
/**
|
||||
* Made public for use in clock.c (for user-space scheduling)
|
||||
FORWARD _PROTOTYPE( int mini_send, (struct proc *caller_ptr, endpoint_t dst_e,
|
||||
message *m_ptr, int flags));
|
||||
FORWARD int mini_send(struct proc *caller_ptr, endpoint_t dst_e, message
|
||||
*m_ptr, int flags);
|
||||
*/
|
||||
FORWARD _PROTOTYPE( int mini_receive, (struct proc *caller_ptr, endpoint_t src,
|
||||
message *m_ptr, int flags));
|
||||
FORWARD _PROTOTYPE( int mini_senda, (struct proc *caller_ptr,
|
||||
asynmsg_t *table, size_t size));
|
||||
FORWARD _PROTOTYPE( int deadlock, (int function,
|
||||
register struct proc *caller, endpoint_t src_dst_e));
|
||||
FORWARD _PROTOTYPE( int try_async, (struct proc *caller_ptr) );
|
||||
FORWARD _PROTOTYPE( int try_one, (struct proc *src_ptr, struct proc *dst_ptr));
|
||||
FORWARD _PROTOTYPE( struct proc * pick_proc, (void));
|
||||
FORWARD _PROTOTYPE( void enqueue_head, (struct proc *rp));
|
||||
FORWARD int mini_receive(struct proc *caller_ptr, endpoint_t src,
|
||||
message *m_ptr, int flags);
|
||||
FORWARD int mini_senda(struct proc *caller_ptr, asynmsg_t *table, size_t
|
||||
size);
|
||||
FORWARD int deadlock(int function, register struct proc *caller,
|
||||
endpoint_t src_dst_e);
|
||||
FORWARD int try_async(struct proc *caller_ptr);
|
||||
FORWARD int try_one(struct proc *src_ptr, struct proc *dst_ptr);
|
||||
FORWARD struct proc * pick_proc(void);
|
||||
FORWARD void enqueue_head(struct proc *rp);
|
||||
|
||||
/* all idles share the same idle_priv structure */
|
||||
PRIVATE struct priv idle_priv;
|
||||
|
||||
@@ -278,8 +278,8 @@ struct proc {
|
||||
|
||||
EXTERN struct proc proc[NR_TASKS + NR_PROCS]; /* process table */
|
||||
|
||||
_PROTOTYPE( int mini_send, (struct proc *caller_ptr, endpoint_t dst_e,
|
||||
message *m_ptr, int flags));
|
||||
int mini_send(struct proc *caller_ptr, endpoint_t dst_e, message *m_ptr,
|
||||
int flags);
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
char sprof_sample_buffer[SAMPLE_BUFFER_SIZE];
|
||||
|
||||
/* Function prototype for the profiling clock handler. */
|
||||
FORWARD _PROTOTYPE( int profile_clock_handler, (irq_hook_t *hook) );
|
||||
FORWARD int profile_clock_handler(irq_hook_t *hook);
|
||||
|
||||
/* A hook for the profiling clock interrupt handler. */
|
||||
PRIVATE irq_hook_t profile_clock_hook;
|
||||
|
||||
@@ -17,7 +17,7 @@ EXTERN struct sprof_info_s sprof_info; /* profiling info for user program */
|
||||
EXTERN vir_bytes sprof_data_addr_vir; /* user address to write data */
|
||||
EXTERN endpoint_t sprof_ep; /* user process */
|
||||
|
||||
_PROTOTYPE(void nmi_sprofile_handler, (struct nmi_frame * frame));
|
||||
void nmi_sprofile_handler(struct nmi_frame * frame);
|
||||
|
||||
#endif /* SPROFILE */
|
||||
|
||||
|
||||
306
kernel/proto.h
306
kernel/proto.h
@@ -15,12 +15,12 @@ struct proc;
|
||||
struct timer;
|
||||
|
||||
/* clock.c */
|
||||
_PROTOTYPE( clock_t get_uptime, (void) );
|
||||
_PROTOTYPE( void set_timer, (struct timer *tp, clock_t t, tmr_func_t f) );
|
||||
_PROTOTYPE( void reset_timer, (struct timer *tp) );
|
||||
_PROTOTYPE( void ser_dump_proc, (void) );
|
||||
clock_t get_uptime(void);
|
||||
void set_timer(struct timer *tp, clock_t t, tmr_func_t f);
|
||||
void reset_timer(struct timer *tp);
|
||||
void ser_dump_proc(void);
|
||||
|
||||
_PROTOTYPE( void cycles_accounting_init, (void) );
|
||||
void cycles_accounting_init(void);
|
||||
/*
|
||||
* This functions start and stop accounting for process, kernel or idle cycles.
|
||||
* It inherently have to account for some kernel cycles for process too,
|
||||
@@ -28,214 +28,208 @@ _PROTOTYPE( void cycles_accounting_init, (void) );
|
||||
* possible before returning to userspace. These function is architecture
|
||||
* dependent
|
||||
*/
|
||||
_PROTOTYPE( void context_stop, (struct proc * p) );
|
||||
void context_stop(struct proc * p);
|
||||
/* this is a wrapper to make calling it from assembly easier */
|
||||
_PROTOTYPE( void context_stop_idle, (void) );
|
||||
_PROTOTYPE( int restore_fpu, (struct proc *) );
|
||||
_PROTOTYPE( void save_fpu, (struct proc *) );
|
||||
_PROTOTYPE( void save_local_fpu, (struct proc *, int retain) );
|
||||
_PROTOTYPE( void fpu_sigcontext, (struct proc *, struct sigframe *fr, struct sigcontext *sc) );
|
||||
void context_stop_idle(void);
|
||||
int restore_fpu(struct proc *);
|
||||
void save_fpu(struct proc *);
|
||||
void save_local_fpu(struct proc *, int retain);
|
||||
void fpu_sigcontext(struct proc *, struct sigframe *fr, struct
|
||||
sigcontext *sc);
|
||||
|
||||
/* main.c */
|
||||
_PROTOTYPE( int main, (void) );
|
||||
_PROTOTYPE( void prepare_shutdown, (int how) );
|
||||
_PROTOTYPE( __dead void minix_shutdown, (struct timer *tp) );
|
||||
_PROTOTYPE( void bsp_finish_booting, (void) );
|
||||
int main(void);
|
||||
void prepare_shutdown(int how);
|
||||
__dead void minix_shutdown(struct timer *tp);
|
||||
void bsp_finish_booting(void);
|
||||
|
||||
/* proc.c */
|
||||
|
||||
_PROTOTYPE( int do_ipc, (reg_t r1, reg_t r2, reg_t r3) );
|
||||
_PROTOTYPE( void proc_init, (void) );
|
||||
_PROTOTYPE( int cancel_async, (struct proc *src, struct proc *dst) );
|
||||
_PROTOTYPE( int has_pending_notify, (struct proc * caller, int src_p) );
|
||||
_PROTOTYPE( int has_pending_asend, (struct proc * caller, int src_p) );
|
||||
_PROTOTYPE( void unset_notify_pending, (struct proc * caller, int src_p));
|
||||
_PROTOTYPE( int mini_notify, (const struct proc *src, endpoint_t dst) );
|
||||
_PROTOTYPE( void enqueue, (struct proc *rp) );
|
||||
_PROTOTYPE( void dequeue, (struct proc *rp) );
|
||||
_PROTOTYPE( void switch_to_user, (void) );
|
||||
_PROTOTYPE( struct proc * arch_finish_switch_to_user, (void) );
|
||||
_PROTOTYPE( struct proc *endpoint_lookup, (endpoint_t ep) );
|
||||
int do_ipc(reg_t r1, reg_t r2, reg_t r3);
|
||||
void proc_init(void);
|
||||
int cancel_async(struct proc *src, struct proc *dst);
|
||||
int has_pending_notify(struct proc * caller, int src_p);
|
||||
int has_pending_asend(struct proc * caller, int src_p);
|
||||
void unset_notify_pending(struct proc * caller, int src_p);
|
||||
int mini_notify(const struct proc *src, endpoint_t dst);
|
||||
void enqueue(struct proc *rp);
|
||||
void dequeue(struct proc *rp);
|
||||
void switch_to_user(void);
|
||||
struct proc * arch_finish_switch_to_user(void);
|
||||
struct proc *endpoint_lookup(endpoint_t ep);
|
||||
#if DEBUG_ENABLE_IPC_WARNINGS
|
||||
_PROTOTYPE( int isokendpt_f, (const char *file, int line, endpoint_t e, int *p, int f));
|
||||
int isokendpt_f(const char *file, int line, endpoint_t e, int *p, int
|
||||
f);
|
||||
#define isokendpt_d(e, p, f) isokendpt_f(__FILE__, __LINE__, (e), (p), (f))
|
||||
#else
|
||||
_PROTOTYPE( int isokendpt_f, (endpoint_t e, int *p, int f) );
|
||||
int isokendpt_f(endpoint_t e, int *p, int f);
|
||||
#define isokendpt_d(e, p, f) isokendpt_f((e), (p), (f))
|
||||
#endif
|
||||
_PROTOTYPE( void proc_no_time, (struct proc *p));
|
||||
_PROTOTYPE( void reset_proc_accounting, (struct proc *p));
|
||||
_PROTOTYPE( void flag_account, (struct proc *p, int flag));
|
||||
_PROTOTYPE( int try_deliver_senda, (struct proc *caller_ptr,
|
||||
asynmsg_t *table,
|
||||
size_t size) );
|
||||
void proc_no_time(struct proc *p);
|
||||
void reset_proc_accounting(struct proc *p);
|
||||
void flag_account(struct proc *p, int flag);
|
||||
int try_deliver_senda(struct proc *caller_ptr, asynmsg_t *table, size_t
|
||||
size);
|
||||
|
||||
/* start.c */
|
||||
_PROTOTYPE( void cstart, (u16_t cs, u16_t ds, u16_t mds,
|
||||
u16_t parmoff, u16_t parmsize) );
|
||||
_PROTOTYPE( char *env_get, (const char *key));
|
||||
void cstart(u16_t cs, u16_t ds, u16_t mds, u16_t parmoff, u16_t
|
||||
parmsize);
|
||||
char *env_get(const char *key);
|
||||
|
||||
/* system.c */
|
||||
_PROTOTYPE( int get_priv, (register struct proc *rc, int proc_type) );
|
||||
_PROTOTYPE( void set_sendto_bit, (const struct proc *rc, int id) );
|
||||
_PROTOTYPE( void unset_sendto_bit, (const struct proc *rc, int id) );
|
||||
_PROTOTYPE( void fill_sendto_mask, (const struct proc *rc,
|
||||
sys_map_t *map) );
|
||||
_PROTOTYPE( void send_sig, (endpoint_t proc_nr, int sig_nr) );
|
||||
_PROTOTYPE( void cause_sig, (proc_nr_t proc_nr, int sig_nr) );
|
||||
_PROTOTYPE( void sig_delay_done, (struct proc *rp) );
|
||||
_PROTOTYPE( void kernel_call, (message *m_user, struct proc * caller) );
|
||||
_PROTOTYPE( void system_init, (void) );
|
||||
int get_priv(register struct proc *rc, int proc_type);
|
||||
void set_sendto_bit(const struct proc *rc, int id);
|
||||
void unset_sendto_bit(const struct proc *rc, int id);
|
||||
void fill_sendto_mask(const struct proc *rc, sys_map_t *map);
|
||||
void send_sig(endpoint_t proc_nr, int sig_nr);
|
||||
void cause_sig(proc_nr_t proc_nr, int sig_nr);
|
||||
void sig_delay_done(struct proc *rp);
|
||||
void kernel_call(message *m_user, struct proc * caller);
|
||||
void system_init(void);
|
||||
#define numap_local(proc_nr, vir_addr, bytes) \
|
||||
umap_local(proc_addr(proc_nr), D, (vir_addr), (bytes))
|
||||
_PROTOTYPE( void clear_endpoint, (struct proc *rc) );
|
||||
_PROTOTYPE( void clear_ipc_refs, (struct proc *rc, int caller_ret) );
|
||||
_PROTOTYPE( phys_bytes umap_bios, (vir_bytes vir_addr, vir_bytes bytes));
|
||||
_PROTOTYPE( void kernel_call_resume, (struct proc *p));
|
||||
_PROTOTYPE( int sched_proc, (struct proc *rp,
|
||||
int priority, int quantum, int cpu));
|
||||
void clear_endpoint(struct proc *rc);
|
||||
void clear_ipc_refs(struct proc *rc, int caller_ret);
|
||||
phys_bytes umap_bios(vir_bytes vir_addr, vir_bytes bytes);
|
||||
void kernel_call_resume(struct proc *p);
|
||||
int sched_proc(struct proc *rp, int priority, int quantum, int cpu);
|
||||
|
||||
/* system/do_newmap.c */
|
||||
_PROTOTYPE( int newmap, (struct proc * caller, struct proc *rp,
|
||||
struct mem_map *map_ptr));
|
||||
int newmap(struct proc * caller, struct proc *rp, struct mem_map
|
||||
*map_ptr);
|
||||
|
||||
/* system/do_vtimer.c */
|
||||
_PROTOTYPE( void vtimer_check, (struct proc *rp) );
|
||||
void vtimer_check(struct proc *rp);
|
||||
|
||||
/* interrupt.c */
|
||||
_PROTOTYPE( void put_irq_handler, (irq_hook_t *hook, int irq,
|
||||
irq_handler_t handler) );
|
||||
_PROTOTYPE( void rm_irq_handler, (const irq_hook_t *hook) );
|
||||
_PROTOTYPE( void enable_irq, (const irq_hook_t *hook) );
|
||||
_PROTOTYPE( int disable_irq, (const irq_hook_t *hook) );
|
||||
void put_irq_handler(irq_hook_t *hook, int irq, irq_handler_t handler);
|
||||
void rm_irq_handler(const irq_hook_t *hook);
|
||||
void enable_irq(const irq_hook_t *hook);
|
||||
int disable_irq(const irq_hook_t *hook);
|
||||
|
||||
_PROTOTYPE(void interrupts_enable, (void));
|
||||
_PROTOTYPE(void interrupts_disable, (void));
|
||||
void interrupts_enable(void);
|
||||
void interrupts_disable(void);
|
||||
|
||||
/* debug.c */
|
||||
_PROTOTYPE( int runqueues_ok, (void) );
|
||||
int runqueues_ok(void);
|
||||
#ifndef CONFIG_SMP
|
||||
#define runqueues_ok_local runqueues_ok
|
||||
#else
|
||||
#define runqueues_ok_local() runqueues_ok_cpu(cpuid)
|
||||
_PROTOTYPE( int runqueues_ok_cpu, (unsigned cpu));
|
||||
int runqueues_ok_cpu(unsigned cpu);
|
||||
#endif
|
||||
_PROTOTYPE( char *rtsflagstr, (u32_t flags) );
|
||||
_PROTOTYPE( char *miscflagstr, (u32_t flags) );
|
||||
_PROTOTYPE( char *schedulerstr, (struct proc *scheduler) );
|
||||
char *rtsflagstr(u32_t flags);
|
||||
char *miscflagstr(u32_t flags);
|
||||
char *schedulerstr(struct proc *scheduler);
|
||||
/* prints process information */
|
||||
_PROTOTYPE( void print_proc, (struct proc *pp));
|
||||
void print_proc(struct proc *pp);
|
||||
/* prints the given process and recursively all processes it depends on */
|
||||
_PROTOTYPE( void print_proc_recursive, (struct proc *pp));
|
||||
void print_proc_recursive(struct proc *pp);
|
||||
#if DEBUG_IPC_HOOK
|
||||
_PROTOTYPE( void hook_ipc_msgrecv, (message *msg, struct proc *src,
|
||||
struct proc *dst) );
|
||||
_PROTOTYPE( void hook_ipc_msgsend, (message *msg, struct proc *src,
|
||||
struct proc *dst) );
|
||||
_PROTOTYPE( void hook_ipc_msgkcall, (message *msg, struct proc *proc) );
|
||||
_PROTOTYPE( void hook_ipc_msgkresult, (message *msg, struct proc *proc) );
|
||||
_PROTOTYPE( void hook_ipc_clear, (struct proc *proc) );
|
||||
void hook_ipc_msgrecv(message *msg, struct proc *src, struct proc *dst);
|
||||
void hook_ipc_msgsend(message *msg, struct proc *src, struct proc *dst);
|
||||
void hook_ipc_msgkcall(message *msg, struct proc *proc);
|
||||
void hook_ipc_msgkresult(message *msg, struct proc *proc);
|
||||
void hook_ipc_clear(struct proc *proc);
|
||||
#endif
|
||||
|
||||
/* system/do_safemap.c */
|
||||
_PROTOTYPE( int map_invoke_vm, (struct proc * caller, int req_type,
|
||||
endpoint_t end_d, int seg_d, vir_bytes off_d,
|
||||
endpoint_t end_s, int seg_s, vir_bytes off_s,
|
||||
size_t size, int flag));
|
||||
int map_invoke_vm(struct proc * caller, int req_type, endpoint_t end_d,
|
||||
int seg_d, vir_bytes off_d, endpoint_t end_s, int seg_s, vir_bytes
|
||||
off_s, size_t size, int flag);
|
||||
|
||||
/* 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 *));
|
||||
int verify_grant(endpoint_t, endpoint_t, cp_grant_id_t, vir_bytes, int,
|
||||
vir_bytes, vir_bytes *, endpoint_t *);
|
||||
|
||||
/* system/do_sysctl.c */
|
||||
_PROTOTYPE( int do_sysctl, (struct proc * caller, message *m));
|
||||
int do_sysctl(struct proc * caller, message *m);
|
||||
|
||||
#if SPROFILE
|
||||
/* profile.c */
|
||||
_PROTOTYPE( void init_profile_clock, (u32_t) );
|
||||
_PROTOTYPE( void stop_profile_clock, (void) );
|
||||
void init_profile_clock(u32_t);
|
||||
void stop_profile_clock(void);
|
||||
#endif
|
||||
|
||||
/* functions defined in architecture-dependent files. */
|
||||
_PROTOTYPE( void prot_init, (void) );
|
||||
_PROTOTYPE( phys_bytes phys_copy, (phys_bytes source, phys_bytes dest,
|
||||
phys_bytes count) );
|
||||
_PROTOTYPE( void phys_copy_fault, (void));
|
||||
_PROTOTYPE( void phys_copy_fault_in_kernel, (void));
|
||||
void prot_init(void);
|
||||
phys_bytes phys_copy(phys_bytes source, phys_bytes dest, phys_bytes
|
||||
count);
|
||||
void phys_copy_fault(void);
|
||||
void phys_copy_fault_in_kernel(void);
|
||||
#define virtual_copy(src, dst, bytes) \
|
||||
virtual_copy_f(NULL, src, dst, bytes, 0)
|
||||
#define virtual_copy_vmcheck(caller, src, dst, bytes) \
|
||||
virtual_copy_f(caller, src, dst, bytes, 1)
|
||||
_PROTOTYPE( int virtual_copy_f, (struct proc * caller,
|
||||
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));
|
||||
_PROTOTYPE( int data_copy_vmcheck, (struct proc *,
|
||||
endpoint_t from, vir_bytes from_addr,
|
||||
endpoint_t to, vir_bytes to_addr, size_t bytes));
|
||||
_PROTOTYPE( void alloc_segments, (struct proc *rp) );
|
||||
_PROTOTYPE( void vm_stop, (void) );
|
||||
_PROTOTYPE( phys_bytes umap_local, (register struct proc *rp, int seg,
|
||||
vir_bytes vir_addr, vir_bytes bytes));
|
||||
_PROTOTYPE( phys_bytes umap_virtual, (struct proc* rp,
|
||||
int seg, vir_bytes vir_addr, vir_bytes bytes) );
|
||||
_PROTOTYPE( phys_bytes seg2phys, (u16_t) );
|
||||
_PROTOTYPE( int vm_phys_memset, (phys_bytes source, u8_t pattern,
|
||||
phys_bytes count) );
|
||||
_PROTOTYPE( int intr_init, (int, int) );
|
||||
_PROTOTYPE( void halt_cpu, (void) );
|
||||
_PROTOTYPE( void arch_init, (void) );
|
||||
_PROTOTYPE( void cpu_identify, (void) );
|
||||
int virtual_copy_f(struct proc * caller, struct vir_addr *src, struct
|
||||
vir_addr *dst, vir_bytes bytes, int vmcheck);
|
||||
int data_copy(endpoint_t from, vir_bytes from_addr, endpoint_t to,
|
||||
vir_bytes to_addr, size_t bytes);
|
||||
int data_copy_vmcheck(struct proc *, endpoint_t from, vir_bytes
|
||||
from_addr, endpoint_t to, vir_bytes to_addr, size_t bytes);
|
||||
void alloc_segments(struct proc *rp);
|
||||
void vm_stop(void);
|
||||
phys_bytes umap_local(register struct proc *rp, int seg, vir_bytes
|
||||
vir_addr, vir_bytes bytes);
|
||||
phys_bytes umap_virtual(struct proc* rp, int seg, vir_bytes vir_addr,
|
||||
vir_bytes bytes);
|
||||
phys_bytes seg2phys(u16_t);
|
||||
int vm_phys_memset(phys_bytes source, u8_t pattern, phys_bytes count);
|
||||
int intr_init(int, int);
|
||||
void halt_cpu(void);
|
||||
void arch_init(void);
|
||||
void cpu_identify(void);
|
||||
/* arch dependent FPU initialization per CPU */
|
||||
_PROTOTYPE( void fpu_init, (void) );
|
||||
void fpu_init(void);
|
||||
/* returns true if pfu is present and initialized */
|
||||
_PROTOTYPE( int is_fpu, (void) );
|
||||
_PROTOTYPE( void ser_putc, (char) );
|
||||
_PROTOTYPE( __dead void arch_shutdown, (int) );
|
||||
_PROTOTYPE( __dead void arch_monitor, (void) );
|
||||
_PROTOTYPE( void restore_user_context, (struct proc * p) );
|
||||
_PROTOTYPE( void read_tsc, (u32_t *high, u32_t *low) );
|
||||
_PROTOTYPE( int arch_init_profile_clock, (u32_t freq) );
|
||||
_PROTOTYPE( void arch_stop_profile_clock, (void) );
|
||||
_PROTOTYPE( void arch_ack_profile_clock, (void) );
|
||||
_PROTOTYPE( void do_ser_debug, (void) );
|
||||
_PROTOTYPE( int arch_get_params, (char *parm, int max));
|
||||
_PROTOTYPE( int arch_set_params, (char *parm, int max));
|
||||
_PROTOTYPE( void arch_pre_exec, (struct proc *pr, u32_t, u32_t));
|
||||
_PROTOTYPE( int arch_umap, (const struct proc *pr, vir_bytes, vir_bytes,
|
||||
int, phys_bytes *));
|
||||
_PROTOTYPE( int arch_do_vmctl, (message *m_ptr, struct proc *p));
|
||||
_PROTOTYPE( void proc_stacktrace, (struct proc *proc) );
|
||||
_PROTOTYPE( int vm_lookup, (const struct proc *proc, vir_bytes virtual, phys_bytes *result, u32_t *ptent));
|
||||
_PROTOTYPE( size_t vm_lookup_range, (const struct proc *proc,
|
||||
vir_bytes vir_addr, phys_bytes *phys_addr, size_t bytes) );
|
||||
_PROTOTYPE( int vm_check_range, (struct proc *caller,
|
||||
struct proc *target, vir_bytes vir_addr, size_t bytes) );
|
||||
_PROTOTYPE( void delivermsg, (struct proc *target));
|
||||
_PROTOTYPE( void arch_do_syscall, (struct proc *proc) );
|
||||
_PROTOTYPE( int arch_phys_map, (int index, phys_bytes *addr,
|
||||
phys_bytes *len, int *flags));
|
||||
_PROTOTYPE( int arch_phys_map_reply, (int index, vir_bytes addr));
|
||||
_PROTOTYPE( int arch_enable_paging, (struct proc * caller, const message * m_ptr));
|
||||
int is_fpu(void);
|
||||
void ser_putc(char);
|
||||
__dead void arch_shutdown(int);
|
||||
__dead void arch_monitor(void);
|
||||
void restore_user_context(struct proc * p);
|
||||
void read_tsc(u32_t *high, u32_t *low);
|
||||
int arch_init_profile_clock(u32_t freq);
|
||||
void arch_stop_profile_clock(void);
|
||||
void arch_ack_profile_clock(void);
|
||||
void do_ser_debug(void);
|
||||
int arch_get_params(char *parm, int max);
|
||||
int arch_set_params(char *parm, int max);
|
||||
void arch_pre_exec(struct proc *pr, u32_t, u32_t);
|
||||
int arch_umap(const struct proc *pr, vir_bytes, vir_bytes, int,
|
||||
phys_bytes *);
|
||||
int arch_do_vmctl(message *m_ptr, struct proc *p);
|
||||
int vm_contiguous(const struct proc *targetproc, vir_bytes vir_buf,
|
||||
size_t count);
|
||||
void proc_stacktrace(struct proc *proc);
|
||||
int vm_lookup(const struct proc *proc, vir_bytes virtual, phys_bytes
|
||||
*result, u32_t *ptent);
|
||||
size_t vm_lookup_range(const struct proc *proc,
|
||||
vir_bytes vir_addr, phys_bytes *phys_addr, size_t bytes);
|
||||
void delivermsg(struct proc *target);
|
||||
void arch_do_syscall(struct proc *proc);
|
||||
int arch_phys_map(int index, phys_bytes *addr, phys_bytes *len, int
|
||||
*flags);
|
||||
int arch_phys_map_reply(int index, vir_bytes addr);
|
||||
int arch_enable_paging(struct proc * caller, const message * m_ptr);
|
||||
int vm_check_range(struct proc *caller,
|
||||
struct proc *target, vir_bytes vir_addr, size_t bytes);
|
||||
|
||||
_PROTOTYPE( int copy_msg_from_user, (struct proc * p, message * user_mbuf,
|
||||
message * dst));
|
||||
_PROTOTYPE( int copy_msg_to_user, (struct proc * p, message * src,
|
||||
message * user_mbuf));
|
||||
_PROTOTYPE(void switch_address_space, (struct proc * p));
|
||||
_PROTOTYPE(void release_address_space, (struct proc *pr));
|
||||
int copy_msg_from_user(struct proc * p, message * user_mbuf, message *
|
||||
dst);
|
||||
int copy_msg_to_user(struct proc * p, message * src, message *
|
||||
user_mbuf);
|
||||
void switch_address_space(struct proc * p);
|
||||
void release_address_space(struct proc *pr);
|
||||
|
||||
_PROTOTYPE(void enable_fpu_exception, (void));
|
||||
_PROTOTYPE(void disable_fpu_exception, (void));
|
||||
_PROTOTYPE(void release_fpu, (struct proc * p));
|
||||
_PROTOTYPE(void arch_pause,(void));
|
||||
_PROTOTYPE(short cpu_load, (void));
|
||||
_PROTOTYPE(void busy_delay_ms, (int ms));
|
||||
void enable_fpu_exception(void);
|
||||
void disable_fpu_exception(void);
|
||||
void release_fpu(struct proc * p);
|
||||
void arch_pause(void);
|
||||
short cpu_load(void);
|
||||
void busy_delay_ms(int ms);
|
||||
|
||||
/* utility.c */
|
||||
_PROTOTYPE( void cpu_print_freq, (unsigned cpu));
|
||||
void cpu_print_freq(unsigned cpu);
|
||||
#endif /* __kernel__ */
|
||||
|
||||
#endif /* PROTO_H */
|
||||
|
||||
@@ -65,7 +65,7 @@ PUBLIC void smp_schedule(unsigned cpu)
|
||||
arch_send_smp_schedule_ipi(cpu);
|
||||
}
|
||||
|
||||
_PROTOTYPE(void smp_sched_handler, (void));
|
||||
void smp_sched_handler(void);
|
||||
|
||||
/*
|
||||
* tell another cpu about a task to do and return only after the cpu acks that
|
||||
|
||||
29
kernel/smp.h
29
kernel/smp.h
@@ -26,7 +26,7 @@ EXTERN unsigned bsp_cpu_id;
|
||||
* suboptimal, the system must be able to run on the bootstrap processor as if
|
||||
* it was the only processor in the system
|
||||
*/
|
||||
_PROTOTYPE(void smp_init, (void));
|
||||
void smp_init(void);
|
||||
|
||||
#define CPU_IS_BSP 1
|
||||
#define CPU_IS_READY 2
|
||||
@@ -51,30 +51,29 @@ SPINLOCK_DECLARE(big_kernel_lock)
|
||||
*/
|
||||
SPINLOCK_DECLARE(boot_lock)
|
||||
|
||||
_PROTOTYPE(void wait_for_APs_to_finish_booting, (void));
|
||||
_PROTOTYPE(void ap_boot_finished, (unsigned cpu));
|
||||
_PROTOTYPE(void smp_shutdown_aps, (void ));
|
||||
void wait_for_APs_to_finish_booting(void);
|
||||
void ap_boot_finished(unsigned cpu);
|
||||
void smp_shutdown_aps(void );
|
||||
|
||||
/* IPI handlers */
|
||||
_PROTOTYPE(void smp_ipi_halt_handler, (void));
|
||||
_PROTOTYPE(void smp_ipi_sched_handler, (void));
|
||||
void smp_ipi_halt_handler(void);
|
||||
void smp_ipi_sched_handler(void);
|
||||
|
||||
_PROTOTYPE(void smp_schedule, (unsigned cpu));
|
||||
void smp_schedule(unsigned cpu);
|
||||
/* stop a processes on a different cpu */
|
||||
_PROTOTYPE(void smp_schedule_stop_proc, (struct proc * p));
|
||||
void smp_schedule_stop_proc(struct proc * p);
|
||||
/* stop a process on a different cpu because its adress space is being changed */
|
||||
_PROTOTYPE(void smp_schedule_vminhibit, (struct proc * p));
|
||||
void smp_schedule_vminhibit(struct proc * p);
|
||||
/* stop the process and for saving its full context */
|
||||
_PROTOTYPE(void smp_schedule_stop_proc_save_ctx, (struct proc * p));
|
||||
void smp_schedule_stop_proc_save_ctx(struct proc * p);
|
||||
/* migrate the full context of a process to the destination CPU */
|
||||
_PROTOTYPE(void smp_schedule_migrate_proc,
|
||||
(struct proc * p, unsigned dest_cpu));
|
||||
void smp_schedule_migrate_proc(struct proc * p, unsigned dest_cpu);
|
||||
|
||||
_PROTOTYPE(void arch_send_smp_schedule_ipi, (unsigned cpu));
|
||||
_PROTOTYPE(void arch_smp_halt_cpu, (void));
|
||||
void arch_send_smp_schedule_ipi(unsigned cpu);
|
||||
void arch_smp_halt_cpu(void);
|
||||
|
||||
/* deal with x-cpu scheduling event */
|
||||
_PROTOTYPE(void smp_sched_handler, (void));
|
||||
void smp_sched_handler(void);
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
||||
@@ -36,186 +36,186 @@
|
||||
#include "proto.h"
|
||||
#include "proc.h"
|
||||
|
||||
_PROTOTYPE( int do_exec, (struct proc * caller, message *m_ptr) );
|
||||
int do_exec(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_EXEC
|
||||
#define do_exec NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_fork, (struct proc * caller, message *m_ptr) );
|
||||
int do_fork(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_FORK
|
||||
#define do_fork NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_newmap, (struct proc * caller, message *m_ptr) );
|
||||
int do_newmap(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_NEWMAP
|
||||
#define do_newmap NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_clear, (struct proc * caller, message *m_ptr) );
|
||||
int do_clear(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_CLEAR
|
||||
#define do_clear NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_trace, (struct proc * caller, message *m_ptr) );
|
||||
int do_trace(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_TRACE
|
||||
#define do_trace NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_runctl, (struct proc * caller, message *m_ptr) );
|
||||
int do_runctl(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_RUNCTL
|
||||
#define do_runctl NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_update, (struct proc * caller, message *m_ptr) );
|
||||
int do_update(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_UPDATE
|
||||
#define do_update NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_exit, (struct proc * caller, message *m_ptr) );
|
||||
int do_exit(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_EXIT
|
||||
#define do_exit NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_copy, (struct proc * caller, message *m_ptr) );
|
||||
int do_copy(struct proc * caller, message *m_ptr);
|
||||
#define do_vircopy do_copy
|
||||
#if ! (USE_VIRCOPY || USE_PHYSCOPY)
|
||||
#define do_copy NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_umap, (struct proc * caller, message *m_ptr) );
|
||||
int do_umap(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_UMAP
|
||||
#define do_umap NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_umap_remote, (struct proc * caller, message *m_ptr) );
|
||||
int do_umap_remote(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_UMAP_REMOTE
|
||||
#define do_umap_remote NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_vumap, (struct proc * caller, message *m_ptr) );
|
||||
int do_vumap(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_VUMAP
|
||||
#define do_vumap NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_memset, (struct proc * caller, message *m_ptr) );
|
||||
int do_memset(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_MEMSET
|
||||
#define do_memset NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_abort, (struct proc * caller, message *m_ptr) );
|
||||
int do_abort(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_ABORT
|
||||
#define do_abort NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_getinfo, (struct proc * caller, message *m_ptr) );
|
||||
int do_getinfo(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_GETINFO
|
||||
#define do_getinfo NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_privctl, (struct proc * caller, message *m_ptr) );
|
||||
int do_privctl(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_PRIVCTL
|
||||
#define do_privctl NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_irqctl, (struct proc * caller, message *m_ptr) );
|
||||
int do_irqctl(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_IRQCTL
|
||||
#define do_irqctl NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_devio, (struct proc * caller, message *m_ptr) );
|
||||
int do_devio(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_DEVIO
|
||||
#define do_devio NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_vdevio, (struct proc * caller, message *m_ptr) );
|
||||
int do_vdevio(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_VDEVIO
|
||||
#define do_vdevio NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_int86, (struct proc * caller, message *m_ptr) );
|
||||
int do_int86(struct proc * caller, message *m_ptr);
|
||||
|
||||
_PROTOTYPE( int do_sdevio, (struct proc * caller, message *m_ptr) );
|
||||
int do_sdevio(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_SDEVIO
|
||||
#define do_sdevio NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_kill, (struct proc * caller, message *m_ptr) );
|
||||
int do_kill(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_KILL
|
||||
#define do_kill NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_getksig, (struct proc * caller, message *m_ptr) );
|
||||
int do_getksig(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_GETKSIG
|
||||
#define do_getksig NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_endksig, (struct proc * caller, message *m_ptr) );
|
||||
int do_endksig(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_ENDKSIG
|
||||
#define do_endksig NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_sigsend, (struct proc * caller, message *m_ptr) );
|
||||
int do_sigsend(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_SIGSEND
|
||||
#define do_sigsend NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_sigreturn, (struct proc * caller, message *m_ptr) );
|
||||
int do_sigreturn(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_SIGRETURN
|
||||
#define do_sigreturn NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_times, (struct proc * caller, message *m_ptr) );
|
||||
int do_times(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_TIMES
|
||||
#define do_times NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_setalarm, (struct proc * caller, message *m_ptr) );
|
||||
int do_setalarm(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_SETALARM
|
||||
#define do_setalarm NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_stime, (struct proc * caller, message *m_ptr) );
|
||||
int do_stime(struct proc * caller, message *m_ptr);
|
||||
|
||||
_PROTOTYPE( int do_vtimer, (struct proc * caller, message *m_ptr) );
|
||||
int do_vtimer(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_VTIMER
|
||||
#define do_vtimer NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_safecopy_to, (struct proc * caller, message *m_ptr) );
|
||||
_PROTOTYPE( int do_safecopy_from, (struct proc * caller, message *m_ptr) );
|
||||
_PROTOTYPE( int do_vsafecopy, (struct proc * caller, message *m_ptr) );
|
||||
_PROTOTYPE( int do_iopenable, (struct proc * caller, message *m_ptr) );
|
||||
_PROTOTYPE( int do_vmctl, (struct proc * caller, message *m_ptr) );
|
||||
_PROTOTYPE( int do_setgrant, (struct proc * caller, message *m_ptr) );
|
||||
_PROTOTYPE( int do_readbios, (struct proc * caller, message *m_ptr) );
|
||||
int do_safecopy_to(struct proc * caller, message *m_ptr);
|
||||
int do_safecopy_from(struct proc * caller, message *m_ptr);
|
||||
int do_vsafecopy(struct proc * caller, message *m_ptr);
|
||||
int do_iopenable(struct proc * caller, message *m_ptr);
|
||||
int do_vmctl(struct proc * caller, message *m_ptr);
|
||||
int do_setgrant(struct proc * caller, message *m_ptr);
|
||||
int do_readbios(struct proc * caller, message *m_ptr);
|
||||
|
||||
_PROTOTYPE( int do_safemap, (struct proc * caller, message *m_ptr) );
|
||||
_PROTOTYPE( int do_saferevmap, (struct proc * caller, message *m_ptr) );
|
||||
_PROTOTYPE( int do_safeunmap, (struct proc * caller, message *m_ptr) );
|
||||
int do_safemap(struct proc * caller, message *m_ptr);
|
||||
int do_saferevmap(struct proc * caller, message *m_ptr);
|
||||
int do_safeunmap(struct proc * caller, message *m_ptr);
|
||||
|
||||
_PROTOTYPE( int do_sprofile, (struct proc * caller, message *m_ptr) );
|
||||
int do_sprofile(struct proc * caller, message *m_ptr);
|
||||
#if ! SPROFILE
|
||||
#define do_sprofile NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_cprofile, (struct proc * caller, message *m_ptr) );
|
||||
_PROTOTYPE( int do_profbuf, (struct proc * caller, message *m_ptr) );
|
||||
int do_cprofile(struct proc * caller, message *m_ptr);
|
||||
int do_profbuf(struct proc * caller, message *m_ptr);
|
||||
#if ! CPROFILE
|
||||
#define do_cprofile NULL
|
||||
#define do_profbuf NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_getmcontext, (struct proc * caller, message *m_ptr) );
|
||||
_PROTOTYPE( int do_setmcontext, (struct proc * caller, message *m_ptr) );
|
||||
int do_getmcontext(struct proc * caller, message *m_ptr);
|
||||
int do_setmcontext(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_MCONTEXT
|
||||
#define do_getmcontext NULL
|
||||
#define do_setmcontext NULL
|
||||
#endif
|
||||
|
||||
_PROTOTYPE( int do_schedule, (struct proc * caller, message *m_ptr) );
|
||||
_PROTOTYPE( int do_schedctl, (struct proc * caller, message *m_ptr) );
|
||||
int do_schedule(struct proc * caller, message *m_ptr);
|
||||
int do_schedctl(struct proc * caller, message *m_ptr);
|
||||
|
||||
_PROTOTYPE( int do_statectl, (struct proc * caller, message *m_ptr) );
|
||||
int do_statectl(struct proc * caller, message *m_ptr);
|
||||
#if ! USE_STATECTL
|
||||
#define do_statectl NULL
|
||||
#endif
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#if USE_IRQCTL
|
||||
|
||||
FORWARD _PROTOTYPE(int generic_handler, (irq_hook_t *hook));
|
||||
FORWARD int generic_handler(irq_hook_t *hook);
|
||||
|
||||
/*===========================================================================*
|
||||
* do_irqctl *
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#define PRIV_DEBUG 0
|
||||
|
||||
FORWARD _PROTOTYPE(int update_priv, (struct proc *rp, struct priv *priv));
|
||||
FORWARD int update_priv(struct proc *rp, struct priv *priv);
|
||||
|
||||
/*===========================================================================*
|
||||
* do_privctl *
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
|
||||
#define MEM_TOP 0xFFFFFFFFUL
|
||||
|
||||
FORWARD _PROTOTYPE(int safecopy, (struct proc *, endpoint_t, endpoint_t,
|
||||
cp_grant_id_t, int, int, size_t, vir_bytes, vir_bytes, int));
|
||||
FORWARD int safecopy(struct proc *, endpoint_t, endpoint_t,
|
||||
cp_grant_id_t, int, int, size_t, vir_bytes, vir_bytes, int);
|
||||
|
||||
#define HASGRANTTABLE(gr) \
|
||||
(priv(gr) && priv(gr)->s_grant_table)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#if USE_SETALARM
|
||||
|
||||
FORWARD _PROTOTYPE( void cause_alarm, (timer_t *tp) );
|
||||
FORWARD void cause_alarm(timer_t *tp);
|
||||
|
||||
/*===========================================================================*
|
||||
* do_setalarm *
|
||||
|
||||
@@ -19,14 +19,13 @@
|
||||
(RTS_ISSET(p, RTS_NO_PRIV) || RTS_ISSET(p, RTS_SIG_PENDING) \
|
||||
|| (RTS_ISSET(p, RTS_RECEIVING) && !RTS_ISSET(p, RTS_SENDING)))
|
||||
|
||||
FORWARD _PROTOTYPE(void adjust_proc_slot, (struct proc *rp,
|
||||
struct proc *from_rp));
|
||||
FORWARD _PROTOTYPE(void adjust_priv_slot, (struct priv *privp,
|
||||
struct priv *from_privp));
|
||||
FORWARD _PROTOTYPE(void swap_fpu_state, (struct proc *a_rp,
|
||||
struct proc *b_orig_rp, struct proc *b_copy_rp));
|
||||
FORWARD _PROTOTYPE(void swap_proc_slot_pointer, (struct proc **rpp,
|
||||
struct proc *src_rp, struct proc *dst_rp));
|
||||
FORWARD void adjust_proc_slot(struct proc *rp, struct proc *from_rp);
|
||||
FORWARD void adjust_priv_slot(struct priv *privp, struct priv
|
||||
*from_privp);
|
||||
FORWARD void swap_fpu_state(struct proc *a_rp, struct proc *b_orig_rp,
|
||||
struct proc *b_copy_rp);
|
||||
FORWARD void swap_proc_slot_pointer(struct proc **rpp, struct proc
|
||||
*src_rp, struct proc *dst_rp);
|
||||
|
||||
/*===========================================================================*
|
||||
* do_update *
|
||||
|
||||
Reference in New Issue
Block a user