Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
19f9ef3
vfs: rework the vfs subsystem with async
greatbridf Sep 2, 2025
ea21223
vfs, rcu: rework path walking with new rcu syntax
greatbridf Sep 14, 2025
49a4903
style, vfs: remove unused imports and InodeRef
greatbridf Sep 14, 2025
632f1c7
vfs: fix debug print of `Mode` structs
greatbridf Sep 14, 2025
210a669
mem, paging: introduce page locks and exclusive pages
greatbridf Oct 8, 2025
9223243
tls: rework of arch's UserTLS design
greatbridf Dec 22, 2025
841bb37
mem, slab: rework the slab system
greatbridf Jan 6, 2026
f17236f
mem, buddy: rework the buddy system
greatbridf Jan 6, 2026
45268e7
vfs: rework of inode and page cache system
greatbridf Jan 13, 2026
913f71f
mem: introduce new `Folio` abstraction
greatbridf Jan 17, 2026
cfc959e
script: add a script to help translate stacktraces
greatbridf Jan 17, 2026
b0c8ef4
style: fix or suppress warnings
greatbridf Jan 17, 2026
bc84f0b
user, init: update riscv64 init script
greatbridf Jan 17, 2026
47d8906
chore: remove and ignore vscode settings from svc
greatbridf Jan 18, 2026
b6d54d6
mm, proc: add an exited thread reaper
greatbridf Jan 18, 2026
997edb0
proc: rewrite process list organization
greatbridf Jan 20, 2026
2392ac1
style: reformat the files related to next patches
greatbridf Jan 23, 2026
6a00786
riscv64, hal: simplify ArchMemory::free_ram implementation
greatbridf Jan 23, 2026
53ae185
style: add helper macros to retrieve symbol constants
greatbridf Jan 23, 2026
a117be1
style: reformat files
greatbridf Jan 23, 2026
4d272fe
riscv64, linker: make sure vdso lies inside .data
greatbridf Jan 23, 2026
5814c00
riscv64: rewrite FDT and present free memory parsing
greatbridf Jan 23, 2026
20b12df
sysinit: pointee type should be u8 when using ptr::write_bytes
greatbridf Jan 23, 2026
74c7e0a
style: reformat file
greatbridf Jan 23, 2026
6a0f703
hal, mm: alloc basic folios from low to high addr
greatbridf Jan 23, 2026
3842078
script: refactor the build image script
greatbridf Jan 24, 2026
c7c5cda
test: rework test script and github workflow
greatbridf Jan 24, 2026
bcc4158
ci: install expect and update printf usage
greatbridf Jan 24, 2026
38a3272
script, build-img: add script folder for each platforms
greatbridf Jan 24, 2026
d4380e0
style, hal: rename x86 trap.rs to trap/mod.rs
greatbridf Jan 24, 2026
2c49a12
chore: remove the specific target from config.toml
greatbridf Jan 25, 2026
a5f6349
target: update x86 json to support new rust nightly
greatbridf Jan 25, 2026
7d47e63
feat: add kernel config framework, rework panicking
greatbridf Jan 26, 2026
681a121
style: reformat files
greatbridf Jan 26, 2026
1be77d9
signal: remove await on thread.force_kill in x86 sigreturn
greatbridf Jan 26, 2026
e567c68
style: extract common import out in vdso rt_sigreturn
greatbridf Jan 26, 2026
22ac594
style: reformat x86 bootstrap code
greatbridf Jan 26, 2026
8240ec2
x86, hal: support loading kernel image up to 14M
greatbridf Jan 26, 2026
7b45c83
kernel: put kernel shutdown into `power` module
greatbridf Jan 26, 2026
b1aa66e
x86: add shutdown support
greatbridf Jan 26, 2026
0e16753
x86: export symbols needed by vdso
greatbridf Jan 26, 2026
fde5a43
x86, TLS: adapt for the new TLS design
greatbridf Jan 26, 2026
60d18e5
hal, x86: add cpu count global variable
greatbridf Jan 26, 2026
4ccaa6b
hal, x86: support the new folio abstraction
greatbridf Jan 26, 2026
6972953
hal, x86: use a new trap handling method
greatbridf Jan 26, 2026
19821e5
runtime: remove unused ExecutionContext and Stack
greatbridf Jan 27, 2026
b877fff
hal: remove dependency of TaskContext for TrapContext
greatbridf Jan 27, 2026
1f9d246
hal: remove struct TaskContext from riscv64
greatbridf Jan 27, 2026
d2cb45c
hal: remove struct TaskContext for x86
greatbridf Jan 27, 2026
8a6acc4
hal: support breakpoint trap type
greatbridf Jan 28, 2026
425291d
hal: add a function to setup kernel call frames
greatbridf Jan 28, 2026
42b5a09
style: reformat thread.rs
greatbridf Jan 28, 2026
0fefeff
hal: set int state and user mode in TrapContext::new
greatbridf Jan 28, 2026
11c6603
pipeline: remove loongarch64 and add x86 build and test
greatbridf Jan 28, 2026
d2a4d79
style: reformat mm_area.rs and mm_list.rs
greatbridf Feb 11, 2026
7747be0
style, mem: move mod mm_area into mm_list
greatbridf Feb 11, 2026
fe9ef4a
style: reformat page_fault.rs
greatbridf Feb 13, 2026
78aaafa
mem: use intrusive lists for `MemArea`s
greatbridf Feb 13, 2026
7ff4d54
mem: add a function to insert Arc<MemArea>s into the list
greatbridf Feb 20, 2026
727dcc0
style: reformat interrupt.rs
greatbridf Feb 20, 2026
d632919
fix/interrupt: use lock_irq in default_irq_handler
greatbridf Feb 20, 2026
803bfb6
mem: move brk related codes to brk.rs
greatbridf Feb 20, 2026
cf7011c
mem: remove unused `AreaList::get_or_insert()`
greatbridf Feb 23, 2026
4d26999
mem: protect `MemArea::grow()` with AreaList lock
greatbridf Feb 23, 2026
bd7a70c
mem: use a ZST MemListLock to avoid using &MMListInner
greatbridf Feb 23, 2026
0aa3dff
mem: protect `MemArea::clone()` with MMList's lock
greatbridf Feb 23, 2026
a1c2640
mem: unify the two kind of range read locks
greatbridf Feb 23, 2026
def1914
mem: introduce per MemArea lock
greatbridf Feb 25, 2026
a3fc062
mem: add a lock field in AreaList
greatbridf Feb 26, 2026
eddb269
WIP: mem: add a helper to isolate mem areas
greatbridf Feb 27, 2026
c8a7a59
WIP: mem: wrap and force the Future returned to be Send
greatbridf Feb 27, 2026
2a43d31
WIP: mem: provide multi-usage link struct
greatbridf Feb 27, 2026
1f82101
WIP: mem: reimpl `MMList::unmap` using `isolate()`
greatbridf Feb 27, 2026
96d25cf
mem: make MemArea flags atomic
greatbridf Feb 28, 2026
f37b288
WIP: mem: reimpl `MMList::protect` using `isolate()`
greatbridf Feb 28, 2026
9b18fc8
WIP: mem: remove unused MemArea member functions
greatbridf Feb 28, 2026
2a5bcae
style: reformat chardev.rs dentry.rs vfs/file/mod.rs
greatbridf Mar 1, 2026
5a0d054
chardev: make `CharDevice::read()` async
greatbridf Mar 1, 2026
e0a0f3e
hal, x86_64: increase global CPU_COUNT in setup_cpu
greatbridf Mar 2, 2026
d5ec1b5
style: reformat rcu.rs
greatbridf Mar 2, 2026
ca216c8
sync, rcu: reuse `RCUReadGuardNew` for `RCUReadGuard`
greatbridf Mar 2, 2026
682c4c9
style: reformat clone.rs
greatbridf Mar 2, 2026
38671c1
task: don't hold thread.inner spinlock for too long
greatbridf Mar 2, 2026
5b2a3af
task: clone the parent thread's TLS if not given
greatbridf Mar 2, 2026
1316f9c
kernel: introduce a late init mechanism
greatbridf Mar 4, 2026
7d0adb2
kernel: support async functions for late init
greatbridf Mar 5, 2026
c46cba4
style: reformat mount.rs
greatbridf Mar 5, 2026
dec29cf
style: reformat procfs.rs
greatbridf Mar 5, 2026
181c189
vfs: move /proc/mounts population to mount.rs
greatbridf Mar 5, 2026
9c2568b
style: reformat e1000e.rs
greatbridf Mar 5, 2026
5732b46
util: remove dont_check macro
greatbridf Mar 5, 2026
a4fc4dd
style: clean old kernel console log macros
greatbridf Mar 5, 2026
b0040f4
style: reformat ahci/mod.rs
greatbridf Mar 5, 2026
2e1774b
style: remove println_warn from prelude
greatbridf Mar 5, 2026
2cfc80d
style: reformat io.rs
greatbridf Mar 5, 2026
2e26c4a
util: add buf_writeln helper macro
greatbridf Mar 5, 2026
f0f7518
style: reformat slab_allocator/lib.rs
greatbridf Mar 5, 2026
b1099dc
slab: count alloced and total {slab, object}
greatbridf Mar 5, 2026
2564ca5
slab: support printing slab debug info
greatbridf Mar 5, 2026
d30c88b
style: reformat buddy_allocator/lib.rs
greatbridf Mar 5, 2026
7e9da0d
mem, buddy: count alloced pages
greatbridf Mar 5, 2026
ea1ff47
runtime: reformat scheduler.rs
greatbridf Mar 7, 2026
ded411a
runtime: release finished Task to avoid memory leaks
greatbridf Mar 7, 2026
1eb3109
style: reformat process.rs
greatbridf Mar 7, 2026
f6d98ec
task, process: remove thread from its list when removing process
greatbridf Mar 7, 2026
0443358
util: embed the import of trait Buffer into buf_writeln
greatbridf Mar 7, 2026
610136b
util: add buf_write macro similar to buf_writeln
greatbridf Mar 7, 2026
5e91a72
buddy: count and print alloc and total info
greatbridf Mar 7, 2026
aa81a17
style: reformat mm.rs and pte.rs
greatbridf Mar 8, 2026
5d86ac9
arch, mm: remove ANONYMOUS PTE flag
greatbridf Mar 8, 2026
05a498a
mm: copy mmapped PTEs as a whole when doing CoWs
greatbridf Mar 8, 2026
18d5360
mm: set an invalid value for mapped PTEs to help debugging
greatbridf Mar 8, 2026
8e6b08b
mm: don't use MAPPED bit for checking mapped PTE
greatbridf Mar 8, 2026
7ddae50
mm: delay populating PTEs to fault handlers
greatbridf Mar 8, 2026
ea661c7
mm: remove unused page table helpers
greatbridf Mar 8, 2026
6fd9c7a
mm: remove shared EMPTY_PAGE
greatbridf Mar 8, 2026
34faa79
style: reformat page_cache.rs
greatbridf Mar 9, 2026
240a48b
sync: add atomic! macro to help performing atomic operations
greatbridf Mar 9, 2026
9cdba49
mm, sync: apply atomic! macro to PageFlags users
greatbridf Mar 9, 2026
6534093
mm, folio: implement spinlock based folio lock
greatbridf Mar 9, 2026
00484b6
mm: extract logic for creating/removing mappings into functions
greatbridf Mar 9, 2026
d0a22c0
mm: remove DerefMut impl for CachePage
greatbridf Mar 12, 2026
888c000
style: reformat syscall/mm.rs
greatbridf Mar 13, 2026
878e9d0
style: reformat elf.rs
greatbridf Mar 13, 2026
9f74ee0
mm: add blanket AnonMapping impl
greatbridf Mar 13, 2026
cae61f4
style: remove unused imports in mm_area.rs
greatbridf Mar 13, 2026
a654701
mm: rename insert_new() to insert() and remove the old one
greatbridf Mar 17, 2026
b8af819
mm: add helper function to create anon mapping
greatbridf Mar 20, 2026
74d6122
mm: update mappings' offsets when splitting areas
greatbridf Mar 20, 2026
f53d61c
mm: create `MemArea`s using new() func
greatbridf Mar 21, 2026
0303cf3
mm: make handle_cow() private
greatbridf Mar 21, 2026
5ff19c9
mm: add a helper to create new MMLists
greatbridf Mar 21, 2026
543d912
mm: rework MMList creation while doing clones
greatbridf Mar 21, 2026
6f8e43c
mm: add a macro to impl Deref for transparent wrappers
greatbridf Mar 22, 2026
c4dc884
mm: don't expose AnonMapping outside of mem module
greatbridf Mar 22, 2026
9c6626e
mm: move PageOffset definition to mod types
greatbridf Mar 22, 2026
68a0200
mm: don't expose FileMapping outside of mem module
greatbridf Mar 22, 2026
b9c4706
mm: use PageOffset when creating file mappings
greatbridf Mar 22, 2026
750b909
mm: use PageOffset inside FileMapping and fault handlers
greatbridf Mar 22, 2026
8552663
mm: rework Mapping to divide it into 3 classes
greatbridf Mar 25, 2026
0c992f5
mm: don't read the PTE twice setting CoW
greatbridf Mar 25, 2026
c7b2600
mm: associate newly alloced anon folios with the anon mapping
greatbridf Mar 25, 2026
d56bf6f
mm: use the anon mapping to alloc folio in CoW handling
greatbridf Mar 25, 2026
92563ea
mm, page_cache: remove alloc_zeroed()
greatbridf Mar 26, 2026
42c3291
mm: introduce the AnonFolio
greatbridf Apr 9, 2026
34d60c0
style, vfs: reformat fat32.rs, file.rs and inode.rs
greatbridf Apr 9, 2026
f9aa5aa
vfs, inode: remove {read,write}_direct
greatbridf Apr 9, 2026
99598a2
mm, vfs: change read_page() arg type to FolioOwned
greatbridf Apr 9, 2026
3d5ef32
hal, riscv: support user bit of table PTEs
greatbridf Apr 9, 2026
cf4805a
mm: refactor set PTE CoW logic, removing PageTable helpers
greatbridf Apr 11, 2026
6feabcf
mm: introduce MapFolio for folios mapped to page tables
greatbridf Sep 8, 2026
59041aa
chore: update gitignore for vim coc settings
greatbridf Sep 8, 2026
bf9f278
fix/futex: forget to .await in `futex_exit`
greatbridf Oct 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[build]
target = "riscv64gc-unknown-none-elf"
target-dir = 'build'
rustflags = ["-C", "force-unwind-tables"]

Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/test-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ jobs:
include:
- arch: riscv64
target: riscv64gc-unknown-none-elf
- arch: loongarch64
target: loongarch64-unknown-none-softfloat
platform: virt
- arch: x86_64
target: x86_64-unknown-none
platform: acpi_compat
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -30,23 +32,24 @@ jobs:

- name: Setup QEMU
run: |
sudo apt-get install -y qemu-system-${{ matrix.arch }} qemu-kvm
sudo apt-get update
sudo apt-get install -y qemu-system-${{ matrix.arch }} qemu-kvm expect

- name: Configure
run: ./configure

- name: Run build for ${{ matrix.arch }} targets
run: |
make build ARCH=${{ matrix.arch }} MODE=release
zstd -k build/boot-${{ matrix.arch }}.img
zstd -k build/boot-${{ matrix.arch }}-${{ matrix.platform }}.img

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: eonix-kernel-and-image-${{ matrix.arch }}
path: |
build/${{ matrix.target }}/release/eonix_kernel
build/boot-${{ matrix.arch }}.img.zst
build/boot-${{ matrix.arch }}-${{ matrix.platform }}.img.zst

- name: Test run for ${{ matrix.arch }}
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
build/

.idea/
.vscode/settings.json
.vim/

test/

Expand Down
12 changes: 6 additions & 6 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
max_width = 100
max_width = 80
hard_tabs = false
tab_spaces = 4
newline_style = "Auto"
Expand All @@ -14,7 +14,7 @@ single_line_if_else_max_width = 60
single_line_let_else_max_width = 60
wrap_comments = false
format_code_in_doc_comments = false
doc_comment_code_block_width = 100
doc_comment_code_block_width = 80
comment_width = 80
normalize_comments = false
normalize_doc_attributes = false
Expand All @@ -29,8 +29,8 @@ fn_single_line = false
where_single_line = false
imports_indent = "Block"
imports_layout = "Mixed"
imports_granularity = "Preserve"
group_imports = "Preserve"
imports_granularity = "Module"
group_imports = "StdExternalCrate"
reorder_imports = true
reorder_modules = true
reorder_impl_items = false
Expand All @@ -42,13 +42,13 @@ binop_separator = "Front"
remove_nested_parens = true
combine_control_expr = true
short_array_element_width_threshold = 10
overflow_delimited_expr = false
overflow_delimited_expr = true
struct_field_align_threshold = 0
enum_discrim_align_threshold = 0
match_arm_blocks = true
match_arm_leading_pipes = "Never"
force_multiline_blocks = false
fn_params_layout = "Tall"
fn_params_layout = "Compressed"
brace_style = "SameLineWhere"
control_brace_style = "AlwaysSameLine"
trailing_semicolon = true
Expand Down
10 changes: 10 additions & 0 deletions .vscode/settings.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"editor.formatOnSave": true,
// Uncomment and set the target you'd like to use for analysis.
//
// Available targets:
// - x86_64-unknown-none.json
// - riscv64gc-unknown-none-elf
// - loongarch64-unknown-none-softfloat
// "rust-analyzer.cargo.target": "x86_64-unknown-none.json",
}
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

117 changes: 113 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 24 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ edition = "2021"
crate-type = ["bin"]

[dependencies]
arcref = { path = "./crates/arcref", default-features = false, features = [
"alloc",
] }
atomic_unique_refcell = { path = "./crates/atomic_unique_refcell", features = [
"no_std",
] }
Expand All @@ -24,8 +27,10 @@ pointers = { path = "./crates/pointers" }
posix_types = { path = "./crates/posix_types" }
slab_allocator = { path = "./crates/slab_allocator" }

intrusive-collections = { version = "0.9.8", features = [
"nightly",
], git = "https://github.com/greatbridf/intrusive-rs" }
bitflags = "2.6.0"
intrusive-collections = { version = "0.9.8", git = "https://github.com/greatbridf/intrusive-rs" }
itertools = { version = "0.13.0", default-features = false }
acpi = "5.2.0"
align_ext = "0.1.0"
Expand All @@ -34,18 +39,34 @@ another_ext4 = { git = "https://github.com/SMS-Derfflinger/another_ext4", branch
stalloc = { version = "0.6.1", default-features = false, features = [
"allocator-api",
] }
async-trait = "0.1.89"
futures = { version = "0.3.31", features = [
"alloc",
"async-await",
], default-features = false }
static_assertions = "1.1.0"
cfg-if = "1.0.4"

[target.'cfg(any(target_arch = "riscv64", target_arch = "loongarch64"))'.dependencies]
virtio-drivers = { version = "0.11.0" }
[target.'cfg(target_arch = "x86_64")'.dependencies]
unwinding = { version = "0.2.8", default-features = false, features = [
"unwinder",
"fde-static",
"personality",
"panic",
] }

[target.'cfg(target_arch = "riscv64")'.dependencies]
virtio-drivers = { version = "0.11.0" }
unwinding = { version = "0.2.8", default-features = false, features = [
"unwinder",
"fde-static",
"personality",
"panic",
] }

[target.'cfg(target_arch = "loongarch64")'.dependencies]
virtio-drivers = { version = "0.11.0" }

[features]
default = []
trace_pci = []
Expand Down
Loading
Loading