qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] b2619c: q800: fix mac_via RTC PRAM commands


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] b2619c: q800: fix mac_via RTC PRAM commands
Date: Tue, 07 Jan 2020 10:00:14 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: b2619c158ab5ab71990de9d514c4e36e178d4fc6
      
https://github.com/qemu/qemu/commit/b2619c158ab5ab71990de9d514c4e36e178d4fc6
  Author: Laurent Vivier <address@hidden>
  Date:   2020-01-07 (Tue, 07 Jan 2020)

  Changed paths:
    M hw/misc/mac_via.c
    M hw/misc/trace-events

  Log Message:
  -----------
  q800: fix mac_via RTC PRAM commands

The command byte is not decoded correctly.

This patch reworks the RTC/PRAM interface and fixes the problem.
It adds a comment before the function to explain how are encoded commands
and some trace-events to ease debugging.

Bug: https://bugs.launchpad.net/qemu/+bug/1856549
Fixes: 6dca62a000 ("hw/m68k: add VIA support")
Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: Mark Cave-Ayland <address@hidden>
Message-Id: <address@hidden>


  Commit: eb064db94ccd62f054019f41fb8be3f268463a13
      
https://github.com/qemu/qemu/commit/eb064db94ccd62f054019f41fb8be3f268463a13
  Author: Laurent Vivier <address@hidden>
  Date:   2020-01-07 (Tue, 07 Jan 2020)

  Changed paths:
    M hw/m68k/q800.c
    M hw/misc/mac_via.c
    M include/hw/misc/mac_via.h

  Log Message:
  -----------
  q800: add a block backend to the PRAM

This allows to save and restore the content of the PRAM.
It may be useful if we want to check the configuration or to change it.

The backend is added using mtd interface, for instance:

    ... -drive file=pram.img,format=raw,if=mtd ...

where pram.img is the file where the data will be stored, its size must
be 256 bytes.

Signed-off-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>


  Commit: e24e58e8acdee80ecd5ee8279d56df53b0232a26
      
https://github.com/qemu/qemu/commit/e24e58e8acdee80ecd5ee8279d56df53b0232a26
  Author: Jason A. Donenfeld <address@hidden>
  Date:   2020-01-07 (Tue, 07 Jan 2020)

  Changed paths:
    M hw/m68k/q800.c

  Log Message:
  -----------
  q800: implement mac rom reset function for BIOS-less mode

On Linux, calling `reboot(RB_AUTOBOOT);` will result in
arch/m68k/mac/misc.c's mac_reset function being called. That in turn
looks at the rombase (or uses 0x40800000 is there's no rombase), adds
0xa, and jumps to that address. At the moment, there's nothing there, so
the kernel just crashes when trying to reboot. So, this commit adds a
very simple implementation at that location, which just writes to via2
to power down. We also correct the value of ROMBASE while we're at it.

Signed-off-by: Jason A. Donenfeld <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 18b6102e51bb317d25ee61b49b7b56702b79560c
      
https://github.com/qemu/qemu/commit/18b6102e51bb317d25ee61b49b7b56702b79560c
  Author: Laurent Vivier <address@hidden>
  Date:   2020-01-07 (Tue, 07 Jan 2020)

  Changed paths:
    M target/m68k/cpu.c
    M target/m68k/cpu.h
    M target/m68k/helper.c

  Log Message:
  -----------
  target/m68k: only change valid bits in CACR

This is used by netBSD (and MacOS ROM) to detect the MMU type

Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
[lv: add a comment before m680x0_cpu_common()]
Signed-off-by: Laurent Vivier <address@hidden>


  Commit: 035eed4c0d257c905a556fa0f4865a0c077b4e7f
      
https://github.com/qemu/qemu/commit/035eed4c0d257c905a556fa0f4865a0c077b4e7f
  Author: Peter Maydell <address@hidden>
  Date:   2020-01-07 (Tue, 07 Jan 2020)

  Changed paths:
    M hw/m68k/q800.c
    M hw/misc/mac_via.c
    M hw/misc/trace-events
    M include/hw/misc/mac_via.h
    M target/m68k/cpu.c
    M target/m68k/cpu.h
    M target/m68k/helper.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/vivier/tags/q800-for-5.0-pull-request' 
into staging

m68k: fix CACR valid bits
q800: add a fake mac rom reset (used by linux)
      fix and improve PRAM emulation

# gpg: Signature made Tue 07 Jan 2020 13:25:50 GMT
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "address@hidden"
# gpg: Good signature from "Laurent Vivier <address@hidden>" [full]
# gpg:                 aka "Laurent Vivier <address@hidden>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <address@hidden>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier/tags/q800-for-5.0-pull-request:
  target/m68k: only change valid bits in CACR
  q800: implement mac rom reset function for BIOS-less mode
  q800: add a block backend to the PRAM
  q800: fix mac_via RTC PRAM commands

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/973d306dd64b...035eed4c0d25



reply via email to

[Prev in Thread] Current Thread [Next in Thread]