summaryrefslogtreecommitdiff
path: root/ruth/ruth.c
diff options
context:
space:
mode:
authorneal <neal>2007-12-14 15:18:07 +0000
committerneal <neal>2007-12-14 15:18:07 +0000
commite598e7fea334facf8490a3854ead4a7b0418ab61 (patch)
tree40907c52e99d81fb6221d23d34eeb59347c44049 /ruth/ruth.c
parentd7dd76141a6a19993c45a1c1ed9d0afe2df7318d (diff)
libhurd-mm/
2007-12-14 Neal H. Walfield <neal@gnu.org> * storage.c (shadow_setup): Support the case where the folio is full. (storage_alloc_): If AS_INIT_DONE is false, use as_alloc_slow to allocate an address. Only call shadow_setup if CAP is not NULL. * as.h (as_alloc_slow): Remove parameter data_mappable and parameter may_alloc. Return a struct hurd_object_desc *, not an addr_t. * as.c (as_alloc): Assert that AS_INIT_DONE is true. Improve debugging output. (as_slot_ensure): Assert that AS_INIT_DONE is true. (as_alloc_slow): Remove parameter data_mappable and parameter may_alloc. Return a struct hurd_object_desc *, not an addr_t. Don't special case page-sized objects, always find a void capability. Don't return an address twice. Don't use capability slots in folios. (as_init:add): Take additional argument, addr. Use this rather than DESC->OBJECT. Generalize code for iterating over folios and cappages. Correctly walk folios. (as_init): Call add on both a descriptor object and its storage. (as_walk): Rewrite such that if AS_INIT_DONE is not true, we don't use a recursive function. If the callback function returns -1, then don't descend. (as_walk:do_walk): Also walk folios. viengoos/ 2007-12-14 Neal H. Walfield <neal@gnu.org> * viengoos.c (system_task_load:csalloc): Remove function. (system_task_load): Don't allocate additional capability slots for the objects we allocate, just use the address of the storage object. ruth/ 2007-12-14 Neal H. Walfield <neal@gnu.org> * ruth.c (main): Only check the objects contained immediately within a folio for shadow objects.
Diffstat (limited to 'ruth/ruth.c')
-rw-r--r--ruth/ruth.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/ruth/ruth.c b/ruth/ruth.c
index 4427220..2af419b 100644
--- a/ruth/ruth.c
+++ b/ruth/ruth.c
@@ -95,6 +95,8 @@ main (int argc, char *argv[])
{
printf ("Checking shadow page tables... ");
+ int processing_folio = -1;
+
int visit (addr_t addr,
l4_word_t type, struct cap_addr_trans cap_addr_trans,
bool writable,
@@ -105,10 +107,24 @@ main (int argc, char *argv[])
assert (slot);
assert (type == slot->type);
if (type == cap_cappage || type == cap_rcappage || type == cap_folio)
- assert (slot->shadow);
+ assertx (slot->shadow,
+ ADDR_FMT ", %s",
+ ADDR_PRINTF (addr), cap_type_string (type));
else
assert (! slot->shadow);
+ if (type == cap_folio)
+ {
+ processing_folio = FOLIO_OBJECTS;
+ return 0;
+ }
+
+ if (processing_folio >= 0)
+ {
+ processing_folio --;
+ return -1;
+ }
+
return 0;
}