Compare commits

...

2 Commits

Author SHA1 Message Date
77edb07211
Clippy: Fix lints
Some checks failed
Continuous Integration / Rustfmt (push) Waiting to run
Continuous Integration / Check (push) Failing after 4m19s
Continuous Integration / Clippy (push) Failing after 1m32s
Continuous Integration / Build (x86_64) (push) Successful in 2m22s
2025-07-23 01:33:20 -04:00
aadebbfefe
CI: Prepare for CI/CD 2025-07-23 01:31:19 -04:00
5 changed files with 54 additions and 8 deletions

48
.gitea/workflows/ci.yaml Normal file
View File

@ -0,0 +1,48 @@
name: Continuous Integration
on: [push]
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo check
# Disabled until custom test harness is implemented.
#test:
# name: Test Suite
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions-rust-lang/setup-rust-toolchain@v1
# - run: cargo test
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: rustup component add clippy
- run: cargo clippy -- -D warnings
build:
name: Build (x86_64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: rustup target add x86_64-unknown-none
- run: cargo build --bin kernel --target x86_64-unknown-none

View File

@ -14,8 +14,7 @@ compile_error!(
#[cfg(target_arch = "x86_64")]
pub mod x86_64;
#[cfg(target_arch = "x86_64")]
pub use x86_64::asm;
pub use x86_64::paging;
pub use x86_64::{asm, paging};
#[cfg(target_arch = "aarch64")]
pub mod aarch64;

View File

@ -6,10 +6,9 @@ use x86_64::structures::idt::*;
lazy_static! {
pub static ref IDT: InterruptDescriptorTable = {
let idt = InterruptDescriptorTable::new();
InterruptDescriptorTable::new()
// TODO: Re-implement this once the x86-interrupt ABI is fixed.
// Alternatively: Write our own interrupt handler wrappers.
idt
};
}

View File

@ -40,7 +40,7 @@ pub struct Process {
#[allow(dead_code)]
pub fn context_switch() -> ! {
loop {}
todo!()
}
#[allow(dead_code)]

View File

@ -36,6 +36,6 @@ impl From<u64> for SyscallStatus {
}
}
pub fn exit(code: u64) -> SyscallStatus {
arch::syscall_impl::caller_syscall_1(Syscall::Exit as u64, code).into()
}
//pub fn exit(code: u64) -> SyscallStatus {
// arch::syscall_impl::caller_syscall_1(Syscall::Exit as u64, code).into()
//}