/* * usrmain() - start the monitor * * This function is called from from rom_entry. It initialises the * serial port (ASC0) and then starts the monitor program. * */ void usrmain(void) { #if (ASC0_PORT==0) gpio_port_config(0, 4, GPIO_MODE_OUT|GPIO_MODE_ALT2); gpio_port_config(0, 5, GPIO_MODE_IN); asc_init(ASC0, 1); #elif (ASC0_PORT==2) gpio_port_config(2, 4, GPIO_MODE_OUT|GPIO_MODE_ALT1); gpio_port_config(2, 5, GPIO_MODE_IN); asc_init(ASC0, 0); #endif ASC0->asc_tbuf = '\r'; /* kick out a character to start things rolling */ printf("qdf version 0.1, copyright 2001 David Haworth\n"); printf("qdf comes with ABSOLUTELY NO WARRANTY. It is free software,\n"); printf("and you are welcome to redistribute it under certain conditions.\n"); printf("Please read the file COPYING for details.\n"); for (;;) do_forth(&forth_env); }
/* * usrmain() - start the kernel * * This function is called from from rom_entry. It initialises the * serial port (ASC0) for kernel debug messages and then starts the * kernel program. * */ void usrmain(void) { #if (ASC0_PORT==0) gpio_port_config(0, 4, GPIO_MODE_OUT|GPIO_MODE_ALT2); gpio_port_config(0, 5, GPIO_MODE_IN); asc_init(ASC0, 1); #elif (ASC0_PORT==2) gpio_port_config(2, 4, GPIO_MODE_OUT|GPIO_MODE_ALT1); gpio_port_config(2, 5, GPIO_MODE_IN); asc_init(ASC0, 0); #endif ASC0->asc_tbuf = '\r'; /* kick out a character to start things rolling */ kprintf("davros version 0.1, copyright 2001 David Haworth\n"); kprintf("davros comes with ABSOLUTELY NO WARRANTY. It is free software,\n"); kprintf("and you are welcome to redistribute it under certain conditions.\n"); kprintf("Please read the file COPYING for details.\n"); __davros_init((memaddr_t)&__bss_end, (RAM_START+RAM_SIZE)); /* Never returns */ }
TEE_Result init_teecore(void) { static int is_first = 1; unsigned long a, s; /* (DEBUG) for inits at 1st TEE service: when UART is setup */ if (!is_first) return TEE_SUCCESS; is_first = 0; #ifndef WITH_UART_DRV /* UART tracing support */ asc_init(); IMSG("teecore: uart trace init"); #endif /* core malloc pool init */ #ifdef CFG_TEE_MALLOC_START a = CFG_TEE_MALLOC_START; s = CFG_TEE_MALLOC_SIZE; #else a = (unsigned long)&teecore_heap_start; s = (unsigned long)&teecore_heap_end; a = ((a + 1) & ~0x0FFFF) + 0x10000; /* 64kB aligned */ s = s & ~0x0FFFF; /* 64kB aligned */ s = s - a; #endif IMSG("teecore heap: paddr=0x%lX size=0x%lX (%ldkB)", a, s, s / 1024); malloc_init((void *)a, s); /* init support for futur mapping of TAs */ tee_mmu_kmap_init(); teecore_init_ta_ram(); teecore_init_pub_ram(); /* Libtomcrypt initialization */ tee_ltc_init(); /* time initialization */ time_source_init(); IMSG("teecore inits done"); return TEE_SUCCESS; }
int main(int argc, char *argv[]) { char *dir, root[512]; if (argc < 3) { printf("Usage: %s <dir> <ns>\n", basename(argv[0])); exit(-1); } dir = argv[1]; _ns = argv[2]; sprintf(root, "%s/%s", dirname(dir), basename(dir)); _offset = strlen(root) + 1; asc_init(&_as); watch_dir(root, fcreat); asc_exit(&_as); return 0; }
void console_init(void) { asc_init(); }