vt82c686: Fix SMBus IO base and configuration registers
commit911629e6d3773a8adeab48b488fadece0d7996b1
authorBALATON Zoltan <balaton@eik.bme.hu>
Sat, 9 Jan 2021 20:16:36 +0000 (9 21:16 +0100)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sun, 21 Feb 2021 18:42:34 +0000 (21 19:42 +0100)
tree94fabff306f891206de1cfb57e8b30367140f857
parent94349bffda0ae13b4d7c9c042bd6c94fc6a5b9bf
vt82c686: Fix SMBus IO base and configuration registers

The base address of the SMBus io ports and its enabled status is set
by registers in the PCI config space but this was not correctly
emulated. Instead the SMBus registers were mapped on realize to the
base address set by a property to the address expected by fuloong2e
firmware.

Fix the base and config register handling to more closely model
hardware which allows to remove the property and allows the guest to
control this mapping. Do all this in reset instead of realize so it's
correctly updated on reset.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Message-Id: <f2ca2ad5f08ba8cee07afd9d67b4e75cda21db09.1610223397.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
hw/isa/vt82c686.c
hw/mips/fuloong2e.c