Steve and I were getting TLB faults on 0x4 last night too. The problem we
were having is that were were dereferencing NULL in the following fashion:
page->blah->blah
where page was NULL. So I guess it was just adding the appropriate amount
to 0x0 and trying to look it up.
On Thu, 22 Mar 2001, Nicholas C. Murphy wrote:
I'm learning to loathe this assignment
already...
We don't know where to go from here...hopefully someone has a suggestion:
We're trying to test TLB handling/paging (without swapping). We have an
idiot's kmalloc system in place...basically, we stealmem a huge amount (64
pages) before vm bootstrap, and kmalloc from that store, never freeing
anything. We essentially used the existing kmalloc (and subpage) code,
modifying it only so it takes pages from our "repository" rather than
stealmem'ing them. But I digress...so, the system seems to boot fine, and
the thread tests work ok (well, actually, the lock test runs out of memory,
but we think that's to be expected given that it's allocating a stack for
each thread...), but bad things happen when we try to run the shell. The
thing is, what happens when we try to run the shell is that we get a TLB
read fault. Yes, that's right, a read fault. We should be getting a write
fault beforehand, methinks, but we don't. We get a read fault on address
0x4. Gdb traces have revealed that it seems to be invoking the TLB fault
somewhere in load_elf _before_ we load any segments. When we try to step
into the function that, basically, allocates page table entries for the new
program, we get the fault. Here's the weird thing: when we try to step into
the function, we get a fencepost-heuristic warning from gdb, it gives the
faults, and we die. Dereferencing the arguments to the function on their
own doesn't cause the problem. But as soon as we try to call the function,
it dies with the TLB fault at address 0x4. We're very confused and do not
know how to diagnose this problem. Any suggestions are much appreciated.
Thanks,
Nick
_______________________________________________
cs161-list mailing list
cs161-list(a)fas.harvard.edu
http://www.fas.harvard.edu/mailman/listinfo/cs161-list