Skip to content

PPC: Mac99 emulation fixes

Alexander Graf qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5PPC: mac99: Fix core99 timer frequencyhw/misc/macio/macio.c+7 -20 replies
2/5PPC: mac_nvram: Remove unused functionshw/nvram/mac_nvram.c hw/ppc/mac.h+0 -250 replies
3/5PPC: mac_nvram: Allow 2 and 4 byte accesseshw/nvram/mac_nvram.c+32 -113 replies
4/5PPC: mac_nvram: Split NVRAM into OF and OSX partshw/nvram/mac_nvram.c+40 -30 replies
5/5PPC: mac99: Expose NVRAM linearlyhw/ppc/mac_newworld.c include/hw/ppc/ppc.h+5 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/5] PPC: Mac99 emulation fixes

While trying to get Mac OS X booting with our -M mac99 emulation I stumbled over a few issues that prevented it from doing so.

With these patches applied I still can't properly boot Mac OS X with -M mac99, but I get a lot further than before. The biggest issue that's left now is to properly fake Mac OS X into believing our timebase frequency. If I hack up the cuda timer I can successfully boot Mac OS X on mac99:

===========

hw/misc/macio/cuda.c +1 -1
index ff6051d..3d40534 100644
@@ -102,7 +102,7 @@
 #define CUDA_TIMER_TICKLE		0x24
 #define CUDA_COMBINED_FORMAT_IIC	0x25
 
-#define CUDA_TIMER_FREQ (4700000 / 6)
+#define CUDA_TIMER_FREQ ((4700000 / 6) / 64)
 #define CUDA_ADB_POLL_FREQ 50
 
 /* CUDA returns time_t's offset from Jan 1, 1904, not 1970 */

===========

Please bear in mind that this patch set depends on an OpenBIOS update.

Alexander Graf (5):
PPC: mac99: Fix core99 timer frequency
PPC: mac_nvram: Remove unused functions
PPC: mac_nvram: Allow 2 and 4 byte accesses
PPC: mac_nvram: Split NVRAM into OF and OSX parts
PPC: mac99: Expose NVRAM linearly

 hw/misc/macio/macio.c |   9 ++++-
 hw/nvram/mac_nvram.c  | 109 +++++++++++++++++++++++++++++++++-----------------
 hw/ppc/mac.h          |   2 -
 hw/ppc/mac_newworld.c |   7 ++--
 include/hw/ppc/ppc.h  |   1 +
 5 files changed, 84 insertions(+), 44 deletions(-)
Signature · 1 line
1.8.1.4