Thread (8 messages) flat view 8 messages, 3 authors, 2008-07-25

Re: can't boot mpc5200, powerpc: Enable AT_BASE_PLATFORM aux vector

From: Jon Smirl <hidden>
Date: 2008-07-25 22:51:26

On 7/25/08, Jon Smirl [off-list ref] wrote:
On 7/25/08, Benjamin Herrenschmidt [off-list ref] wrote:
 > On Fri, 2008-07-25 at 17:00 -0500, Nathan Lynch wrote:
 >  > Jon Smirl wrote:
 >  > > I've lost my ability to boot on the mpc5200. Reverting this patch fixes it.
 >  >
 >  > How does it fail?
 >  >
 >  >
 >  > > @@ -1652,6 +1655,14 @@ struct cpu_spec * __init identify_cpu(unsigned
 >  > > long offset, unsigned int pvr)
 >  > >                     } else
 >  > >                             *t = *s;
 >  > >                     *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
 >  > > +
 >  > > +                   /*
 >  > > +                    * Set the base platform string once; assumes
 >  > > +                    * we're called with real pvr first.
 >  > > +                    */
 >  > > +                   if (powerpc_base_platform == NULL)
 >  > > +                           powerpc_base_platform = t->platform;
 >  > > +
 >  >
 >  > Hmm, maybe this needs RELOC/PTRRELOC tricks?
 >
 >
 > Hrm... indeed.
 >
 >  if (RELOC(powerpc_base_platform))
 >         RELOC(powerpc_base_platform) = t->platform;
This boots:

#define RELOC(x)        (*PTRRELOC(&(x)))
			if (RELOC(powerpc_base_platform))
			       RELOC(powerpc_base_platform) = t->platform;


It completely fails booting, no console or anything.

 Where is RELOC defined, prom_init.c?

 #ifdef CONFIG_PPC64
 #define RELOC(x)        (*PTRRELOC(&(x)))
 #define ADDR(x)         (u32) add_reloc_offset((unsigned long)(x))
 #define OF_WORKAROUNDS  0
 #else
 #define RELOC(x)        (x)
 #define ADDR(x)         (u32) (x)
 #define OF_WORKAROUNDS  of_workarounds
 int of_workarounds;
 #endif



 >
 >  try that.
 >
 >  Ben.
quoted
 >
 >


 --
 Jon Smirl
 jonsmirl@gmail.com

-- 
Jon Smirl
jonsmirl@gmail.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help