Exemple #1
0
void hardwaremain(int ret_addr)
{
	struct sys_info *sysinfo = (CONFIG_DCACHE_RAM_BASE + CONFIG_DCACHE_RAM_SIZE - CONFIG_DCACHE_RAM_GLOBAL_VAR_SIZE); // in CACHE
        struct sys_info *sysinfox = ((CONFIG_RAMTOP) - CONFIG_DCACHE_RAM_GLOBAL_VAR_SIZE); // in RAM

	struct node_core_id id;

	id = get_node_core_id_x();

	//FIXME: for USBDEBUG you need to make sure dbg_info get assigned in AP
        print_debug("CODE IN CACHE ON NODE:"); print_debug_hex8(id.nodeid); print_debug("\n");

	train_ram(id.nodeid, sysinfo, sysinfox);

	/*
		go back, but can not use stack any more, because we only keep ret_addr and can not restore esp, and ebp
	*/

        __asm__ volatile (
                "movl  %0, %%edi\n\t"
                "jmp     *%%edi\n\t"
                :: "a"(ret_addr)
        );



}
void hardwaremain(int ret_addr)
{
	struct sys_info *sysinfo = &sysinfo_car; // in CACHE
        struct sys_info *sysinfox = ((CONFIG_RAMTOP) - sizeof(*sysinfox)); // in RAM

	struct node_core_id id;

	id = get_node_core_id_x();

        print_debug("CODE IN CACHE ON NODE:"); print_debug_hex8(id.nodeid); print_debug("\n");

	train_ram(id.nodeid, sysinfo, sysinfox);

	/*
		go back, but can not use stack any more, because we only keep ret_addr and can not restore esp, and ebp
	*/

        __asm__ volatile (
                "movl  %0, %%edi\n\t"
                "jmp     *%%edi\n\t"
                :: "a"(ret_addr)
        );



}
Exemple #3
0
void hardwaremain(int ret_addr)
{
	struct sys_info *sysinfo = (CONFIG_DCACHE_RAM_BASE +
			CONFIG_DCACHE_RAM_SIZE -
			CONFIG_DCACHE_RAM_GLOBAL_VAR_SIZE); // in CACHE
	struct sys_info *sysinfox = ((CONFIG_RAMTOP) -
			CONFIG_DCACHE_RAM_GLOBAL_VAR_SIZE); // in RAM

	struct node_core_id id;

	id = get_node_core_id_x();

        printk(BIOS_DEBUG, "CODE IN CACHE ON NODE: %02x\n", id.nodeid);

	train_ram(id.nodeid, sysinfo, sysinfox);

	/*
	 * go back, but can not use stack any more, because we
	 * only keep ret_addr and can not restore esp, and ebp.
	 */

        __asm__ volatile (
                "movl  %0, %%edi\n\t"
                "jmp     *%%edi\n\t"
                :: "a"(ret_addr)
        );
}