Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion .gdbinit
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
add-symbol-file target/x86_64-unknown-none/debug/kernel
br gdt.rs:radian_core::gdt::Manager::reload_segments
br test_usermode
br cpu.rs:radian_core::cpu::Manager::dummy_int_handler
br task.rs:radian_core::task::Manager::switch_to_usermode
target remote localhost:1234
6 changes: 3 additions & 3 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ build-bootloader:
cargo build $(if $(RELEASE),--release,) --target x86_64-unknown-uefi --bin boot

build-kernel:
RUSTFLAGS='-C link-arg=-Tsystem/drivers/src/kernel.ld -C relocation-model=static' cargo build $(if $(RELEASE),--release,) --target x86_64-unknown-none --bin kernel
clang -ffreestanding -nostdlib -O2 -Wall -T ./system/drivers/src/driver.ld ./system/core/bin/test.c -o ./system/core/bin/test.elf
RUSTFLAGS='-C link-arg=-Tsystem/core/bin/kernel.ld -C relocation-model=static' cargo build $(if $(RELEASE),--release,) --target x86_64-unknown-none --bin kernel

build-drivers:
clear && objdump -t target/x86_64-unknown-none/debug/deps/libradian_core-eee6dde371a58c3d.a | awk '/a/ {print "PROVIDE( \"" $4 "\" = " $1 ");"}' | awk '!seen[$2]++' | sort
Expand Down Expand Up @@ -70,7 +71,7 @@ qemu: iso
-drive if=pflash,format=raw,readonly=on,file=$(OVMF_CODE) \
-drive format=raw,file=$(ISO_FILE) \
-smp 4 -m 4G -cpu max -s -d unimp,guest_errors,invalid_mem,int \
--serial mon:stdio \
-monitor stdio \
-device qemu-xhci -device usb-kbd -audiodev pa,id=snd0 -machine pcspk-audiodev=snd0 -M q35 --no-reboot

qemu-nographic: iso # yo stop allocating so much my pc only has 8G atleast allocate 2G
Expand Down
6 changes: 0 additions & 6 deletions boot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ name = "boot"
version = "0.1.0"
edition = "2024"

[profile.dev]
panic = "abort"

[profile.release]
panic = "abort"

[dependencies]
panic-abort = "0.3.2"
uefi = { version = "0.35.0", features = ["alloc", "global_allocator", "logger", "panic_handler"] }
Expand Down
38 changes: 38 additions & 0 deletions syscalls_doc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
interrupt vector => 0xf0

[IN] rax = #id of syscall
[IN] r9 = arg1
[IN] r10 = arg2
[IN] r11 = arg3
[IN] r12 = arg4
[OUT] r15 = return value

#id ?
0x600 signal abort
0x601 get errno
r15 errno
0x602 exit
r9 code
0x603 getpid
r15 pid
0x700 yield now
0x701 set name
r9 virtaddr name to &CStr
0x702 sleep
r9 secs
r10 nanos
0x703 spawn
r9 entrypoint
r10 stack
r15 tid
0x704 available-parallelism
r15 count
0x705 join
r9 tid
0x800 alloc
r9 size
r10 size
0x801 dealloc
r9 ptr
r10 size
r11 align
5 changes: 5 additions & 0 deletions system/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ name = "radian_core"
version = "0.1.0"
edition = "2024"

[[bin]]
name = "kernel"
path = "bin/kernel.rs"

[lib]
crate-type = ["staticlib", "rlib"]

[dependencies]
xmas-elf = "0.10.0"
File renamed without changes.
Loading