Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jul 1998 16:51:48 -0400 (EDT)
From:      zhihuizhang <bf20761@binghamton.edu>
To:        hackers <freebsd-hackers@FreeBSD.ORG>
Subject:   Still confused with PTDpde/APTDpde
Message-ID:  <Pine.SOL.L3.93.980728163817.15296A-100000@bingsun2>

next in thread | raw e-mail | index | archive | help

I spend another day thinking about the usage of PTDpde/APTDpde in pmap.c
and still confused with them.  It must have something to do with VA->PA
translation and mixed assembly / C programming:

(1) First of all, If we have the following lines in GAS:

	.global _xx
	.set	_xx, 30

We have defined a global (absolute?) symbol _xx whose value is 30.  Now, I
refer to _xx in C by xx.  What is the value (left or right?) of xx?  In
other words, is the address of xx 30 or is the value of xx 30?

(2)  If the value of xx is 30.  Then look at locore.s where PTDped/APTDpde
is defined in the same way.  Both PTDpde and APTDpde has very special
values (an address whose PDE, PTE, offset parts are the same).  The
question is what is the meaning of (unsigned)PTDpde & PG_FRAME and
(unsigned)APTDpde & PG_FRAME in pmap.c?  To make sense, the address (not
value) of xx must be 30. 

(3) If this is correct, only PTDpde works well because we set up the
self-referential pde entry in pmap_pinit().  But for APTDpde, it does not
work the same way.  How can APTDpde used to access other process's page
tables?

These questions may look stupid, but I am just stuck into them.

Any help or hint is appreciated.

-------------------------------------------------- 
| Zhihui Zhang, http://cs.binghamton.edu/~zzhang |
| Dept. of Computer Science,  SUNY at Binghamton |
--------------------------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.L3.93.980728163817.15296A-100000>