Daniel Ramsbrock
2005-10-25 14:05:55 UTC
Here is my usual list of clarification items:
1. Do we need to have interrupts disabled while initializing paging
(i.e. during the call to Init_VM)? I assume yes.
2. For part 1, we should use our existing userseg.c, and we'll only
switch over to the new uservm.c in part 2, correct?
3. There are quite a few fields in both pte and pde which it doesn't
seem like we need. It is safe to assume that the only fields we will
need to set are present, flags, and the base address? Can we leave all
other fields set to zero?
4. As mentioned in the slides, we are supposed to set the following
flags in both pde and pte: VM_WRITE, VM_READ, VM_USER. In part 2, we
will be removing VM_USER from both pde and pte (well, at init time
anyhow--VM_USER may be set later when a page is allocated to a user
process). Is that correct?
5. The slide titled "Mapping kernel memory: steps" mentions the
PAGE_DIRECTORY_INDEX and PAGE_TABLE_INDEX functions as being handy.
While I understand what they do, I'm not quite sure how they are useful
during this step--perhaps I'm misunderstanding what needs to be done
during this step. The only place I could imagine using these is when
storing the base addresses--but I'm converting those by simply
right-shifting my addresses by 12 bits (for both pde's and pte's).
6. The same slide also mentions using Get_Page to obtain the Page struct
for a given page address. Once we have this, I assume we do two things:
set vaddr to the current logical address and set entry to the current
pte pointer. We leave flags and clock alone, right?
Thanks,
Daniel
1. Do we need to have interrupts disabled while initializing paging
(i.e. during the call to Init_VM)? I assume yes.
2. For part 1, we should use our existing userseg.c, and we'll only
switch over to the new uservm.c in part 2, correct?
3. There are quite a few fields in both pte and pde which it doesn't
seem like we need. It is safe to assume that the only fields we will
need to set are present, flags, and the base address? Can we leave all
other fields set to zero?
4. As mentioned in the slides, we are supposed to set the following
flags in both pde and pte: VM_WRITE, VM_READ, VM_USER. In part 2, we
will be removing VM_USER from both pde and pte (well, at init time
anyhow--VM_USER may be set later when a page is allocated to a user
process). Is that correct?
5. The slide titled "Mapping kernel memory: steps" mentions the
PAGE_DIRECTORY_INDEX and PAGE_TABLE_INDEX functions as being handy.
While I understand what they do, I'm not quite sure how they are useful
during this step--perhaps I'm misunderstanding what needs to be done
during this step. The only place I could imagine using these is when
storing the base addresses--but I'm converting those by simply
right-shifting my addresses by 12 bits (for both pde's and pte's).
6. The same slide also mentions using Get_Page to obtain the Page struct
for a given page address. Once we have this, I assume we do two things:
set vaddr to the current logical address and set entry to the current
pte pointer. We leave flags and clock alone, right?
Thanks,
Daniel