Discussion:
Basic question from early going
(too old to reply)
Tim Reiff
2005-04-10 21:02:03 UTC
Permalink
I have some really basic questions on Project 4. As a procrastinator,
normally I've been able to sit down on the last day and grind through all
the details, but right from the start of this I'm confused about a lot of
the instructions given.

Anyway, I make my page directory and allocate the 1024 page tables too.
However, I'm not sure how to "fill out the appropriate fields in the page
tables and page directories." I start by just setting everything to zero
except the pageTableBaseAddr field, which I use to link everything together.
Later, when going through the physical pages I set the present bit and flags
field for the ones mapping to the physical memory. Is this correct?

I'm also confused by the phrase, "register page (i.e. linear page i maps to
physical page i)". Does this involve something with the Page struct
associated with each physical page? I've been (naively) setting the entry
field to the corresponding pte_t struct, then just letting vaddr be equal to
the physical address...? Long story short, everything blows up when calling
Enable_Paging. I get "[CPU ] exception(): 3rd (13) exception with no
resolution." Oh well, any help? Sadly, I feel like this should be obvious.
c***@CSIC.UMD.EDU
2005-04-11 08:15:27 UTC
Permalink
I got that quite a bit at the start, and what was happening was that
I was storing the appropriately shifted addresses into table
structures. I think there are some posts about this a week or two
back. When retrieving pages, struc Pages,etc., I had mixed up some
of the addressing modes, i.e., make sure that your base addresses
stored in page table/directory entries are page addresses
(virtual/physical addresses shifted right appropriately) and make
sure that when your using Get_Page or taking a base address and
trying to access the actual page table/page that you shift it left
appropriately to get a full 32 bit address.

Loading...