Ejemplo n.º 1
0
void bsp_libc_init(void)
{
    /*
     *  Init the RTEMS libio facility to provide UNIX-like system
     *  calls for use by newlib (ie: provide open, close, etc)
     *  Uses malloc() to get area for the iops, so must be after malloc init
     */
    if (rtems_libio_init_helper)
	(*rtems_libio_init_helper)();

    /*
     * Set up for the libc handling.
     */
    libc_init();
}
Ejemplo n.º 2
0
Archivo: init.c Proyecto: dtbinh/M2
void _start() {
    BoardEarlyInit();
    cpu_early_init();

    BoardConsoleInit();
    BoardConsolePuts("\n\n================\nuC-sdk - booting\n================\n");

    libc_init();

    BoardInit();
    cpu_init();

    BoardLateInit();
    cpu_late_init();

    exit(main(0, NULL, NULL));
}
Ejemplo n.º 3
0
void init_system()
{
    uint8_t cpuid = smp_processor_id();

    setup_vector();

    setup_httbr((uint32_t) &__HYP_PGTABLE);

    setup_mem_attr();

    if (cpuid == 0) {
        // TODO(wonseok) console init will be moved dev_init().
        console_init();

        libc_init();
    }

    irq_init();

    //enable_traps();

    if (cpuid == 0) {
        paging_create((addr_t) &__HYP_PGTABLE);

        platform_init();

        dev_init(); /* we don't have */

        vdev_init(); /* Already we have */

        timer_hw_init(NS_PL2_PTIMER_IRQ);

        setup_vm_mmap();

#ifdef CONFIG_SMP
        printf("wake up...other CPUs\n");
        secondary_smp_pen = 1;
#endif
    }
    printf("%s[%d]: CPU[%d]\n", __func__, __LINE__, cpuid);

    enable_mmu();

    start_hypervisor();
}
Ejemplo n.º 4
0
void bsp_libc_init(
  void *heap_begin,
  uintptr_t heap_size,
  size_t sbrk_amount
)
{
    RTEMS_Malloc_Initialize( heap_begin, heap_size, sbrk_amount );

    /*
     *  Init the RTEMS libio facility to provide UNIX-like system
     *  calls for use by newlib (ie: provide open, close, etc)
     *  Uses malloc() to get area for the iops, so must be after malloc init
     */
    if (rtems_libio_init_helper)
	(*rtems_libio_init_helper)();

    /*
     * Set up for the libc handling.
     */
    libc_init();
}