aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/aspeed.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/arm/aspeed.c')
-rw-r--r--hw/arm/aspeed.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index a167b73697..665d04fbf6 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -33,9 +33,14 @@ static struct arm_boot_info aspeed_board_binfo = {
};
struct AspeedMachineState {
+ /* Private */
+ MachineState parent_obj;
+ /* Public */
+
AspeedSoCState soc;
MemoryRegion ram_container;
MemoryRegion max_ram;
+ bool mmio_exec;
};
/* Palmetto hardware value: 0x120CE416 */
@@ -253,7 +258,7 @@ static void sdhci_attach_drive(SDHCIState *sdhci, DriveInfo *dinfo)
static void aspeed_machine_init(MachineState *machine)
{
- AspeedMachineState *bmc;
+ AspeedMachineState *bmc = ASPEED_MACHINE(machine);
AspeedMachineClass *amc = ASPEED_MACHINE_GET_CLASS(machine);
AspeedSoCClass *sc;
DriveInfo *drive0 = drive_get(IF_MTD, 0, 0);
@@ -261,8 +266,6 @@ static void aspeed_machine_init(MachineState *machine)
int i;
NICInfo *nd = &nd_table[0];
- bmc = g_new0(AspeedMachineState, 1);
-
memory_region_init(&bmc->ram_container, NULL, "aspeed-ram-container",
4 * GiB);
memory_region_add_subregion(&bmc->ram_container, 0, machine->ram);
@@ -751,7 +754,7 @@ static const TypeInfo aspeed_machine_types[] = {
}, {
.name = TYPE_ASPEED_MACHINE,
.parent = TYPE_MACHINE,
- .instance_size = sizeof(AspeedMachine),
+ .instance_size = sizeof(AspeedMachineState),
.instance_init = aspeed_machine_instance_init,
.class_size = sizeof(AspeedMachineClass),
.class_init = aspeed_machine_class_init,