From: Albert Herranz <albert_herranz@yahoo•es>
To: Segher Boessenkool <segher@kernel•crashing.org>
Cc: linuxppc-dev@lists•ozlabs.org
Subject: Re: [RFC PATCH v4 2/2] powerpc: gamecube/wii: early debugging using usbgecko
Date: Fri, 04 Dec 2009 17:54:05 +0100 [thread overview]
Message-ID: <4B193EAD.2040303@yahoo.es> (raw)
In-Reply-To: <364F1867-9601-44FD-B140-EAA0FCC2C237@kernel.crashing.org>
Segher Boessenkool wrote:
>> +#ifdef CONFIG_PPC_EARLY_DEBUG_USBGECKO
>> +setup_usbgecko_bat:
>> + /* prepare a BAT for early io */
>> +#if defined(CONFIG_GAMECUBE)
>> + lis r8, 0x0c00
>> +#elif defined(CONFIG_WII)
>> + lis r8, 0x0d00
>> +#else
>> +#error Invalid platform for USB Gecko based early debugging.
>> +#endif
>
> A kernel with both CONFIG_WII and CONFIG_GAMECUBE works fine
> on either, right? If so, could you please switch the two #ifs?
> A dual-platform kernel will be used on a Wii much more likely
> than on a GC.
>
Nope, a GameCube kernel currently doesn't work on a Wii and the same the other way around.
But I can make that particular check a runtime check.
The idea would be to enclose that snippet in GAMECUBE_COMMON and check the PVR. If it is a Gekko (a fixed value) then we have a GameCube, otherwise we assume a Wii.
>> + /*
>> + * The virtual address used must match the virtual address
>> + * associated to the fixmap entry FIX_EARLY_DEBUG_BASE.
>> + */
>> + lis r11, 0xfffe /* top 128K */
>> + ori r8, r8, 0x002a /* uncached, guarded ,rw */
>> + ori r11, r11, 0x3 /* 128K */
>
> I think you should clear Vp since the BAT mapping can survive until
> after user space is started; it won't hurt to remove it either way.
> So 2 instead of 3. And put the meaning in the comment :-)
This BAT is re-setup again on MMU_init, way before starting userspace.
But I'll make it Vs=1, Vp=0 here too :)
>
> Looks fine otherwise.
>
Thanks.
>
> Segher
>
>
Cheers,
Albert
next prev parent reply other threads:[~2009-12-04 16:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-03 20:34 [RFC PATCH v4 0/2] rework of usbgecko-based early debug Albert Herranz
2009-12-03 20:34 ` [RFC PATCH v4 1/2] powerpc: reserve fixmap entries for " Albert Herranz
2009-12-11 22:15 ` Benjamin Herrenschmidt
2009-12-03 20:35 ` [RFC PATCH v4 2/2] powerpc: gamecube/wii: early debugging using usbgecko Albert Herranz
2009-12-04 12:04 ` Segher Boessenkool
2009-12-04 16:54 ` Albert Herranz [this message]
2009-12-04 19:56 ` Segher Boessenkool
2009-12-11 22:16 ` Benjamin Herrenschmidt
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=4B193EAD.2040303@yahoo.es \
--to=albert_herranz@yahoo$(echo .)es \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=segher@kernel$(echo .)crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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