Skip to content

hw/misc/tmp105: Correct temperature limit check logic

Peter Maydell qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2hw/misc/tmp105: reset the T_low and T_High registershw/misc/tmp105.c+3 -01 reply
2/2tmp105: Correct handling of temperature limit checkshw/misc/tmp105.c hw/misc/tmp105.h+68 -91 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchCédric Le Goater
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] hw/misc/tmp105: Correct temperature limit check logic

This patchseries fixes bug https://bugs.launchpad.net/qemu/+bug/1734474
which is a regression between QEMU 1.3.0 and 1.4.0 of ability to boot a guest image on the n800 machine. The regression was introduced by commit cb5ef3fa1871522a08, which fixed a logic error in the tmp105 device's handling of i2c writes. That commit is correct, but it exposed an underlying bug in the tmp105 implementation. Previously, we accidentallywrote 0 to the config register when this guest tried to write 0x36, which meant (among other things) that we left the device in "comparator mode" rather than putting it into "interrupt mode" as the guest wanted, and it turns out that our interrupt-mode logic was buggy, so we would signal an over-temperature interrupt immediately and continuously, and the guest would hang.

Patch 1 fixes a silly omission where we weren't setting the reset values for the T_high and T_low limit registers. Patch 2 fixes the interrupt mode limit checks.

With these two the n9800 image linked to in the bug report can boot properly again.

thanks
-- PMM

Peter Maydell (2):
hw/misc/tmp105: reset the T_low and T_High registers
tmp105: Correct handling of temperature limit checks

 hw/misc/tmp105.c | 73 ++++++++++++++++++++++++++++++++++++++++++------
 hw/misc/tmp105.h |  7 +++++
 2 files changed, 71 insertions(+), 9 deletions(-)
Signature · 1 line
2.20.1