This code should now build the x86_x64-softmmu part 2.
This commit is contained in:
@ -149,16 +149,30 @@ static void pc_machine_class_init(struct uc_struct *uc, ObjectClass *oc, void *d
|
||||
}
|
||||
|
||||
static const TypeInfo pc_machine_info = {
|
||||
.name = TYPE_PC_MACHINE,
|
||||
.parent = TYPE_MACHINE,
|
||||
.abstract = true,
|
||||
.instance_size = sizeof(PCMachineState),
|
||||
.instance_init = pc_machine_initfn,
|
||||
.class_size = sizeof(PCMachineClass),
|
||||
.class_init = pc_machine_class_init,
|
||||
.interfaces = (InterfaceInfo[]) {
|
||||
{ }
|
||||
},
|
||||
TYPE_PC_MACHINE,
|
||||
TYPE_MACHINE,
|
||||
|
||||
sizeof(PCMachineClass),
|
||||
sizeof(PCMachineState),
|
||||
NULL,
|
||||
|
||||
pc_machine_initfn,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
|
||||
pc_machine_class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
true,
|
||||
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
// should this be added somehow?
|
||||
//.interfaces = (InterfaceInfo[]) { { } },
|
||||
};
|
||||
|
||||
void pc_machine_register_types(struct uc_struct *uc)
|
||||
|
@ -46,19 +46,14 @@ static int pc_init_pci(struct uc_struct *uc, MachineState *machine)
|
||||
return pc_init1(uc, machine);
|
||||
}
|
||||
|
||||
#define PC_I440FX_MACHINE_OPTIONS \
|
||||
PC_DEFAULT_MACHINE_OPTIONS, \
|
||||
.family = "pc_piix"
|
||||
|
||||
#define PC_I440FX_2_2_MACHINE_OPTIONS \
|
||||
PC_I440FX_MACHINE_OPTIONS
|
||||
|
||||
static QEMUMachine pc_i440fx_machine_v2_2 = {
|
||||
PC_I440FX_2_2_MACHINE_OPTIONS,
|
||||
.name = "pc-i440fx-2.2",
|
||||
.init = pc_init_pci,
|
||||
.is_default = 1,
|
||||
.arch = UC_ARCH_X86, // X86
|
||||
"pc_piix",
|
||||
"pc-i440fx-2.2",
|
||||
pc_init_pci,
|
||||
NULL,
|
||||
255,
|
||||
1,
|
||||
UC_ARCH_X86, // X86
|
||||
};
|
||||
|
||||
static void pc_generic_machine_class_init(struct uc_struct *uc, ObjectClass *oc, void *data)
|
||||
|
@ -205,10 +205,20 @@ static void apic_class_init(struct uc_struct *uc, ObjectClass *klass, void *data
|
||||
}
|
||||
|
||||
static const TypeInfo apic_info = {
|
||||
.name = "apic",
|
||||
.instance_size = sizeof(APICCommonState),
|
||||
.parent = TYPE_APIC_COMMON,
|
||||
.class_init = apic_class_init,
|
||||
"apic",
|
||||
TYPE_APIC_COMMON,
|
||||
|
||||
0,
|
||||
sizeof(APICCommonState),
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
|
||||
apic_class_init,
|
||||
};
|
||||
|
||||
void apic_register_types(struct uc_struct *uc)
|
||||
|
@ -163,11 +163,13 @@ void apic_init_reset(struct uc_struct *uc, DeviceState *dev)
|
||||
|
||||
void apic_designate_bsp(struct uc_struct *uc, DeviceState *dev)
|
||||
{
|
||||
if (dev == NULL) {
|
||||
APICCommonState *s;
|
||||
|
||||
if (dev == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
APICCommonState *s = APIC_COMMON(uc, dev);
|
||||
s = APIC_COMMON(uc, dev);
|
||||
s->apicbase |= MSR_IA32_APICBASE_BSP;
|
||||
}
|
||||
|
||||
@ -245,12 +247,24 @@ static void apic_common_class_init(struct uc_struct *uc, ObjectClass *klass, voi
|
||||
}
|
||||
|
||||
static const TypeInfo apic_common_type = {
|
||||
.name = TYPE_APIC_COMMON,
|
||||
.parent = TYPE_DEVICE,
|
||||
.instance_size = sizeof(APICCommonState),
|
||||
.class_size = sizeof(APICCommonClass),
|
||||
.class_init = apic_common_class_init,
|
||||
.abstract = true,
|
||||
TYPE_APIC_COMMON,
|
||||
TYPE_DEVICE,
|
||||
|
||||
sizeof(APICCommonClass),
|
||||
sizeof(APICCommonState),
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
|
||||
apic_common_class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
true,
|
||||
};
|
||||
|
||||
void apic_common_register_types(struct uc_struct *uc)
|
||||
|
Reference in New Issue
Block a user