Port-m68k archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Weird calculation for kernel L2 segment table



[sorry for a wrong address for port-m68k@]

Frank Wille wrote:

> > Without rereading the 040/060 manuals and without knowing about the current
> > layout of segment and page tables (first lev1 tables, then lev2, etc.?) in 
> > both
> > ports, I only got headaches after 30 minutes, so I decided to make a test! 
> > :)

The traditional hp300 derived pmap (designed for 68851 and HP MMU)
uses two level table lookups for address translation.
The first one is the segment table and the second is the page table.
(there is a simple doc in arch/hp300/DOC/HPMMU.notes)

On 4kbytes/page systems (hp300 etc.), both have 1024 entries.
On 8kbytes/page systems (i.e. on amiga and atari),
the segment table has 256 entries and the page table has 2048
(== NPTEPG == PAGE_SIZE / sizeof(pt_entry_t)) entries.
(I don't know why these two traditional ports use different PAGE_SIZE)

On the other hand, 040/060 MMU only supports three level table lookups.
Both the first and second level tables have 128 entries, and
the third one (page table) has 1024 or 2048 entries per its page size
as well as 68851/68030.

In -current pmap implementation, it uses an allocated page for the
segment table for 030 to put both the first and second lookup tables
(maybe to simplify implementation to support both machines).

This code block is initialization of tables for the kernel address space.

> > I patched the NetBSD/amiga 4.0 release kernel with your changes and tried it
> > for some time on my A3000 with 68060. Booting, starting X11, compiling 
> > pkgsrc.
> >
> > Works fine for me!

Tuomo wrote:

> I patched NetBSD/Atari current with Tsutsui's changes and I also made just
> test using my Falcon with 68060; system booted up fine and I copied some files
> around disks.
> 
> Works fine :)

Thank you for reports :-)

I'll commmit the changes later so that we'll have less
PAGE_SIZE dependent code.
(such MD code could often be missed in major MI changes)
---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index