Ejemplo n.º 1
0
void   
test_2(UNSIGNED argc, VOID *argv)
{
    STATUS              status;
    /* Access argc and argv just to avoid compilation warnings.  */
    status =  (STATUS) argc + (STATUS) argv;
        while(1) {
                if( send_flag )
                        ether_send();
        }
        
}
Ejemplo n.º 2
0
/*f c_mmio_model::write
 */
void c_mmio_model::write( unsigned int address, unsigned int data, int bytes )
{
    FILE * fp;

    switch (address & 0xff)
    {
    case 0:
        data &= 0xff;
        fp = fopen ("out.log", "a");
        fprintf (fp, "%c", data);
        fclose (fp);

        if ((data >= 32 && data < 127) || data == '\n')
            printf ("%c", (data & 0xff));
        else
            printf ("%2.2x", data);
        return;

    case 4:
        debug_level = data;
        return;

    case 8:
        gdb_trap(5);
        return;

    case 0x0c:
        printf ("Setting Timer ISR address to %x\n", data);
        //private_data->gip->set_interrupt_vector (0, data);
        return;
	
    case 0x10:
        private_data->gip->set_flags( data, 0xf0000001);
        return;

    case 0x14:
	printf ("*** HISTORICAL\n");
        gdb_trap(5);
        return;

    case 0x20:
        //private_data->gip->set_interrupt_vector (1, data);
	return;

    case 0x24:
        //private_data->gip->set_kernel_sp (data);
	return;

    case 0x28:
	tty_out ((char)data);
	return;

    case 0x30:
	ether_byte ((unsigned char)data);
	return;

    case 0x34:
	ether_send ();
	return;
	
    case 0x2c:
        //private_data->gip->set_interrupt_vector (2, data);
	printf ("Setting up ISR for serial RX\n");
	return;
	
    case 0x100:
        private_data->gip->trace_restart();
        return;

    case 0x104:
        private_data->gip->trace_all_stop();
        return;
    }
}