Hi,
I have a problem, if I add a simple function to my kernel the computer reboot. But if I revome this function, he work fine.
The interrupts are disabled
functions probleme
Re:functions probleme
just....
I use gcc(version 2.95.3) for my kernel...
If I do:
main.c
asm("jmp start");
void start(void)
{
/* Initialise l'?cran */
init_screen();
/* Initialise le driver managment */
driver_init();
/* Enregistrer les drivers des disquettes */
init_floppy();
}
floppy.c
void detect_floppy(void)
{
}
void init_floppy(void)
{
detect_floppy(); <--- I add this function, the computer reboot
}
I use gcc(version 2.95.3) for my kernel...
If I do:
main.c
asm("jmp start");
void start(void)
{
/* Initialise l'?cran */
init_screen();
/* Initialise le driver managment */
driver_init();
/* Enregistrer les drivers des disquettes */
init_floppy();
}
floppy.c
void detect_floppy(void)
{
}
void init_floppy(void)
{
detect_floppy(); <--- I add this function, the computer reboot
}
Re:functions probleme
hmm that's strange...are you sure that you even are running your C kernel?
Re:functions probleme
__inline__ __volatile__ static HLT(){
__asm__ ("hlt\n\t" \
);
}
void start(void)
{
/* Initialise l'?cran */
init_screen();
/* Initialise le driver managment */
driver_init();
/* Enregistrer les drivers des disquettes */
init_floppy();
HLT();
}
__asm__ ("hlt\n\t" \
);
}
void start(void)
{
/* Initialise l'?cran */
init_screen();
/* Initialise le driver managment */
driver_init();
/* Enregistrer les drivers des disquettes */
init_floppy();
HLT();
}
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:functions probleme
what is the troublesome function ? if you declare anything before your "asm (jmp start)", your dead ...CyberMan wrote: Hi,
I have a problem, if I add a simple function to my kernel the computer reboot. But if I revome this function, he work fine.
The interrupts are disabled