Compare commits

..
2 changed files with 6 additions and 17 deletions

View file

@ -79,13 +79,12 @@ default:
all: $(KERNEL) all: $(KERNEL)
$(Q)compiledb -n make $(Q)compiledb -n make
.PHONY: __build_all
__build_all: __build_all:
$(Q)$(MAKE) --no-print-directory -f scripts/Makefile.build _all obj=. $(Q)$(MAKE) --no-print-directory -f scripts/Makefile.build _all obj=.
$(KOBJ): __build_all $(KOBJ): __build_all
$(KERNEL): $(KOBJ) built-in.o linker.ld $(KERNEL): $(KOBJ) linker.ld
$(Q)echo " LD $@" $(Q)echo " LD $@"
$(Q)$(LD) $(KOBJ) $(LDFLAGS) -T linker.ld -o $@ $(Q)$(LD) $(KOBJ) $(LDFLAGS) -T linker.ld -o $@

View file

@ -29,20 +29,17 @@ static void mem_init_zones()
struct mem_zone *last; struct mem_zone *last;
static const char *grid[] = {"Entry", "Physical base", "Length", "Type"}; static const char *grid[] = {"Entry", "Physical base", "Length", "Type"};
#ifdef KDEBUG int grid_width = kprintf("| %-5s | %-18s | %-18s | %-22s |\n", grid[0], grid[1], grid[2], grid[3]);
int grid_width = kdebug("| %-5s | %-16s | %-16s | %-22s |\n", grid[0], grid[1], grid[2], grid[3]); kprintf("|");
kdebug("|"); for (int i = 0; i < grid_width - 3; i++) {
for (int i = 0; i < grid_width - 17; i++) {
kprintf("-"); kprintf("-");
} }
kprintf("|\n"); kprintf("|\n");
#endif
for (int i = 0; i < map->entry_count; i++) { for (int i = 0; i < map->entry_count; i++) {
struct limine_memmap_entry *ent = kern_map_res->entries[i]; struct limine_memmap_entry *ent = kern_map_res->entries[i];
if (ARRAY_SIZE(zone_type_strings) > ent->type) { if (ARRAY_SIZE(zone_type_strings) > ent->type)
kdebug("| %05d | %016llx | %16llx | %-22s |\n", i, ent->base, ent->length, zone_type_strings[ent->type]); kprintf("| %-5d | 0x%-16x | 0x%-16x | %-22s |\n", i, ent->base, ent->length, zone_type_strings[ent->type]);
}
bool usable; bool usable;
switch (ent->type) { switch (ent->type) {
@ -77,13 +74,6 @@ static void mem_init_zones()
last_usable = usable; last_usable = usable;
} }
#ifdef KDEBUG
kdebug("|");
for (int i = 0; i < grid_width - 17; i++) {
kprintf("-");
}
kprintf("|\n");
#endif
} }
void mem_init() void mem_init()