235 |
{ |
{ |
236 |
} |
} |
237 |
|
|
238 |
|
static void main_cpu_reset(void *opaque) |
239 |
|
{ |
240 |
|
CPUState *env = opaque; |
241 |
|
cpu_reset(env); |
242 |
|
} |
243 |
|
|
244 |
static const int ide_iobase[2] = { 0x1f0, 0x170 }; |
static const int ide_iobase[2] = { 0x1f0, 0x170 }; |
245 |
static const int ide_iobase2[2] = { 0x3f6, 0x376 }; |
static const int ide_iobase2[2] = { 0x3f6, 0x376 }; |
246 |
static const int ide_irq[2] = { 14, 15 }; |
static const int ide_irq[2] = { 14, 15 }; |
259 |
const char *kernel_filename, const char *kernel_cmdline, |
const char *kernel_filename, const char *kernel_cmdline, |
260 |
const char *initrd_filename) |
const char *initrd_filename) |
261 |
{ |
{ |
262 |
|
CPUState *env; |
263 |
char buf[1024]; |
char buf[1024]; |
264 |
m48t59_t *nvram; |
m48t59_t *nvram; |
265 |
int ret, linux_boot; |
int ret, linux_boot; |
269 |
|
|
270 |
linux_boot = (kernel_filename != NULL); |
linux_boot = (kernel_filename != NULL); |
271 |
|
|
272 |
|
env = cpu_init(); |
273 |
|
register_savevm("cpu", 0, 3, cpu_save, cpu_load, env); |
274 |
|
qemu_register_reset(main_cpu_reset, env); |
275 |
|
|
276 |
/* allocate RAM */ |
/* allocate RAM */ |
277 |
cpu_register_physical_memory(0, ram_size, 0); |
cpu_register_physical_memory(0, ram_size, 0); |
278 |
|
|