linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Fredrik Noring <noring@nocrew.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Geoff Levand <geoff@infradead.org>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	"Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Re: Improvements for the PS3
Date: Fri, 20 Jul 2018 10:46:17 +0200	[thread overview]
Message-ID: <20180720084617.GF8962@localhost.localdomain> (raw)
In-Reply-To: <CAMuHMdXcbzDi07_AXUzwnzw39DYeoHpORk2aSn9W+jmBKeShOg@mail.gmail.com>

Hi Geert,

> > That would not work with kernel freezes unfortunately. Debugging those with
> > nondeterministicly invisible kernel prints would be painful, I believe.
> 
> Unfortunately AFAIK the PS3 doesn't have any other "synchronous" output we
> can use for debugging (like flashing the power LED).

Well, one can use lv1_panic to bisect the PowerPC boot process. It either
freezes, in which case the call to lv1_panic isn't reached, or it reboots.
This method yields 1 bit of information for every reflash and reboot, with
a procedure taking about 5 minutes per turn, so 12 bits/hour sustained. ;)

The prime advantage is that lv1_panic works everywhere, including the
earliest boot stages.

I've since learned about the PS3GELIC_UDBG option to broadcast UDP via the
Ethernet port, but I don't know how well it works or its limitations.

One useful option for debugging is to setup a very early graphical console,
more or less from head.S, before any kernel functions are invoked. I have a
simple proof of concept implemented for the PS2 here:

https://github.com/frno7/linux/blob/ps2-v4.17-n3/arch/mips/boot/compressed/dbg.c

This could be done for the PS3 as well. The OtherOS demo

http://mc.pp.se/ps3/oodemo.xhtml

by Marcus Comstedt in 2007 contains the essentials with MMU and hypervisor
initialisation for graphics. I discovered that a small patch is required to
make his demo work with modern GCC:

--- a/source/script.lds
+++ b/source/script.lds
@@ -50,6 +50,7 @@ SECTIONS
  .opd : {
       *(.opd)
       }
+ . = ALIGN(256);
  .got : {
       __toc_start = .;
       *(.got)

Fredrik

      reply	other threads:[~2018-07-20  8:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-14 16:49 Improvements for the PS3 Fredrik Noring
2018-07-18 22:40 ` Geoff Levand
2018-07-19  7:45   ` Geert Uytterhoeven
2018-07-19 15:15     ` Geoff Levand
2018-07-19 20:14     ` Fredrik Noring
2018-07-20  7:36       ` Geert Uytterhoeven
2018-07-20  8:46         ` Fredrik Noring [this message]

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=20180720084617.GF8962@localhost.localdomain \
    --to=noring@nocrew.org \
    --cc=geert@linux-m68k.org \
    --cc=geoff@infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=macro@linux-mips.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).