aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMarvin Borner2021-05-18 18:37:19 +0200
committerMarvin Borner2021-05-18 18:37:50 +0200
commit4b4bfec8a312132acc84b5166998d0cfa7c01931 (patch)
treeeeb494cf539b4bfdb6dae23a34f5f1c5d7167667 /kernel
parenteb13f2a8f536fecf918699bc19b3087a78a417d6 (diff)
Improved entire building chain (especially debugging)
Diffstat (limited to 'kernel')
-rw-r--r--kernel/Makefile3
-rw-r--r--kernel/drivers/fb.c5
-rw-r--r--kernel/features/proc.c6
3 files changed, 13 insertions, 1 deletions
diff --git a/kernel/Makefile b/kernel/Makefile
index 01fe3c1..14fc055 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -42,3 +42,6 @@ all: compile
compile: $(COBJS)
@mkdir -p $(BUILD)/apps/kernel/
@$(LD) -N -z max-page-size=0x1000 -eboot_entry -Tlink.ld -o $(BUILD)/apps/kernel/exec -L$(BUILD) $+ -lk
+ifeq ($(CONFIG_STRIP), true)
+ @$(ST) --strip-all $(BUILD)/apps/kernel/exec
+endif
diff --git a/kernel/drivers/fb.c b/kernel/drivers/fb.c
index 8122654..6a81434 100644
--- a/kernel/drivers/fb.c
+++ b/kernel/drivers/fb.c
@@ -29,7 +29,10 @@ PROTECTED static struct vbe_basic *vbe = NULL;
static u32 fb_map_buffer(struct page_dir *dir)
{
assert(vbe);
- return virtual_alloc(dir, memory_range_around((u32)vbe->fb, FB_SIZE), MEMORY_USER).base;
+ struct memory_range r =
+ virtual_alloc(dir, memory_range_around((u32)vbe->fb, FB_SIZE), MEMORY_USER);
+ printf("FB: %x+%x\n", r.base, r.size);
+ return r.base;
}
static u32 fb_owner = 0;
diff --git a/kernel/features/proc.c b/kernel/features/proc.c
index c6de9c0..574df68 100644
--- a/kernel/features/proc.c
+++ b/kernel/features/proc.c
@@ -58,6 +58,12 @@ HOT FLATTEN void scheduler(struct regs *regs)
memory_switch_dir(PROC(current)->page_dir);
memcpy(regs, &PROC(current)->regs, sizeof(*regs));
+#if DEBUG_SCHEDULER
+ if (current != idle_proc)
+ printf("%s (%d): eip %x esp %x useresp %x\n", PROC(current)->name,
+ PROC(current)->pid, regs->eip, regs->esp, regs->useresp);
+#endif
+
locked = 0;
}