aspeed/fby35: Fix owner of the BMC RAM memory region
authorCédric Le Goater <clg@kaod.org>
Thu, 28 Jul 2022 06:15:52 +0000 (08:15 +0200)
committerCédric Le Goater <clg@kaod.org>
Mon, 1 Aug 2022 13:24:15 +0000 (15:24 +0200)
commit398c01da9c8c8af5db0b2b4b4888c2bd27218230
tree0e5031829e080623113dc25fc0dc431dbdb3f94a
parent3867c1c5fd8f509bd1deada6119cd0f28edeb9af
aspeed/fby35: Fix owner of the BMC RAM memory region

A MachineState object is used as a owner of the RAM region and this
asserts in memory_region_init_ram() when QEMU is built with
CONFIG_QOM_CAST_DEBUG :

    /* This will assert if owner is neither NULL nor a DeviceState.
     * We only want the owner here for the purposes of defining a
     * unique name for migration. TODO: Ideally we should implement
     * a naming scheme for Objects which are not DeviceStates, in
     * which case we can relax this restriction.
     */
    owner_dev = DEVICE(owner);

Use the BMC and BIC objects as the owners of their memory regions.

Cc: Peter Delevoryas <peter@pjd.dev>
Fixes: 778e14cc5cd5 ("aspeed: Add AST2600 (BMC) to fby35")
Reviewed-by: Peter Delevoryas <peter@pjd.dev>
Message-Id: <20220727102714.803041-3-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
hw/arm/fby35.c