Main Page | Directories | File List | Globals

setup.c File Reference

#include <agnix/init.h>
#include <agnix/irq.h>
#include <agnix/faults.h>

Include dependency graph for setup.c:

Go to the source code of this file.

Functions

int irqs_init (void)
int timer_init (void)
int bios_init (void)
int __init i386_init (void)


Function Documentation

int bios_init void   ) 
 

Definition at line 18 of file bios.c.

References smbios_init().

Referenced by i386_init().

00019 {
00020     smbios_init();
00021 
00022     return 0;
00023 }

Here is the call graph for this function:

int __init i386_init void   ) 
 

Definition at line 22 of file setup.c.

References bios_init(), faults_init(), irqs_init(), and timer_init().

Referenced by start_kernel().

00023 {
00024     faults_init();     
00025     irqs_init();     
00026     timer_init();
00027     bios_init();
00028 
00029     return 0;
00030 }

Here is the call graph for this function:

int irqs_init void   ) 
 

Definition at line 144 of file irq.c.

References __asm__(), flags, IRQ_BUILD_NAME_16, irq_disabled, irq_info, irq_names, IRQ_syscall(), memset(), and set_interrupt_gate().

Referenced by i386_init().

00145 {
00146     int i;
00147     u32 flags;
00148     save_flags(flags); __cli();
00149 
00150     memset(irq_info, 0, 256 * sizeof(struct irq_s));
00151 
00152     for (i = 0; i < 256; i++) {
00153         INIT_LIST_HEAD(&irq_info[i].head);
00154         irq_disabled[i] = 0;
00155     }
00156 
00157     IRQ_BUILD_NAME_16(0);
00158     for (i = 0; i < 16; i++)
00159         set_interrupt_gate(32 + i, __KERNEL_CS, irq_names[i], 0);
00160 
00161     set_interrupt_gate(0x80, __KERNEL_CS, IRQ_syscall, 3);
00162 
00163     __asm__ __volatile__ ("lgdt %0" : "=m" (gdt_descr));
00164     __asm__ __volatile__ ("lidt %0" : "=m" (idt_descr));
00165     __asm__ __volatile__ ("pushfl ; andl $0xffffbfff, (%esp); popfl");
00166 
00167     restore_flags(flags);
00168 
00169     return 0;
00170 }

Here is the call graph for this function:

int timer_init void   ) 
 

Definition at line 66 of file timer.c.

References current_time, current_time_lock, install_irq(), irq_timer, and rtc_chip.

Referenced by i386_init().

00067 {
00068     spin_lock_init(&current_time_lock);
00069 
00070     rtc_ops(&rtc_chip)->gettime(&rtc_chip, &current_time);
00071     install_irq(0, &irq_timer);
00072 
00073     return 0;
00074 }

Here is the call graph for this function:

Dokumentacje wygenerowano programem Doxygen 1.4.2 dla projektu Agnix