[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    address resolution question
From:       "Weiguang SHI" <weiguang_shi () hotmail ! com>
Date:       2001-07-31 21:38:54
[Download RAW message or body]

Hi,

I need your help to understand this.
In machdep.c,

   1451         /*
   1452          * map page 1 R/W into the kernel page table so we can use 
it
   1453          * as a buffer.  The kernel will unmap this page later.
   1454          */
   1455         pte = (pt_entry_t)vtopte(KERNBASE + (1 <<PAGE_SHIFT));
   1456         *pte = (1 << PAGE_SHIFT) | PG_RW | PG_V;


According to my calculation, pte=0xbfcc0001 and *pte will yield
0x2FF,0xC0,0x1 as indexes to the page directory table, page table and
an offset. My page directory table is like this (starting at physical
address 0x2C2000):

    index            page_table_base_address; prot
    ----------       -----------------------------
    0,0x1D           0x2A4,0x2C1            ; RW
    0x2FF            0x2C2                  ; RW
    0x300,0x31D      0x2A4,0x2C1            ; RW

The entries that are not listed are all zeros. This table was created
by "create_pagetable" in locore.s

I know there is a recursive reference, i.e., the 0x2ff entry. But I
need more (authoritative) explanation on how the triple
(0x2ff,0xc0,0x1) is going to be resolved.

Would you shed some light?

Thanks very much.
Weiguang

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic