#include "hw/boards.h"
#include "monitor/monitor.h"
#include "hw/loader.h"
-#include "hw/virtio.h"
+#include "hw/virtio/virtio.h"
#include "hw/sysbus.h"
#include "sysemu/kvm.h"
#include "exec/address-spaces.h"
#endif
#define MAX_BLK_DEVS 10
+#define ZIPL_FILENAME "s390-zipl.rom"
static VirtIOS390Bus *s390_bus;
static S390CPU **ipi_states;
*/
static unsigned s390_running_cpus;
-void s390_add_running_cpu(CPUS390XState *env)
+void s390_add_running_cpu(S390CPU *cpu)
{
- if (env->halted) {
+ CPUState *cs = CPU(cpu);
+ CPUS390XState *env = &cpu->env;
+
+ if (cs->halted) {
s390_running_cpus++;
- env->halted = 0;
+ cs->halted = 0;
env->exception_index = -1;
}
}
-unsigned s390_del_running_cpu(CPUS390XState *env)
+unsigned s390_del_running_cpu(S390CPU *cpu)
{
- if (env->halted == 0) {
+ CPUState *cs = CPU(cpu);
+ CPUS390XState *env = &cpu->env;
+
+ if (cs->halted == 0) {
assert(s390_running_cpus >= 1);
s390_running_cpus--;
- env->halted = 1;
+ cs->halted = 1;
env->exception_index = EXCP_HLT;
}
return s390_running_cpus;
void s390_init_ipl_dev(const char *kernel_filename,
const char *kernel_cmdline,
- const char *initrd_filename)
+ const char *initrd_filename,
+ const char *firmware)
{
DeviceState *dev;
qdev_prop_set_string(dev, "initrd", initrd_filename);
}
qdev_prop_set_string(dev, "cmdline", kernel_cmdline);
+ qdev_prop_set_string(dev, "firmware", firmware);
qdev_init_nofail(dev);
}
for (i = 0; i < smp_cpus; i++) {
S390CPU *cpu;
+ CPUState *cs;
cpu = cpu_s390x_init(cpu_model);
+ cs = CPU(cpu);
ipi_states[i] = cpu;
- cpu->env.halted = 1;
+ cs->halted = 1;
cpu->env.exception_index = EXCP_HLT;
cpu->env.storage_keys = storage_keys;
}
}
my_ram_size = my_ram_size >> (20 + shift) << (20 + shift);
- /* lets propagate the changed ram size into the global variable. */
+ /* let's propagate the changed ram size into the global variable. */
ram_size = my_ram_size;
/* get a BUS */
s390_bus = s390_virtio_bus_init(&my_ram_size);
s390_sclp_init();
s390_init_ipl_dev(args->kernel_filename, args->kernel_cmdline,
- args->initrd_filename);
+ args->initrd_filename, ZIPL_FILENAME);
/* register hypercalls */
s390_virtio_register_hcalls();