* [MPC8260] accessing I/Os while MMU is off
@ 2003-05-26 6:16 vincent poirson
2003-05-26 8:27 ` None Atall
0 siblings, 1 reply; 5+ messages in thread
From: vincent poirson @ 2003-05-26 6:16 UTC (permalink / raw)
To: linuxppc-embedded
Hello,
I want to change my PDATC value while in
HardwareInterrupt code (in kernel/head.S) where MMU is
off. So I simply do :
li r13, 0x0d50
addis r13, 0xf001
stw r14, 0(r13)
// where 0xf0010d50 is my PDATC adress and r14 the
value I want to store
I do not understand why my kernel crahes and goes in
machine exception. Surprisingly, I can change PDATC
with BDI2000 but not with assembler code. Is this an
adress translation problem ?
Am I missing something obvious ? Any help will be
appreciated.
Thanks in advance.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [MPC8260] accessing I/Os while MMU is off
2003-05-26 6:16 [MPC8260] accessing I/Os while MMU is off vincent poirson
@ 2003-05-26 8:27 ` None Atall
2003-05-26 12:39 ` vincent poirson
0 siblings, 1 reply; 5+ messages in thread
From: None Atall @ 2003-05-26 8:27 UTC (permalink / raw)
To: vincent poirson, linuxppc-embedded
You missed a small shift... :)
-----------------------
li r16,r16,0x10
li r13, 0xf001
slw r13,r13,r16
addis r13, 0x0d50
stw r14, 0(r13)
-----------------------
Dimitris.
--- vincent poirson <poirsonv@yahoo.fr> wrote:
>
> Hello,
>
> I want to change my PDATC value while in
> HardwareInterrupt code (in kernel/head.S) where MMU
> is
> off. So I simply do :
> li r13, 0x0d50
> addis r13, 0xf001
> stw r14, 0(r13)
> // where 0xf0010d50 is my PDATC adress and r14 the
> value I want to store
> I do not understand why my kernel crahes and goes in
> machine exception. Surprisingly, I can change PDATC
> with BDI2000 but not with assembler code. Is this an
> adress translation problem ?
> Am I missing something obvious ? Any help will be
> appreciated.
>
> Thanks in advance.
>
>
>
=====
------------------------------------------------------------
-Dhmhtrios Meidanis
-Degree in Mathematics, University of the Aegean.
-Master in Computer Architecture and Digital
Systems, University of Crete.
Greece.
------------------------------------------------------------
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [MPC8260] accessing I/Os while MMU is off
2003-05-26 8:27 ` None Atall
@ 2003-05-26 12:39 ` vincent poirson
2003-05-26 12:48 ` Gary Thomas
0 siblings, 1 reply; 5+ messages in thread
From: vincent poirson @ 2003-05-26 12:39 UTC (permalink / raw)
To: linuxppc-embedded
Well, I forgot one operand in the addis instruction
but otherwise my code is OK. I checked that the right
PDATC adress was in the GPR.
I also forgot to say that my code works when I put it
in a interrupt handler in a normal kernel module.
What I do not understand is why the kernel keeps going
in machine check exception when I try to load PDATC
contents or store a value in PDATC.
--- None Atall <linux_meis@yahoo.com> a écrit : > You
missed a small shift... :)
>
> -----------------------
> li r16,r16,0x10
> li r13, 0xf001
> slw r13,r13,r16
> addis r13, 0x0d50
> stw r14, 0(r13)
> -----------------------
>
> Dimitris.
>
> --- vincent poirson <poirsonv@yahoo.fr> wrote:
> >
> > Hello,
> >
> > I want to change my PDATC value while in
> > HardwareInterrupt code (in kernel/head.S) where
> MMU
> > is
> > off. So I simply do :
> > li r13, 0x0d50
> > addis r13, 0xf001
> > stw r14, 0(r13)
> > // where 0xf0010d50 is my PDATC adress and r14 the
> > value I want to store
> > I do not understand why my kernel crahes and goes
> in
> > machine exception. Surprisingly, I can change
> PDATC
> > with BDI2000 but not with assembler code. Is this
> an
> > adress translation problem ?
> > Am I missing something obvious ? Any help will be
> > appreciated.
> >
> > Thanks in advance.
> >
> >
> >
>
>
> =====
>
------------------------------------------------------------
> -Dhmhtrios Meidanis
> -Degree in Mathematics, University of the Aegean.
> -Master in Computer Architecture and Digital
> Systems, University of Crete.
> Greece.
>
------------------------------------------------------------
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [MPC8260] accessing I/Os while MMU is off
2003-05-26 12:39 ` vincent poirson
@ 2003-05-26 12:48 ` Gary Thomas
2003-05-27 8:41 ` vincent poirson
0 siblings, 1 reply; 5+ messages in thread
From: Gary Thomas @ 2003-05-26 12:48 UTC (permalink / raw)
To: vincent poirson; +Cc: linuxppc embedded
On Mon, 2003-05-26 at 06:39, vincent poirson wrote:
> Well, I forgot one operand in the addis instruction
> but otherwise my code is OK. I checked that the right
> PDATC adress was in the GPR.
> I also forgot to say that my code works when I put it
> in a interrupt handler in a normal kernel module.
> What I do not understand is why the kernel keeps going
> in machine check exception when I try to load PDATC
> contents or store a value in PDATC.
>
Are you sure that the address you are using is correct? In particular,
this may be a mapped (via MMU) address. The physical address can often
be different. When you are executing in this mode, you must use the
physical address.
>
>
> --- None Atall <linux_meis@yahoo.com> a écrit : > You
> missed a small shift... :)
> >
> > -----------------------
> > li r16,r16,0x10
> > li r13, 0xf001
> > slw r13,r13,r16
> > addis r13, 0x0d50
> > stw r14, 0(r13)
> > -----------------------
> >
> > Dimitris.
> >
> > --- vincent poirson <poirsonv@yahoo.fr> wrote:
> > >
> > > Hello,
> > >
> > > I want to change my PDATC value while in
> > > HardwareInterrupt code (in kernel/head.S) where
> > MMU
> > > is
> > > off. So I simply do :
> > > li r13, 0x0d50
> > > addis r13, 0xf001
> > > stw r14, 0(r13)
> > > // where 0xf0010d50 is my PDATC adress and r14 the
> > > value I want to store
> > > I do not understand why my kernel crahes and goes
> > in
> > > machine exception. Surprisingly, I can change
> > PDATC
> > > with BDI2000 but not with assembler code. Is this
> > an
> > > adress translation problem ?
> > > Am I missing something obvious ? Any help will be
> > > appreciated.
> > >
> > > Thanks in advance.
> > >
> > >
> > >
> >
> >
> > =====
> >
> ------------------------------------------------------------
> > -Dhmhtrios Meidanis
> > -Degree in Mathematics, University of the Aegean.
> > -Master in Computer Architecture and Digital
> > Systems, University of Crete.
> > Greece.
> >
> ------------------------------------------------------------
> >
>
>
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [MPC8260] accessing I/Os while MMU is off
2003-05-26 12:48 ` Gary Thomas
@ 2003-05-27 8:41 ` vincent poirson
0 siblings, 0 replies; 5+ messages in thread
From: vincent poirson @ 2003-05-27 8:41 UTC (permalink / raw)
To: gary; +Cc: linuxppc-embedded
Surprisingly, I can move my I/O with BDI2000 by
modifing directly the PDATC value at the telnet
server. The BDI doc says the adress written at the
telnet server are never translated. So I guess I got
the physical adress. However, I tried translating the
adress and I do not get satisfying results either.
--- Gary Thomas <gary@mlbassoc.com> a écrit : > On
Mon, 2003-05-26 at 06:39, vincent poirson wrote:
> > Well, I forgot one operand in the addis
> instruction
> > but otherwise my code is OK. I checked that the
> right
> > PDATC adress was in the GPR.
> > I also forgot to say that my code works when I put
> it
> > in a interrupt handler in a normal kernel module.
> > What I do not understand is why the kernel keeps
> going
> > in machine check exception when I try to load
> PDATC
> > contents or store a value in PDATC.
> >
>
> Are you sure that the address you are using is
> correct? In particular,
> this may be a mapped (via MMU) address. The
> physical address can often
> be different. When you are executing in this mode,
> you must use the
> physical address.
>
> >
> >
> > --- None Atall <linux_meis@yahoo.com> a écrit : >
> You
> > missed a small shift... :)
> > >
> > > -----------------------
> > > li r16,r16,0x10
> > > li r13, 0xf001
> > > slw r13,r13,r16
> > > addis r13, 0x0d50
> > > stw r14, 0(r13)
> > > -----------------------
> > >
> > > Dimitris.
> > >
> > > --- vincent poirson <poirsonv@yahoo.fr> wrote:
> > > >
> > > > Hello,
> > > >
> > > > I want to change my PDATC value while in
> > > > HardwareInterrupt code (in kernel/head.S)
> where
> > > MMU
> > > > is
> > > > off. So I simply do :
> > > > li r13, 0x0d50
> > > > addis r13, 0xf001
> > > > stw r14, 0(r13)
> > > > // where 0xf0010d50 is my PDATC adress and r14
> the
> > > > value I want to store
> > > > I do not understand why my kernel crahes and
> goes
> > > in
> > > > machine exception. Surprisingly, I can change
> > > PDATC
> > > > with BDI2000 but not with assembler code. Is
> this
> > > an
> > > > adress translation problem ?
> > > > Am I missing something obvious ? Any help will
> be
> > > > appreciated.
> > > >
> > > > Thanks in advance.
> > > >
> > > >
> > > >
> > >
> > >
> > > =====
> > >
> >
>
------------------------------------------------------------
> > > -Dhmhtrios Meidanis
> > > -Degree in Mathematics, University of the
> Aegean.
> > > -Master in Computer Architecture and Digital
> > > Systems, University of Crete.
> > > Greece.
> > >
> >
>
------------------------------------------------------------
> > >
> >
> >
> --
> Gary Thomas <gary@mlbassoc.com>
> MLB Associates
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-05-27 8:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-26 6:16 [MPC8260] accessing I/Os while MMU is off vincent poirson
2003-05-26 8:27 ` None Atall
2003-05-26 12:39 ` vincent poirson
2003-05-26 12:48 ` Gary Thomas
2003-05-27 8:41 ` vincent poirson
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).