Date: Tue, 31 Jul 2001 15:38:54 -0600 From: "Weiguang SHI" <weiguang_shi@hotmail.com> To: freebsd-hackers@freebsd.org Subject: address resolution question Message-ID: <F1950ZDbz006MLqNbdV0000a502@hotmail.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F1950ZDbz006MLqNbdV0000a502>