mirror of
https://github.com/drasko/codezero.git
synced 2026-02-23 15:23:16 +01:00
Minor changes in README. Added fault debugging printfs that can be turned on/off.
Tasks boot fine up to doing ipc using their utcbs. UTCB PLAN: - Push ipc registers into private environment instead of a shared utcb, but map-in a shared utcb to pass on long data to server tasks. - Shared utcb has unique virtual address for every thread. - Forked child does inherit parent's utcb, but cannot use it to communicate to any server. It must explicitly obtain its own utcb for that. - Clone could have a flag to explicitly not inherit parent utcb, which is the right thing to do. - MM0 serves a syscall to obtain self utcb. - By this method, upon forks tasks don't need to map-in a utcb unless they want to pass long data.
This commit is contained in:
@@ -9,13 +9,23 @@
|
||||
#include <kmalloc/kmalloc.h>
|
||||
|
||||
|
||||
// #define DEBUG_FAULT_HANDLING
|
||||
#ifdef DEBUG_FAULT_HANDLING
|
||||
#define dprintf(...) printf(__VA_ARGS__)
|
||||
#else
|
||||
#define dprintf(...)
|
||||
#endif
|
||||
|
||||
#if defined(DEBUG_FAULT_HANDLING)
|
||||
void print_cache_pages(struct vm_object *vmo)
|
||||
{
|
||||
struct page *p;
|
||||
|
||||
printf("Pages:\n======\n");
|
||||
if (!list_empty(&vmo->page_cache))
|
||||
printf("Pages:\n======\n");
|
||||
|
||||
list_for_each_entry(p, &vmo->page_cache, list) {
|
||||
printf("Page offset: 0x%x, virtual: 0x%x, refcnt: %d\n", p->offset,
|
||||
dprintf("Page offset: 0x%x, virtual: 0x%x, refcnt: %d\n", p->offset,
|
||||
p->virtual, p->refcnt);
|
||||
}
|
||||
}
|
||||
@@ -38,6 +48,10 @@ void vm_object_print(struct vm_object *vmo)
|
||||
print_cache_pages(vmo);
|
||||
printf("\n");
|
||||
}
|
||||
#else
|
||||
void print_cache_pages(struct vm_object *vmo) { }
|
||||
void vm_object_print(struct vm_object *vmo) { }
|
||||
#endif
|
||||
|
||||
/* Global list of in-memory vm objects. */
|
||||
LIST_HEAD(vm_object_list);
|
||||
|
||||
Reference in New Issue
Block a user