From owner-freebsd-hackers Tue Jul 28 13:53:01 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA12450 for freebsd-hackers-outgoing; Tue, 28 Jul 1998 13:53:01 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from bingsun2.cc.binghamton.edu (bingsun2.cc.binghamton.edu [128.226.1.6]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA12363 for ; Tue, 28 Jul 1998 13:52:25 -0700 (PDT) (envelope-from bf20761@binghamton.edu) Received: from localhost (bf20761@localhost) by bingsun2.cc.binghamton.edu (8.8.7/8.6.9) with SMTP id QAA15887 for ; Tue, 28 Jul 1998 16:51:48 -0400 (EDT) Date: Tue, 28 Jul 1998 16:51:48 -0400 (EDT) From: zhihuizhang X-Sender: bf20761@bingsun2 To: hackers Subject: Still confused with PTDpde/APTDpde Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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