FUCKYOU
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
dkm/boot_modules.o: dkm\boot_modules.c include\utsm\dkm.h \
|
||||
include\utsm\types.h include\utsm\dma.h include\utsm\block.h \
|
||||
include\utsm\net.h include\utsm\paging.h include\utsm\log.h \
|
||||
include\utsm\arena.h dkm\..\arch\x86_64\limine.h
|
||||
include\utsm\dkm.h:
|
||||
include\utsm\types.h:
|
||||
include\utsm\dma.h:
|
||||
include\utsm\block.h:
|
||||
include\utsm\net.h:
|
||||
include\utsm\paging.h:
|
||||
include\utsm\log.h:
|
||||
include\utsm\arena.h:
|
||||
dkm\..\arch\x86_64\limine.h:
|
||||
@@ -0,0 +1,9 @@
|
||||
dkm/console_early.o: dkm\console_early.c include\utsm\dkm.h \
|
||||
include\utsm\types.h include\utsm\dma.h include\utsm\block.h \
|
||||
include\utsm\net.h include\utsm\paging.h
|
||||
include\utsm\dkm.h:
|
||||
include\utsm\types.h:
|
||||
include\utsm\dma.h:
|
||||
include\utsm\block.h:
|
||||
include\utsm\net.h:
|
||||
include\utsm\paging.h:
|
||||
@@ -0,0 +1,10 @@
|
||||
dkm/dkm_core.o: dkm\dkm_core.c include\utsm\dkm.h include\utsm\types.h \
|
||||
include\utsm\dma.h include\utsm\block.h include\utsm\net.h \
|
||||
include\utsm\paging.h include\utsm\log.h
|
||||
include\utsm\dkm.h:
|
||||
include\utsm\types.h:
|
||||
include\utsm\dma.h:
|
||||
include\utsm\block.h:
|
||||
include\utsm\net.h:
|
||||
include\utsm\paging.h:
|
||||
include\utsm\log.h:
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <utsm/log.h>
|
||||
#include <utsm/idt.h>
|
||||
#include <utsm/net.h>
|
||||
#include <utsm/mm.h>
|
||||
|
||||
static void dkm_api_info(const char *msg) {
|
||||
log_info(msg);
|
||||
@@ -52,7 +53,10 @@ static dkm_kernel_api g_kernel_api = {
|
||||
.boot_modules_response = 0,
|
||||
.irq_register = 0,
|
||||
.hhdm_offset = 0,
|
||||
.block = 0
|
||||
.block = 0,
|
||||
.mmio = 0,
|
||||
.mm_map_mmio = 0,
|
||||
.mm_unmap_mmio = 0
|
||||
};
|
||||
|
||||
const dkm_kernel_api *dkm_get_kernel_api(void) {
|
||||
@@ -69,6 +73,7 @@ void dkm_fill_platform_info(void) {
|
||||
g_kernel_api.dma = dma_get_api();
|
||||
g_kernel_api.net = net_get_api();
|
||||
g_kernel_api.block = block_get_api();
|
||||
g_kernel_api.mmio = paging_get_api();
|
||||
if (g_rsdp_request.response && g_rsdp_request.response->address) {
|
||||
g_kernel_api.rsdp_address = g_rsdp_request.response->address;
|
||||
}
|
||||
@@ -87,4 +92,6 @@ void dkm_fill_platform_info(void) {
|
||||
if (g_hhdm_request.response) {
|
||||
g_kernel_api.hhdm_offset = g_hhdm_request.response->offset;
|
||||
}
|
||||
g_kernel_api.mm_map_mmio = mm_map_mmio;
|
||||
g_kernel_api.mm_unmap_mmio = mm_unmap_mmio;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
dkm/kernel_api.o: dkm\kernel_api.c include\utsm\dkm.h \
|
||||
include\utsm\types.h include\utsm\dma.h include\utsm\block.h \
|
||||
include\utsm\net.h include\utsm\paging.h include\utsm\log.h \
|
||||
include\utsm\idt.h include\utsm\mm.h dkm\..\arch\x86_64\limine.h
|
||||
include\utsm\dkm.h:
|
||||
include\utsm\types.h:
|
||||
include\utsm\dma.h:
|
||||
include\utsm\block.h:
|
||||
include\utsm\net.h:
|
||||
include\utsm\paging.h:
|
||||
include\utsm\log.h:
|
||||
include\utsm\idt.h:
|
||||
include\utsm\mm.h:
|
||||
dkm\..\arch\x86_64\limine.h:
|
||||
Binary file not shown.
@@ -2,6 +2,10 @@
|
||||
#include <utsm/log.h>
|
||||
#include <utsm/types.h>
|
||||
#include "../arch/x86_64/limine.h"
|
||||
#include "../kernel/ini_parser.h"
|
||||
|
||||
/* 前向声明:带 FUCK [drivers] 过滤的加载入口(定义见下文) */
|
||||
void dsm_load_by_manifest_ex(const ini_config *cfg);
|
||||
|
||||
#define DSM_MAX_DRIVERS_PER_STAGE 8
|
||||
#define DSM_MAX_STAGES 4
|
||||
@@ -283,6 +287,10 @@ static int dsm_parse_manifest(const char *text, u64 size) {
|
||||
}
|
||||
|
||||
void dsm_load_by_manifest(void) {
|
||||
dsm_load_by_manifest_ex(NULL);
|
||||
}
|
||||
|
||||
void dsm_load_by_manifest_ex(const ini_config *cfg) {
|
||||
struct limine_module_response *rsp = g_module_request.response;
|
||||
if (!rsp) {
|
||||
log_warn("[DSM] no Limine module response");
|
||||
@@ -317,6 +325,16 @@ void dsm_load_by_manifest(void) {
|
||||
for (u32 di = 0; di < stage->driver_count; di++) {
|
||||
dsm_driver_entry *drv = &stage->drivers[di];
|
||||
|
||||
/* === FUCK [drivers] 驱动开关检查 === */
|
||||
if (cfg) {
|
||||
int enabled = ini_get_bool(cfg, "drivers", drv->name, 1);
|
||||
if (!enabled) {
|
||||
log_info("[DSM] driver disabled by FUCK: ");
|
||||
log_info(drv->name);
|
||||
continue; /* 跳过此驱动 */
|
||||
}
|
||||
}
|
||||
|
||||
drv->boot_module = dsm_find_boot_module(drv->path);
|
||||
if (!drv->boot_module) {
|
||||
log_info("[DSM] module not found");
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
dkm/manifest.o: dkm\manifest.c include\utsm\dkm.h include\utsm\types.h \
|
||||
include\utsm\dma.h include\utsm\block.h include\utsm\net.h \
|
||||
include\utsm\paging.h include\utsm\log.h dkm\..\arch\x86_64\limine.h \
|
||||
dkm\..\kernel\ini_parser.h
|
||||
include\utsm\dkm.h:
|
||||
include\utsm\types.h:
|
||||
include\utsm\dma.h:
|
||||
include\utsm\block.h:
|
||||
include\utsm\net.h:
|
||||
include\utsm\paging.h:
|
||||
include\utsm\log.h:
|
||||
dkm\..\arch\x86_64\limine.h:
|
||||
dkm\..\kernel\ini_parser.h:
|
||||
Binary file not shown.
Reference in New Issue
Block a user