Re: amiga problems

From: Timothy Newsham <newsham_at_nospam.org>
Date: Sat Dec 31 1994 - 17:41:57 PST

> Only if you're multiprocessor... the kernel printf is done in a tight loop.
> More likely it ages something out of the TLB which is hosing you.

I should point out that I have a bitmap display. Printf calls the
cons putchar routine. The putchar routine stamps characters onto
the bitmap, and if scrolling has to be done the whole bitmap gets
moved up. I put a cli()/sti() around the putch to make sure that
characters get written out without being disturbed.

> You need to go back and look at your treatment of the TLB when you set up a
> kernel translation for the MALLOC()'ed (or malloc(), I think you're using an
> old version of the code) memory. In particular, you need to look at what
> you do when deleting an old kernel translation. For the i386, it's a
> flush_tlb() (but only if DEBUG, hmmm, that doesn't seem right) in
> kern_deletetrans().

I based my hat.c on the i386 port. I have the following:

        *pt &= ~PT_PG;
        if (pv->p_vas == curthread->t_proc->p_vas) {
                flush_atc();
        }

So the cache should be flushed if it needs to be.

> Oh, yes, that is definitely an important difference. However, this sounds
> like you're having problems with the translation you *think* you're adding
> as a part of getting dynamic kernel memory.

Is there anything I need to do to map memory into the kernel when
hat adds a translation? I figured that when the kernel was going
to add translations it would use kern_addtrans() in vm.c. I noticed
that the hat code supports the use of PROT_KERN (kernel access only)
but the mach-independant code never uses it so I havent supported it.

> An amusing check is to read/modify/write the location, flush the TLB, then
> assert that the value you just wrote is, in fact, what is currently in that
> location. Use volatile pointers (to make sure it doesn't all end up in a
> register).

I'll try this.

> Feels like TLB to me (ATC, in Moto-ese, I think).

fun. (I was hoping you'd say "Oh, its this simple thing over here that
you overlooked" :)

> Andy
Received on Sat Dec 31 17:11:12 1994

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:11 PDT