qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Mac OS X PPC host support (was: [4932] Preliminary PPC6


From: malc
Subject: Re: [Qemu-devel] Mac OS X PPC host support (was: [4932] Preliminary PPC64/Linux host support)
Date: Wed, 30 Jul 2008 00:23:01 +0400 (MSD)

On Tue, 29 Jul 2008, Andreas F?rber wrote:


Am 27.07.2008 um 20:14 schrieb malc:

On Sat, 26 Jul 2008, Andreas F?rber wrote:


Am 26.07.2008 um 20:54 schrieb malc:

there are currently numbers hardcoded for Linux.
It's not just about numbers, last time i looked (cursory) the ABIs where
a lot different (PPC32 case) just changing the numbers wont get one very
far i think.

Of course not only, but it's one step that could be applied. The stack alignment is 16 Bytes for both, and the prolog in my ppc(32) branch seems to match the referenced Apple pseudocode now.

Where else do you have differences in mind? Which additional functions may need to be adjusted?

I'd have to check Darwins ABI to be sure, but here's the short list:

http://developer.apple.com/documentation/DeveloperTools/Conceptual/LowLevelABI/Articles/32bitPowerPC.html

a. Alignement of 64 bit arguments (in the register file)
  (This was the thing that confused Sparcs ASI helpers when i first
   tried to boot Sparc on, then new, PPC32 tcg)

What register file? Please be more detailed, I'm not intimate with TCG.

I meant this http://en.wikipedia.org/wiki/Register_file
But anyhow it is not aligned hence the ASI failure You saw earlier.

b. List of reserved registers

According to the Apple ppc ABI document, r2 is not system-reserved compared to SVR4 ppc ABI. The other general-purpose registers look similar (assuming we don't have nested functions), although Apple seems to have less strict prescriptions what to store where.

c. The approach to TOC (or however Apple calls the substitute)

Not sure what you mean. Pointers to concrete files and functions might help.

I have checked and MacOS X on PPC32 doesn't use those.


In any case, PPC32 + MacOS X i can help with. PPC64 + MacOS X not so much.

Restoring Mac OS X ppc(32) to work again would be just great.
PPC64 didn't work pre-TCG. We'll probably know where to poke ourselves once ppc is running.

I have made a stab at making it work and tried it on MacOS X (Tiger) that
i have here, for Sparc it progress a bit further but still meets it's doom
shortly:

qemu: fatal: Trap 0x29 while interrupts disabled, Error state
pc: ffd04020  npc: ffd04024
General Registers:
%g0: 00000000   %g1: 00000000   %g2: ffd908e0   %g3: ffd00000
%g4: ffd83038   %g5: 00000001   %g6: 00000000   %g7: 00000000
Current Register Window:
%o0: 00000000   %o1: 00000000   %o2: 00000000   %o3: 00000000
%o4: 00000000   %o5: 00000000   %o6: ffdd3fa0   %o7: 00000000
%l0: 00000000   %l1: 00000000   %l2: 00000000   %l3: 00000000
%l4: 00000000   %l5: 00000000   %l6: 00000000   %l7: 00000000
%i0: 00000000   %i1: 00000000   %i2: 00000000   %i3: 00000000
%i4: 00000000   %i5: 00000000   %i6: 00000000   %i7: 00000000

Floating Point Registers:
[all bit zero FPRs snipped]
psr: 0x04001fc0 -> ---- SP- wim: 0x00000001
fsr: 0x00080000

BlueSwirl, rings any bells?

I tried my best to hack it while in Mac OSX, but, honestly, i can not
stand that system and have no spare (quiet enough) machine to SSH into
it and do things remotely, sorry.

The code is available at:

http://repo.or.cz/w/qemu/malc.git?a=shortlog;h=refs/heads/tcgppc32macosx

--
mailto:address@hidden




reply via email to

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