BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / commit / c738dbb1e7e7a46a98436326234826eef71083e2 / memory

// Related

Nucleus

Barry CPU specific segment c738dbb (3 years, 2 months ago)
diff --git a/memory/fault.c b/memory/fault.c
index 5f94b55..efc8b66 100644
--- a/memory/fault.c
+++ b/memory/fault.c
@@ -185,7 +185,7 @@ page_fault_handler(struct InterruptFrame *frame)
 	if (__builtin_expect(!region, 0)) {
 		page_t pg = get_page(addr);
 		panic("[CPU#%d] Page Fault [%d:%d] (%#.8x -> %#.8x [tbl:%d, pg:%d][%#.8x], %s, %s, %s)",
-		      CPUID, current->tgid, current->tid, frame->eip,
+		      cpu->id, current->tgid, current->tid, frame->eip,
 		      addr, (addr >> 12) / 1024, (addr >> 12) % 1024, pg,
 		      present ? "present" : "not present",
 		      write ? "write" : "read",
@@ -213,10 +213,10 @@ early_page_fault_handler(struct InterruptFrame *frame)
 	uint8_t write   = frame->err & (1 << 1);
 	uint8_t user    = frame->err & (1 << 2);
 	if (!PAGE_ADDR(addr))
-		panic("Null dereference @ %#.8x (CPU#%d)", frame->eip, CPUID);
+		panic("Null dereference @ %#.8x (CPU#%d)", frame->eip, cpu->id);
 	ASSERT(!present);
 	kprintf("Allocating frame for %#.8x [%#.8x] CPU#%d",
-	        addr, frame->eip,CPUID);
+	        addr, frame->eip, cpu->id);
 	/* Allocate a page */
 	set_page(addr, alloc_frame() | PTE_PRESENT | PTE_WRITE | PTE_GLOBAL);
 }