@@ -91,6 +91,7 @@ static void aspeed_init(MachineState *machine)
static void palmetto_bmc_init(MachineState *machine)
{
+ machine->cpu_model = "arm926";
aspeed_init(machine);
}
@@ -15,6 +15,7 @@
#include "qemu-common.h"
#include "cpu.h"
#include "exec/address-spaces.h"
+#include "hw/boards.h"
#include "hw/arm/ast2400.h"
#include "hw/char/serial.h"
#include "qemu/log.h"
@@ -67,7 +68,7 @@ static void ast2400_init(Object *obj)
{
AST2400State *s = AST2400(obj);
- s->cpu = cpu_arm_init("arm926");
+ s->cpu = cpu_arm_init(current_machine->cpu_model);
object_initialize(&s->vic, sizeof(s->vic), TYPE_ASPEED_VIC);
object_property_add_child(obj, "vic", OBJECT(&s->vic), NULL);
It will be easier to specify a different cpu for other soc derived from the ast2400 soc. Signed-off-by: Cédric Le Goater <clg@kaod.org> --- Change since v1: - remove check on cpu_model. hw/arm/aspeed.c | 1 + hw/arm/ast2400.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)