qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
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)	[thread overview]
Message-ID: <Pine.LNX.4.64.0807300016040.2830@linmac.oyster.ru> (raw)
In-Reply-To: <9ABED4D6-5AFB-44D4-A1F6-A86B5E139543@web.de>

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:av1474@comtv.ru

  reply	other threads:[~2008-07-29 20:23 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-23 19:17 [Qemu-devel] [4932] Preliminary PPC64/Linux host support malc
2008-07-24  6:01 ` René Rebe
2008-07-24 17:41   ` malc
2008-07-24 18:42     ` Andreas Färber
2008-07-25  8:41     ` René Rebe
2008-07-25 18:15       ` malc
2008-07-26 19:32         ` René Rebe
2008-07-27 18:17           ` malc
     [not found] ` <1964D914-95C1-4A3E-AE40-2DE082D40C24@hotmail.com>
2008-07-24 23:33   ` C.W. Betts
2008-07-25 18:18     ` malc
2008-07-26 13:08       ` Andreas Färber
     [not found]         ` <F41A287D-66CA-42E4-A191-CD5381987301@hotmail.com>
2008-07-26 17:36           ` C.W. Betts
2008-07-26 18:00             ` Andreas Färber
2008-07-26 18:54         ` malc
2008-07-26 20:42           ` Andreas Färber
2008-07-27 18:14             ` malc
2008-07-29 16:28               ` [Qemu-devel] Mac OS X PPC host support (was: [4932] Preliminary PPC64/Linux host support) Andreas Färber
2008-07-29 20:23                 ` malc [this message]
2008-07-30 18:45                   ` Blue Swirl
2008-07-31 17:15                     ` malc
2008-07-31 18:57                     ` malc
2008-07-31 21:50                       ` Andreas Färber
2008-08-01 18:52                         ` malc
2008-08-02 21:29                           ` Andreas Färber
2008-08-03 18:56                             ` malc
2008-08-02 16:35                         ` Andreas Färber
     [not found]                           ` <E3E8B39E-1924-465D-AA4A-9250D835C932@hotmail.com>
2008-08-02 19:43                             ` C.W. Betts
2008-07-26 13:39     ` [Qemu-devel] [4932] Preliminary PPC64/Linux host support Andreas Färber
     [not found]       ` <1D9DD99A-96CE-4570-B8EE-428CDBAE5FE3@hotmail.com>
2008-07-26 17:13         ` C.W. Betts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0807300016040.2830@linmac.oyster.ru \
    --to=av1474@comtv.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).