* Still on kexec for SH4 architecture, please help
@ 2008-02-01 13:35 Matteo Pampolini
2008-02-04 4:29 ` Paul Mundt
0 siblings, 1 reply; 4+ messages in thread
From: Matteo Pampolini @ 2008-02-01 13:35 UTC (permalink / raw)
To: kexec
Hello there,
my name is Matteo and I'm writing from Italy. As you
can probably understand from the subject, I work with
Paolo Cortesi that recently asked for help on this
issue, unfortunately he has problems posting a
readable message, so here I am.
We are working on an SH4 architecture and we have to
need to replace our running kernel with a new one,
that's why we are using kexec, of course (BTW, a
stupid question: the new kernel will have all the RAM
available as the first one, am I right? No memory
pages are wasted during the transition, aren't they?).
We downloaded kexec-tools-testing-20071030 package, we
enabled kexec support in kernel, and launched:
./kexec --load --type=zImage-sh
--append="console=ttyAS1,115200" --empty-zero=84401000
zImage
./kexec -e
and the result is always an oops:
Starting new kernel
kexec information
segment[0]: 0x0c001000 - 0x0c002000 (0x00001000)
segment[1]: 0x0c210000 - 0x0c387000 (0x00177000)
start : 0x8c210000
illegal slot instruction: 01a0 [#1]
Pid : 92, Comm: kexec
PC is at 0x8c210008
PC : 8c210008 SP : 8a710000 SR : 400080f0 TEA :
2966e480 Not tainted
R0 : 00000004 R1 : fffffff0 R2 : a0000000 R3 :
00000000
R4 : aa7105ec R5 : ac387000 R6 : 8c210000 R7 :
80000000
R8 : 00001000 R9 : a0000000 R10 : 8a89c600 R11 :
8a70f000
R12 : 8441ab00 R13 : 0a710002 R14 : 00000000
MACH: 00000000 MACL: 00000000 GBR : 29573b18 PR :
84411b02
Apparently is the old kernel that crashes during
relocation, but I'm not sure of it.
The empty_zero value is grabbed from System.map, but
please tell me, why start is 8c210000? I had a look at
kexec sources for SH, saw that some masks are applied
to addresses, but did not understand why.
Any help is really really appreciated, thank you all.
Matteo.
___________________________________
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Still on kexec for SH4 architecture, please help
2008-02-01 13:35 Still on kexec for SH4 architecture, please help Matteo Pampolini
@ 2008-02-04 4:29 ` Paul Mundt
2008-02-04 17:37 ` Matteo Pampolini
0 siblings, 1 reply; 4+ messages in thread
From: Paul Mundt @ 2008-02-04 4:29 UTC (permalink / raw)
To: Matteo Pampolini; +Cc: kexec
On Fri, Feb 01, 2008 at 02:35:57PM +0100, Matteo Pampolini wrote:
> ./kexec --load --type=zImage-sh
> --append="console=ttyAS1,115200" --empty-zero=84401000
>
[snip]
> Starting new kernel
> kexec information
> segment[0]: 0x0c001000 - 0x0c002000 (0x00001000)
> segment[1]: 0x0c210000 - 0x0c387000 (0x00177000)
> start : 0x8c210000
>
> illegal slot instruction: 01a0 [#1]
>
> Pid : 92, Comm: kexec
> PC is at 0x8c210008
> PC : 8c210008 SP : 8a710000 SR : 400080f0 TEA :
> 2966e480 Not tainted
> R0 : 00000004 R1 : fffffff0 R2 : a0000000 R3 :
> 00000000
> R4 : aa7105ec R5 : ac387000 R6 : 8c210000 R7 :
> 80000000
> R8 : 00001000 R9 : a0000000 R10 : 8a89c600 R11 :
> 8a70f000
> R12 : 8441ab00 R13 : 0a710002 R14 : 00000000
> MACH: 00000000 MACL: 00000000 GBR : 29573b18 PR :
> 84411b02
>
Yes, that's fairly obvious. kexec is trying to load the zImage in to RAM
which simply doesn't exist at this location on your platform. The
original kexec/SH port was done on a landisk, if you take a look at
arch/sh/configs/landisk_defconfig in the kernel you can see where these
values come from.
kexec/arch/sh/kexec-zImage-sh.c is pretty sparse at the moment, and only
factors in the empty zero page. You likely want to extend this for things
like the boot link offset and other values specific to your platform.
> The empty_zero value is grabbed from System.map, but
> please tell me, why start is 8c210000? I had a look at
P1 (0x80000000) + memory start (0x0c000000) + 0x00210000 which is or'ed
in in zImage_sh_load().
> kexec sources for SH, saw that some masks are applied
> to addresses, but did not understand why.
>
Mostly because it was written with one target in mind, and is in need of
some hacking so it's more generally useful. I suggest you follow the
approach that the empty zero page definition uses, and apply that for
things like the boot link offset and the other relevant values.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Still on kexec for SH4 architecture, please help
2008-02-04 4:29 ` Paul Mundt
@ 2008-02-04 17:37 ` Matteo Pampolini
0 siblings, 0 replies; 4+ messages in thread
From: Matteo Pampolini @ 2008-02-04 17:37 UTC (permalink / raw)
To: Paul Mundt; +Cc: kexec
Hello Paul,
many thanks for your help, we investigated on memory
addresses and fixed some issues. Things do not work,
yet but we hope to see the light soon.
In case we get in trouble again we'll surely let you
know.
Regards,
Matteo.
--- Paul Mundt <lethal@linux-sh.org> ha scritto:
> On Fri, Feb 01, 2008 at 02:35:57PM +0100, Matteo
> Pampolini wrote:
> > ./kexec --load --type=zImage-sh
> > --append="console=ttyAS1,115200"
> --empty-zero=84401000
> >
> [snip]
>
> > Starting new kernel
> > kexec information
> > segment[0]: 0x0c001000 - 0x0c002000 (0x00001000)
> > segment[1]: 0x0c210000 - 0x0c387000 (0x00177000)
> > start : 0x8c210000
> >
> > illegal slot instruction: 01a0 [#1]
> >
> > Pid : 92, Comm: kexec
> > PC is at 0x8c210008
> > PC : 8c210008 SP : 8a710000 SR : 400080f0 TEA :
> > 2966e480 Not tainted
> > R0 : 00000004 R1 : fffffff0 R2 : a0000000 R3 :
> > 00000000
> > R4 : aa7105ec R5 : ac387000 R6 : 8c210000 R7 :
> > 80000000
> > R8 : 00001000 R9 : a0000000 R10 : 8a89c600 R11 :
> > 8a70f000
> > R12 : 8441ab00 R13 : 0a710002 R14 : 00000000
> > MACH: 00000000 MACL: 00000000 GBR : 29573b18 PR :
> > 84411b02
> >
> Yes, that's fairly obvious. kexec is trying to load
> the zImage in to RAM
> which simply doesn't exist at this location on your
> platform. The
> original kexec/SH port was done on a landisk, if you
> take a look at
> arch/sh/configs/landisk_defconfig in the kernel you
> can see where these
> values come from.
>
> kexec/arch/sh/kexec-zImage-sh.c is pretty sparse at
> the moment, and only
> factors in the empty zero page. You likely want to
> extend this for things
> like the boot link offset and other values specific
> to your platform.
>
> > The empty_zero value is grabbed from System.map,
> but
> > please tell me, why start is 8c210000? I had a
> look at
>
> P1 (0x80000000) + memory start (0x0c000000) +
> 0x00210000 which is or'ed
> in in zImage_sh_load().
>
> > kexec sources for SH, saw that some masks are
> applied
> > to addresses, but did not understand why.
> >
> Mostly because it was written with one target in
> mind, and is in need of
> some hacking so it's more generally useful. I
> suggest you follow the
> approach that the empty zero page definition uses,
> and apply that for
> things like the boot link offset and the other
> relevant values.
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
>
___________________________________
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Still on kexec for SH4 architecture, please help
@ 2008-02-06 18:50 paolo.cortesi
0 siblings, 0 replies; 4+ messages in thread
From: paolo.cortesi @ 2008-02-06 18:50 UTC (permalink / raw)
To: lethal; +Cc: kexec, matteo_pampolini
Hello Paul,
I am a collegue of Matteo Pampolini; thanks a lot about your last suggest, but I have still one problem.
I changed the:
P1 (0x80000000) + memory start (0x0c000000) + 0x00210000 or'ed in zImage_sh_load() that you suggested
in such way:
CONFIG_PAGE_OFFSET(0x80000000) + CONFIG_MEMORY_START (0x04400000) + CONFIG_BOOT_LINK_OFFSET (0x0080000)
and I changed the initiliaziation start memory range to set available my CONFIG_MEMORY_START address.
The log that I got is the follow and I can´t see the new kernel really restating:
./kexec -l new_zImage --type=zImage-sh --append="console=ttyAS1,115200" --empty-zero=84401000
....
....
empty_zero = 0x04401000
area = 0x04400000
Starting new kernel
kexec information
segment[0]: 0x04401000 - 0x04402000 (0x00001000)
segment[1]: 0x04c00000 - 0x04d5a000 (0x0015a000)
start : 0x84c00000
Do you still see any error?
Sincerely
Paolo Cortesi
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-06 19:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-01 13:35 Still on kexec for SH4 architecture, please help Matteo Pampolini
2008-02-04 4:29 ` Paul Mundt
2008-02-04 17:37 ` Matteo Pampolini
-- strict thread matches above, loose matches on Subject: below --
2008-02-06 18:50 paolo.cortesi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.