Exemplo n.º 1
0
Arquivo: main.c Projeto: conmarap/dart
// Kernel entry point
void _main(struct multiboot *mboot_ptr, uint32_t initial_stack) {
    // Clear screen to get rid of boot messages.
    kclear();

    // Initialise all the ISRs and segmentation.
    init_dt();

    // Some print tests.
    kprintf("Boot successfull\n");
    int num = 36;
    printf("Integer \"num\" = %i.\n", num);
    printf("Initial kernel stack is: %i\n", initial_stack);

    // Test the interrupts.
    printf("Testing interrupts\n");
    test_interrupts();

    // Initialize interrupts.
    printf("Initializing Interrupts\n");
    init_interrupts();

    printf("The kernel has booted\n");

    // Start the timer.
    init_timer(50);

    for(;;) { }
}
Exemplo n.º 2
0
int vapi_main( void )
{
  test_registers();
  test_simple_io();
  test_interrupts();
  test_external_clock();
  endshake();
  
  return 0;
}
Exemplo n.º 3
0
int main(void) {
  ac_bool error = AC_FALSE;

  initialize_intr_descriptor_table();

  error |= test_interrupts();

  if (!error) {
    ac_printf("OK\n");
  }

  return error;
}
Exemplo n.º 4
0
/*!
 * First kernel function (after grub loads it to memory)
 * \param magic	Multiboot magic number
 * \param addr	Address where multiboot structure is saved
 */
void k_startup ( unsigned long magic, unsigned long addr )
{
	extern console_t INITIAL_STDOUT; /* initial stdout */
	extern console_t STDOUT; /* default stdout for kernel */
	extern console_t STDOUT_PROG; /* default stdout for programs */

	/* set initial stdout */
	k_stdout = &INITIAL_STDOUT;
	k_stdout->init ( NULL );

	/* start with regular initialization */

	/* interrupts */
	arch_init_interrupts ();

	/* switch to default 'stdout' for kernel */
	//extern console_t dev_null;
	//k_stdout = &dev_null;
	k_stdout = &STDOUT;
	k_stdout->init( NULL );

	/* initialize 'stdout' for programs */
	u_stdout = &STDOUT_PROG;
	u_stdout->init ( NULL );

	kprint ( "%s\n", system_info );

	enable_interrupts ();

	/* "programs" - select programs to run */
	//početni program
	kprint ( "\nStarting program: hello_world\n\n" );
	hello_world ();
	//pozvana 3 vanjska prekida
	kprint ( "\nStarting interrupt tests\n\n" );
	test_interrupts ();

	kprint ( "System halted!" );
	halt();
}