I don't know many of the details of this topic, but I think I can answer some of the high-level issues.
The MMU is mapping pages from virtual to physical addresses. The minimum page size on SPARC is 8 KBytes, so the lowest 13 bits of the address is the offset into an 8K page. The MMU does not deal with those page offsets. The encoding you are seeing is that those lowest 13-bits are being used to hold other information. In this case that is the context id, which is probably identical to the getpid() value. Note that the %asi register does not hold the context id, it holds an address space identifier (ASI). In this case the ASI 0x82 is the nofault primary address space that is the default used for non-faulting loads in user space programs. Hope that helps a bit, Peter. > When playing around in class with memory faults and > dtrace, we noticed something interesting: > the address passed to trap is similar to but not the > same as the faulting address. > E.g., if I touch illegal address 0x00113738, we get a > trap on 0x001131DE. Poking around in the > code reveals: > > > ttp://src.opensolaris.org/source/xref/onnv/onnv-gate/u > sr/src/uts/sun4u/sys/mmu.h, > [mangled source deleted -pd] > > All well and code: the strangeness in the low-order > part of the trap address must be this > "context." > This is confirmed by seeing that > sfmmu_tsbmiss_exception is getting called before, > with a > "tagaccess" arg of 0x001131DE. > > However.... > > where's this context of "0x11DE" coming from? The > ASI for this process is 0x82! > > Is anybody familiar with this piece of code ? > > Later, > Max & Sean This message posted from opensolaris.org _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
