mbox series

[0/2] q800: fix and improve RTC/PRAM interface

Message ID 20191219201439.84804-1-laurent@vivier.eu
Headers show
Series q800: fix and improve RTC/PRAM interface | expand

Message

Laurent Vivier Dec. 19, 2019, 8:14 p.m. UTC
A bug has been reported on launchpad about an error
reported by cc:

  qemu-4.2.0/hw/misc/mac_via.c:467:27: style: Expression is
  always false because 'else if' condition matches previous
  condition at line 463. [multiCondition]

  https://bugs.launchpad.net/qemu/+bug/1856549

In fact, the PRAM interface has not really been tested and
has several problems that needed to be fixed.

This series makes a cleanup in this part of code and
fix existing problems.

It also adds some trace-events that helped to debug the
numerous issues and a backend file to allow to save and
restore the content of the PRAM.

This has been tested by playing with the /dev/nvram interface
in the guest, checking we can read what we have written, and
we can read and write in the file on host and read and write
the same data in the guest /dev/nvram.

Laurent Vivier (2):
  q800: fix mac_via RTC PRAM commands
  q800: add a block backend to the PRAM

 hw/m68k/q800.c            |   6 +
 hw/misc/mac_via.c         | 339 ++++++++++++++++++++++++++++----------
 hw/misc/trace-events      |  19 +++
 include/hw/misc/mac_via.h |   3 +
 4 files changed, 284 insertions(+), 83 deletions(-)