Date: Wed, 01 Aug 2001 09:34:26 -0600 From: "Weiguang SHI" <weiguang_shi@hotmail.com> To: tlambert2@mindspring.com Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: address resolution question Message-ID: <F349wPiyAphwFutJLto0000b051@hotmail.com>
next in thread | raw e-mail | index | archive | help
... > > 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? > >It gets resolved as the address 0x0C001000. It is a page address >for a 4k page (hint: 0x1000 * 0xc001). Thanks but I don't get it yet. You see 0x2ff is the index to the PTD (page table directory) here, which refers to 0x2c2000 (physical address of the page table) and this address is where the PTD itself starts (a recursive reference). So the second index, 0xc0, is applied again to this very PTD, though now used as a PD (Page Table), to get an entry. However, the entry it indexes to is all zero. Does this cause a page fault? (the idt has been set up till now.) >The lower area of memory is a 16MB region, when trapping to virtual >8086 mode. The kernel is loaded starting at 1MB in the virtual I think it is loaded starting 0xc0000000 in virtual address space though it is loaded physically just above 1M. 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?F349wPiyAphwFutJLto0000b051>