refacotr: remove all c files (#1131)

* refacotr: remove all c files

Use Rust to implement the symbol table generator.
Delete unused header files and c files
Adjust the makefile in the debug directory

Signed-off-by: Godones <chenlinfeng25@outlook.com>

* fix: remove extern "C" rs_* functions

move gen_kallsyms.rs to build-scripts

Signed-off-by: Godones <chenlinfeng25@outlook.com>
This commit is contained in:
linfeng
2025-04-14 09:56:14 +08:00
committed by GitHub
parent 2d06264d79
commit 1485456bf3
86 changed files with 309 additions and 4009 deletions

View File

@ -5,9 +5,7 @@ pub mod pkru;
use alloc::sync::Arc;
use alloc::vec::Vec;
use hashbrown::HashSet;
use log::{debug, info};
use x86::time::rdtsc;
use x86_64::registers::model_specific::EferFlags;
use crate::driver::serial::serial8250::send_to_default_serial8250_port;
@ -553,11 +551,10 @@ unsafe fn allocator_init() {
debug!("Successfully enabled new page table");
}
#[no_mangle]
pub extern "C" fn rs_test_buddy() {
test_buddy();
}
#[cfg(test)]
pub fn test_buddy() {
use hashbrown::HashSet;
use x86::time::rdtsc;
// 申请内存然后写入数据然后free掉
// 总共申请200MB内存
const TOTAL_SIZE: usize = 200 * 1024 * 1024;