void restart() { /* Perform some initialization to restart a program */ #ifdef USE_RAMDISK /* Read the file with name `argv[1]' into ramdisk. */ init_ramdisk(); #endif /* Read the entry code into memory. */ load_entry(); /* Set the initial instruction pointer. */ cpu.eip = ENTRY_START; cpu.ebp = 0; cpu.esp = 0x80000000; cpu.eflags_cf = false; cpu.eflags_pf = false; cpu.eflags_zf = false; cpu.eflags_sf = false; cpu.eflags_if = false; cpu.eflags_df = false; cpu.eflags_of = false; /* Initialize DRAM. */ init_ddr3(); }
void restart() { /* Perform some initialization to restart a program */ #ifdef USE_RAMDISK /* Read the file with name `argv[1]' into ramdisk. */ init_ramdisk(); #endif /* Read the entry code into memory. */ load_entry(); /* Set the initial instruction pointer. */ cpu.eip = ENTRY_START; /* Set the initial flag register */ cpu.EFLAGS.val = 0x00000002; /* Initialize DRAM. */ init_ddr3(); }