Ejemplo n.º 1
0
void main(phys_addr_t m_start)
{
	// Record the address of the start of physical RAM.
	mem_start = m_start;

	call_initcalls(&_system_initcall_begin,
		       &_system_initcall_end);

	call_initcalls(&_early_initcall_begin,
		       &_early_initcall_end);

	print_str("PicardOS v0.1 booting...\n");

	call_initcalls(&_initcall_begin,
		       &_initcall_end);

	/*
	 * Fork user processes.
	 */
	up *current_up = (up *)&_up_begin;
	while (current_up != (up *)&_up_end) {
		_fork((unsigned int)current_up->u_fn,
		     current_up->s_size);
		current_up++;
	}
	_task_switch();
}
Ejemplo n.º 2
0
TEE_Result init_teecore(void)
{
	static int is_first = 1;

	/* (DEBUG) for inits at 1st TEE service: when UART is setup */
	if (!is_first)
		return TEE_SUCCESS;
	is_first = 0;

#ifdef CFG_WITH_USER_TA
	tee_svc_uref_base = CFG_TEE_LOAD_ADDR;
#endif

	/* init support for futur mapping of TAs */
	tee_mmu_kmap_init();
	teecore_init_pub_ram();

	/* time initialization */
	time_source_init();

	/* call pre-define initcall routines */
	call_initcalls();

	IMSG("teecore inits done");
	return TEE_SUCCESS;
}
Ejemplo n.º 3
0
/*
 * Note: this function is weak just to make it possible to exclude it from
 * the unpaged area.
 */
TEE_Result __weak init_teecore(void)
{
	static int is_first = 1;

	/* (DEBUG) for inits at 1st TEE service: when UART is setup */
	if (!is_first)
		return TEE_SUCCESS;
	is_first = 0;

#ifdef CFG_WITH_USER_TA
	tee_svc_uref_base = TEE_TEXT_VA_START;
#endif

	/* init support for future mapping of TAs */
	teecore_init_pub_ram();

	/* time initialization */
	time_source_init();

	/* call pre-define initcall routines */
	call_initcalls();

	IMSG("Initialized");
	return TEE_SUCCESS;
}