Skip to content

Commit 687c718

Browse files
committed
refactor(kernel): 移除 IPC 子系统和用户态支持
1 parent cb1e3d7 commit 687c718

File tree

18 files changed

+6
-2311
lines changed

18 files changed

+6
-2311
lines changed

kernel/src/ipc/mod.rs

Lines changed: 0 additions & 428 deletions
This file was deleted.

kernel/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,12 @@ pub mod drivers;
1717
pub mod fs;
1818
pub mod graphics;
1919
pub mod interrupts;
20-
pub mod ipc;
2120
pub mod libs;
2221
pub mod memory;
2322
pub mod output;
2423
pub mod panic;
2524
pub mod process;
26-
pub mod service;
2725
pub mod sync;
28-
pub mod syscall;
2926
pub mod test;
3027

3128
pub mod config {

kernel/src/libs/elf.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
//! ELF loader support for Proka Kernel
22
//!
3-
//! This module provides ELF binary loading for both kernel and user space:
3+
//! This module provides ELF binary loading for kernel space:
44
//!
55
//! - `KernelMmap`: For loading kernel-space ELF (shared libraries, kernel modules)
6-
//! - `UserMmap`: For loading user-space ELF executables
76
//!
87
//! # Memory Management Strategy
98
//!
@@ -17,18 +16,6 @@
1716
//!
1817
//! For use cases requiring library unloading, consider using a separate tracking
1918
//! structure or implementing a page-level slab allocator.
20-
//!
21-
//! # User Space ELF Loading
22-
//!
23-
//! User programs are loaded into their own address space with proper isolation:
24-
//!
25-
//! ```text
26-
//! User Address Space Layout:
27-
//! 0x0000_0010_0000_0000 Program text (ELF segments)
28-
//! 0x0000_1000_0000_0000 User heap
29-
//! 0x0000_7FA0_0000_0000 mmap region
30-
//! 0x0000_7FC0_0000_0000 User stack (grows down)
31-
//! ```
3219
3320
extern crate alloc;
3421
use core::fmt::Debug;
@@ -38,7 +25,6 @@ use spin::Mutex;
3825
use x86_64::structures::paging::{FrameAllocator, Mapper, Size4KiB, Translate};
3926

4027
use crate::fs::vfs::{VfsError, VFS};
41-
use crate::memory::paging::vmm::{MemorySet, VmArea, VmAreaType, USER_STACK_TOP};
4228
use crate::memory::FRAME_ALLOCATOR;
4329
use crate::println;
4430
use x86_64::structures::paging::PageTableFlags;

kernel/src/main.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,6 @@ pub extern "C" fn kernel_main() -> ! {
6262
proka_kernel::process::process::init();
6363
// Initialize scheduler
6464
proka_kernel::process::scheduler::init();
65-
// Initialize IPC subsystem
66-
proka_kernel::ipc::init();
67-
// Initialize kernel services
68-
proka_kernel::service::init();
69-
// Initialize IPC syscall subsystem
70-
proka_kernel::syscall::init();
7165

7266
x86_64::instructions::interrupts::enable(); // Enable interrupts
7367

0 commit comments

Comments
 (0)