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

Laurent Vivier posted 2 patches 4 years, 3 months ago
Test asan failed
Test checkpatch failed
Test FreeBSD failed
Test docker-mingw@fedora failed
Test docker-clang@ubuntu failed
Test docker-quick@centos7 failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191219201439.84804-1-laurent@vivier.eu
Maintainers: Laurent Vivier <laurent@vivier.eu>
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(-)
[PATCH 0/2] q800: fix and improve RTC/PRAM interface
Posted by Laurent Vivier 4 years, 3 months ago
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(-)

-- 
2.24.1