linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* OF /chosen/initrd,* variables - patch, official?
@ 2007-08-21 11:12 Matt Sealey
  2007-08-21 11:21 ` Matt Sealey
  0 siblings, 1 reply; 11+ messages in thread
From: Matt Sealey @ 2007-08-21 11:12 UTC (permalink / raw)
  To: ppc-dev, linuxppc-embedded

Hi guys,

Just a query here, there was a patch for /chosen/initrd,start and initrd,end
variables gained from firmware or so, which allowed booting without getting
those values into r3/r4, does anyone know the maintainer/author of that
patch?

Also, what are the chances of pushing it for 2.6.23 or 2.6.24? I can imagine
it's fairly useful (at least it is to me)..

-- 
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OF /chosen/initrd,* variables - patch, official?
  2007-08-21 11:12 OF /chosen/initrd,* variables - patch, official? Matt Sealey
@ 2007-08-21 11:21 ` Matt Sealey
  2007-08-21 11:32   ` David Gibson
  0 siblings, 1 reply; 11+ messages in thread
From: Matt Sealey @ 2007-08-21 11:21 UTC (permalink / raw)
  To: ppc-dev, linuxppc-embedded

Damn, I should use patchwork more efficiently;

http://patchwork.ozlabs.org/linuxppc/patch?q=initrd&filter=none&id=12168

Does anyone have any suggestion on the best way to integrate this so that
it "just works" on OF platforms? It seems only to be usable way too late
in boot to work, this code would have to be called in boot/main.c which seems
relatively.. impossible to achieve.. or called in some specialised platform
init code..

I hacked up a patch initially before I saw Milton's work and did it all
in main.c (and did the same to mkvmlinuz..) and it seemed to work okay
there.

I'm really curious as to the status and usefulness of this here.. :(

-- 
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations

Matt Sealey wrote:
> Hi guys,
> 
> Just a query here, there was a patch for /chosen/initrd,start and initrd,end
> variables gained from firmware or so, which allowed booting without getting
> those values into r3/r4, does anyone know the maintainer/author of that
> patch?
> 
> Also, what are the chances of pushing it for 2.6.23 or 2.6.24? I can imagine
> it's fairly useful (at least it is to me)..
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OF /chosen/initrd,* variables - patch, official?
  2007-08-21 11:21 ` Matt Sealey
@ 2007-08-21 11:32   ` David Gibson
  2007-08-21 12:19     ` Linux 2.6.23.rc3 boot issues on XUPV2P Computer - Service
  2007-08-21 12:36     ` OF /chosen/initrd,* variables - patch, official? Matt Sealey
  0 siblings, 2 replies; 11+ messages in thread
From: David Gibson @ 2007-08-21 11:32 UTC (permalink / raw)
  To: Matt Sealey; +Cc: ppc-dev, linuxppc-embedded

On Tue, Aug 21, 2007 at 12:21:18PM +0100, Matt Sealey wrote:
> Damn, I should use patchwork more efficiently;
> 
> http://patchwork.ozlabs.org/linuxppc/patch?q=initrd&filter=none&id=12168
> 
> Does anyone have any suggestion on the best way to integrate this so that
> it "just works" on OF platforms? It seems only to be usable way too late
> in boot to work, this code would have to be called in boot/main.c which seems
> relatively.. impossible to achieve.. or called in some specialised platform
> init code..

It would have to be called from platform_init().  If called in main()
it would clobber any other platform-specific initialization of the
initrd parameters in loader_info.

> I hacked up a patch initially before I saw Milton's work and did it all
> in main.c (and did the same to mkvmlinuz..) and it seemed to work okay
> there.
> 
> I'm really curious as to the status and usefulness of this here.. :(
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Linux 2.6.23.rc3 boot issues  on XUPV2P
  2007-08-21 11:32   ` David Gibson
@ 2007-08-21 12:19     ` Computer - Service
  2007-08-21 12:52       ` Grant Likely
  2007-08-21 12:36     ` OF /chosen/initrd,* variables - patch, official? Matt Sealey
  1 sibling, 1 reply; 11+ messages in thread
From: Computer - Service @ 2007-08-21 12:19 UTC (permalink / raw)
  To: linuxppc-embedded

Hi all.

I try to port Linux 2.6 on my XUPV2P Board which is based on ML300.

It runs sometimes, but for the usual case it just doesn't.
My problem is the initialization.
I have no clue why I get different values almost every time.
This is a log from the same zImage.elf, which is just loaded certain 
times in the row:

loaded at:     00400000 005331A0
board data at: 0000000E 0000008A
relocated to:  00404084 00404100
zimage at:     00404EB9 00530A50
avail ram:     00534000 3B784800

Linux/PPC load: console=ttyS0,9600
Uncompressing Linux...done.
Now booting the kernel

loaded at:     00400000 005331A0
board data at: 00000000 0000007C
relocated to:  00404084 00404100
zimage at:     00404EB9 00530A50
avail ram:     00534000 7C9E2378

Linux/PPC load: console=ttyS0,9600
Uncompressing Linux...done.
Now booting the kernel

loaded at:     00400000 005331A0
board data at: 40000000 4000007C
relocated to:  00404084 00404100
zimage at:     00404EB9 00530A50
avail ram:     00534000 00000000

Linux/PPC load: console=ttyS0,9600
Uncompressing Linux...oops... out of memory
pause

loaded at:     00400000 005331A0
board data at: 00000001 0000007D
relocated to:  00404084 00404100
zimage at:     00404EB9 00530A50
avail ram:     00534000 9E23787C

Linux/PPC load: console=ttyS0,9600
Uncompressing Linux...done.
Now booting the kernel
[    0.000000] Linux version 2.6.23-rc3 (warkentin@iss2) (gcc version 
4.1.1) #1                                          Tue Aug 21 14:01:45 
CEST 2007
[    0.000000] Xilinx ML300 Reference System (Virtex-II Pro)
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA             0 ->   196608


and just if the "avial ram" is about 10000000 it boots.

Anyone some idea why it could happens?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OF /chosen/initrd,* variables - patch, official?
  2007-08-21 11:32   ` David Gibson
  2007-08-21 12:19     ` Linux 2.6.23.rc3 boot issues on XUPV2P Computer - Service
@ 2007-08-21 12:36     ` Matt Sealey
  2007-08-21 12:42       ` David Gibson
  1 sibling, 1 reply; 11+ messages in thread
From: Matt Sealey @ 2007-08-21 12:36 UTC (permalink / raw)
  To: Matt Sealey, ppc-dev, linuxppc-embedded

David Gibson wrote:
> On Tue, Aug 21, 2007 at 12:21:18PM +0100, Matt Sealey wrote:
>> Damn, I should use patchwork more efficiently;
>>
>> http://patchwork.ozlabs.org/linuxppc/patch?q=initrd&filter=none&id=12168
>>
>> Does anyone have any suggestion on the best way to integrate this so that
>> it "just works" on OF platforms? It seems only to be usable way too late
>> in boot to work, this code would have to be called in boot/main.c which seems
>> relatively.. impossible to achieve.. or called in some specialised platform
>> init code..
> 
> It would have to be called from platform_init().  If called in main()
> it would clobber any other platform-specific initialization of the
> initrd parameters in loader_info.

So just to get this straight.. platform_init would be the function called from
md.init or would be better at md.setup_arch?

My goal right now is get something for CHRP (Pegasos) and Efika and try not
to cause problems for anything else, but also really try not to clutter the
thing with config checks, platform checks etc.

-- 
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OF /chosen/initrd,* variables - patch, official?
  2007-08-21 12:36     ` OF /chosen/initrd,* variables - patch, official? Matt Sealey
@ 2007-08-21 12:42       ` David Gibson
  2007-08-21 12:58         ` Matt Sealey
  0 siblings, 1 reply; 11+ messages in thread
From: David Gibson @ 2007-08-21 12:42 UTC (permalink / raw)
  To: Matt Sealey; +Cc: ppc-dev, linuxppc-embedded

On Tue, Aug 21, 2007 at 01:36:49PM +0100, Matt Sealey wrote:
> David Gibson wrote:
> > On Tue, Aug 21, 2007 at 12:21:18PM +0100, Matt Sealey wrote:
> >> Damn, I should use patchwork more efficiently;
> >>
> >> http://patchwork.ozlabs.org/linuxppc/patch?q=initrd&filter=none&id=12168
> >>
> >> Does anyone have any suggestion on the best way to integrate this so that
> >> it "just works" on OF platforms? It seems only to be usable way too late
> >> in boot to work, this code would have to be called in boot/main.c which seems
> >> relatively.. impossible to achieve.. or called in some specialised platform
> >> init code..
> > 
> > It would have to be called from platform_init().  If called in main()
> > it would clobber any other platform-specific initialization of the
> > initrd parameters in loader_info.
> 
> So just to get this straight.. platform_init would be the function
> called from md.init or would be better at md.setup_arch?

Uh... no... this is in the bootwrapper, long before ppc_md even
exists.  platform_init() is called from arch/powerpc/boot/crt0.S,
immediately before main().

> My goal right now is get something for CHRP (Pegasos) and Efika and try not
> to cause problems for anything else, but also really try not to clutter the
> thing with config checks, platform checks etc.
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Linux 2.6.23.rc3 boot issues on XUPV2P
  2007-08-21 12:19     ` Linux 2.6.23.rc3 boot issues on XUPV2P Computer - Service
@ 2007-08-21 12:52       ` Grant Likely
  0 siblings, 0 replies; 11+ messages in thread
From: Grant Likely @ 2007-08-21 12:52 UTC (permalink / raw)
  To: Computer - Service; +Cc: linuxppc-embedded

On 8/21/07, Computer - Service <computer-service@gmx.de> wrote:
> Hi all.
>
> I try to port Linux 2.6 on my XUPV2P Board which is based on ML300.
>
> It runs sometimes, but for the usual case it just doesn't.
> My problem is the initialization.
> I have no clue why I get different values almost every time.
> This is a log from the same zImage.elf, which is just loaded certain
> times in the row:

Check that the Virtex support code in
arch/ppc/boot/simple/embed_config.c is getting compiled in (hint:
search for ML403).  If it's configured out, then your board info
structure won't get setup correctly.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OF /chosen/initrd,* variables - patch, official?
  2007-08-21 12:42       ` David Gibson
@ 2007-08-21 12:58         ` Matt Sealey
  2007-08-21 13:54           ` David Gibson
  0 siblings, 1 reply; 11+ messages in thread
From: Matt Sealey @ 2007-08-21 12:58 UTC (permalink / raw)
  To: Matt Sealey, ppc-dev, linuxppc-embedded


David Gibson wrote:
> Uh... no... this is in the bootwrapper, long before ppc_md even
> exists.  platform_init() is called from arch/powerpc/boot/crt0.S,
> immediately before main().

Oh *THAT* platform init.

So I could just drop a

} else {
	dt_find_initrd();
}

.. at the end and nobody would be too disgusted or have any problems?

-- 
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OF /chosen/initrd,* variables - patch, official?
  2007-08-21 12:58         ` Matt Sealey
@ 2007-08-21 13:54           ` David Gibson
  2007-08-21 14:24             ` Matt Sealey
  0 siblings, 1 reply; 11+ messages in thread
From: David Gibson @ 2007-08-21 13:54 UTC (permalink / raw)
  To: Matt Sealey; +Cc: ppc-dev, linuxppc-embedded

On Tue, Aug 21, 2007 at 01:58:31PM +0100, Matt Sealey wrote:
> 
> David Gibson wrote:
> > Uh... no... this is in the bootwrapper, long before ppc_md even
> > exists.  platform_init() is called from arch/powerpc/boot/crt0.S,
> > immediately before main().
> 
> Oh *THAT* platform init.
> 
> So I could just drop a
> 
> } else {
> 	dt_find_initrd();
> }
> 
> .. at the end and nobody would be too disgusted or have any problems?

Err.. at the end of what?  Each platform has it's own version of
platform_init().


-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OF /chosen/initrd,* variables - patch, official?
  2007-08-21 13:54           ` David Gibson
@ 2007-08-21 14:24             ` Matt Sealey
  2007-08-22  1:44               ` David Gibson
  0 siblings, 1 reply; 11+ messages in thread
From: Matt Sealey @ 2007-08-21 14:24 UTC (permalink / raw)
  To: Matt Sealey, ppc-dev, linuxppc-embedded

David Gibson wrote:
> On Tue, Aug 21, 2007 at 01:58:31PM +0100, Matt Sealey wrote:
>> David Gibson wrote:
>>> Uh... no... this is in the bootwrapper, long before ppc_md even
>>> exists.  platform_init() is called from arch/powerpc/boot/crt0.S,
>>> immediately before main().
>> Oh *THAT* platform init.
>>
>> So I could just drop a
>>
>> } else {
>> 	dt_find_initrd();
>> }
>>
>> .. at the end and nobody would be too disgusted or have any problems?
> 
> Err.. at the end of what?  Each platform has it's own version of
> platform_init().

arch/powerpc/boot/of.c since it's not really relevant to me for non-OF
platforms?

-- 
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: OF /chosen/initrd,* variables - patch, official?
  2007-08-21 14:24             ` Matt Sealey
@ 2007-08-22  1:44               ` David Gibson
  0 siblings, 0 replies; 11+ messages in thread
From: David Gibson @ 2007-08-22  1:44 UTC (permalink / raw)
  To: Matt Sealey; +Cc: ppc-dev, linuxppc-embedded

On Tue, Aug 21, 2007 at 03:24:52PM +0100, Matt Sealey wrote:
> David Gibson wrote:
> > On Tue, Aug 21, 2007 at 01:58:31PM +0100, Matt Sealey wrote:
> >> David Gibson wrote:
> >>> Uh... no... this is in the bootwrapper, long before ppc_md even
> >>> exists.  platform_init() is called from arch/powerpc/boot/crt0.S,
> >>> immediately before main().
> >> Oh *THAT* platform init.
> >>
> >> So I could just drop a
> >>
> >> } else {
> >> 	dt_find_initrd();
> >> }
> >>
> >> .. at the end and nobody would be too disgusted or have any problems?
> > 
> > Err.. at the end of what?  Each platform has it's own version of
> > platform_init().
> 
> arch/powerpc/boot/of.c since it's not really relevant to me for non-OF
> platforms?

Err... it would have to be a somewhat strange OF implementation that
gives the linux,initrd-* properties sane values before entry...  I
doubt we want to do this for all real OF systems.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-08-22  1:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-21 11:12 OF /chosen/initrd,* variables - patch, official? Matt Sealey
2007-08-21 11:21 ` Matt Sealey
2007-08-21 11:32   ` David Gibson
2007-08-21 12:19     ` Linux 2.6.23.rc3 boot issues on XUPV2P Computer - Service
2007-08-21 12:52       ` Grant Likely
2007-08-21 12:36     ` OF /chosen/initrd,* variables - patch, official? Matt Sealey
2007-08-21 12:42       ` David Gibson
2007-08-21 12:58         ` Matt Sealey
2007-08-21 13:54           ` David Gibson
2007-08-21 14:24             ` Matt Sealey
2007-08-22  1:44               ` David Gibson

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).