From: Benjamin Herrenschmidt <bh40@calva.net>
To: Gabriel Paubert <paubert@iram.es>, <linuxppc-dev@lists.linuxppc.org>
Cc: <cort@fsmlabs.com>
Subject: Re: 2.4.0-test3
Date: Tue, 11 Jul 2000 12:41:05 +0200 [thread overview]
Message-ID: <20000711104105.21032@mailhost.mipsys.com> (raw)
In-Reply-To: <Pine.HPX.4.10.10007111104060.9548-100000@gra-ux1.iram.es>
>
>Now imagine here that IBAT3U is zero (I think the code is executing in
>1:1 mapped mode here). You just have set IBATL on a 601 hence the valid
>flag and you temporarily have a mapping that says:
>
>(1st 8 Mb of virtual address space) -> video memory
>
>what happens if the instruction fetcher decides to start loading a cache
>line (executing from video memory) ? Might it also depending on firmware,
>create a multiple BAT match (which is a definitive no-no) ?
Well, in theory, this code is run with MMU off.
>That's a single instruction slot, yes, but it may hurt. Simply swapping
>these instructions might solve the problem since you are not supposed to
>access the display virtual address at this time, it will have a transient
>mapping:
>
>(video memory) -> first 8 Mb of physical memory
>
>but it sounds harmless.
Ok, I'll flip them anyway.
>Oh and please add an isync before and after touching the BATS, this is
>required by the architecture (as I've indicated with my hand made pseudo
>unified diffs).
>
>The fact that the valid bits are BATL on 601 and BATU on the other makes
>all the BAT manipulation extremely delicate. Maybe it would be better for
>robustness not to try to save a few instructions and have 2 completely
>different code paths...
Well, I'll try that. But again, the MMU is supposed to be off at this point.
>Besides looking at load_bat macros, the comment does not quite exactly
>reflect the code and might crash on 601:
>/* 601 only have IBAT cr0.eq is set on 601 when using this macro */
>It should be reordered, even if slightly bigger. I believe that, once upon
>a time, there was a LOAD_601_BAT macro.
>#define LOAD_BAT(n, offset, reg, RA, RB) \
> /* see the comment for clear_bats() -- Cort */ \
> li RA,0; \
> mtspr IBAT##n##U,RA; \
> mtspr DBAT##n##U,RA; \ <-- Wrong, might crash 601 !
> lwz RA,offset+0(reg); \
> lwz RB,offset+4(reg); \
> mtspr IBAT##n##U,RA; \
> mtspr IBAT##n##L,RB; \
> beq 1f; \
>
>This should be fixed but it seems to be there since so long...
>
>I don't know whether one of the chunks of code that I suspect is the
>source of the problem, but they might well be.
Ok, that would cause a crash when loading the BAT after MMU is re-
enabled. Cort, what's your explanation ?
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2000-07-11 10:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-10 11:56 2.4.0-test3 Iain Sandoe
2000-07-10 12:10 ` 2.4.0-test3 Benjamin Herrenschmidt
2000-07-10 15:07 ` 2.4.0-test3 Andreas Tobler
2000-07-10 16:05 ` 2.4.0-test3 Benjamin Herrenschmidt
2000-07-10 18:30 ` 2.4.0-test3 Andreas Tobler
2000-07-10 21:48 ` 2.4.0-test3 Takashi Oe
2000-07-10 22:14 ` 2.4.0-test3 Benjamin Herrenschmidt
2000-07-10 22:20 ` 2.4.0-test3 Takashi Oe
2000-07-10 22:26 ` 2.4.0-test3 Andreas Tobler
2000-07-11 7:58 ` 2.4.0-test3 Gabriel Paubert
2000-07-11 8:45 ` 2.4.0-test3 Benjamin Herrenschmidt
2000-07-11 10:12 ` 2.4.0-test3 Gabriel Paubert
2000-07-11 10:41 ` Benjamin Herrenschmidt [this message]
2000-07-11 12:38 ` 2.4.0-test3 Gabriel Paubert
2000-07-11 15:57 ` 2.4.0-test3 Benjamin Herrenschmidt
2000-07-11 11:52 ` 2.4.0-test3 Takashi Oe
-- strict thread matches above, loose matches on Subject: below --
2000-07-10 16:12 2.4.0-test3 Iain Sandoe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20000711104105.21032@mailhost.mipsys.com \
--to=bh40@calva.net \
--cc=cort@fsmlabs.com \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=paubert@iram.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).