qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 4248b3: PPC: Allow Rc bit to be set on mtspr


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 4248b3: PPC: Allow Rc bit to be set on mtspr
Date: Thu, 12 Nov 2015 06:30:06 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 4248b336d3c1b74e343842c5b478b165d75f5ce8
      
https://github.com/qemu/qemu/commit/4248b336d3c1b74e343842c5b478b165d75f5ce8
  Author: Alexander Graf <address@hidden>
  Date:   2015-11-12 (Thu, 12 Nov 2015)

  Changed paths:
    M target-ppc/translate.c

  Log Message:
  -----------
  PPC: Allow Rc bit to be set on mtspr

According to the ISA setting the Rc bit on mtspr is undefined behavior.
Real 750 hardware simply ignores the bit and doesn't touch cr0 though.

Unfortunately, Mac OS 9 relies on this fact and executes a few mtspr
instructions (to set XER for example) with Rc set.

So let's handle the bit the same way hardware does and ignore it.

Signed-off-by: Alexander Graf <address@hidden>
Signed-off-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: 488661ee9dd300110a6612d52fe68e2bb3539a5f
      
https://github.com/qemu/qemu/commit/488661ee9dd300110a6612d52fe68e2bb3539a5f
  Author: Alexander Graf <address@hidden>
  Date:   2015-11-12 (Thu, 12 Nov 2015)

  Changed paths:
    M target-ppc/mem_helper.c

  Log Message:
  -----------
  PPC: Fix lswx bounds checks

The lswx instruction checks whether the desired string actually fits
into all defined registers. Unfortunately it does the calculation wrong,
resulting in illegal instruction traps for loads that really should fit.

Fix it up, making Mac OS happier.

Signed-off-by: Alexander Graf <address@hidden>
Signed-off-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: 72f1f97d4927f798167855fda7881b0e22756b20
      
https://github.com/qemu/qemu/commit/72f1f97d4927f798167855fda7881b0e22756b20
  Author: Alexander Graf <address@hidden>
  Date:   2015-11-12 (Thu, 12 Nov 2015)

  Changed paths:
    M hw/ppc/mac_newworld.c

  Log Message:
  -----------
  PPC: mac99: Always add USB controller

The mac99 machines always have a USB controller. Usually not having one around
doesn't hurt quite as much, but Mac OS 9 really really wants one or it crashes
on bootup.

So always add OHCI to make it happy.

Signed-off-by: Alexander Graf <address@hidden>
Signed-off-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: 6729aa40135bc96d69b5bf5e65a7d463ef7793e7
      
https://github.com/qemu/qemu/commit/6729aa40135bc96d69b5bf5e65a7d463ef7793e7
  Author: Mark Cave-Ayland <address@hidden>
  Date:   2015-11-12 (Thu, 12 Nov 2015)

  Changed paths:
    M hw/misc/macio/cuda.c

  Log Message:
  -----------
  cuda.c: fix CUDA ADB error packet format

According to MOL, ADB error packets should be of the form (type, status, cmd)
rather than just (type, status). This fixes ADB device detection under MacOS 9.

Signed-off-by: Mark Cave-Ayland <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: 4202e63c0432c72ba518dd882e99a794620d1665
      
https://github.com/qemu/qemu/commit/4202e63c0432c72ba518dd882e99a794620d1665
  Author: Mark Cave-Ayland <address@hidden>
  Date:   2015-11-12 (Thu, 12 Nov 2015)

  Changed paths:
    M hw/misc/macio/cuda.c

  Log Message:
  -----------
  cuda.c: fix CUDA_PACKET response packet format

According to comments in MOL, the response to a CUDA_PACKET should be one of
the following:

Reply: (CUDA_PACKET, status, cmd)
Error: (ERROR_PACKET, status, CUDA_PACKET, cmd)

Update cuda_receive_packet() accordingly to reflect this in order to make
MacOS 9 happy.

Signed-off-by: Mark Cave-Ayland <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: f1f46f74a9de7298977a3ed668e71843fa904c38
      
https://github.com/qemu/qemu/commit/f1f46f74a9de7298977a3ed668e71843fa904c38
  Author: Mark Cave-Ayland <address@hidden>
  Date:   2015-11-12 (Thu, 12 Nov 2015)

  Changed paths:
    M hw/misc/macio/cuda.c

  Log Message:
  -----------
  cuda.c: implement simple CUDA_GET_6805_ADDR command

This simply returns an empty response with no error status as implemented by
MOL to allow MacOS 9 boot to proceed further.

Signed-off-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: ce8d3b647b5acc2bec19602d9fac87d3da11ae77
      
https://github.com/qemu/qemu/commit/ce8d3b647b5acc2bec19602d9fac87d3da11ae77
  Author: Mark Cave-Ayland <address@hidden>
  Date:   2015-11-12 (Thu, 12 Nov 2015)

  Changed paths:
    M hw/misc/macio/cuda.c

  Log Message:
  -----------
  cuda.c: implement dummy IIC access commands

These are used by MacOS 9 on boot. Here we return an error except for 4-byte
commands which write to the IIC bus in a similar manner to MOL.

Signed-off-by: Mark Cave-Ayland <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: d271ae36dc1e292ae140f5bbf23e0fc1392dd325
      
https://github.com/qemu/qemu/commit/d271ae36dc1e292ae140f5bbf23e0fc1392dd325
  Author: Mark Cave-Ayland <address@hidden>
  Date:   2015-11-12 (Thu, 12 Nov 2015)

  Changed paths:
    M hw/misc/macio/cuda.c

  Log Message:
  -----------
  cuda.c: fix CUDA SR interrupt clearing

Make sure that we also clear the data and clock interrupts at the same time.

Signed-off-by: Mark Cave-Ayland <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: b5ac04103bc3b24042418df1a561096187165fd7
      
https://github.com/qemu/qemu/commit/b5ac04103bc3b24042418df1a561096187165fd7
  Author: Mark Cave-Ayland <address@hidden>
  Date:   2015-11-12 (Thu, 12 Nov 2015)

  Changed paths:
    M hw/misc/macio/cuda.c

  Log Message:
  -----------
  cuda.c: add defines for CUDA registers

Signed-off-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: eda14abbb804f8ed2cb903c99ad1852848fa2e42
      
https://github.com/qemu/qemu/commit/eda14abbb804f8ed2cb903c99ad1852848fa2e42
  Author: Mark Cave-Ayland <address@hidden>
  Date:   2015-11-12 (Thu, 12 Nov 2015)

  Changed paths:
    M hw/misc/macio/cuda.c

  Log Message:
  -----------
  cuda.c: refactor get_tb() so that the time can be passed in

This is in preparation for sharing the code between timers.

Signed-off-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: 0174adb611a22bcfeeb123851cf4874e6d922d06
      
https://github.com/qemu/qemu/commit/0174adb611a22bcfeeb123851cf4874e6d922d06
  Author: Mark Cave-Ayland <address@hidden>
  Date:   2015-11-12 (Thu, 12 Nov 2015)

  Changed paths:
    M hw/misc/macio/cuda.c

  Log Message:
  -----------
  cuda.c: rename get_counter() state variable from s to ti for consistency

Signed-off-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: a53cfdcca2834ec7e61fd955c4f24ac233c4ec16
      
https://github.com/qemu/qemu/commit/a53cfdcca2834ec7e61fd955c4f24ac233c4ec16
  Author: Mark Cave-Ayland <address@hidden>
  Date:   2015-11-12 (Thu, 12 Nov 2015)

  Changed paths:
    M hw/misc/macio/cuda.c

  Log Message:
  -----------
  cuda.c: fix T2 timer and enable its interrupt

Fix the counter loading logic and enable the T2 interrupt when the timer
expires. Otherwise MacOS 9 hangs on boot.

Signed-off-by: Mark Cave-Ayland <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: cffc331a3156870d54883bc79e4278472ffd8f1d
      
https://github.com/qemu/qemu/commit/cffc331a3156870d54883bc79e4278472ffd8f1d
  Author: Mark Cave-Ayland <address@hidden>
  Date:   2015-11-12 (Thu, 12 Nov 2015)

  Changed paths:
    M hw/misc/macio/cuda.c
    M hw/ppc/mac.h

  Log Message:
  -----------
  cuda.c: add delay to setting of SR_INT bit

MacOS 9 is racy when it comes to accessing the shift register. Fix this by
introducing a small delay between data accesses and raising the SR_INT
interrupt bit.

Signed-off-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: 0a9516c2d6711cb6760a726952bdbbe931fd045c
      
https://github.com/qemu/qemu/commit/0a9516c2d6711cb6760a726952bdbbe931fd045c
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2015-11-12 (Thu, 12 Nov 2015)

  Changed paths:
    M include/monitor/hmp-target.h
    M monitor.c
    M stubs/Makefile.objs
    A stubs/target-get-monitor-def.c
    M target-ppc/cpu-qom.h
    M target-ppc/monitor.c

  Log Message:
  -----------
  monitor/target-ppc: Define target_get_monitor_def

At the moment get_monitor_def() returns only registers from statically
defined monitor_defs array. However there is a lot of BOOK3S SPRs
which are not in the list and cannot be printed from the monitor.

This adds a new target platform hook - target_get_monitor_def().
The hook is called if a register was not found in the static
array returned by the target_monitor_defs() hook.

The hook is only defined for POWERPC, it returns registered
SPRs and fails on unregistered ones providing the user with information
on what is actually supported on the running CPU. The register value is
saved as uint64_t as it is the biggest supported register size;
target_ulong cannot be used because of the stub - it is in a "common"
code and cannot include "cpu.h", etc; this is also why the hook prototype
is redefined in the stub instead of being included from some header.

This replaces static descriptors for GPRs, FPRs, SRs with a helper which
looks for a value in a corresponding array in the CPUPPCState.
The immediate effect is that all 32 SRs can be printed now (instead of 16);
later this can be reused for VSX or TM registers.

This replaces callbacks for MSR and XER with static descriptors in
monitor_defs as they are stored in CPUPPCState.

While we are here, this adds "cr" as a synonym of "ccr".

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: df1ac44e9f0c1b1d775c65b6e86fbcac0be77930
      
https://github.com/qemu/qemu/commit/df1ac44e9f0c1b1d775c65b6e86fbcac0be77930
  Author: Peter Maydell <address@hidden>
  Date:   2015-11-12 (Thu, 12 Nov 2015)

  Changed paths:
    M hw/misc/macio/cuda.c
    M hw/ppc/mac.h
    M hw/ppc/mac_newworld.c
    M include/monitor/hmp-target.h
    M monitor.c
    M stubs/Makefile.objs
    A stubs/target-get-monitor-def.c
    M target-ppc/cpu-qom.h
    M target-ppc/mem_helper.c
    M target-ppc/monitor.c
    M target-ppc/translate.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/dgibson/tags/ppc-next-20151112' into 
staging

ppc patch queue -2015-11-12

Highlights:
   - A number of fixes for MacOS 9 compatibility based on the old MOL
     (Mac-On-Linux) code and a GSoC project.
   - Cleaner and more general way of handling register access from the
     monitor

# gpg: Signature made Thu 12 Nov 2015 04:33:26 GMT using RSA key ID 20D9B392
# gpg: Good signature from "David Gibson <address@hidden>"
# gpg:                 aka "David Gibson (Red Hat) <address@hidden>"
# gpg:                 aka "David Gibson (ozlabs.org) <address@hidden>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dgibson/tags/ppc-next-20151112:
  monitor/target-ppc: Define target_get_monitor_def
  cuda.c: add delay to setting of SR_INT bit
  cuda.c: fix T2 timer and enable its interrupt
  cuda.c: rename get_counter() state variable from s to ti for consistency
  cuda.c: refactor get_tb() so that the time can be passed in
  cuda.c: add defines for CUDA registers
  cuda.c: fix CUDA SR interrupt clearing
  cuda.c: implement dummy IIC access commands
  cuda.c: implement simple CUDA_GET_6805_ADDR command
  cuda.c: fix CUDA_PACKET response packet format
  cuda.c: fix CUDA ADB error packet format
  PPC: mac99: Always add USB controller
  PPC: Fix lswx bounds checks
  PPC: Allow Rc bit to be set on mtspr

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


Compare: https://github.com/qemu/qemu/compare/fd717e789010...df1ac44e9f0c

reply via email to

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