コード例 #1
0
ファイル: system.c プロジェクト: carlobar/milkymist
__attribute__((noreturn)) void reboot()
{
	uart_force_sync(1); /* flush UART buffers */
	irq_setmask(0);
	irq_enable(0);
	CSR_SYSTEM_ID = 1; /* Writing to CSR_SYSTEM_ID causes a system reset */
	while(1);
}
コード例 #2
0
ファイル: boot.c プロジェクト: carlobar/milkymist
static void __attribute__((noreturn)) boot(unsigned int r1, unsigned int r2, unsigned int r3, unsigned int r4, unsigned int addr)
{
	vga_blank();
	uart_force_sync(1);
	irq_setmask(0);
	irq_enable(0);
	boot_helper(r1, r2, r3, r4, addr);
	while(1);
}
コード例 #3
0
/* main is from Milkymist bios. */
int port_main(int i, char **c)
{
        /* lock gdbstub ROM */
        CSR_DBG_CTRL = DBG_CTRL_GDB_ROM_LOCK;

        /* enable bus errors */
        CSR_DBG_CTRL = DBG_CTRL_BUS_ERR_EN;

        CSR_GPIO_OUT = GPIO_LED1;
        rescue = !((unsigned int)main > FLASH_OFFSET_REGULAR_BIOS);

        irq_setmask(0);
        irq_enable(1);
	time_init();
        uart_init();
//        vga_init(!(rescue || (CSR_GPIO_IN & GPIO_BTN2)));
        putsnonl(banner);
//        crcbios();
//        brd_init();
//        tmu_init(); /* < for hardware-accelerated scrolling */
//        usb_init();
//        ukb_init();

        if(rescue)
                printf("I: Booting in rescue mode\n");

//        splash_display();
//        ethreset(); /* < that pesky ethernet PHY needs two resets at times... */
//        print_mac();
//        boot_sequence();
//        vga_unblank();
//        vga_set_console(1);
    uart_force_sync(1);
while (1)  {
        putsnonl("\e[1mStarting CoreMark\e[0m\n");
        main();
	putsnonl("\e[1mCoreMark ended.\e[0m \n\n");
}
        return 0;
}
コード例 #4
0
ファイル: main.c プロジェクト: kiniou/milkymist-democompo
int main()
{
	irq_setmask(0);
	irq_enable(1);
	uart_async_init();
	uart_force_sync(1);
	banner();
	brd_init();
	time_init();
	mem_init();
	vga_init();
	snd_init();
	tmu_init();
	pfpu_init();

	music_start();
	while(1) {
		intro_csv();
		while(!(CSR_GPIO_IN & GPIO_DIP3));
	}
	
	return 0;
}