#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define UACPI_MEMORY_BUFFER_MAX 4096 ALIGNED (16) static uint8_t uacpi_memory_buffer[UACPI_MEMORY_BUFFER_MAX]; /* * The kernel starts booting here. This is the entry point after Limine hands control. We set up all * the necessary platform-dependent subsystems/drivers and jump into the init app. */ void bootmain (void) { struct limine_mp_response* mp = limine_mp_request.response; struct cpu* bsp_cpu = cpu_make (mp->bsp_lapic_id, 0); amd64_init (bsp_cpu, false); syscall_init (); amd64_debug_init (); pmm_init (); mm_init (); uacpi_setup_early_table_access ((void*)uacpi_memory_buffer, sizeof (uacpi_memory_buffer)); amd64_ioapic_init (); amd64_hpet_init (); devices_init (); vfs_init (); struct device* ramdisk_device = device_find (RAMDISK_DEVICE); struct reschedule_ctx rctx = {.entries = NULL, .lock = SPIN_LOCK_INIT}; int ret = vfs_create_mountpoint ("ramdisk", VFS_TARFS, ramdisk_device, NULL, &rctx); if (ret < 0) { DEBUG ("could not mount ramdisk! (%d)\n", ret); spin (); } smp_init (); proc_init (); for (;;) ; }