Discussion:
Clarifications
(too old to reply)
will
2005-11-04 20:57:47 UTC
Permalink
1) exactly which entries need to be marked as 'present'. I currently only
mark tables/pages present when I 'alloc' them. For example, since only the
top two page tables were used from part1 for the kernel mapping, they are the
only ones I marked as present. And for each of the table entries, if there
are no pages allocated to them, I also set 'present=0'.
I don't see how you can mark a page as present unless it is physically
allocated by either Alloc_Page or Alloc_Pageable_Page

2) since we're only using userContext->memory as a temporary buffer for
our pages now, we need to free it and set it to null. We don't use
this field anymore because of paging. Is this correct?

3) are stackPointerAddr and argBlockAddr physical addresses or virtual ones?

4) do we modify userContext->entryAddr, or leave it as the virtual offset?

Future crashes will bring more questions, but that's all for now.

Thanks

-will
Iulian Neamtiu
2005-11-04 22:06:06 UTC
Permalink
Post by will
1) exactly which entries need to be marked as 'present'. I currently only
mark tables/pages present when I 'alloc' them. For example, since only the
top two page tables were used from part1 for the kernel mapping, they are the
only ones I marked as present. And for each of the table entries, if there
are no pages allocated to them, I also set 'present=0'.
That's right.
Post by will
I don't see how you can mark a page as present unless it is physically
allocated by either Alloc_Page or Alloc_Pageable_Page
2) since we're only using userContext->memory as a temporary buffer for
our pages now, we need to free it and set it to null. We don't use
this field anymore because of paging. Is this correct?
It is used, grep for it in userseg.c. You can get rid of it but then make
sure you replace its uses with 0x80000000. If you set it to 0 and use it
for setting up descriptors, copy to/from user, etc., that's a recipe for
disaster. I'd say set it to 0x80000000 after the tmeporary buffer
business and you're good.
Post by will
3) are stackPointerAddr and argBlockAddr physical addresses or virtual ones?
4) do we modify userContext->entryAddr, or leave it as the virtual offset?
I'll let you figure those out. They're pretty important.

Iulian

Loading...