* head_8xx.S
@ 2004-02-03 18:39 Luca Risso
2004-02-05 20:02 ` head_8xx.S Dan Malek
0 siblings, 1 reply; 4+ messages in thread
From: Luca Risso @ 2004-02-03 18:39 UTC (permalink / raw)
To: linuxppc-dev
Hi,
I'm trying to port Linux2.6.0 from to a MPC860 based board.
I'm currently in trouble with the head_8xx.S file during early MMU
operations.
I get an exception because of the following instructions:
InstructionTLBMiss:
#ifdef CONFIG_8xx_CPU6
stw r3, 8(r0)
li r3, 0x3f80
.
.
.
.
3:
lwz r21, 0(r20) /* Get the level 1 entry */
rlwinm. r20, r21,0,0,19 /* Extract page descriptor page address */
beq 2f /* If zero, don't try to find a pte */
/* We have a pte table, so load the MI_TWC with the attributes
* for this "segment."
*/
tophys(r21,r21)
ori r21,r21,1 /* Set valid bit */
#ifdef CONFIG_8xx_CPU6
li r3, 0x2b80
stw r3, 12(r0)
lwz r3, 12(r0)
#endif
mtspr MI_TWC, r21 /* Set segment attributes */
#ifdef CONFIG_8xx_CPU6
li r3, 0x3b80
stw r3, 12(r0)
lwz r3, 12(r0)
#endif
mtspr MD_TWC, r21 /* Load pte table base address */
mfspr r21, MD_TWC /* ....and get the pte address */
lwz r20, 0(r21) /* Get the pte */
<HERE I GOT THE FAULT>
ori r20, r20, _PAGE_ACCESSED
stw r20, 0(r21)
MD_TWC (and so R21) contains a wrong address (out of my physical memory) while it
should already be a real one.
I read several mails about a problem like this but probably I missed the solution,
please can give me a pointer to it.
Thanks
Luca
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: head_8xx.S
2004-02-03 18:39 head_8xx.S Luca Risso
@ 2004-02-05 20:02 ` Dan Malek
0 siblings, 0 replies; 4+ messages in thread
From: Dan Malek @ 2004-02-05 20:02 UTC (permalink / raw)
To: Luca Risso; +Cc: linuxppc-dev
Luca Risso wrote:
> I'm trying to port Linux2.6.0 from to a MPC860 based board.
> I'm currently in trouble with the head_8xx.S file during early MMU
> operations.
I _promise_ to do some more work on it this weekend. Hopefully I
can get it limping along.
-- Dan
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: head_8xx.S
@ 2004-02-06 8:08 Luca Risso
2004-02-06 18:48 ` head_8xx.S Dan Malek
0 siblings, 1 reply; 4+ messages in thread
From: Luca Risso @ 2004-02-06 8:08 UTC (permalink / raw)
To: Dan Malek <dan; +Cc: linuxppc-dev
Thanks a lot for your help Dan.
With some further investigation I bypassed the problem removing the "tophys" instructions as shown below.
I'm not sure that's the right thing to do, but at least it took me a step forward so to be able to crash as soon as the
transfer_to_handler is called by the decrementer interrupt.
Unfortunately my BDM doesn't support MMU relocation and I can't debug easily.
If you feel that my "patch" is the wrong way to solve the problem or if you have any suggestion about my new fault please let me know.
Regards
Luca
.
.
.
3:
lwz r21, 0(r20) /* Get the level 1 entry */
rlwinm. r20, r21,0,0,19 /* Extract page descriptor page address */
beq 2f /* If zero, don't try to find a pte */
/* We have a pte table, so load the MI_TWC with the attributes
* for this "segment."
*/
// tophys(r21,r21) <--------------------- COMMENT
ori r21,r21,1 /* Set valid bit */
#ifdef CONFIG_8xx_CPU6
li r3, 0x2b80
stw r3, 12(r0)
lwz r3, 12(r0)
#endif
mtspr MI_TWC, r21 /* Set segment attributes */
#ifdef CONFIG_8xx_CPU6
li r3, 0x3b80
.
.
.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: head_8xx.S
2004-02-06 8:08 head_8xx.S Luca Risso
@ 2004-02-06 18:48 ` Dan Malek
0 siblings, 0 replies; 4+ messages in thread
From: Dan Malek @ 2004-02-06 18:48 UTC (permalink / raw)
To: Luca Risso; +Cc: linuxppc-dev
Luca Risso wrote:
> With some further investigation I bypassed the problem removing the "tophys"...
There are some subtle VM changes in 2.6 that require code changes to the
TLB exception handlers and a few other places. I know what they are, I just
don't have any active 8xx projects right now so I have to find time and boards
to get this done and tested.
Thanks.
-- Dan
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-02-06 18:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-06 8:08 head_8xx.S Luca Risso
2004-02-06 18:48 ` head_8xx.S Dan Malek
-- strict thread matches above, loose matches on Subject: below --
2004-02-03 18:39 head_8xx.S Luca Risso
2004-02-05 20:02 ` head_8xx.S Dan Malek
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).