| 210 |
slavio_set_power_fail(slavio_misc, 1); |
slavio_set_power_fail(slavio_misc, 1); |
| 211 |
} |
} |
| 212 |
|
|
| 213 |
|
static void main_cpu_reset(void *opaque) |
| 214 |
|
{ |
| 215 |
|
CPUState *env = opaque; |
| 216 |
|
cpu_reset(env); |
| 217 |
|
} |
| 218 |
|
|
| 219 |
/* Sun4m hardware initialisation */ |
/* Sun4m hardware initialisation */ |
| 220 |
static void sun4m_init(int ram_size, int vga_ram_size, int boot_device, |
static void sun4m_init(int ram_size, int vga_ram_size, int boot_device, |
| 221 |
DisplayState *ds, const char **fd_filename, int snapshot, |
DisplayState *ds, const char **fd_filename, int snapshot, |
| 222 |
const char *kernel_filename, const char *kernel_cmdline, |
const char *kernel_filename, const char *kernel_cmdline, |
| 223 |
const char *initrd_filename) |
const char *initrd_filename) |
| 224 |
{ |
{ |
| 225 |
|
CPUState *env; |
| 226 |
char buf[1024]; |
char buf[1024]; |
| 227 |
int ret, linux_boot; |
int ret, linux_boot; |
| 228 |
unsigned int i; |
unsigned int i; |
| 230 |
|
|
| 231 |
linux_boot = (kernel_filename != NULL); |
linux_boot = (kernel_filename != NULL); |
| 232 |
|
|
| 233 |
|
env = cpu_init(); |
| 234 |
|
register_savevm("cpu", 0, 3, cpu_save, cpu_load, env); |
| 235 |
|
qemu_register_reset(main_cpu_reset, env); |
| 236 |
|
|
| 237 |
/* allocate RAM */ |
/* allocate RAM */ |
| 238 |
cpu_register_physical_memory(0, ram_size, 0); |
cpu_register_physical_memory(0, ram_size, 0); |
| 239 |
|
|