void check_multiboot(uint32_t magic, multiboot_info_t * mbinfo) { if (magic != MULTIBOOT_BOOTLOADER_MAGIC) { klog_info("magic: 0x%x\n", magic); klog_info("Unsupported Bootloader.\n"); panic(); } }
void task_a_fn(void) { while (1) { klog_info("a: %d\n", timer_get_jiffies()); task_break(); } }
void kmain(uint32_t magic, multiboot_info_t * mbinfo) { con_init(); klog_info("Kernel Location: 0x%08x - 0x%08x\n", KERNEL_START, KERNEL_END); klog_info("Multiboot Version: %x\n", mbinfo->flags); klog_info("Memory (Low/High): 0x%08x/0x%08x\n", mbinfo->mem_lower, mbinfo->mem_upper); check_multiboot(magic, mbinfo); arch_init(); mm_init(mbinfo); klog_info("Sepix %s-%s %s %s\n", BUILD_VERSION_BRANCH, BUILD_VERSION_REV, BUILD_VERSION_DATE, STRINGIFY(ARCH)); task_init(); arch_start(); task_idle_fn(); }
void uip_log(char *msg) { klog_info("UIP: %s", msg); }
void timer_test(void) { klog_info("Tick %d\n", timer_get_jiffies()); }