Skip to contentSkip to conversation

accessing I/Os while MMU is off

MPC8260 vincent poirson 3 participants 5 messages May 26, 2003 – May 27, 2003

lore
Share & tools
lore
#0 lore raw

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/

#1 lore raw

You missed a small shift... :)

-----------------------
li r16,r16,0x10
li r13, 0xf001
slw r13,r13,r16
addis r13, 0x0d50
stw r14, 0(r13)
-----------------------

Dimitris.

Quoted 19 lines · --- vincent poirson

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.

Quoted 4 lines

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/

#2 lore raw

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 <[email protected]> a écrit : > You
missed a small shift... :)

Quoted 35 lines

-----------------------
li r16,r16,0x10
li r13, 0xf001
slw r13,r13,r16
addis r13, 0x0d50
stw r14, 0(r13)
-----------------------

Dimitris.

Quoted 5 lines · --- vincent poirson

Hello,

I want to change my PDATC value while in HardwareInterrupt code (in kernel/head.S) where

MMU

Quoted 8 lines

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

Quoted 1 line

machine exception. Surprisingly, I can change

PDATC

Quoted 1 line

with BDI2000 but not with assembler code. Is this

an

Quoted 4 lines

adress translation problem ?
Am I missing something obvious ? Any help will be appreciated.

Quoted 8 lines
Quoted 4 lines

Thanks in advance.

=====

------------------------------------------------------------

Review

Quoted 6 lines
(quoted diff) +0 -3
-Dhmhtrios Meidanis
-Degree in Mathematics, University of the Aegean.
-Master in Computer Architecture and Digital
 Systems, University of Crete.
 Greece.

------------------------------------------------------------

Quoted 1 line

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#3 lore raw
Quoted 9 lines · vincent poirson

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.

Quoted 47 lines

--- None Atall <[email protected]> a écrit : > You
missed a small shift... :)

Quoted 35 lines

-----------------------
li r16,r16,0x10
li r13, 0xf001
slw r13,r13,r16
addis r13, 0x0d50
stw r14, 0(r13)
-----------------------

Dimitris.

Quoted 5 lines · --- vincent poirson

Hello,

I want to change my PDATC value while in HardwareInterrupt code (in kernel/head.S) where

MMU

Quoted 8 lines

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

Quoted 1 line

machine exception. Surprisingly, I can change

PDATC

Quoted 1 line

with BDI2000 but not with assembler code. Is this

an

Quoted 4 lines

adress translation problem ?
Am I missing something obvious ? Any help will be appreciated.

Quoted 8 lines
Quoted 4 lines

Thanks in advance.

=====

Quoted 11 lines

------------------------------------------------------------

Review

Quoted 6 lines
(quoted diff) +0 -3
-Dhmhtrios Meidanis
-Degree in Mathematics, University of the Aegean.
-Master in Computer Architecture and Digital
 Systems, University of Crete.
 Greece.

------------------------------------------------------------

Quoted 1 line

--
Gary Thomas <[email protected]>
MLB Associates

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#4 lore raw

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 <[email protected]> a écrit : > On

Quoted 58 lines · vincent poirson
Quoted 1 line

Well, I forgot one operand in the addis

instruction

Quoted 1 line

but otherwise my code is OK. I checked that the

right

Quoted 2 lines

PDATC adress was in the GPR.
I also forgot to say that my code works when I put

it

Quoted 2 lines

in a interrupt handler in a normal kernel module.
What I do not understand is why the kernel keeps

going

Quoted 1 line

in machine check exception when I try to load

PDATC

Quoted 2 lines

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.

Quoted 3 lines

--- None Atall <[email protected]> a écrit : >

You

Quoted 18 lines

missed a small shift... :)

Quoted 17 lines

-----------------------
li r16,r16,0x10
li r13, 0xf001
slw r13,r13,r16
addis r13, 0x0d50
stw r14, 0(r13)
-----------------------

Dimitris.

Quoted 5 lines · --- vincent poirson

Hello,

I want to change my PDATC value while in HardwareInterrupt code (in kernel/head.S)

where

Quoted 7 lines
Quoted 7 lines

MMU

Quoted 6 lines

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

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

value I want to store
I do not understand why my kernel crahes and

goes

Quoted 1 line
Quoted 1 line

in

Quoted 20 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

machine exception. Surprisingly, I can change

PDATC

Quoted 1 line

with BDI2000 but not with assembler code. Is

this

Quoted 3 lines
Quoted 3 lines

an

Quoted 2 lines

adress translation problem ?
Am I missing something obvious ? Any help will

be

Quoted 11 lines
Quoted 10 lines
Quoted 6 lines

appreciated.

Thanks in advance.

=====

------------------------------------------------------------

Quoted 9 lines
Quoted 2 lines

Review

Quoted 2 lines
(quoted diff) +0 -2
-Dhmhtrios Meidanis
-Degree in Mathematics, University of the

Aegean.

Quoted 5 lines
Quoted 4 lines

-Master in Computer Architecture and Digital
Systems, University of Crete.
Greece.

------------------------------------------------------------

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

--
Gary Thomas <[email protected]>
MLB Associates

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/