Date: Tue, 14 Jul 1998 16:34:17 -0400 (EDT) From: zhihuizhang <bf20761@binghamton.edu> To: hackers <freebsd-hackers@FreeBSD.ORG> Subject: Wrong comment in pmap_bootstrap() about virtual_avail? Message-ID: <Pine.SOL.L3.93.980714162458.22697B-100000@bingsun2>
next in thread | raw e-mail | index | archive | help
In file i386/pmap.c, routine pmap_bootstrap(), I find the following comment: "XXX The calculation of virtual_avail is wrong. It's NKPT*PAGE_SIZE too large. It should be instead be correctly calculated in locore.s and not based on 'first'(which is a physical address, not a virtual address, for the start of unused physical memory)..." I read this comment a long while ago and still do not understand it. I believe that the calculation of virutal_avail which immediately follows is correct and 'firstaddr' has to be a physical address (PA + KERNBASE == VA). Why it is wrong? How come it is NKPT*PAGE_SIZE large? Anyway, this piece of code appears in freebsd-stable. If the code IS wrong, how can this bug not be removed? So maybe the comment is wrong. BTW, what does "XXX' mean which appear many times elsewhere? Any help 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.980714162458.22697B-100000>
