* question about 8241 again
@ 2004-04-24 3:38 llee
2004-04-24 5:16 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 2+ messages in thread
From: llee @ 2004-04-24 3:38 UTC (permalink / raw)
To: linuxppc-dev list
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=GB18030; format=flowed, Size: 835 bytes --]
Hi, all,
I get confusion on linux PPC MMU management(kernel 2.6.3): It seems
linux setup an empty hashtable (in MMU_init_hw) first and do a
hash_page() when exception. But at least it should make a real mapping
for the kernel itself, shouldn't it? But I haven't found it do this
anywhere.
And also, when i add the following code in sandpoint_map_io(and I also
enable feature CPU_FTR_HPTE_TABLE for 8241):
io_block_mapping(0x70000000, 0x70000000, 0x20000000, _PAGE_IO);
io_block_mapping(0x80500000, 0x80500000, 0x00100000, _PAGE_IO);
the first call get a bat mapping and another get a page mapping, but
only the first one works find, the second one could not been access.
Could anybody tell me why?
Thanks advanced and sorry for my poor english.
Ken
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: question about 8241 again
2004-04-24 3:38 question about 8241 again llee
@ 2004-04-24 5:16 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2004-04-24 5:16 UTC (permalink / raw)
To: llee; +Cc: linuxppc-dev list
On Sat, 2004-04-24 at 13:38, llee wrote:
> Hi, all,
>
> I get confusion on linux PPC MMU management(kernel 2.6.3): It seems
> linux setup an empty hashtable (in MMU_init_hw) first and do a
> hash_page() when exception. But at least it should make a real mapping
> for the kernel itself, shouldn't it? But I haven't found it do this
> anywhere.
The kernel itself... well.. that depends. For the kernel code/data,
and in general, the beginning of the linear mapping, linux uses BATs
(basically, the start of memory is mapped with BATs, up to 512Mb,
that is 2 BATs). In 2.6, the kernel should be able to cope with
taking a hash fault on the rest of kernel memory at any time, if
you spot a case where this isn't true, please tell us ;) Especially,
it clears MSR:RI in areas where faulting isn't safe (like when using
SRR0/SRR1) which causes a fault at this point to return to a special
fixup code instead of resuming the normal flow of execution.
> And also, when i add the following code in sandpoint_map_io(and I also
> enable feature CPU_FTR_HPTE_TABLE for 8241):
> io_block_mapping(0x70000000, 0x70000000, 0x20000000, _PAGE_IO);
> io_block_mapping(0x80500000, 0x80500000, 0x00100000, _PAGE_IO);
> the first call get a bat mapping and another get a page mapping, but
> only the first one works find, the second one could not been access.
I'm not too sure, I tend to discourage people from using
io_block_mapping, use ioremap instead. Make sure you are past
MMU_init though before you can use the page tables.
> Could anybody tell me why?
>
> Thanks advanced and sorry for my poor english.
>
> Ken
>
--
Benjamin Herrenschmidt <benh@kernel.crashing.org>
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-04-24 5:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-24 3:38 question about 8241 again llee
2004-04-24 5:16 ` Benjamin Herrenschmidt
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).