diff --git a/Cargo.lock b/Cargo.lock index 67e48cc9f..d5a634656 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -113,6 +113,227 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" +[[package]] +name = "aster-block" +version = "0.1.0" +dependencies = [ + "aster-frame", + "aster-util", + "bitflags 1.3.2", + "component", + "lazy_static", + "log", + "spin 0.9.8", +] + +[[package]] +name = "aster-console" +version = "0.1.0" +dependencies = [ + "aster-frame", + "aster-util", + "bitflags 1.3.2", + "component", + "log", + "spin 0.9.8", +] + +[[package]] +name = "aster-frame" +version = "0.1.0" +dependencies = [ + "acpi", + "align_ext", + "aml", + "bit_field", + "bitflags 1.3.2", + "bitvec", + "buddy_system_allocator", + "cfg-if", + "gimli", + "inherit-methods-macro", + "int-to-c-enum", + "intrusive-collections", + "ktest", + "lazy_static", + "log", + "multiboot2", + "pod", + "rsdp", + "spin 0.9.8", + "static_assertions", + "tdx-guest", + "trapframe", + "unwinding", + "volatile", + "x86", + "x86_64", +] + +[[package]] +name = "aster-frame-x86-boot-linux-setup" +version = "0.1.0" +dependencies = [ + "uart_16550", + "xmas-elf", +] + +[[package]] +name = "aster-framebuffer" +version = "0.1.0" +dependencies = [ + "aster-frame", + "component", + "font8x8", + "log", + "spin 0.9.8", +] + +[[package]] +name = "aster-input" +version = "0.1.0" +dependencies = [ + "aster-frame", + "aster-rights", + "aster-util", + "bitflags 1.3.2", + "component", + "lazy_static", + "log", + "spin 0.9.8", + "virtio-input-decoder", +] + +[[package]] +name = "aster-network" +version = "0.1.0" +dependencies = [ + "align_ext", + "aster-frame", + "aster-rights", + "aster-util", + "bitflags 1.3.2", + "bytes", + "component", + "int-to-c-enum", + "log", + "pod", + "ringbuf", + "smoltcp", + "spin 0.9.8", +] + +[[package]] +name = "aster-rights" +version = "0.1.0" +dependencies = [ + "aster-rights-proc", + "bitflags 1.3.2", + "typeflags", + "typeflags-util", +] + +[[package]] +name = "aster-rights-proc" +version = "0.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "aster-std" +version = "0.1.0" +dependencies = [ + "align_ext", + "ascii", + "aster-block", + "aster-console", + "aster-frame", + "aster-input", + "aster-network", + "aster-rights", + "aster-rights-proc", + "aster-time", + "aster-util", + "aster-virtio", + "bitflags 1.3.2", + "controlled", + "core2", + "cpio-decoder", + "getrandom", + "int-to-c-enum", + "intrusive-collections", + "keyable-arc", + "ktest", + "lazy_static", + "lending-iterator", + "libflate", + "log", + "lru", + "pod", + "ringbuf", + "smoltcp", + "spin 0.9.8", + "tdx-guest", + "time", + "typeflags", + "typeflags-util", + "virtio-input-decoder", + "vte", + "xmas-elf", +] + +[[package]] +name = "aster-time" +version = "0.1.0" +dependencies = [ + "aster-frame", + "aster-util", + "component", + "log", + "spin 0.9.8", +] + +[[package]] +name = "aster-util" +version = "0.1.0" +dependencies = [ + "aster-frame", + "aster-rights", + "aster-rights-proc", + "bitvec", + "ktest", + "pod", + "typeflags-util", +] + +[[package]] +name = "aster-virtio" +version = "0.1.0" +dependencies = [ + "align_ext", + "aster-block", + "aster-console", + "aster-frame", + "aster-input", + "aster-network", + "aster-rights", + "aster-util", + "bit_field", + "bitflags 1.3.2", + "bytes", + "component", + "int-to-c-enum", + "log", + "pod", + "smoltcp", + "spin 0.9.8", + "typeflags-util", + "virtio-input-decoder", +] + [[package]] name = "atomic-polyfill" version = "0.1.11" @@ -607,143 +828,14 @@ dependencies = [ name = "jinux" version = "0.2.2" dependencies = [ + "aster-frame", + "aster-framebuffer", + "aster-std", + "aster-time", "component", - "jinux-frame", - "jinux-framebuffer", - "jinux-std", - "jinux-time", "x86_64", ] -[[package]] -name = "jinux-block" -version = "0.1.0" -dependencies = [ - "bitflags 1.3.2", - "component", - "jinux-frame", - "jinux-util", - "lazy_static", - "log", - "spin 0.9.8", -] - -[[package]] -name = "jinux-console" -version = "0.1.0" -dependencies = [ - "bitflags 1.3.2", - "component", - "jinux-frame", - "jinux-util", - "log", - "spin 0.9.8", -] - -[[package]] -name = "jinux-frame" -version = "0.1.0" -dependencies = [ - "acpi", - "align_ext", - "aml", - "bit_field", - "bitflags 1.3.2", - "bitvec", - "buddy_system_allocator", - "cfg-if", - "gimli", - "inherit-methods-macro", - "int-to-c-enum", - "intrusive-collections", - "ktest", - "lazy_static", - "log", - "multiboot2", - "pod", - "rsdp", - "spin 0.9.8", - "static_assertions", - "tdx-guest", - "trapframe", - "unwinding", - "volatile", - "x86", - "x86_64", -] - -[[package]] -name = "jinux-frame-x86-boot-linux-setup" -version = "0.1.0" -dependencies = [ - "uart_16550", - "xmas-elf", -] - -[[package]] -name = "jinux-framebuffer" -version = "0.1.0" -dependencies = [ - "component", - "font8x8", - "jinux-frame", - "log", - "spin 0.9.8", -] - -[[package]] -name = "jinux-input" -version = "0.1.0" -dependencies = [ - "bitflags 1.3.2", - "component", - "jinux-frame", - "jinux-rights", - "jinux-util", - "lazy_static", - "log", - "spin 0.9.8", - "virtio-input-decoder", -] - -[[package]] -name = "jinux-network" -version = "0.1.0" -dependencies = [ - "align_ext", - "bitflags 1.3.2", - "bytes", - "component", - "int-to-c-enum", - "jinux-frame", - "jinux-rights", - "jinux-util", - "log", - "pod", - "ringbuf", - "smoltcp", - "spin 0.9.8", -] - -[[package]] -name = "jinux-rights" -version = "0.1.0" -dependencies = [ - "bitflags 1.3.2", - "jinux-rights-proc", - "typeflags", - "typeflags-util", -] - -[[package]] -name = "jinux-rights-proc" -version = "0.1.0" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "jinux-runner" version = "0.1.0" @@ -755,98 +847,6 @@ dependencies = [ "xmas-elf", ] -[[package]] -name = "jinux-std" -version = "0.1.0" -dependencies = [ - "align_ext", - "ascii", - "bitflags 1.3.2", - "controlled", - "core2", - "cpio-decoder", - "getrandom", - "int-to-c-enum", - "intrusive-collections", - "jinux-block", - "jinux-console", - "jinux-frame", - "jinux-input", - "jinux-network", - "jinux-rights", - "jinux-rights-proc", - "jinux-time", - "jinux-util", - "jinux-virtio", - "keyable-arc", - "ktest", - "lazy_static", - "lending-iterator", - "libflate", - "log", - "lru", - "pod", - "ringbuf", - "smoltcp", - "spin 0.9.8", - "tdx-guest", - "time", - "typeflags", - "typeflags-util", - "virtio-input-decoder", - "vte", - "xmas-elf", -] - -[[package]] -name = "jinux-time" -version = "0.1.0" -dependencies = [ - "component", - "jinux-frame", - "jinux-util", - "log", - "spin 0.9.8", -] - -[[package]] -name = "jinux-util" -version = "0.1.0" -dependencies = [ - "bitvec", - "jinux-frame", - "jinux-rights", - "jinux-rights-proc", - "ktest", - "pod", - "typeflags-util", -] - -[[package]] -name = "jinux-virtio" -version = "0.1.0" -dependencies = [ - "align_ext", - "bit_field", - "bitflags 1.3.2", - "bytes", - "component", - "int-to-c-enum", - "jinux-block", - "jinux-console", - "jinux-frame", - "jinux-input", - "jinux-network", - "jinux-rights", - "jinux-util", - "log", - "pod", - "smoltcp", - "spin 0.9.8", - "typeflags-util", - "virtio-input-decoder", -] - [[package]] name = "json" version = "0.12.4" diff --git a/Cargo.toml b/Cargo.toml index 5d86a8379..9d624fbc4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,14 +8,14 @@ name = "jinux" path = "kernel/main.rs" [dependencies] -jinux-frame = { path = "framework/jinux-frame" } -jinux-std = { path = "services/libs/jinux-std" } +aster-frame = { path = "framework/aster-frame" } +aster-std = { path = "services/libs/aster-std" } component = { path = "services/libs/comp-sys/component" } [dev-dependencies] x86_64 = "0.14.2" -jinux-time = { path = "services/comps/time" } -jinux-framebuffer = { path = "services/comps/framebuffer" } +aster-time = { path = "services/comps/time" } +aster-framebuffer = { path = "services/comps/framebuffer" } [profile.dev] opt-level = 0 @@ -33,8 +33,8 @@ panic = "unwind" members = [ "runner", - "framework/jinux-frame", - "framework/jinux-frame/src/arch/x86/boot/linux_boot/setup", + "framework/aster-frame", + "framework/aster-frame/src/arch/x86/boot/linux_boot/setup", "framework/libs/align_ext", "framework/libs/ktest", "framework/libs/tdx-guest", @@ -48,10 +48,10 @@ members = [ "services/libs/cpio-decoder", "services/libs/int-to-c-enum", "services/libs/int-to-c-enum/derive", - "services/libs/jinux-rights", - "services/libs/jinux-rights-proc", - "services/libs/jinux-std", - "services/libs/jinux-util", + "services/libs/aster-rights", + "services/libs/aster-rights-proc", + "services/libs/aster-std", + "services/libs/aster-util", "services/libs/keyable-arc", "services/libs/typeflags", "services/libs/typeflags-util", @@ -65,4 +65,4 @@ exclude = [ ] [features] -intel_tdx = ["jinux-frame/intel_tdx", "jinux-std/intel_tdx"] +intel_tdx = ["aster-frame/intel_tdx", "aster-std/intel_tdx"] diff --git a/Components.toml b/Components.toml index 3f5a396ad..aa5c07f4b 100644 --- a/Components.toml +++ b/Components.toml @@ -1,13 +1,13 @@ # template [components] -std = { name = "jinux-std" } -virtio = { name = "jinux-virtio" } -input = { name = "jinux-input" } -block = { name = "jinux-block" } -console = { name = "jinux-console" } -time = { name = "jinux-time" } -framebuffer = { name = "jinux-framebuffer" } -network = { name = "jinux-network" } +std = { name = "aster-std" } +virtio = { name = "aster-virtio" } +input = { name = "aster-input" } +block = { name = "aster-block" } +console = { name = "aster-console" } +time = { name = "aster-time" } +framebuffer = { name = "aster-framebuffer" } +network = { name = "aster-network" } main = { name = "jinux" } [whitelist] diff --git a/Makefile b/Makefile index c4e5f2cbd..81a455e00 100644 --- a/Makefile +++ b/Makefile @@ -92,8 +92,8 @@ USERMODE_TESTABLE := \ services/libs/cpio-decoder \ services/libs/int-to-c-enum \ services/libs/int-to-c-enum/derive \ - services/libs/jinux-rights \ - services/libs/jinux-rights-proc \ + services/libs/aster-rights \ + services/libs/aster-rights-proc \ services/libs/keyable-arc \ services/libs/typeflags \ services/libs/typeflags-util diff --git a/README.md b/README.md index 1128e92a5..f9ad1e18a 100644 --- a/README.md +++ b/README.md @@ -70,14 +70,14 @@ Nevertheless, you could enter the directory of a specific crate and invoke `carg #### Kernel mode unit tests -We can run unit tests in kernel mode for crates like `jinux-frame` or `jinux-std`. This is powered by our [ktest](framework/libs/ktest) framework. +We can run unit tests in kernel mode for crates like `aster-frame` or `aster-std`. This is powered by our [ktest](framework/libs/ktest) framework. ```bash make run KTEST=1 ``` You could also specify tests in a crate or a subset of tests to run. ```bash -make run KTEST=1 KTEST_WHITELIST=failing_assertion,jinux_frame::test::expect_panic KTEST_CRATES=jinux-frame +make run KTEST=1 KTEST_WHITELIST=failing_assertion,aster_frame::test::expect_panic KTEST_CRATES=aster-frame ``` #### Component check @@ -141,12 +141,12 @@ The codebase of Jinux is organized as below. * `runner/`: creating a bootable Jinux kernel image along with an initramfs image. It also supports `cargo run` since it is the only package with `main()`. * `kernel/`: defining the entry point of the Jinux kernel. * `framework/`: the privileged half of Jinux (allowed to use `unsafe` keyword) - * `jinux-frame`: providing the safe Rust abstractions for low-level resources like CPU, memory, interrupts, etc; + * `aster-frame`: providing the safe Rust abstractions for low-level resources like CPU, memory, interrupts, etc; * `libs`: Privileged libraries. * `services/`: the unprivileged half of Jinux (not allowed to use `unsafe` directly), implementing most of the OS functionalities. * `comps/`: Jinux OS components; * `libs/`: Jinux OS libraries; - * `jinux-std`: this is where system calls are implemented. Currently, this crate is too big. It will eventually be decomposed into smaller crates. + * `aster-std`: this is where system calls are implemented. Currently, this crate is too big. It will eventually be decomposed into smaller crates. * `tests/`: providing integration tests written in Rust. * `regression/`: providing user-space tests written in C. * `docs/`: The Jinux book (needs a major update). diff --git a/build.rs b/build.rs index df176c1db..0c2017fb8 100644 --- a/build.rs +++ b/build.rs @@ -5,7 +5,7 @@ fn main() -> Result<(), Box> { let linker_script_path = if target == "x86_64" { PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()) .join("framework") - .join("jinux-frame") + .join("aster-frame") .join("src") .join("arch") .join("x86") diff --git a/docs/src/capabilities/zero_cost_capabilities.md b/docs/src/capabilities/zero_cost_capabilities.md index b07173c8c..a74602212 100644 --- a/docs/src/capabilities/zero_cost_capabilities.md +++ b/docs/src/capabilities/zero_cost_capabilities.md @@ -351,7 +351,7 @@ mod test { ### Implement access rights with typeflags -The `Jinux-rights/lib.rs` file implements access rights. +The `aster-rights/lib.rs` file implements access rights. ```rust //! Access rights. @@ -376,7 +376,7 @@ typeflags! { } ``` -The `Jinux-rights-proc/lib.rs` file implements the `require` procedural macro. +The `aster-rights-proc/lib.rs` file implements the `require` procedural macro. See the channel capability example later for how `require` is used. ```rust diff --git a/framework/jinux-frame/Cargo.toml b/framework/aster-frame/Cargo.toml similarity index 98% rename from framework/jinux-frame/Cargo.toml rename to framework/aster-frame/Cargo.toml index ad99cea1b..27e3cd02a 100644 --- a/framework/jinux-frame/Cargo.toml +++ b/framework/aster-frame/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "jinux-frame" +name = "aster-frame" version = "0.1.0" edition = "2021" diff --git a/framework/jinux-frame/build.rs b/framework/aster-frame/build.rs similarity index 96% rename from framework/jinux-frame/build.rs rename to framework/aster-frame/build.rs index c8d65f3dc..6bd57bc3b 100644 --- a/framework/jinux-frame/build.rs +++ b/framework/aster-frame/build.rs @@ -32,7 +32,7 @@ fn build_linux_setup_header( let cargo = std::env::var("CARGO").unwrap(); let mut cmd = std::process::Command::new(cargo); - cmd.arg("install").arg("jinux-frame-x86-boot-linux-setup"); + cmd.arg("install").arg("aster-frame-x86-boot-linux-setup"); cmd.arg("--debug"); cmd.arg("--locked"); cmd.arg("--path").arg(setup_crate_dir.to_str().unwrap()); diff --git a/framework/jinux-frame/src/arch/mod.rs b/framework/aster-frame/src/arch/mod.rs similarity index 100% rename from framework/jinux-frame/src/arch/mod.rs rename to framework/aster-frame/src/arch/mod.rs diff --git a/framework/jinux-frame/src/arch/x86/boot/boot.S b/framework/aster-frame/src/arch/x86/boot/boot.S similarity index 100% rename from framework/jinux-frame/src/arch/x86/boot/boot.S rename to framework/aster-frame/src/arch/x86/boot/boot.S diff --git a/framework/jinux-frame/src/arch/x86/boot/linux_boot/boot_params.rs b/framework/aster-frame/src/arch/x86/boot/linux_boot/boot_params.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/boot/linux_boot/boot_params.rs rename to framework/aster-frame/src/arch/x86/boot/linux_boot/boot_params.rs diff --git a/framework/jinux-frame/src/arch/x86/boot/linux_boot/mod.rs b/framework/aster-frame/src/arch/x86/boot/linux_boot/mod.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/boot/linux_boot/mod.rs rename to framework/aster-frame/src/arch/x86/boot/linux_boot/mod.rs diff --git a/framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/Cargo.toml b/framework/aster-frame/src/arch/x86/boot/linux_boot/setup/Cargo.toml similarity index 82% rename from framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/Cargo.toml rename to framework/aster-frame/src/arch/x86/boot/linux_boot/setup/Cargo.toml index 019b0c64c..41ba76b24 100644 --- a/framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/Cargo.toml +++ b/framework/aster-frame/src/arch/x86/boot/linux_boot/setup/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "jinux-frame-x86-boot-linux-setup" +name = "aster-frame-x86-boot-linux-setup" version = "0.1.0" edition = "2021" diff --git a/framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/build.rs b/framework/aster-frame/src/arch/x86/boot/linux_boot/setup/build.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/build.rs rename to framework/aster-frame/src/arch/x86/boot/linux_boot/setup/build.rs diff --git a/framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/linker.ld b/framework/aster-frame/src/arch/x86/boot/linux_boot/setup/linker.ld similarity index 100% rename from framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/linker.ld rename to framework/aster-frame/src/arch/x86/boot/linux_boot/setup/linker.ld diff --git a/framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/src/boot_params.rs b/framework/aster-frame/src/arch/x86/boot/linux_boot/setup/src/boot_params.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/src/boot_params.rs rename to framework/aster-frame/src/arch/x86/boot/linux_boot/setup/src/boot_params.rs diff --git a/framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/src/console.rs b/framework/aster-frame/src/arch/x86/boot/linux_boot/setup/src/console.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/src/console.rs rename to framework/aster-frame/src/arch/x86/boot/linux_boot/setup/src/console.rs diff --git a/framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/src/header.S b/framework/aster-frame/src/arch/x86/boot/linux_boot/setup/src/header.S similarity index 100% rename from framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/src/header.S rename to framework/aster-frame/src/arch/x86/boot/linux_boot/setup/src/header.S diff --git a/framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/src/loader.rs b/framework/aster-frame/src/arch/x86/boot/linux_boot/setup/src/loader.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/src/loader.rs rename to framework/aster-frame/src/arch/x86/boot/linux_boot/setup/src/loader.rs diff --git a/framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/src/main.rs b/framework/aster-frame/src/arch/x86/boot/linux_boot/setup/src/main.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/src/main.rs rename to framework/aster-frame/src/arch/x86/boot/linux_boot/setup/src/main.rs diff --git a/framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/x86_64-i386_protected_mode.json b/framework/aster-frame/src/arch/x86/boot/linux_boot/setup/x86_64-i386_protected_mode.json similarity index 100% rename from framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/x86_64-i386_protected_mode.json rename to framework/aster-frame/src/arch/x86/boot/linux_boot/setup/x86_64-i386_protected_mode.json diff --git a/framework/jinux-frame/src/arch/x86/boot/mod.rs b/framework/aster-frame/src/arch/x86/boot/mod.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/boot/mod.rs rename to framework/aster-frame/src/arch/x86/boot/mod.rs diff --git a/framework/jinux-frame/src/arch/x86/boot/multiboot/header.S b/framework/aster-frame/src/arch/x86/boot/multiboot/header.S similarity index 100% rename from framework/jinux-frame/src/arch/x86/boot/multiboot/header.S rename to framework/aster-frame/src/arch/x86/boot/multiboot/header.S diff --git a/framework/jinux-frame/src/arch/x86/boot/multiboot/mod.rs b/framework/aster-frame/src/arch/x86/boot/multiboot/mod.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/boot/multiboot/mod.rs rename to framework/aster-frame/src/arch/x86/boot/multiboot/mod.rs diff --git a/framework/jinux-frame/src/arch/x86/boot/multiboot2/header.S b/framework/aster-frame/src/arch/x86/boot/multiboot2/header.S similarity index 100% rename from framework/jinux-frame/src/arch/x86/boot/multiboot2/header.S rename to framework/aster-frame/src/arch/x86/boot/multiboot2/header.S diff --git a/framework/jinux-frame/src/arch/x86/boot/multiboot2/mod.rs b/framework/aster-frame/src/arch/x86/boot/multiboot2/mod.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/boot/multiboot2/mod.rs rename to framework/aster-frame/src/arch/x86/boot/multiboot2/mod.rs diff --git a/framework/jinux-frame/src/arch/x86/console.rs b/framework/aster-frame/src/arch/x86/console.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/console.rs rename to framework/aster-frame/src/arch/x86/console.rs diff --git a/framework/jinux-frame/src/arch/x86/cpu.rs b/framework/aster-frame/src/arch/x86/cpu.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/cpu.rs rename to framework/aster-frame/src/arch/x86/cpu.rs diff --git a/framework/jinux-frame/src/arch/x86/device/cmos.rs b/framework/aster-frame/src/arch/x86/device/cmos.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/device/cmos.rs rename to framework/aster-frame/src/arch/x86/device/cmos.rs diff --git a/framework/jinux-frame/src/arch/x86/device/io_port.rs b/framework/aster-frame/src/arch/x86/device/io_port.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/device/io_port.rs rename to framework/aster-frame/src/arch/x86/device/io_port.rs diff --git a/framework/jinux-frame/src/arch/x86/device/mod.rs b/framework/aster-frame/src/arch/x86/device/mod.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/device/mod.rs rename to framework/aster-frame/src/arch/x86/device/mod.rs diff --git a/framework/jinux-frame/src/arch/x86/device/serial.rs b/framework/aster-frame/src/arch/x86/device/serial.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/device/serial.rs rename to framework/aster-frame/src/arch/x86/device/serial.rs diff --git a/framework/jinux-frame/src/arch/x86/iommu/context_table.rs b/framework/aster-frame/src/arch/x86/iommu/context_table.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/iommu/context_table.rs rename to framework/aster-frame/src/arch/x86/iommu/context_table.rs diff --git a/framework/jinux-frame/src/arch/x86/iommu/fault.rs b/framework/aster-frame/src/arch/x86/iommu/fault.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/iommu/fault.rs rename to framework/aster-frame/src/arch/x86/iommu/fault.rs diff --git a/framework/jinux-frame/src/arch/x86/iommu/mod.rs b/framework/aster-frame/src/arch/x86/iommu/mod.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/iommu/mod.rs rename to framework/aster-frame/src/arch/x86/iommu/mod.rs diff --git a/framework/jinux-frame/src/arch/x86/iommu/remapping.rs b/framework/aster-frame/src/arch/x86/iommu/remapping.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/iommu/remapping.rs rename to framework/aster-frame/src/arch/x86/iommu/remapping.rs diff --git a/framework/jinux-frame/src/arch/x86/iommu/second_stage.rs b/framework/aster-frame/src/arch/x86/iommu/second_stage.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/iommu/second_stage.rs rename to framework/aster-frame/src/arch/x86/iommu/second_stage.rs diff --git a/framework/jinux-frame/src/arch/x86/irq.rs b/framework/aster-frame/src/arch/x86/irq.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/irq.rs rename to framework/aster-frame/src/arch/x86/irq.rs diff --git a/framework/jinux-frame/src/arch/x86/kernel/acpi/dmar.rs b/framework/aster-frame/src/arch/x86/kernel/acpi/dmar.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/kernel/acpi/dmar.rs rename to framework/aster-frame/src/arch/x86/kernel/acpi/dmar.rs diff --git a/framework/jinux-frame/src/arch/x86/kernel/acpi/mod.rs b/framework/aster-frame/src/arch/x86/kernel/acpi/mod.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/kernel/acpi/mod.rs rename to framework/aster-frame/src/arch/x86/kernel/acpi/mod.rs diff --git a/framework/jinux-frame/src/arch/x86/kernel/acpi/remapping.rs b/framework/aster-frame/src/arch/x86/kernel/acpi/remapping.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/kernel/acpi/remapping.rs rename to framework/aster-frame/src/arch/x86/kernel/acpi/remapping.rs diff --git a/framework/jinux-frame/src/arch/x86/kernel/apic/ioapic.rs b/framework/aster-frame/src/arch/x86/kernel/apic/ioapic.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/kernel/apic/ioapic.rs rename to framework/aster-frame/src/arch/x86/kernel/apic/ioapic.rs diff --git a/framework/jinux-frame/src/arch/x86/kernel/apic/mod.rs b/framework/aster-frame/src/arch/x86/kernel/apic/mod.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/kernel/apic/mod.rs rename to framework/aster-frame/src/arch/x86/kernel/apic/mod.rs diff --git a/framework/jinux-frame/src/arch/x86/kernel/apic/x2apic.rs b/framework/aster-frame/src/arch/x86/kernel/apic/x2apic.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/kernel/apic/x2apic.rs rename to framework/aster-frame/src/arch/x86/kernel/apic/x2apic.rs diff --git a/framework/jinux-frame/src/arch/x86/kernel/apic/xapic.rs b/framework/aster-frame/src/arch/x86/kernel/apic/xapic.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/kernel/apic/xapic.rs rename to framework/aster-frame/src/arch/x86/kernel/apic/xapic.rs diff --git a/framework/jinux-frame/src/arch/x86/kernel/mod.rs b/framework/aster-frame/src/arch/x86/kernel/mod.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/kernel/mod.rs rename to framework/aster-frame/src/arch/x86/kernel/mod.rs diff --git a/framework/jinux-frame/src/arch/x86/kernel/pic.rs b/framework/aster-frame/src/arch/x86/kernel/pic.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/kernel/pic.rs rename to framework/aster-frame/src/arch/x86/kernel/pic.rs diff --git a/framework/jinux-frame/src/arch/x86/kernel/tsc.rs b/framework/aster-frame/src/arch/x86/kernel/tsc.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/kernel/tsc.rs rename to framework/aster-frame/src/arch/x86/kernel/tsc.rs diff --git a/framework/jinux-frame/src/arch/x86/linker.ld b/framework/aster-frame/src/arch/x86/linker.ld similarity index 100% rename from framework/jinux-frame/src/arch/x86/linker.ld rename to framework/aster-frame/src/arch/x86/linker.ld diff --git a/framework/jinux-frame/src/arch/x86/mm/mod.rs b/framework/aster-frame/src/arch/x86/mm/mod.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/mm/mod.rs rename to framework/aster-frame/src/arch/x86/mm/mod.rs diff --git a/framework/jinux-frame/src/arch/x86/mod.rs b/framework/aster-frame/src/arch/x86/mod.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/mod.rs rename to framework/aster-frame/src/arch/x86/mod.rs diff --git a/framework/jinux-frame/src/arch/x86/pci.rs b/framework/aster-frame/src/arch/x86/pci.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/pci.rs rename to framework/aster-frame/src/arch/x86/pci.rs diff --git a/framework/jinux-frame/src/arch/x86/qemu.rs b/framework/aster-frame/src/arch/x86/qemu.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/qemu.rs rename to framework/aster-frame/src/arch/x86/qemu.rs diff --git a/framework/jinux-frame/src/arch/x86/tdx_guest.rs b/framework/aster-frame/src/arch/x86/tdx_guest.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/tdx_guest.rs rename to framework/aster-frame/src/arch/x86/tdx_guest.rs diff --git a/framework/jinux-frame/src/arch/x86/timer/apic.rs b/framework/aster-frame/src/arch/x86/timer/apic.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/timer/apic.rs rename to framework/aster-frame/src/arch/x86/timer/apic.rs diff --git a/framework/jinux-frame/src/arch/x86/timer/hpet.rs b/framework/aster-frame/src/arch/x86/timer/hpet.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/timer/hpet.rs rename to framework/aster-frame/src/arch/x86/timer/hpet.rs diff --git a/framework/jinux-frame/src/arch/x86/timer/mod.rs b/framework/aster-frame/src/arch/x86/timer/mod.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/timer/mod.rs rename to framework/aster-frame/src/arch/x86/timer/mod.rs diff --git a/framework/jinux-frame/src/arch/x86/timer/pit.rs b/framework/aster-frame/src/arch/x86/timer/pit.rs similarity index 100% rename from framework/jinux-frame/src/arch/x86/timer/pit.rs rename to framework/aster-frame/src/arch/x86/timer/pit.rs diff --git a/framework/jinux-frame/src/boot/kcmdline.rs b/framework/aster-frame/src/boot/kcmdline.rs similarity index 100% rename from framework/jinux-frame/src/boot/kcmdline.rs rename to framework/aster-frame/src/boot/kcmdline.rs diff --git a/framework/jinux-frame/src/boot/memory_region.rs b/framework/aster-frame/src/boot/memory_region.rs similarity index 100% rename from framework/jinux-frame/src/boot/memory_region.rs rename to framework/aster-frame/src/boot/memory_region.rs diff --git a/framework/jinux-frame/src/boot/mod.rs b/framework/aster-frame/src/boot/mod.rs similarity index 98% rename from framework/jinux-frame/src/boot/mod.rs rename to framework/aster-frame/src/boot/mod.rs index b0a0ab4e7..22711b6cd 100644 --- a/framework/jinux-frame/src/boot/mod.rs +++ b/framework/aster-frame/src/boot/mod.rs @@ -103,13 +103,13 @@ pub fn init() { /// Call the framework-user defined entrypoint of the actual kernel. /// -/// Any kernel that uses the jinux-frame crate should define a function named +/// Any kernel that uses the aster-frame crate should define a function named /// `jinux_main` as the entrypoint. pub fn call_jinux_main() -> ! { #[cfg(not(ktest))] unsafe { // The entry point of kernel code, which should be defined by the package that - // uses jinux-frame. + // uses aster-frame. extern "Rust" { fn jinux_main() -> !; } diff --git a/framework/jinux-frame/src/bus/mmio/bus.rs b/framework/aster-frame/src/bus/mmio/bus.rs similarity index 100% rename from framework/jinux-frame/src/bus/mmio/bus.rs rename to framework/aster-frame/src/bus/mmio/bus.rs diff --git a/framework/jinux-frame/src/bus/mmio/device.rs b/framework/aster-frame/src/bus/mmio/device.rs similarity index 100% rename from framework/jinux-frame/src/bus/mmio/device.rs rename to framework/aster-frame/src/bus/mmio/device.rs diff --git a/framework/jinux-frame/src/bus/mmio/mod.rs b/framework/aster-frame/src/bus/mmio/mod.rs similarity index 100% rename from framework/jinux-frame/src/bus/mmio/mod.rs rename to framework/aster-frame/src/bus/mmio/mod.rs diff --git a/framework/jinux-frame/src/bus/mod.rs b/framework/aster-frame/src/bus/mod.rs similarity index 100% rename from framework/jinux-frame/src/bus/mod.rs rename to framework/aster-frame/src/bus/mod.rs diff --git a/framework/jinux-frame/src/bus/pci/bus.rs b/framework/aster-frame/src/bus/pci/bus.rs similarity index 100% rename from framework/jinux-frame/src/bus/pci/bus.rs rename to framework/aster-frame/src/bus/pci/bus.rs diff --git a/framework/jinux-frame/src/bus/pci/capability/mod.rs b/framework/aster-frame/src/bus/pci/capability/mod.rs similarity index 100% rename from framework/jinux-frame/src/bus/pci/capability/mod.rs rename to framework/aster-frame/src/bus/pci/capability/mod.rs diff --git a/framework/jinux-frame/src/bus/pci/capability/msix.rs b/framework/aster-frame/src/bus/pci/capability/msix.rs similarity index 100% rename from framework/jinux-frame/src/bus/pci/capability/msix.rs rename to framework/aster-frame/src/bus/pci/capability/msix.rs diff --git a/framework/jinux-frame/src/bus/pci/capability/vendor.rs b/framework/aster-frame/src/bus/pci/capability/vendor.rs similarity index 100% rename from framework/jinux-frame/src/bus/pci/capability/vendor.rs rename to framework/aster-frame/src/bus/pci/capability/vendor.rs diff --git a/framework/jinux-frame/src/bus/pci/cfg_space.rs b/framework/aster-frame/src/bus/pci/cfg_space.rs similarity index 100% rename from framework/jinux-frame/src/bus/pci/cfg_space.rs rename to framework/aster-frame/src/bus/pci/cfg_space.rs diff --git a/framework/jinux-frame/src/bus/pci/common_device.rs b/framework/aster-frame/src/bus/pci/common_device.rs similarity index 100% rename from framework/jinux-frame/src/bus/pci/common_device.rs rename to framework/aster-frame/src/bus/pci/common_device.rs diff --git a/framework/jinux-frame/src/bus/pci/device_info.rs b/framework/aster-frame/src/bus/pci/device_info.rs similarity index 100% rename from framework/jinux-frame/src/bus/pci/device_info.rs rename to framework/aster-frame/src/bus/pci/device_info.rs diff --git a/framework/jinux-frame/src/bus/pci/mod.rs b/framework/aster-frame/src/bus/pci/mod.rs similarity index 100% rename from framework/jinux-frame/src/bus/pci/mod.rs rename to framework/aster-frame/src/bus/pci/mod.rs diff --git a/framework/jinux-frame/src/config.rs b/framework/aster-frame/src/config.rs similarity index 100% rename from framework/jinux-frame/src/config.rs rename to framework/aster-frame/src/config.rs diff --git a/framework/jinux-frame/src/console.rs b/framework/aster-frame/src/console.rs similarity index 100% rename from framework/jinux-frame/src/console.rs rename to framework/aster-frame/src/console.rs diff --git a/framework/jinux-frame/src/cpu.rs b/framework/aster-frame/src/cpu.rs similarity index 100% rename from framework/jinux-frame/src/cpu.rs rename to framework/aster-frame/src/cpu.rs diff --git a/framework/jinux-frame/src/error.rs b/framework/aster-frame/src/error.rs similarity index 100% rename from framework/jinux-frame/src/error.rs rename to framework/aster-frame/src/error.rs diff --git a/framework/jinux-frame/src/io_mem.rs b/framework/aster-frame/src/io_mem.rs similarity index 100% rename from framework/jinux-frame/src/io_mem.rs rename to framework/aster-frame/src/io_mem.rs diff --git a/framework/jinux-frame/src/lib.rs b/framework/aster-frame/src/lib.rs similarity index 100% rename from framework/jinux-frame/src/lib.rs rename to framework/aster-frame/src/lib.rs diff --git a/framework/jinux-frame/src/logger.rs b/framework/aster-frame/src/logger.rs similarity index 100% rename from framework/jinux-frame/src/logger.rs rename to framework/aster-frame/src/logger.rs diff --git a/framework/jinux-frame/src/panicking.rs b/framework/aster-frame/src/panicking.rs similarity index 100% rename from framework/jinux-frame/src/panicking.rs rename to framework/aster-frame/src/panicking.rs diff --git a/framework/jinux-frame/src/prelude.rs b/framework/aster-frame/src/prelude.rs similarity index 100% rename from framework/jinux-frame/src/prelude.rs rename to framework/aster-frame/src/prelude.rs diff --git a/framework/jinux-frame/src/sync/atomic_bits.rs b/framework/aster-frame/src/sync/atomic_bits.rs similarity index 100% rename from framework/jinux-frame/src/sync/atomic_bits.rs rename to framework/aster-frame/src/sync/atomic_bits.rs diff --git a/framework/jinux-frame/src/sync/mod.rs b/framework/aster-frame/src/sync/mod.rs similarity index 100% rename from framework/jinux-frame/src/sync/mod.rs rename to framework/aster-frame/src/sync/mod.rs diff --git a/framework/jinux-frame/src/sync/mutex.rs b/framework/aster-frame/src/sync/mutex.rs similarity index 100% rename from framework/jinux-frame/src/sync/mutex.rs rename to framework/aster-frame/src/sync/mutex.rs diff --git a/framework/jinux-frame/src/sync/rcu/mod.rs b/framework/aster-frame/src/sync/rcu/mod.rs similarity index 100% rename from framework/jinux-frame/src/sync/rcu/mod.rs rename to framework/aster-frame/src/sync/rcu/mod.rs diff --git a/framework/jinux-frame/src/sync/rcu/monitor.rs b/framework/aster-frame/src/sync/rcu/monitor.rs similarity index 100% rename from framework/jinux-frame/src/sync/rcu/monitor.rs rename to framework/aster-frame/src/sync/rcu/monitor.rs diff --git a/framework/jinux-frame/src/sync/rcu/owner_ptr.rs b/framework/aster-frame/src/sync/rcu/owner_ptr.rs similarity index 100% rename from framework/jinux-frame/src/sync/rcu/owner_ptr.rs rename to framework/aster-frame/src/sync/rcu/owner_ptr.rs diff --git a/framework/jinux-frame/src/sync/rwlock.rs b/framework/aster-frame/src/sync/rwlock.rs similarity index 99% rename from framework/jinux-frame/src/sync/rwlock.rs rename to framework/aster-frame/src/sync/rwlock.rs index ce4ce64df..7e8cbe46b 100644 --- a/framework/jinux-frame/src/sync/rwlock.rs +++ b/framework/aster-frame/src/sync/rwlock.rs @@ -57,7 +57,7 @@ use crate::trap::DisabledLocalIrqGuard; /// # Examples /// /// ``` -/// use jinux_frame::sync::RwLock; +/// use aster_frame::sync::RwLock; /// /// let lock = RwLock::new(5) /// diff --git a/framework/jinux-frame/src/sync/rwmutex.rs b/framework/aster-frame/src/sync/rwmutex.rs similarity index 99% rename from framework/jinux-frame/src/sync/rwmutex.rs rename to framework/aster-frame/src/sync/rwmutex.rs index 573e5e791..46078ac42 100644 --- a/framework/jinux-frame/src/sync/rwmutex.rs +++ b/framework/aster-frame/src/sync/rwmutex.rs @@ -46,7 +46,7 @@ use super::WaitQueue; /// # Examples /// /// ``` -/// use jinux_frame::sync::RwMutex; +/// use aster_frame::sync::RwMutex; /// /// let mutex = RwMutex::new(5) /// diff --git a/framework/jinux-frame/src/sync/spin.rs b/framework/aster-frame/src/sync/spin.rs similarity index 100% rename from framework/jinux-frame/src/sync/spin.rs rename to framework/aster-frame/src/sync/spin.rs diff --git a/framework/jinux-frame/src/sync/wait.rs b/framework/aster-frame/src/sync/wait.rs similarity index 100% rename from framework/jinux-frame/src/sync/wait.rs rename to framework/aster-frame/src/sync/wait.rs diff --git a/framework/jinux-frame/src/task/mod.rs b/framework/aster-frame/src/task/mod.rs similarity index 100% rename from framework/jinux-frame/src/task/mod.rs rename to framework/aster-frame/src/task/mod.rs diff --git a/framework/jinux-frame/src/task/priority.rs b/framework/aster-frame/src/task/priority.rs similarity index 100% rename from framework/jinux-frame/src/task/priority.rs rename to framework/aster-frame/src/task/priority.rs diff --git a/framework/jinux-frame/src/task/processor.rs b/framework/aster-frame/src/task/processor.rs similarity index 100% rename from framework/jinux-frame/src/task/processor.rs rename to framework/aster-frame/src/task/processor.rs diff --git a/framework/jinux-frame/src/task/scheduler.rs b/framework/aster-frame/src/task/scheduler.rs similarity index 100% rename from framework/jinux-frame/src/task/scheduler.rs rename to framework/aster-frame/src/task/scheduler.rs diff --git a/framework/jinux-frame/src/task/switch.S b/framework/aster-frame/src/task/switch.S similarity index 100% rename from framework/jinux-frame/src/task/switch.S rename to framework/aster-frame/src/task/switch.S diff --git a/framework/jinux-frame/src/task/task.rs b/framework/aster-frame/src/task/task.rs similarity index 100% rename from framework/jinux-frame/src/task/task.rs rename to framework/aster-frame/src/task/task.rs diff --git a/framework/jinux-frame/src/timer.rs b/framework/aster-frame/src/timer.rs similarity index 100% rename from framework/jinux-frame/src/timer.rs rename to framework/aster-frame/src/timer.rs diff --git a/framework/jinux-frame/src/trap/handler.rs b/framework/aster-frame/src/trap/handler.rs similarity index 100% rename from framework/jinux-frame/src/trap/handler.rs rename to framework/aster-frame/src/trap/handler.rs diff --git a/framework/jinux-frame/src/trap/irq.rs b/framework/aster-frame/src/trap/irq.rs similarity index 99% rename from framework/jinux-frame/src/trap/irq.rs rename to framework/aster-frame/src/trap/irq.rs index 25c102088..0f23b5b06 100644 --- a/framework/jinux-frame/src/trap/irq.rs +++ b/framework/aster-frame/src/trap/irq.rs @@ -98,7 +98,7 @@ impl Drop for IrqLine { /// # Example /// /// ``rust -/// use jinux_frame::irq; +/// use aster_frame::irq; /// /// { /// let _ = irq::disable_local(); diff --git a/framework/jinux-frame/src/trap/mod.rs b/framework/aster-frame/src/trap/mod.rs similarity index 100% rename from framework/jinux-frame/src/trap/mod.rs rename to framework/aster-frame/src/trap/mod.rs diff --git a/framework/jinux-frame/src/user.rs b/framework/aster-frame/src/user.rs similarity index 98% rename from framework/jinux-frame/src/user.rs rename to framework/aster-frame/src/user.rs index 97b950390..9b89bc6c4 100644 --- a/framework/jinux-frame/src/user.rs +++ b/framework/aster-frame/src/user.rs @@ -48,7 +48,7 @@ impl UserSpace { /// Specific architectures need to implement this trait. This should only used in `UserMode` /// -/// Only visible in jinux-frame +/// Only visible in aster-frame pub(crate) trait UserContextApiInternal { /// Starts executing in the user mode. fn execute(&mut self) -> UserEvent; @@ -98,7 +98,7 @@ pub trait UserContextApi { /// Here is a sample code on how to use `UserMode`. /// /// ```no_run -/// use jinux_frame::task::Task; +/// use aster_frame::task::Task; /// /// let current = Task::current(); /// let user_space = current.user_space() diff --git a/framework/jinux-frame/src/util/mod.rs b/framework/aster-frame/src/util/mod.rs similarity index 100% rename from framework/jinux-frame/src/util/mod.rs rename to framework/aster-frame/src/util/mod.rs diff --git a/framework/jinux-frame/src/util/recycle_allocator.rs b/framework/aster-frame/src/util/recycle_allocator.rs similarity index 100% rename from framework/jinux-frame/src/util/recycle_allocator.rs rename to framework/aster-frame/src/util/recycle_allocator.rs diff --git a/framework/jinux-frame/src/util/type_map.rs b/framework/aster-frame/src/util/type_map.rs similarity index 100% rename from framework/jinux-frame/src/util/type_map.rs rename to framework/aster-frame/src/util/type_map.rs diff --git a/framework/jinux-frame/src/vm/dma/dma_coherent.rs b/framework/aster-frame/src/vm/dma/dma_coherent.rs similarity index 100% rename from framework/jinux-frame/src/vm/dma/dma_coherent.rs rename to framework/aster-frame/src/vm/dma/dma_coherent.rs diff --git a/framework/jinux-frame/src/vm/dma/dma_stream.rs b/framework/aster-frame/src/vm/dma/dma_stream.rs similarity index 100% rename from framework/jinux-frame/src/vm/dma/dma_stream.rs rename to framework/aster-frame/src/vm/dma/dma_stream.rs diff --git a/framework/jinux-frame/src/vm/dma/mod.rs b/framework/aster-frame/src/vm/dma/mod.rs similarity index 100% rename from framework/jinux-frame/src/vm/dma/mod.rs rename to framework/aster-frame/src/vm/dma/mod.rs diff --git a/framework/jinux-frame/src/vm/frame.rs b/framework/aster-frame/src/vm/frame.rs similarity index 100% rename from framework/jinux-frame/src/vm/frame.rs rename to framework/aster-frame/src/vm/frame.rs diff --git a/framework/jinux-frame/src/vm/frame_allocator.rs b/framework/aster-frame/src/vm/frame_allocator.rs similarity index 100% rename from framework/jinux-frame/src/vm/frame_allocator.rs rename to framework/aster-frame/src/vm/frame_allocator.rs diff --git a/framework/jinux-frame/src/vm/heap_allocator.rs b/framework/aster-frame/src/vm/heap_allocator.rs similarity index 100% rename from framework/jinux-frame/src/vm/heap_allocator.rs rename to framework/aster-frame/src/vm/heap_allocator.rs diff --git a/framework/jinux-frame/src/vm/io.rs b/framework/aster-frame/src/vm/io.rs similarity index 100% rename from framework/jinux-frame/src/vm/io.rs rename to framework/aster-frame/src/vm/io.rs diff --git a/framework/jinux-frame/src/vm/memory_set.rs b/framework/aster-frame/src/vm/memory_set.rs similarity index 100% rename from framework/jinux-frame/src/vm/memory_set.rs rename to framework/aster-frame/src/vm/memory_set.rs diff --git a/framework/jinux-frame/src/vm/mod.rs b/framework/aster-frame/src/vm/mod.rs similarity index 96% rename from framework/jinux-frame/src/vm/mod.rs rename to framework/aster-frame/src/vm/mod.rs index 4a86befa2..bdd36c179 100644 --- a/framework/jinux-frame/src/vm/mod.rs +++ b/framework/aster-frame/src/vm/mod.rs @@ -54,12 +54,12 @@ pub const fn is_page_aligned(p: usize) -> bool { (p & (PAGE_SIZE - 1)) == 0 } -/// Convert physical address to virtual address using offset, only available inside jinux-frame +/// Convert physical address to virtual address using offset, only available inside aster-frame pub(crate) fn paddr_to_vaddr(pa: usize) -> usize { pa + PHYS_OFFSET } -/// Only available inside jinux-frame +/// Only available inside aster-frame pub(crate) static MEMORY_REGIONS: Once> = Once::new(); pub static FRAMEBUFFER_REGIONS: Once> = Once::new(); diff --git a/framework/jinux-frame/src/vm/offset.rs b/framework/aster-frame/src/vm/offset.rs similarity index 100% rename from framework/jinux-frame/src/vm/offset.rs rename to framework/aster-frame/src/vm/offset.rs diff --git a/framework/jinux-frame/src/vm/options.rs b/framework/aster-frame/src/vm/options.rs similarity index 100% rename from framework/jinux-frame/src/vm/options.rs rename to framework/aster-frame/src/vm/options.rs diff --git a/framework/jinux-frame/src/vm/page_table.rs b/framework/aster-frame/src/vm/page_table.rs similarity index 100% rename from framework/jinux-frame/src/vm/page_table.rs rename to framework/aster-frame/src/vm/page_table.rs diff --git a/framework/jinux-frame/src/vm/space.rs b/framework/aster-frame/src/vm/space.rs similarity index 100% rename from framework/jinux-frame/src/vm/space.rs rename to framework/aster-frame/src/vm/space.rs diff --git a/framework/libs/ktest/src/lib.rs b/framework/libs/ktest/src/lib.rs index 5e2f1c24e..640c72848 100644 --- a/framework/libs/ktest/src/lib.rs +++ b/framework/libs/ktest/src/lib.rs @@ -4,7 +4,7 @@ //! `cargo test`-like experience for any `#![no_std]` bare metal crates. //! //! In Jinux, all the tests written in the source tree of the crates will be run -//! immediately after the initialization of jinux-frame. Thus you can use any +//! immediately after the initialization of aster-frame. Thus you can use any //! feature provided by the frame including the heap allocator, etc. //! //! By all means, ktest is an individule crate that only requires: @@ -39,7 +39,7 @@ //! } //! ``` //! -//! And also, any crates using the ktest framework should be linked with jinux-frame +//! And also, any crates using the ktest framework should be linked with aster-frame //! and import the `ktest` crate: //! //! ```toml @@ -67,14 +67,14 @@ //! This is achieved by a whitelist filter on the test name. //! //! ```bash -//! make run KTEST=1 KTEST_WHITELIST=failing_assertion,jinux_frame::test::expect_panic +//! make run KTEST=1 KTEST_WHITELIST=failing_assertion,aster_frame::test::expect_panic //! ``` //! //! `KTEST_CRATES` variable is used to specify in which crates the tests to be run. //! This is achieved by conditionally compiling the test module using the `#[cfg]`. //! //! ```bash -//! make run KTEST=1 KTEST_CRATES=jinux-frame +//! make run KTEST=1 KTEST_CRATES=aster-frame //! `` //! //! We support the `#[should_panic]` attribute just in the same way as the standard diff --git a/kernel/main.rs b/kernel/main.rs index 340891903..43f653277 100644 --- a/kernel/main.rs +++ b/kernel/main.rs @@ -3,15 +3,15 @@ // The `export_name` attribute for the `jinux_main` entrypoint requires the removal of safety check. // Please be aware that the kernel is not allowed to introduce any other unsafe operations. // #![forbid(unsafe_code)] -extern crate jinux_frame; +extern crate aster_frame; -use jinux_frame::early_println; +use aster_frame::early_println; #[export_name = "jinux_main"] pub fn main() -> ! { - jinux_frame::init(); - early_println!("[kernel] finish init jinux_frame"); + aster_frame::init(); + early_println!("[kernel] finish init aster_frame"); component::init_all(component::parse_metadata!()).unwrap(); - jinux_std::init(); - jinux_std::run_first_process(); + aster_std::init(); + aster_std::run_first_process(); } diff --git a/runner/src/machine/qemu_grub_efi/linux_boot.rs b/runner/src/machine/qemu_grub_efi/linux_boot.rs index 1f7ab83e9..3a1ea0b2f 100644 --- a/runner/src/machine/qemu_grub_efi/linux_boot.rs +++ b/runner/src/machine/qemu_grub_efi/linux_boot.rs @@ -47,7 +47,7 @@ fn header_to_raw_binary(elf_file: &[u8]) -> Vec { /// This function sould be used when generating the Linux x86 Boot setup header. /// Some fields in the Linux x86 Boot setup header should be filled after assembled. /// And the filled fields must have the bytes with values of 0xAB. See -/// `framework/jinux-frame/src/arch/x86/boot/linux_boot/setup/src/header.S` for more +/// `framework/aster-frame/src/arch/x86/boot/linux_boot/setup/src/header.S` for more /// info on this mechanism. fn fill_header_field(header: &mut [u8], offset: usize, value: &[u8]) { let size = value.len(); diff --git a/runner/src/machine/qemu_grub_efi/mod.rs b/runner/src/machine/qemu_grub_efi/mod.rs index 8cb1454cc..a0fd489b8 100644 --- a/runner/src/machine/qemu_grub_efi/mod.rs +++ b/runner/src/machine/qemu_grub_efi/mod.rs @@ -96,14 +96,14 @@ pub fn create_bootdev_image( BootProtocol::Linux => { // Find the setup header in the build script output directory. let bs_out_dir = if release_mode { - glob("target/x86_64-custom/release/build/jinux-frame-*").unwrap() + glob("target/x86_64-custom/release/build/aster-frame-*").unwrap() } else { - glob("target/x86_64-custom/debug/build/jinux-frame-*").unwrap() + glob("target/x86_64-custom/debug/build/aster-frame-*").unwrap() }; let header_path = Path::new(bs_out_dir.into_iter().next().unwrap().unwrap().as_path()) .join("out") .join("bin") - .join("jinux-frame-x86-boot-linux-setup"); + .join("aster-frame-x86-boot-linux-setup"); // Make the `bzImage`-compatible kernel image and place it in the boot directory. let target_path = iso_root.join("boot").join("jinuz"); linux_boot::make_bzimage(&target_path, &jinux_path.as_path(), &header_path.as_path()) diff --git a/runner/src/main.rs b/runner/src/main.rs index 760201237..3551134f4 100644 --- a/runner/src/main.rs +++ b/runner/src/main.rs @@ -209,14 +209,15 @@ fn main() { println!("[jinux-runner] Running: {:#?}", qemu_cmd); let exit_status = qemu_cmd.status().unwrap(); - - // FIXME: Exit code manipulation is not needed when using non-x86 QEMU - let qemu_exit_code = exit_status.code().unwrap(); - let kernel_exit_code = qemu_exit_code >> 1; - match kernel_exit_code { - 0x10 /* jinux_frame::QemuExitCode::Success */ => { std::process::exit(0); }, - 0x20 /* jinux_frame::QemuExitCode::Failed */ => { std::process::exit(1); }, - _ /* unknown, e.g., a triple fault */ => { std::process::exit(2) }, + if !exit_status.success() { + // FIXME: Exit code manipulation is not needed when using non-x86 QEMU + let qemu_exit_code = exit_status.code().unwrap(); + let kernel_exit_code = qemu_exit_code >> 1; + match kernel_exit_code { + 0x10 /*aster_frame::QemuExitCode::Success*/ => { std::process::exit(0); }, + 0x20 /*aster_frame::QemuExitCode::Failed*/ => { std::process::exit(1); }, + _ /* unknown, e.g., a triple fault */ => { std::process::exit(2) }, + } } } diff --git a/services/comps/block/Cargo.toml b/services/comps/block/Cargo.toml index 99e0d2303..a3393222e 100644 --- a/services/comps/block/Cargo.toml +++ b/services/comps/block/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "jinux-block" +name = "aster-block" version = "0.1.0" edition = "2021" @@ -8,8 +8,8 @@ edition = "2021" [dependencies] bitflags = "1.3" spin = "0.9.4" -jinux-frame = { path = "../../../framework/jinux-frame" } -jinux-util = { path = "../../libs/jinux-util" } +aster-frame = { path = "../../../framework/aster-frame" } +aster-util = { path = "../../libs/aster-util" } component = { path = "../../libs/comp-sys/component" } log = "0.4" diff --git a/services/comps/block/src/lib.rs b/services/comps/block/src/lib.rs index c1410e17b..96f9f83ee 100644 --- a/services/comps/block/src/lib.rs +++ b/services/comps/block/src/lib.rs @@ -12,9 +12,9 @@ use alloc::collections::BTreeMap; use alloc::string::String; use alloc::sync::Arc; use alloc::vec::Vec; +use aster_frame::sync::SpinLock; use component::init_component; use component::ComponentInitError; -use jinux_frame::sync::SpinLock; use spin::Once; pub const BLK_SIZE: usize = 512; diff --git a/services/comps/console/Cargo.toml b/services/comps/console/Cargo.toml index 6e022aaa5..82ec86767 100644 --- a/services/comps/console/Cargo.toml +++ b/services/comps/console/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "jinux-console" +name = "aster-console" version = "0.1.0" edition = "2021" @@ -8,8 +8,8 @@ edition = "2021" [dependencies] bitflags = "1.3" spin = "0.9.4" -jinux-frame = { path = "../../../framework/jinux-frame" } -jinux-util = { path = "../../libs/jinux-util" } +aster-frame = { path = "../../../framework/aster-frame" } +aster-util = { path = "../../libs/aster-util" } component = { path = "../../libs/comp-sys/component" } log = "0.4" diff --git a/services/comps/console/src/lib.rs b/services/comps/console/src/lib.rs index 169f93ce6..5e46b4098 100644 --- a/services/comps/console/src/lib.rs +++ b/services/comps/console/src/lib.rs @@ -8,8 +8,8 @@ extern crate alloc; use alloc::{collections::BTreeMap, fmt::Debug, string::String, sync::Arc, vec::Vec}; use core::any::Any; +use aster_frame::sync::SpinLock; use component::{init_component, ComponentInitError}; -use jinux_frame::sync::SpinLock; use spin::Once; pub type ConsoleCallback = dyn Fn(&[u8]) + Send + Sync; diff --git a/services/comps/framebuffer/Cargo.toml b/services/comps/framebuffer/Cargo.toml index 623734d41..d8c729ed9 100644 --- a/services/comps/framebuffer/Cargo.toml +++ b/services/comps/framebuffer/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "jinux-framebuffer" +name = "aster-framebuffer" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -jinux-frame = { path = "../../../framework/jinux-frame" } +aster-frame = { path = "../../../framework/aster-frame" } component = { path = "../../libs/comp-sys/component" } log = "0.4" spin = "0.9.4" diff --git a/services/comps/framebuffer/src/lib.rs b/services/comps/framebuffer/src/lib.rs index 383bf5e2b..921f5e3ff 100644 --- a/services/comps/framebuffer/src/lib.rs +++ b/services/comps/framebuffer/src/lib.rs @@ -6,13 +6,13 @@ extern crate alloc; use alloc::vec::Vec; +use aster_frame::{boot, config::PAGE_SIZE, io_mem::IoMem, sync::SpinLock, vm::VmIo}; use component::{init_component, ComponentInitError}; use core::{ fmt, ops::{Index, IndexMut}, }; use font8x8::UnicodeFonts; -use jinux_frame::{boot, config::PAGE_SIZE, io_mem::IoMem, sync::SpinLock, vm::VmIo}; use spin::Once; #[init_component] @@ -28,7 +28,7 @@ pub(crate) fn init() { let framebuffer = boot::framebuffer_arg(); let mut writer = None; let mut size = 0; - for i in jinux_frame::vm::FRAMEBUFFER_REGIONS.get().unwrap().iter() { + for i in aster_frame::vm::FRAMEBUFFER_REGIONS.get().unwrap().iter() { size = i.len() as usize; } diff --git a/services/comps/input/Cargo.toml b/services/comps/input/Cargo.toml index 9726dad1b..7db8afd7e 100644 --- a/services/comps/input/Cargo.toml +++ b/services/comps/input/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "jinux-input" +name = "aster-input" version = "0.1.0" edition = "2021" @@ -8,9 +8,9 @@ edition = "2021" [dependencies] bitflags = "1.3" spin = "0.9.4" -jinux-frame = { path = "../../../framework/jinux-frame" } -jinux-util = { path = "../../libs/jinux-util" } -jinux-rights = { path = "../../libs/jinux-rights" } +aster-frame = { path = "../../../framework/aster-frame" } +aster-util = { path = "../../libs/aster-util" } +aster-rights = { path = "../../libs/aster-rights" } component = { path = "../../libs/comp-sys/component" } virtio-input-decoder = "0.1.4" log = "0.4" diff --git a/services/comps/input/src/lib.rs b/services/comps/input/src/lib.rs index 1644e88a0..ea58da312 100644 --- a/services/comps/input/src/lib.rs +++ b/services/comps/input/src/lib.rs @@ -14,7 +14,7 @@ use alloc::vec::Vec; use component::init_component; use component::ComponentInitError; -use jinux_frame::sync::SpinLock; +use aster_frame::sync::SpinLock; use spin::Once; use virtio_input_decoder::DecodeType; diff --git a/services/comps/network/Cargo.toml b/services/comps/network/Cargo.toml index d56d55ca1..97cc67ed2 100644 --- a/services/comps/network/Cargo.toml +++ b/services/comps/network/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "jinux-network" +name = "aster-network" version = "0.1.0" edition = "2021" @@ -7,9 +7,9 @@ edition = "2021" [dependencies] component = { path = "../../libs/comp-sys/component" } -jinux-frame = { path = "../../../framework/jinux-frame" } -jinux-util = { path = "../../libs/jinux-util" } -jinux-rights = { path = "../../libs/jinux-rights" } +aster-frame = { path = "../../../framework/aster-frame" } +aster-util = { path = "../../libs/aster-util" } +aster-rights = { path = "../../libs/aster-rights" } align_ext = { path = "../../../framework/libs/align_ext" } int-to-c-enum = { path = "../../libs/int-to-c-enum" } bytes = { version = "1.4.0", default-features = false } diff --git a/services/comps/network/src/lib.rs b/services/comps/network/src/lib.rs index 1614acb43..04ea77466 100644 --- a/services/comps/network/src/lib.rs +++ b/services/comps/network/src/lib.rs @@ -13,14 +13,14 @@ use alloc::collections::BTreeMap; use alloc::string::String; use alloc::sync::Arc; use alloc::vec::Vec; +use aster_frame::sync::SpinLock; +use aster_util::safe_ptr::Pod; use buffer::RxBuffer; use buffer::TxBuffer; use component::init_component; use component::ComponentInitError; use core::any::Any; use core::fmt::Debug; -use jinux_frame::sync::SpinLock; -use jinux_util::safe_ptr::Pod; use smoltcp::phy; use spin::Once; diff --git a/services/comps/time/Cargo.toml b/services/comps/time/Cargo.toml index 032189fed..aa595969c 100644 --- a/services/comps/time/Cargo.toml +++ b/services/comps/time/Cargo.toml @@ -1,13 +1,13 @@ [package] -name = "jinux-time" +name = "aster-time" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -jinux-frame = { path = "../../../framework/jinux-frame" } -jinux-util = { path = "../../libs/jinux-util" } +aster-frame = { path = "../../../framework/aster-frame" } +aster-util = { path = "../../libs/aster-util" } component = { path = "../../libs/comp-sys/component" } log = "0.4" spin = "0.9.4" diff --git a/services/comps/time/src/clocksource.rs b/services/comps/time/src/clocksource.rs index ef59320f7..b688d4235 100644 --- a/services/comps/time/src/clocksource.rs +++ b/services/comps/time/src/clocksource.rs @@ -6,9 +6,9 @@ //! It can be integrated into larger systems to provide timing capabilities, or used standalone for time tracking and elapsed time measurements. use alloc::sync::Arc; +use aster_frame::sync::SpinLock; +use aster_util::coeff::Coeff; use core::{cmp::max, ops::Add, time::Duration}; -use jinux_frame::sync::SpinLock; -use jinux_util::coeff::Coeff; use crate::NANOS_PER_SECOND; diff --git a/services/comps/time/src/lib.rs b/services/comps/time/src/lib.rs index b6c1e33f7..3c8e725a3 100644 --- a/services/comps/time/src/lib.rs +++ b/services/comps/time/src/lib.rs @@ -5,9 +5,9 @@ extern crate alloc; use alloc::sync::Arc; +use aster_frame::sync::Mutex; use component::{init_component, ComponentInitError}; use core::{sync::atomic::Ordering::Relaxed, time::Duration}; -use jinux_frame::sync::Mutex; use spin::Once; use clocksource::ClockSource; diff --git a/services/comps/time/src/rtc.rs b/services/comps/time/src/rtc.rs index 978d16079..a6dc47b6c 100644 --- a/services/comps/time/src/rtc.rs +++ b/services/comps/time/src/rtc.rs @@ -1,6 +1,6 @@ +use aster_frame::arch::x86::device::cmos::{get_century_register, CMOS_ADDRESS, CMOS_DATA}; use core::sync::atomic::AtomicU8; use core::sync::atomic::Ordering::Relaxed; -use jinux_frame::arch::x86::device::cmos::{get_century_register, CMOS_ADDRESS, CMOS_DATA}; pub(crate) static CENTURY_REGISTER: AtomicU8 = AtomicU8::new(0); diff --git a/services/comps/time/src/tsc.rs b/services/comps/time/src/tsc.rs index 3e2ddf0f3..d44fc34a8 100644 --- a/services/comps/time/src/tsc.rs +++ b/services/comps/time/src/tsc.rs @@ -2,9 +2,9 @@ //! //! Use `init` to initialize this module. use alloc::sync::Arc; +use aster_frame::arch::{read_tsc, x86::tsc_freq}; +use aster_frame::timer::Timer; use core::time::Duration; -use jinux_frame::arch::{read_tsc, x86::tsc_freq}; -use jinux_frame::timer::Timer; use spin::Once; use crate::clocksource::{ClockSource, Instant}; diff --git a/services/comps/virtio/Cargo.toml b/services/comps/virtio/Cargo.toml index e71cd2b26..f014aa134 100644 --- a/services/comps/virtio/Cargo.toml +++ b/services/comps/virtio/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "jinux-virtio" +name = "aster-virtio" version = "0.1.0" edition = "2021" @@ -11,13 +11,13 @@ spin = "0.9.4" virtio-input-decoder = "0.1.4" bytes = { version = "1.4.0", default-features = false } align_ext = { path = "../../../framework/libs/align_ext" } -jinux-input = { path = "../input" } -jinux-block = { path = "../block" } -jinux-network = { path = "../network" } -jinux-console = { path = "../console" } -jinux-frame = { path = "../../../framework/jinux-frame" } -jinux-util = { path = "../../libs/jinux-util" } -jinux-rights = { path = "../../libs/jinux-rights" } +aster-input = { path = "../input" } +aster-block = { path = "../block" } +aster-network = { path = "../network" } +aster-console = { path = "../console" } +aster-frame = { path = "../../../framework/aster-frame" } +aster-util = { path = "../../libs/aster-util" } +aster-rights = { path = "../../libs/aster-rights" } typeflags-util = { path = "../../libs/typeflags-util" } pod = { git = "https://github.com/jinzhao-dev/pod", rev = "d7dba56" } component = { path = "../../libs/comp-sys/component" } diff --git a/services/comps/virtio/src/device/block/device.rs b/services/comps/virtio/src/device/block/device.rs index 925a71aba..5bb1ea47e 100644 --- a/services/comps/virtio/src/device/block/device.rs +++ b/services/comps/virtio/src/device/block/device.rs @@ -1,8 +1,8 @@ use core::hint::spin_loop; use alloc::{boxed::Box, string::ToString, sync::Arc}; -use jinux_frame::{io_mem::IoMem, sync::SpinLock, trap::TrapFrame}; -use jinux_util::safe_ptr::SafePtr; +use aster_frame::{io_mem::IoMem, sync::SpinLock, trap::TrapFrame}; +use aster_util::safe_ptr::SafePtr; use log::info; use pod::Pod; @@ -97,7 +97,7 @@ impl BlockDevice { .unwrap(); fn handle_block_device(_: &TrapFrame) { - jinux_block::get_device(super::DEVICE_NAME) + aster_block::get_device(super::DEVICE_NAME) .unwrap() .handle_irq(); } @@ -107,7 +107,7 @@ impl BlockDevice { } device.transport.finish_init(); - jinux_block::register_device(super::DEVICE_NAME.to_string(), Arc::new(device)); + aster_block::register_device(super::DEVICE_NAME.to_string(), Arc::new(device)); Ok(()) } @@ -120,7 +120,7 @@ impl BlockDevice { } } -impl jinux_block::BlockDevice for BlockDevice { +impl aster_block::BlockDevice for BlockDevice { fn read_block(&self, block_id: usize, buf: &mut [u8]) { self.read(block_id, buf); } diff --git a/services/comps/virtio/src/device/block/mod.rs b/services/comps/virtio/src/device/block/mod.rs index fd6b5cefb..62763d723 100644 --- a/services/comps/virtio/src/device/block/mod.rs +++ b/services/comps/virtio/src/device/block/mod.rs @@ -1,9 +1,9 @@ pub mod device; +use aster_frame::io_mem::IoMem; +use aster_util::safe_ptr::SafePtr; use bitflags::bitflags; use int_to_c_enum::TryFromInt; -use jinux_frame::io_mem::IoMem; -use jinux_util::safe_ptr::SafePtr; use pod::Pod; use crate::transport::VirtioTransport; diff --git a/services/comps/virtio/src/device/console/config.rs b/services/comps/virtio/src/device/console/config.rs index b4212f961..f4e237319 100644 --- a/services/comps/virtio/src/device/console/config.rs +++ b/services/comps/virtio/src/device/console/config.rs @@ -1,5 +1,5 @@ -use jinux_frame::io_mem::IoMem; -use jinux_util::safe_ptr::SafePtr; +use aster_frame::io_mem::IoMem; +use aster_util::safe_ptr::SafePtr; use pod::Pod; use crate::transport::VirtioTransport; diff --git a/services/comps/virtio/src/device/console/device.rs b/services/comps/virtio/src/device/console/device.rs index d37fe2151..6993abf41 100644 --- a/services/comps/virtio/src/device/console/device.rs +++ b/services/comps/virtio/src/device/console/device.rs @@ -1,9 +1,9 @@ use core::hint::spin_loop; use alloc::{boxed::Box, fmt::Debug, string::ToString, sync::Arc, vec::Vec}; -use jinux_console::{AnyConsoleDevice, ConsoleCallback}; -use jinux_frame::{config::PAGE_SIZE, io_mem::IoMem, sync::SpinLock, trap::TrapFrame}; -use jinux_util::safe_ptr::SafePtr; +use aster_console::{AnyConsoleDevice, ConsoleCallback}; +use aster_frame::{config::PAGE_SIZE, io_mem::IoMem, sync::SpinLock, trap::TrapFrame}; +use aster_util::safe_ptr::SafePtr; use log::debug; use crate::{ @@ -130,14 +130,14 @@ impl ConsoleDevice { .unwrap(); device.transport.finish_init(); - jinux_console::register_device(DEVICE_NAME.to_string(), Arc::new(device)); + aster_console::register_device(DEVICE_NAME.to_string(), Arc::new(device)); Ok(()) } } fn handle_console_input(_: &TrapFrame) { - jinux_console::get_device(DEVICE_NAME).unwrap().handle_irq(); + aster_console::get_device(DEVICE_NAME).unwrap().handle_irq(); } fn config_space_change(_: &TrapFrame) { diff --git a/services/comps/virtio/src/device/input/device.rs b/services/comps/virtio/src/device/input/device.rs index dc5b48c16..fcb4b5fae 100644 --- a/services/comps/virtio/src/device/input/device.rs +++ b/services/comps/virtio/src/device/input/device.rs @@ -7,9 +7,9 @@ use alloc::{ sync::Arc, vec::Vec, }; +use aster_frame::{io_mem::IoMem, offset_of, sync::SpinLock, trap::TrapFrame}; +use aster_util::{field_ptr, safe_ptr::SafePtr}; use bitflags::bitflags; -use jinux_frame::{io_mem::IoMem, offset_of, sync::SpinLock, trap::TrapFrame}; -use jinux_util::{field_ptr, safe_ptr::SafePtr}; use log::{debug, info}; use pod::Pod; use virtio_input_decoder::{DecodeType, Decoder}; @@ -112,7 +112,7 @@ impl InputDevice { fn handle_input(_: &TrapFrame) { debug!("Handle Virtio input interrupt"); - let device = jinux_input::get_device(super::DEVICE_NAME).unwrap(); + let device = aster_input::get_device(super::DEVICE_NAME).unwrap(); device.handle_irq().unwrap(); } @@ -131,7 +131,7 @@ impl InputDevice { device.transport.finish_init(); - jinux_input::register_device(super::DEVICE_NAME.to_string(), Arc::new(device)); + aster_input::register_device(super::DEVICE_NAME.to_string(), Arc::new(device)); Ok(()) } @@ -183,7 +183,7 @@ impl InputDevice { } } -impl jinux_input::InputDevice for InputDevice { +impl aster_input::InputDevice for InputDevice { fn handle_irq(&self) -> Option<()> { // one interrupt may contains serval input, so it should loop loop { diff --git a/services/comps/virtio/src/device/input/mod.rs b/services/comps/virtio/src/device/input/mod.rs index c1310718d..eea3e1360 100644 --- a/services/comps/virtio/src/device/input/mod.rs +++ b/services/comps/virtio/src/device/input/mod.rs @@ -26,8 +26,8 @@ pub mod device; use crate::transport::VirtioTransport; -use jinux_frame::io_mem::IoMem; -use jinux_util::safe_ptr::SafePtr; +use aster_frame::io_mem::IoMem; +use aster_util::safe_ptr::SafePtr; use pod::Pod; pub static DEVICE_NAME: &str = "Virtio-Input"; diff --git a/services/comps/virtio/src/device/network/config.rs b/services/comps/virtio/src/device/network/config.rs index 1971655bb..0fb980d5b 100644 --- a/services/comps/virtio/src/device/network/config.rs +++ b/services/comps/virtio/src/device/network/config.rs @@ -1,7 +1,7 @@ +use aster_frame::io_mem::IoMem; +use aster_network::EthernetAddr; +use aster_util::safe_ptr::SafePtr; use bitflags::bitflags; -use jinux_frame::io_mem::IoMem; -use jinux_network::EthernetAddr; -use jinux_util::safe_ptr::SafePtr; use pod::Pod; use crate::transport::VirtioTransport; diff --git a/services/comps/virtio/src/device/network/device.rs b/services/comps/virtio/src/device/network/device.rs index 3faecadc1..f3fc6bfc0 100644 --- a/services/comps/virtio/src/device/network/device.rs +++ b/services/comps/virtio/src/device/network/device.rs @@ -1,12 +1,12 @@ use core::{fmt::Debug, hint::spin_loop, mem::size_of}; use alloc::{boxed::Box, string::ToString, sync::Arc, vec::Vec}; -use jinux_frame::{offset_of, sync::SpinLock, trap::TrapFrame}; -use jinux_network::{ +use aster_frame::{offset_of, sync::SpinLock, trap::TrapFrame}; +use aster_network::{ buffer::{RxBuffer, TxBuffer}, AnyNetworkDevice, EthernetAddr, NetDeviceIrqHandler, VirtioNetError, }; -use jinux_util::{field_ptr, slot_vec::SlotVec}; +use aster_util::{field_ptr, slot_vec::SlotVec}; use log::debug; use pod::Pod; use smoltcp::phy::{DeviceCapabilities, Medium}; @@ -87,7 +87,7 @@ impl NetworkDevice { /// Interrupt handler if network device receives some packet fn handle_network_event(_: &TrapFrame) { - jinux_network::handle_recv_irq(super::DEVICE_NAME); + aster_network::handle_recv_irq(super::DEVICE_NAME); } device @@ -99,7 +99,7 @@ impl NetworkDevice { .register_queue_callback(QUEUE_RECV, Box::new(handle_network_event), false) .unwrap(); - jinux_network::register_device( + aster_network::register_device( super::DEVICE_NAME.to_string(), Arc::new(SpinLock::new(Box::new(device))), ); diff --git a/services/comps/virtio/src/queue.rs b/services/comps/virtio/src/queue.rs index bca786595..b761a2aa8 100644 --- a/services/comps/virtio/src/queue.rs +++ b/services/comps/virtio/src/queue.rs @@ -3,18 +3,18 @@ use crate::transport::VirtioTransport; use alloc::vec::Vec; +use aster_frame::{ + io_mem::IoMem, + offset_of, + vm::{DmaCoherent, VmAllocOptions}, +}; +use aster_rights::{Dup, TRightSet, TRights, Write}; +use aster_util::{field_ptr, safe_ptr::SafePtr}; use bitflags::bitflags; use core::{ mem::size_of, sync::atomic::{fence, Ordering}, }; -use jinux_frame::{ - io_mem::IoMem, - offset_of, - vm::{DmaCoherent, VmAllocOptions}, -}; -use jinux_rights::{Dup, TRightSet, TRights, Write}; -use jinux_util::{field_ptr, safe_ptr::SafePtr}; use log::debug; use pod::Pod; @@ -372,7 +372,7 @@ fn set_buf(ptr: &SafePtr, device: Arc, - common_device: jinux_frame::bus::mmio::device::MmioCommonDevice, + common_device: aster_frame::bus::mmio::device::MmioCommonDevice, multiplex: Arc>, } diff --git a/services/comps/virtio/src/transport/mmio/driver.rs b/services/comps/virtio/src/transport/mmio/driver.rs index 1e6c428a7..e4d21dc8b 100644 --- a/services/comps/virtio/src/transport/mmio/driver.rs +++ b/services/comps/virtio/src/transport/mmio/driver.rs @@ -1,5 +1,5 @@ use alloc::{sync::Arc, vec::Vec}; -use jinux_frame::{ +use aster_frame::{ bus::{ mmio::{ bus::{MmioDevice, MmioDriver}, diff --git a/services/comps/virtio/src/transport/mmio/mod.rs b/services/comps/virtio/src/transport/mmio/mod.rs index be15263ef..13bb42c18 100644 --- a/services/comps/virtio/src/transport/mmio/mod.rs +++ b/services/comps/virtio/src/transport/mmio/mod.rs @@ -1,5 +1,5 @@ use alloc::sync::Arc; -use jinux_frame::bus::mmio::MMIO_BUS; +use aster_frame::bus::mmio::MMIO_BUS; use spin::Once; use self::driver::VirtioMmioDriver; diff --git a/services/comps/virtio/src/transport/mmio/multiplex.rs b/services/comps/virtio/src/transport/mmio/multiplex.rs index 845635643..82ee9f27d 100644 --- a/services/comps/virtio/src/transport/mmio/multiplex.rs +++ b/services/comps/virtio/src/transport/mmio/multiplex.rs @@ -1,13 +1,13 @@ use core::fmt::Debug; use alloc::{boxed::Box, sync::Arc, vec::Vec}; -use jinux_frame::{ +use aster_frame::{ io_mem::IoMem, sync::RwLock, trap::{IrqCallbackFunction, IrqLine, TrapFrame}, }; -use jinux_rights::{ReadOp, TRightSet, WriteOp}; -use jinux_util::safe_ptr::SafePtr; +use aster_rights::{ReadOp, TRightSet, WriteOp}; +use aster_util::safe_ptr::SafePtr; /// Multiplexing Irqs. The two interrupt types (configuration space change and queue interrupt) /// of the virtio-mmio device share the same IRQ, so `MultiplexIrq` are used to distinguish them. diff --git a/services/comps/virtio/src/transport/mod.rs b/services/comps/virtio/src/transport/mod.rs index c828bc7b6..46e083b86 100644 --- a/services/comps/virtio/src/transport/mod.rs +++ b/services/comps/virtio/src/transport/mod.rs @@ -1,8 +1,8 @@ use core::fmt::Debug; use alloc::boxed::Box; -use jinux_frame::{io_mem::IoMem, trap::IrqCallbackFunction, vm::DmaCoherent}; -use jinux_util::safe_ptr::SafePtr; +use aster_frame::{io_mem::IoMem, trap::IrqCallbackFunction, vm::DmaCoherent}; +use aster_util::safe_ptr::SafePtr; use crate::{ queue::{AvailRing, Descriptor, UsedRing}, diff --git a/services/comps/virtio/src/transport/pci/capability.rs b/services/comps/virtio/src/transport/pci/capability.rs index 9e6c35701..f8a4c6a7a 100644 --- a/services/comps/virtio/src/transport/pci/capability.rs +++ b/services/comps/virtio/src/transport/pci/capability.rs @@ -1,5 +1,5 @@ use alloc::sync::Arc; -use jinux_frame::bus::pci::{ +use aster_frame::bus::pci::{ capability::vendor::CapabilityVndrData, cfg_space::{Bar, IoBar, MemoryBar}, common_device::BarManager, diff --git a/services/comps/virtio/src/transport/pci/common_cfg.rs b/services/comps/virtio/src/transport/pci/common_cfg.rs index adaae7b1f..6d7248966 100644 --- a/services/comps/virtio/src/transport/pci/common_cfg.rs +++ b/services/comps/virtio/src/transport/pci/common_cfg.rs @@ -1,5 +1,5 @@ -use jinux_frame::io_mem::IoMem; -use jinux_util::safe_ptr::SafePtr; +use aster_frame::io_mem::IoMem; +use aster_util::safe_ptr::SafePtr; use pod::Pod; use crate::transport::pci::capability::VirtioPciCpabilityType; diff --git a/services/comps/virtio/src/transport/pci/device.rs b/services/comps/virtio/src/transport/pci/device.rs index 4862cf201..f67f1f097 100644 --- a/services/comps/virtio/src/transport/pci/device.rs +++ b/services/comps/virtio/src/transport/pci/device.rs @@ -1,4 +1,4 @@ -use jinux_frame::{ +use aster_frame::{ bus::{ pci::{ bus::PciDevice, capability::CapabilityData, common_device::PciCommonDevice, PciDeviceId, @@ -12,8 +12,8 @@ use jinux_frame::{ }; use alloc::{boxed::Box, sync::Arc}; +use aster_util::{field_ptr, safe_ptr::SafePtr}; use core::fmt::Debug; -use jinux_util::{field_ptr, safe_ptr::SafePtr}; use log::{info, warn}; use super::{common_cfg::VirtioPciCommonCfg, msix::VirtioMsixManager}; diff --git a/services/comps/virtio/src/transport/pci/driver.rs b/services/comps/virtio/src/transport/pci/driver.rs index 7f6cf9baa..5e37120f0 100644 --- a/services/comps/virtio/src/transport/pci/driver.rs +++ b/services/comps/virtio/src/transport/pci/driver.rs @@ -1,5 +1,5 @@ use alloc::{sync::Arc, vec::Vec}; -use jinux_frame::{ +use aster_frame::{ bus::{ pci::{ bus::{PciDevice, PciDriver}, diff --git a/services/comps/virtio/src/transport/pci/mod.rs b/services/comps/virtio/src/transport/pci/mod.rs index 886e72736..4fd80e8c7 100644 --- a/services/comps/virtio/src/transport/pci/mod.rs +++ b/services/comps/virtio/src/transport/pci/mod.rs @@ -5,7 +5,7 @@ pub mod driver; pub(super) mod msix; use alloc::sync::Arc; -use jinux_frame::bus::pci::PCI_BUS; +use aster_frame::bus::pci::PCI_BUS; use spin::Once; use self::driver::VirtioPciDriver; diff --git a/services/comps/virtio/src/transport/pci/msix.rs b/services/comps/virtio/src/transport/pci/msix.rs index 77ceda7b9..baeb093ac 100644 --- a/services/comps/virtio/src/transport/pci/msix.rs +++ b/services/comps/virtio/src/transport/pci/msix.rs @@ -1,5 +1,5 @@ use alloc::vec::Vec; -use jinux_frame::{bus::pci::capability::msix::CapabilityMsixData, trap::IrqLine}; +use aster_frame::{bus::pci::capability::msix::CapabilityMsixData, trap::IrqLine}; pub struct VirtioMsixManager { config_msix_vector: u16, @@ -17,7 +17,7 @@ impl VirtioMsixManager { pub fn new(mut msix: CapabilityMsixData) -> Self { let mut msix_vector_list: Vec = (0..msix.table_size()).collect(); for i in msix_vector_list.iter() { - let irq = jinux_frame::trap::IrqLine::alloc().unwrap(); + let irq = aster_frame::trap::IrqLine::alloc().unwrap(); msix.set_interrupt_vector(irq, *i); } let config_msix_vector = msix_vector_list.pop().unwrap(); diff --git a/services/libs/jinux-rights-proc/Cargo.toml b/services/libs/aster-rights-proc/Cargo.toml similarity index 91% rename from services/libs/jinux-rights-proc/Cargo.toml rename to services/libs/aster-rights-proc/Cargo.toml index 81c8dd134..bcdc003fc 100644 --- a/services/libs/jinux-rights-proc/Cargo.toml +++ b/services/libs/aster-rights-proc/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "jinux-rights-proc" +name = "aster-rights-proc" version = "0.1.0" edition = "2021" diff --git a/services/libs/jinux-rights-proc/src/lib.rs b/services/libs/aster-rights-proc/src/lib.rs similarity index 100% rename from services/libs/jinux-rights-proc/src/lib.rs rename to services/libs/aster-rights-proc/src/lib.rs diff --git a/services/libs/jinux-rights-proc/src/require_attr.rs b/services/libs/aster-rights-proc/src/require_attr.rs similarity index 100% rename from services/libs/jinux-rights-proc/src/require_attr.rs rename to services/libs/aster-rights-proc/src/require_attr.rs diff --git a/services/libs/jinux-rights-proc/src/require_item.rs b/services/libs/aster-rights-proc/src/require_item.rs similarity index 100% rename from services/libs/jinux-rights-proc/src/require_item.rs rename to services/libs/aster-rights-proc/src/require_item.rs diff --git a/services/libs/jinux-rights/Cargo.toml b/services/libs/aster-rights/Cargo.toml similarity index 78% rename from services/libs/jinux-rights/Cargo.toml rename to services/libs/aster-rights/Cargo.toml index 758231ac5..c9f4f522e 100644 --- a/services/libs/jinux-rights/Cargo.toml +++ b/services/libs/aster-rights/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "jinux-rights" +name = "aster-rights" version = "0.1.0" edition = "2021" @@ -9,6 +9,6 @@ edition = "2021" typeflags = { path = "../typeflags" } typeflags-util = { path = "../typeflags-util" } bitflags = "1.3" -jinux-rights-proc = { path = "../jinux-rights-proc" } +aster-rights-proc = { path = "../aster-rights-proc" } [features] diff --git a/services/libs/jinux-rights/src/lib.rs b/services/libs/aster-rights/src/lib.rs similarity index 98% rename from services/libs/jinux-rights/src/lib.rs rename to services/libs/aster-rights/src/lib.rs index 8b59cd257..e7e929bff 100644 --- a/services/libs/jinux-rights/src/lib.rs +++ b/services/libs/aster-rights/src/lib.rs @@ -58,7 +58,7 @@ pub type FullOp = TRights![Read, Write, Dup]; /// Example: /// /// ```rust -/// use jinux_rights::{Rights, TRights, TRightSet}; +/// use aster_rights::{Rights, TRights, TRightSet}; /// /// pub struct Vmo(R); /// diff --git a/services/libs/jinux-std/Cargo.toml b/services/libs/aster-std/Cargo.toml similarity index 79% rename from services/libs/jinux-std/Cargo.toml rename to services/libs/aster-std/Cargo.toml index f826e428f..6465467da 100644 --- a/services/libs/jinux-std/Cargo.toml +++ b/services/libs/aster-std/Cargo.toml @@ -1,26 +1,26 @@ [package] -name = "jinux-std" +name = "aster-std" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -jinux-frame = { path = "../../../framework/jinux-frame" } +aster-frame = { path = "../../../framework/aster-frame" } align_ext = { path = "../../../framework/libs/align_ext" } pod = { git = "https://github.com/jinzhao-dev/pod", rev = "d7dba56" } -jinux-input = { path = "../../comps/input" } -jinux-block = { path = "../../comps/block" } -jinux-network = { path = "../../comps/network" } -jinux-console = { path = "../../comps/console" } -jinux-time = { path = "../../comps/time" } -jinux-virtio = { path = "../../comps/virtio" } -jinux-rights = { path = "../jinux-rights" } +aster-input = { path = "../../comps/input" } +aster-block = { path = "../../comps/block" } +aster-network = { path = "../../comps/network" } +aster-console = { path = "../../comps/console" } +aster-time = { path = "../../comps/time" } +aster-virtio = { path = "../../comps/virtio" } +aster-rights = { path = "../aster-rights" } controlled = { path = "../../libs/comp-sys/controlled" } typeflags = { path = "../typeflags" } typeflags-util = { path = "../typeflags-util" } -jinux-rights-proc = { path = "../jinux-rights-proc" } -jinux-util = { path = "../jinux-util" } +aster-rights-proc = { path = "../aster-rights-proc" } +aster-util = { path = "../aster-util" } int-to-c-enum = { path = "../../libs/int-to-c-enum" } cpio-decoder = { path = "../cpio-decoder" } virtio-input-decoder = "0.1.4" diff --git a/services/libs/jinux-std/src/console.rs b/services/libs/aster-std/src/console.rs similarity index 94% rename from services/libs/jinux-std/src/console.rs rename to services/libs/aster-std/src/console.rs index b64572d16..d42995e2f 100644 --- a/services/libs/jinux-std/src/console.rs +++ b/services/libs/aster-std/src/console.rs @@ -9,7 +9,7 @@ struct VirtioConsolesPrinter; impl Write for VirtioConsolesPrinter { fn write_str(&mut self, s: &str) -> core::fmt::Result { - for (_, device) in jinux_console::all_devices() { + for (_, device) in aster_console::all_devices() { device.send(s.as_bytes()); } Ok(()) diff --git a/services/libs/jinux-std/src/device/mod.rs b/services/libs/aster-std/src/device/mod.rs similarity index 100% rename from services/libs/jinux-std/src/device/mod.rs rename to services/libs/aster-std/src/device/mod.rs diff --git a/services/libs/jinux-std/src/device/null.rs b/services/libs/aster-std/src/device/null.rs similarity index 100% rename from services/libs/jinux-std/src/device/null.rs rename to services/libs/aster-std/src/device/null.rs diff --git a/services/libs/jinux-std/src/device/pty/mod.rs b/services/libs/aster-std/src/device/pty/mod.rs similarity index 100% rename from services/libs/jinux-std/src/device/pty/mod.rs rename to services/libs/aster-std/src/device/pty/mod.rs diff --git a/services/libs/jinux-std/src/device/pty/pty.rs b/services/libs/aster-std/src/device/pty/pty.rs similarity index 100% rename from services/libs/jinux-std/src/device/pty/pty.rs rename to services/libs/aster-std/src/device/pty/pty.rs diff --git a/services/libs/jinux-std/src/device/random.rs b/services/libs/aster-std/src/device/random.rs similarity index 100% rename from services/libs/jinux-std/src/device/random.rs rename to services/libs/aster-std/src/device/random.rs diff --git a/services/libs/jinux-std/src/device/tdxguest/mod.rs b/services/libs/aster-std/src/device/tdxguest/mod.rs similarity index 100% rename from services/libs/jinux-std/src/device/tdxguest/mod.rs rename to services/libs/aster-std/src/device/tdxguest/mod.rs diff --git a/services/libs/jinux-std/src/device/tty/device.rs b/services/libs/aster-std/src/device/tty/device.rs similarity index 100% rename from services/libs/jinux-std/src/device/tty/device.rs rename to services/libs/aster-std/src/device/tty/device.rs diff --git a/services/libs/jinux-std/src/device/tty/driver.rs b/services/libs/aster-std/src/device/tty/driver.rs similarity index 95% rename from services/libs/jinux-std/src/device/tty/driver.rs rename to services/libs/aster-std/src/device/tty/driver.rs index b78036faa..8801680db 100644 --- a/services/libs/jinux-std/src/device/tty/driver.rs +++ b/services/libs/aster-std/src/device/tty/driver.rs @@ -1,4 +1,4 @@ -pub use jinux_frame::arch::console::register_console_input_callback; +pub use aster_frame::arch::console::register_console_input_callback; use spin::Once; use crate::{ @@ -9,7 +9,7 @@ use crate::{ pub static TTY_DRIVER: Once> = Once::new(); pub(super) fn init() { - for (_, device) in jinux_console::all_devices() { + for (_, device) in aster_console::all_devices() { device.register_callback(&console_input_callback) } let tty_driver = Arc::new(TtyDriver::new()); diff --git a/services/libs/jinux-std/src/device/tty/line_discipline.rs b/services/libs/aster-std/src/device/tty/line_discipline.rs similarity index 99% rename from services/libs/jinux-std/src/device/tty/line_discipline.rs rename to services/libs/aster-std/src/device/tty/line_discipline.rs index 7764f4eb5..29ace5190 100644 --- a/services/libs/jinux-std/src/device/tty/line_discipline.rs +++ b/services/libs/aster-std/src/device/tty/line_discipline.rs @@ -6,7 +6,7 @@ use crate::process::signal::{Pollee, Poller}; use crate::thread::work_queue::work_item::WorkItem; use crate::thread::work_queue::{submit_work_item, WorkPriority}; use alloc::format; -use jinux_frame::trap::disable_local; +use aster_frame::trap::disable_local; use ringbuf::{ring_buffer::RbBase, Rb, StaticRb}; use super::termio::{KernelTermios, WinSize, CC_C_CHAR}; diff --git a/services/libs/jinux-std/src/device/tty/mod.rs b/services/libs/aster-std/src/device/tty/mod.rs similarity index 100% rename from services/libs/jinux-std/src/device/tty/mod.rs rename to services/libs/aster-std/src/device/tty/mod.rs diff --git a/services/libs/jinux-std/src/device/tty/termio.rs b/services/libs/aster-std/src/device/tty/termio.rs similarity index 100% rename from services/libs/jinux-std/src/device/tty/termio.rs rename to services/libs/aster-std/src/device/tty/termio.rs diff --git a/services/libs/jinux-std/src/device/urandom.rs b/services/libs/aster-std/src/device/urandom.rs similarity index 100% rename from services/libs/jinux-std/src/device/urandom.rs rename to services/libs/aster-std/src/device/urandom.rs diff --git a/services/libs/jinux-std/src/device/zero.rs b/services/libs/aster-std/src/device/zero.rs similarity index 100% rename from services/libs/jinux-std/src/device/zero.rs rename to services/libs/aster-std/src/device/zero.rs diff --git a/services/libs/jinux-std/src/driver/mod.rs b/services/libs/aster-std/src/driver/mod.rs similarity index 88% rename from services/libs/jinux-std/src/driver/mod.rs rename to services/libs/aster-std/src/driver/mod.rs index 3c49bf8ec..4a49e8285 100644 --- a/services/libs/jinux-std/src/driver/mod.rs +++ b/services/libs/aster-std/src/driver/mod.rs @@ -2,14 +2,14 @@ use log::info; pub fn init() { // print all the input device to make sure input crate will compile - for (name, _) in jinux_input::all_devices() { + for (name, _) in aster_input::all_devices() { info!("Found Input device, name:{}", name); } } #[allow(unused)] fn block_device_test() { - for (_, device) in jinux_block::all_devices() { + for (_, device) in aster_block::all_devices() { let mut write_buffer = [0u8; 512]; let mut read_buffer = [0u8; 512]; info!("write_buffer address:{:x}", write_buffer.as_ptr() as usize); diff --git a/services/libs/jinux-std/src/error.rs b/services/libs/aster-std/src/error.rs similarity index 91% rename from services/libs/jinux-std/src/error.rs rename to services/libs/aster-std/src/error.rs index 2827c5afa..679bd83a4 100644 --- a/services/libs/jinux-std/src/error.rs +++ b/services/libs/aster-std/src/error.rs @@ -178,15 +178,15 @@ impl From for Error { } } -impl From for Error { - fn from(frame_error: jinux_frame::Error) -> Self { +impl From for Error { + fn from(frame_error: aster_frame::Error) -> Self { match frame_error { - jinux_frame::Error::AccessDenied => Error::new(Errno::EFAULT), - jinux_frame::Error::NoMemory => Error::new(Errno::ENOMEM), - jinux_frame::Error::InvalidArgs => Error::new(Errno::EINVAL), - jinux_frame::Error::IoError => Error::new(Errno::EIO), - jinux_frame::Error::NotEnoughResources => Error::new(Errno::EBUSY), - jinux_frame::Error::PageFault => Error::new(Errno::EFAULT), + aster_frame::Error::AccessDenied => Error::new(Errno::EFAULT), + aster_frame::Error::NoMemory => Error::new(Errno::ENOMEM), + aster_frame::Error::InvalidArgs => Error::new(Errno::EINVAL), + aster_frame::Error::IoError => Error::new(Errno::EIO), + aster_frame::Error::NotEnoughResources => Error::new(Errno::EBUSY), + aster_frame::Error::PageFault => Error::new(Errno::EFAULT), } } } @@ -237,16 +237,16 @@ impl From for Error { } } -impl From for jinux_frame::Error { +impl From for aster_frame::Error { fn from(error: Error) -> Self { match error.errno { - Errno::EACCES => jinux_frame::Error::AccessDenied, - Errno::EIO => jinux_frame::Error::IoError, - Errno::ENOMEM => jinux_frame::Error::NoMemory, - Errno::EFAULT => jinux_frame::Error::PageFault, - Errno::EINVAL => jinux_frame::Error::InvalidArgs, - Errno::EBUSY => jinux_frame::Error::NotEnoughResources, - _ => jinux_frame::Error::InvalidArgs, + Errno::EACCES => aster_frame::Error::AccessDenied, + Errno::EIO => aster_frame::Error::IoError, + Errno::ENOMEM => aster_frame::Error::NoMemory, + Errno::EFAULT => aster_frame::Error::PageFault, + Errno::EINVAL => aster_frame::Error::InvalidArgs, + Errno::EBUSY => aster_frame::Error::NotEnoughResources, + _ => aster_frame::Error::InvalidArgs, } } } diff --git a/services/libs/jinux-std/src/events/events.rs b/services/libs/aster-std/src/events/events.rs similarity index 100% rename from services/libs/jinux-std/src/events/events.rs rename to services/libs/aster-std/src/events/events.rs diff --git a/services/libs/jinux-std/src/events/io_events.rs b/services/libs/aster-std/src/events/io_events.rs similarity index 100% rename from services/libs/jinux-std/src/events/io_events.rs rename to services/libs/aster-std/src/events/io_events.rs diff --git a/services/libs/jinux-std/src/events/mod.rs b/services/libs/aster-std/src/events/mod.rs similarity index 100% rename from services/libs/jinux-std/src/events/mod.rs rename to services/libs/aster-std/src/events/mod.rs diff --git a/services/libs/jinux-std/src/events/observer.rs b/services/libs/aster-std/src/events/observer.rs similarity index 100% rename from services/libs/jinux-std/src/events/observer.rs rename to services/libs/aster-std/src/events/observer.rs diff --git a/services/libs/jinux-std/src/events/subject.rs b/services/libs/aster-std/src/events/subject.rs similarity index 100% rename from services/libs/jinux-std/src/events/subject.rs rename to services/libs/aster-std/src/events/subject.rs diff --git a/services/libs/jinux-std/src/fs/device.rs b/services/libs/aster-std/src/fs/device.rs similarity index 100% rename from services/libs/jinux-std/src/fs/device.rs rename to services/libs/aster-std/src/fs/device.rs diff --git a/services/libs/jinux-std/src/fs/devpts/mod.rs b/services/libs/aster-std/src/fs/devpts/mod.rs similarity index 98% rename from services/libs/jinux-std/src/fs/devpts/mod.rs rename to services/libs/aster-std/src/fs/devpts/mod.rs index 25d115d44..7b84d3eff 100644 --- a/services/libs/jinux-std/src/fs/devpts/mod.rs +++ b/services/libs/aster-std/src/fs/devpts/mod.rs @@ -6,9 +6,9 @@ use crate::fs::utils::{ }; use crate::prelude::*; +use aster_frame::vm::VmFrame; +use aster_util::{id_allocator::IdAlloc, slot_vec::SlotVec}; use core::time::Duration; -use jinux_frame::vm::VmFrame; -use jinux_util::{id_allocator::IdAlloc, slot_vec::SlotVec}; use self::ptmx::Ptmx; use self::slave::PtySlaveInode; diff --git a/services/libs/jinux-std/src/fs/devpts/ptmx.rs b/services/libs/aster-std/src/fs/devpts/ptmx.rs similarity index 100% rename from services/libs/jinux-std/src/fs/devpts/ptmx.rs rename to services/libs/aster-std/src/fs/devpts/ptmx.rs diff --git a/services/libs/jinux-std/src/fs/devpts/slave.rs b/services/libs/aster-std/src/fs/devpts/slave.rs similarity index 100% rename from services/libs/jinux-std/src/fs/devpts/slave.rs rename to services/libs/aster-std/src/fs/devpts/slave.rs diff --git a/services/libs/jinux-std/src/fs/epoll/epoll_file.rs b/services/libs/aster-std/src/fs/epoll/epoll_file.rs similarity index 100% rename from services/libs/jinux-std/src/fs/epoll/epoll_file.rs rename to services/libs/aster-std/src/fs/epoll/epoll_file.rs diff --git a/services/libs/jinux-std/src/fs/epoll/mod.rs b/services/libs/aster-std/src/fs/epoll/mod.rs similarity index 100% rename from services/libs/jinux-std/src/fs/epoll/mod.rs rename to services/libs/aster-std/src/fs/epoll/mod.rs diff --git a/services/libs/jinux-std/src/fs/file_handle.rs b/services/libs/aster-std/src/fs/file_handle.rs similarity index 100% rename from services/libs/jinux-std/src/fs/file_handle.rs rename to services/libs/aster-std/src/fs/file_handle.rs diff --git a/services/libs/jinux-std/src/fs/file_table.rs b/services/libs/aster-std/src/fs/file_table.rs similarity index 99% rename from services/libs/jinux-std/src/fs/file_table.rs rename to services/libs/aster-std/src/fs/file_table.rs index 93e622df3..b3b910ed4 100644 --- a/services/libs/jinux-std/src/fs/file_table.rs +++ b/services/libs/aster-std/src/fs/file_table.rs @@ -2,8 +2,8 @@ use crate::events::{Events, Observer, Subject}; use crate::net::socket::Socket; use crate::prelude::*; +use aster_util::slot_vec::SlotVec; use core::cell::Cell; -use jinux_util::slot_vec::SlotVec; use super::file_handle::FileLike; use super::fs_resolver::{FsPath, FsResolver, AT_FDCWD}; diff --git a/services/libs/jinux-std/src/fs/fs_resolver.rs b/services/libs/aster-std/src/fs/fs_resolver.rs similarity index 100% rename from services/libs/jinux-std/src/fs/fs_resolver.rs rename to services/libs/aster-std/src/fs/fs_resolver.rs diff --git a/services/libs/jinux-std/src/fs/inode_handle/dyn_cap.rs b/services/libs/aster-std/src/fs/inode_handle/dyn_cap.rs similarity index 98% rename from services/libs/jinux-std/src/fs/inode_handle/dyn_cap.rs rename to services/libs/aster-std/src/fs/inode_handle/dyn_cap.rs index fae4407c3..f554f4621 100644 --- a/services/libs/jinux-std/src/fs/inode_handle/dyn_cap.rs +++ b/services/libs/aster-std/src/fs/inode_handle/dyn_cap.rs @@ -1,7 +1,7 @@ use crate::events::IoEvents; use crate::prelude::*; use crate::process::signal::Poller; -use jinux_rights::{Rights, TRights}; +use aster_rights::{Rights, TRights}; use super::*; diff --git a/services/libs/jinux-std/src/fs/inode_handle/mod.rs b/services/libs/aster-std/src/fs/inode_handle/mod.rs similarity index 99% rename from services/libs/jinux-std/src/fs/inode_handle/mod.rs rename to services/libs/aster-std/src/fs/inode_handle/mod.rs index 665d6f491..e84dba0a2 100644 --- a/services/libs/jinux-std/src/fs/inode_handle/mod.rs +++ b/services/libs/aster-std/src/fs/inode_handle/mod.rs @@ -13,7 +13,7 @@ use crate::fs::utils::{ }; use crate::prelude::*; use crate::process::signal::Poller; -use jinux_rights::Rights; +use aster_rights::Rights; #[derive(Debug)] pub struct InodeHandle(Arc, R); diff --git a/services/libs/jinux-std/src/fs/inode_handle/static_cap.rs b/services/libs/aster-std/src/fs/inode_handle/static_cap.rs similarity index 87% rename from services/libs/jinux-std/src/fs/inode_handle/static_cap.rs rename to services/libs/aster-std/src/fs/inode_handle/static_cap.rs index dcd525df7..1744f4815 100644 --- a/services/libs/jinux-std/src/fs/inode_handle/static_cap.rs +++ b/services/libs/aster-std/src/fs/inode_handle/static_cap.rs @@ -1,6 +1,6 @@ use crate::prelude::*; -use jinux_rights::{Read, TRightSet, TRights, Write}; -use jinux_rights_proc::require; +use aster_rights::{Read, TRightSet, TRights, Write}; +use aster_rights_proc::require; use super::*; diff --git a/services/libs/jinux-std/src/fs/mod.rs b/services/libs/aster-std/src/fs/mod.rs similarity index 100% rename from services/libs/jinux-std/src/fs/mod.rs rename to services/libs/aster-std/src/fs/mod.rs diff --git a/services/libs/jinux-std/src/fs/pipe.rs b/services/libs/aster-std/src/fs/pipe.rs similarity index 100% rename from services/libs/jinux-std/src/fs/pipe.rs rename to services/libs/aster-std/src/fs/pipe.rs diff --git a/services/libs/jinux-std/src/fs/procfs/mod.rs b/services/libs/aster-std/src/fs/procfs/mod.rs similarity index 100% rename from services/libs/jinux-std/src/fs/procfs/mod.rs rename to services/libs/aster-std/src/fs/procfs/mod.rs diff --git a/services/libs/jinux-std/src/fs/procfs/pid/comm.rs b/services/libs/aster-std/src/fs/procfs/pid/comm.rs similarity index 100% rename from services/libs/jinux-std/src/fs/procfs/pid/comm.rs rename to services/libs/aster-std/src/fs/procfs/pid/comm.rs diff --git a/services/libs/jinux-std/src/fs/procfs/pid/exe.rs b/services/libs/aster-std/src/fs/procfs/pid/exe.rs similarity index 100% rename from services/libs/jinux-std/src/fs/procfs/pid/exe.rs rename to services/libs/aster-std/src/fs/procfs/pid/exe.rs diff --git a/services/libs/jinux-std/src/fs/procfs/pid/fd.rs b/services/libs/aster-std/src/fs/procfs/pid/fd.rs similarity index 100% rename from services/libs/jinux-std/src/fs/procfs/pid/fd.rs rename to services/libs/aster-std/src/fs/procfs/pid/fd.rs diff --git a/services/libs/jinux-std/src/fs/procfs/pid/mod.rs b/services/libs/aster-std/src/fs/procfs/pid/mod.rs similarity index 100% rename from services/libs/jinux-std/src/fs/procfs/pid/mod.rs rename to services/libs/aster-std/src/fs/procfs/pid/mod.rs diff --git a/services/libs/jinux-std/src/fs/procfs/self_.rs b/services/libs/aster-std/src/fs/procfs/self_.rs similarity index 100% rename from services/libs/jinux-std/src/fs/procfs/self_.rs rename to services/libs/aster-std/src/fs/procfs/self_.rs diff --git a/services/libs/jinux-std/src/fs/procfs/template/builder.rs b/services/libs/aster-std/src/fs/procfs/template/builder.rs similarity index 100% rename from services/libs/jinux-std/src/fs/procfs/template/builder.rs rename to services/libs/aster-std/src/fs/procfs/template/builder.rs diff --git a/services/libs/jinux-std/src/fs/procfs/template/dir.rs b/services/libs/aster-std/src/fs/procfs/template/dir.rs similarity index 99% rename from services/libs/jinux-std/src/fs/procfs/template/dir.rs rename to services/libs/aster-std/src/fs/procfs/template/dir.rs index 2f00ee35e..f14d38a14 100644 --- a/services/libs/jinux-std/src/fs/procfs/template/dir.rs +++ b/services/libs/aster-std/src/fs/procfs/template/dir.rs @@ -1,5 +1,5 @@ +use aster_util::slot_vec::SlotVec; use core::time::Duration; -use jinux_util::slot_vec::SlotVec; use crate::fs::device::Device; use crate::fs::utils::{DirentVisitor, FileSystem, Inode, InodeMode, InodeType, Metadata}; diff --git a/services/libs/jinux-std/src/fs/procfs/template/file.rs b/services/libs/aster-std/src/fs/procfs/template/file.rs similarity index 99% rename from services/libs/jinux-std/src/fs/procfs/template/file.rs rename to services/libs/aster-std/src/fs/procfs/template/file.rs index cb6fe1179..f583d9d69 100644 --- a/services/libs/jinux-std/src/fs/procfs/template/file.rs +++ b/services/libs/aster-std/src/fs/procfs/template/file.rs @@ -1,5 +1,5 @@ +use aster_frame::vm::VmFrame; use core::time::Duration; -use jinux_frame::vm::VmFrame; use crate::fs::utils::{FileSystem, Inode, InodeMode, InodeType, IoctlCmd, Metadata}; use crate::prelude::*; diff --git a/services/libs/jinux-std/src/fs/procfs/template/mod.rs b/services/libs/aster-std/src/fs/procfs/template/mod.rs similarity index 100% rename from services/libs/jinux-std/src/fs/procfs/template/mod.rs rename to services/libs/aster-std/src/fs/procfs/template/mod.rs diff --git a/services/libs/jinux-std/src/fs/procfs/template/sym.rs b/services/libs/aster-std/src/fs/procfs/template/sym.rs similarity index 98% rename from services/libs/jinux-std/src/fs/procfs/template/sym.rs rename to services/libs/aster-std/src/fs/procfs/template/sym.rs index 355a02904..01a9867e0 100644 --- a/services/libs/jinux-std/src/fs/procfs/template/sym.rs +++ b/services/libs/aster-std/src/fs/procfs/template/sym.rs @@ -1,5 +1,5 @@ +use aster_frame::vm::VmFrame; use core::time::Duration; -use jinux_frame::vm::VmFrame; use crate::fs::utils::{FileSystem, Inode, InodeMode, InodeType, IoctlCmd, Metadata}; use crate::prelude::*; diff --git a/services/libs/jinux-std/src/fs/ramfs/fs.rs b/services/libs/aster-std/src/fs/ramfs/fs.rs similarity index 99% rename from services/libs/jinux-std/src/fs/ramfs/fs.rs rename to services/libs/aster-std/src/fs/ramfs/fs.rs index 9d80d7d84..93467c71d 100644 --- a/services/libs/jinux-std/src/fs/ramfs/fs.rs +++ b/services/libs/aster-std/src/fs/ramfs/fs.rs @@ -1,10 +1,10 @@ use alloc::str; +use aster_frame::sync::{RwLock, RwLockWriteGuard}; +use aster_frame::vm::{VmFrame, VmIo}; +use aster_rights::Full; +use aster_util::slot_vec::SlotVec; use core::sync::atomic::{AtomicUsize, Ordering}; use core::time::Duration; -use jinux_frame::sync::{RwLock, RwLockWriteGuard}; -use jinux_frame::vm::{VmFrame, VmIo}; -use jinux_rights::Full; -use jinux_util::slot_vec::SlotVec; use super::*; use crate::events::IoEvents; diff --git a/services/libs/jinux-std/src/fs/ramfs/mod.rs b/services/libs/aster-std/src/fs/ramfs/mod.rs similarity index 100% rename from services/libs/jinux-std/src/fs/ramfs/mod.rs rename to services/libs/aster-std/src/fs/ramfs/mod.rs diff --git a/services/libs/jinux-std/src/fs/rootfs.rs b/services/libs/aster-std/src/fs/rootfs.rs similarity index 100% rename from services/libs/jinux-std/src/fs/rootfs.rs rename to services/libs/aster-std/src/fs/rootfs.rs diff --git a/services/libs/jinux-std/src/fs/utils/access_mode.rs b/services/libs/aster-std/src/fs/utils/access_mode.rs similarity index 98% rename from services/libs/jinux-std/src/fs/utils/access_mode.rs rename to services/libs/aster-std/src/fs/utils/access_mode.rs index 3929abd5f..cbf76ba37 100644 --- a/services/libs/jinux-std/src/fs/utils/access_mode.rs +++ b/services/libs/aster-std/src/fs/utils/access_mode.rs @@ -1,5 +1,5 @@ use crate::prelude::*; -use jinux_rights::Rights; +use aster_rights::Rights; #[allow(non_camel_case_types)] #[derive(Clone, Copy, Debug)] diff --git a/services/libs/jinux-std/src/fs/utils/channel.rs b/services/libs/aster-std/src/fs/utils/channel.rs similarity index 99% rename from services/libs/jinux-std/src/fs/utils/channel.rs rename to services/libs/aster-std/src/fs/utils/channel.rs index 605096c07..722953caf 100644 --- a/services/libs/jinux-std/src/fs/utils/channel.rs +++ b/services/libs/aster-std/src/fs/utils/channel.rs @@ -1,12 +1,12 @@ +use aster_rights_proc::require; use core::sync::atomic::{AtomicBool, AtomicU32, Ordering}; -use jinux_rights_proc::require; use ringbuf::{HeapConsumer as HeapRbConsumer, HeapProducer as HeapRbProducer, HeapRb}; use crate::events::IoEvents; use crate::events::Observer; use crate::prelude::*; use crate::process::signal::{Pollee, Poller}; -use jinux_rights::{Read, ReadOp, TRights, Write, WriteOp}; +use aster_rights::{Read, ReadOp, TRights, Write, WriteOp}; use super::StatusFlags; diff --git a/services/libs/jinux-std/src/fs/utils/creation_flags.rs b/services/libs/aster-std/src/fs/utils/creation_flags.rs similarity index 100% rename from services/libs/jinux-std/src/fs/utils/creation_flags.rs rename to services/libs/aster-std/src/fs/utils/creation_flags.rs diff --git a/services/libs/jinux-std/src/fs/utils/dentry.rs b/services/libs/aster-std/src/fs/utils/dentry.rs similarity index 100% rename from services/libs/jinux-std/src/fs/utils/dentry.rs rename to services/libs/aster-std/src/fs/utils/dentry.rs diff --git a/services/libs/jinux-std/src/fs/utils/dirent_visitor.rs b/services/libs/aster-std/src/fs/utils/dirent_visitor.rs similarity index 100% rename from services/libs/jinux-std/src/fs/utils/dirent_visitor.rs rename to services/libs/aster-std/src/fs/utils/dirent_visitor.rs diff --git a/services/libs/jinux-std/src/fs/utils/direntry_vec.rs b/services/libs/aster-std/src/fs/utils/direntry_vec.rs similarity index 96% rename from services/libs/jinux-std/src/fs/utils/direntry_vec.rs rename to services/libs/aster-std/src/fs/utils/direntry_vec.rs index 5d139caac..45c4b6b7a 100644 --- a/services/libs/jinux-std/src/fs/utils/direntry_vec.rs +++ b/services/libs/aster-std/src/fs/utils/direntry_vec.rs @@ -1,7 +1,7 @@ use super::Inode; use crate::prelude::*; -use jinux_util::slot_vec::SlotVec; +use aster_util::slot_vec::SlotVec; pub trait DirEntryVecExt { /// If the entry is not found by `name`, use `f` to get the inode, then put the entry into vec. diff --git a/services/libs/jinux-std/src/fs/utils/file_creation_mask.rs b/services/libs/aster-std/src/fs/utils/file_creation_mask.rs similarity index 100% rename from services/libs/jinux-std/src/fs/utils/file_creation_mask.rs rename to services/libs/aster-std/src/fs/utils/file_creation_mask.rs diff --git a/services/libs/jinux-std/src/fs/utils/fs.rs b/services/libs/aster-std/src/fs/utils/fs.rs similarity index 100% rename from services/libs/jinux-std/src/fs/utils/fs.rs rename to services/libs/aster-std/src/fs/utils/fs.rs diff --git a/services/libs/jinux-std/src/fs/utils/inode.rs b/services/libs/aster-std/src/fs/utils/inode.rs similarity index 99% rename from services/libs/jinux-std/src/fs/utils/inode.rs rename to services/libs/aster-std/src/fs/utils/inode.rs index 5726442fa..24b06a9de 100644 --- a/services/libs/jinux-std/src/fs/utils/inode.rs +++ b/services/libs/aster-std/src/fs/utils/inode.rs @@ -1,7 +1,7 @@ +use aster_frame::vm::VmFrame; +use aster_rights::Full; use core::time::Duration; use core2::io::{Error as IoError, ErrorKind as IoErrorKind, Result as IoResult, Write}; -use jinux_frame::vm::VmFrame; -use jinux_rights::Full; use super::{DirentVisitor, FileSystem, IoctlCmd, SuperBlock}; use crate::events::IoEvents; diff --git a/services/libs/jinux-std/src/fs/utils/ioctl.rs b/services/libs/aster-std/src/fs/utils/ioctl.rs similarity index 100% rename from services/libs/jinux-std/src/fs/utils/ioctl.rs rename to services/libs/aster-std/src/fs/utils/ioctl.rs diff --git a/services/libs/jinux-std/src/fs/utils/mod.rs b/services/libs/aster-std/src/fs/utils/mod.rs similarity index 100% rename from services/libs/jinux-std/src/fs/utils/mod.rs rename to services/libs/aster-std/src/fs/utils/mod.rs diff --git a/services/libs/jinux-std/src/fs/utils/mount.rs b/services/libs/aster-std/src/fs/utils/mount.rs similarity index 100% rename from services/libs/jinux-std/src/fs/utils/mount.rs rename to services/libs/aster-std/src/fs/utils/mount.rs diff --git a/services/libs/jinux-std/src/fs/utils/page_cache.rs b/services/libs/aster-std/src/fs/utils/page_cache.rs similarity index 98% rename from services/libs/jinux-std/src/fs/utils/page_cache.rs rename to services/libs/aster-std/src/fs/utils/page_cache.rs index 0d62fc0f2..f22f9ab98 100644 --- a/services/libs/jinux-std/src/fs/utils/page_cache.rs +++ b/services/libs/aster-std/src/fs/utils/page_cache.rs @@ -1,10 +1,10 @@ use super::Inode; use crate::prelude::*; use crate::vm::vmo::{get_page_idx_range, Pager, Vmo, VmoFlags, VmoOptions}; -use jinux_rights::Full; +use aster_rights::Full; +use aster_frame::vm::{VmAllocOptions, VmFrame}; use core::ops::Range; -use jinux_frame::vm::{VmAllocOptions, VmFrame}; use lru::LruCache; pub struct PageCache { diff --git a/services/libs/jinux-std/src/fs/utils/status_flags.rs b/services/libs/aster-std/src/fs/utils/status_flags.rs similarity index 100% rename from services/libs/jinux-std/src/fs/utils/status_flags.rs rename to services/libs/aster-std/src/fs/utils/status_flags.rs diff --git a/services/libs/jinux-std/src/lib.rs b/services/libs/aster-std/src/lib.rs similarity index 97% rename from services/libs/jinux-std/src/lib.rs rename to services/libs/aster-std/src/lib.rs index b79b0e1b3..9e0d88d7a 100644 --- a/services/libs/jinux-std/src/lib.rs +++ b/services/libs/aster-std/src/lib.rs @@ -28,7 +28,7 @@ use crate::{ Thread, }, }; -use jinux_frame::{ +use aster_frame::{ arch::qemu::{exit_qemu, QemuExitCode}, boot, }; @@ -82,7 +82,7 @@ fn init_thread() { })); thread.join(); info!( - "[jinux-std/lib.rs] spawn kernel thread, tid = {}", + "[aster-std/lib.rs] spawn kernel thread, tid = {}", thread.tid() ); thread::work_queue::init(); diff --git a/services/libs/jinux-std/src/net/iface/any_socket.rs b/services/libs/aster-std/src/net/iface/any_socket.rs similarity index 100% rename from services/libs/jinux-std/src/net/iface/any_socket.rs rename to services/libs/aster-std/src/net/iface/any_socket.rs diff --git a/services/libs/jinux-std/src/net/iface/common.rs b/services/libs/aster-std/src/net/iface/common.rs similarity index 100% rename from services/libs/jinux-std/src/net/iface/common.rs rename to services/libs/aster-std/src/net/iface/common.rs diff --git a/services/libs/jinux-std/src/net/iface/loopback.rs b/services/libs/aster-std/src/net/iface/loopback.rs similarity index 100% rename from services/libs/jinux-std/src/net/iface/loopback.rs rename to services/libs/aster-std/src/net/iface/loopback.rs diff --git a/services/libs/jinux-std/src/net/iface/mod.rs b/services/libs/aster-std/src/net/iface/mod.rs similarity index 100% rename from services/libs/jinux-std/src/net/iface/mod.rs rename to services/libs/aster-std/src/net/iface/mod.rs diff --git a/services/libs/jinux-std/src/net/iface/time.rs b/services/libs/aster-std/src/net/iface/time.rs similarity index 76% rename from services/libs/jinux-std/src/net/iface/time.rs rename to services/libs/aster-std/src/net/iface/time.rs index 4bcc1ff49..d7aced038 100644 --- a/services/libs/jinux-std/src/net/iface/time.rs +++ b/services/libs/aster-std/src/net/iface/time.rs @@ -1,4 +1,4 @@ -use jinux_frame::timer::read_monotonic_milli_seconds; +use aster_frame::timer::read_monotonic_milli_seconds; pub(super) fn get_network_timestamp() -> smoltcp::time::Instant { let millis = read_monotonic_milli_seconds(); diff --git a/services/libs/jinux-std/src/net/iface/util.rs b/services/libs/aster-std/src/net/iface/util.rs similarity index 97% rename from services/libs/jinux-std/src/net/iface/util.rs rename to services/libs/aster-std/src/net/iface/util.rs index a12269674..d4dd1acac 100644 --- a/services/libs/jinux-std/src/net/iface/util.rs +++ b/services/libs/aster-std/src/net/iface/util.rs @@ -1,4 +1,4 @@ -use jinux_frame::timer::read_monotonic_milli_seconds; +use aster_frame::timer::read_monotonic_milli_seconds; use crate::{ prelude::*, diff --git a/services/libs/jinux-std/src/net/iface/virtio.rs b/services/libs/aster-std/src/net/iface/virtio.rs similarity index 95% rename from services/libs/jinux-std/src/net/iface/virtio.rs rename to services/libs/aster-std/src/net/iface/virtio.rs index 9b9c82e14..aa49034ff 100644 --- a/services/libs/jinux-std/src/net/iface/virtio.rs +++ b/services/libs/aster-std/src/net/iface/virtio.rs @@ -1,7 +1,7 @@ use crate::prelude::*; -use jinux_frame::sync::SpinLock; -use jinux_network::AnyNetworkDevice; -use jinux_virtio::device::network::DEVICE_NAME; +use aster_frame::sync::SpinLock; +use aster_network::AnyNetworkDevice; +use aster_virtio::device::network::DEVICE_NAME; use smoltcp::{ iface::{Config, Routes, SocketHandle, SocketSet}, socket::dhcpv4, @@ -19,7 +19,7 @@ pub struct IfaceVirtio { impl IfaceVirtio { pub fn new() -> Arc { - let virtio_net = jinux_network::get_device(DEVICE_NAME).unwrap(); + let virtio_net = aster_network::get_device(DEVICE_NAME).unwrap(); let interface = { let mac_addr = virtio_net.lock().mac_addr(); let ip_addr = IpCidr::new(wire::IpAddress::Ipv4(wire::Ipv4Address::UNSPECIFIED), 0); diff --git a/services/libs/jinux-std/src/net/mod.rs b/services/libs/aster-std/src/net/mod.rs similarity index 89% rename from services/libs/jinux-std/src/net/mod.rs rename to services/libs/aster-std/src/net/mod.rs index dee7122c4..bf368dd37 100644 --- a/services/libs/jinux-std/src/net/mod.rs +++ b/services/libs/aster-std/src/net/mod.rs @@ -18,8 +18,8 @@ pub fn init() { vec![iface_virtio, iface_loopback] }); - for (name, _) in jinux_network::all_devices() { - jinux_network::register_recv_callback(&name, || { + for (name, _) in aster_network::all_devices() { + aster_network::register_recv_callback(&name, || { // TODO: further check that the irq num is the same as iface's irq num let iface_virtio = &IFACES.get().unwrap()[0]; iface_virtio.poll(); diff --git a/services/libs/jinux-std/src/net/socket/ip/always_some.rs b/services/libs/aster-std/src/net/socket/ip/always_some.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/ip/always_some.rs rename to services/libs/aster-std/src/net/socket/ip/always_some.rs diff --git a/services/libs/jinux-std/src/net/socket/ip/common.rs b/services/libs/aster-std/src/net/socket/ip/common.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/ip/common.rs rename to services/libs/aster-std/src/net/socket/ip/common.rs diff --git a/services/libs/jinux-std/src/net/socket/ip/datagram/bound.rs b/services/libs/aster-std/src/net/socket/ip/datagram/bound.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/ip/datagram/bound.rs rename to services/libs/aster-std/src/net/socket/ip/datagram/bound.rs diff --git a/services/libs/jinux-std/src/net/socket/ip/datagram/mod.rs b/services/libs/aster-std/src/net/socket/ip/datagram/mod.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/ip/datagram/mod.rs rename to services/libs/aster-std/src/net/socket/ip/datagram/mod.rs diff --git a/services/libs/jinux-std/src/net/socket/ip/datagram/unbound.rs b/services/libs/aster-std/src/net/socket/ip/datagram/unbound.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/ip/datagram/unbound.rs rename to services/libs/aster-std/src/net/socket/ip/datagram/unbound.rs diff --git a/services/libs/jinux-std/src/net/socket/ip/mod.rs b/services/libs/aster-std/src/net/socket/ip/mod.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/ip/mod.rs rename to services/libs/aster-std/src/net/socket/ip/mod.rs diff --git a/services/libs/jinux-std/src/net/socket/ip/stream/connected.rs b/services/libs/aster-std/src/net/socket/ip/stream/connected.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/ip/stream/connected.rs rename to services/libs/aster-std/src/net/socket/ip/stream/connected.rs diff --git a/services/libs/jinux-std/src/net/socket/ip/stream/connecting.rs b/services/libs/aster-std/src/net/socket/ip/stream/connecting.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/ip/stream/connecting.rs rename to services/libs/aster-std/src/net/socket/ip/stream/connecting.rs diff --git a/services/libs/jinux-std/src/net/socket/ip/stream/init.rs b/services/libs/aster-std/src/net/socket/ip/stream/init.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/ip/stream/init.rs rename to services/libs/aster-std/src/net/socket/ip/stream/init.rs diff --git a/services/libs/jinux-std/src/net/socket/ip/stream/listen.rs b/services/libs/aster-std/src/net/socket/ip/stream/listen.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/ip/stream/listen.rs rename to services/libs/aster-std/src/net/socket/ip/stream/listen.rs diff --git a/services/libs/jinux-std/src/net/socket/ip/stream/mod.rs b/services/libs/aster-std/src/net/socket/ip/stream/mod.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/ip/stream/mod.rs rename to services/libs/aster-std/src/net/socket/ip/stream/mod.rs diff --git a/services/libs/jinux-std/src/net/socket/mod.rs b/services/libs/aster-std/src/net/socket/mod.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/mod.rs rename to services/libs/aster-std/src/net/socket/mod.rs diff --git a/services/libs/jinux-std/src/net/socket/unix/addr.rs b/services/libs/aster-std/src/net/socket/unix/addr.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/unix/addr.rs rename to services/libs/aster-std/src/net/socket/unix/addr.rs diff --git a/services/libs/jinux-std/src/net/socket/unix/mod.rs b/services/libs/aster-std/src/net/socket/unix/mod.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/unix/mod.rs rename to services/libs/aster-std/src/net/socket/unix/mod.rs diff --git a/services/libs/jinux-std/src/net/socket/unix/stream/connected.rs b/services/libs/aster-std/src/net/socket/unix/stream/connected.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/unix/stream/connected.rs rename to services/libs/aster-std/src/net/socket/unix/stream/connected.rs diff --git a/services/libs/jinux-std/src/net/socket/unix/stream/endpoint.rs b/services/libs/aster-std/src/net/socket/unix/stream/endpoint.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/unix/stream/endpoint.rs rename to services/libs/aster-std/src/net/socket/unix/stream/endpoint.rs diff --git a/services/libs/jinux-std/src/net/socket/unix/stream/init.rs b/services/libs/aster-std/src/net/socket/unix/stream/init.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/unix/stream/init.rs rename to services/libs/aster-std/src/net/socket/unix/stream/init.rs diff --git a/services/libs/jinux-std/src/net/socket/unix/stream/listener.rs b/services/libs/aster-std/src/net/socket/unix/stream/listener.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/unix/stream/listener.rs rename to services/libs/aster-std/src/net/socket/unix/stream/listener.rs diff --git a/services/libs/jinux-std/src/net/socket/unix/stream/mod.rs b/services/libs/aster-std/src/net/socket/unix/stream/mod.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/unix/stream/mod.rs rename to services/libs/aster-std/src/net/socket/unix/stream/mod.rs diff --git a/services/libs/jinux-std/src/net/socket/unix/stream/socket.rs b/services/libs/aster-std/src/net/socket/unix/stream/socket.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/unix/stream/socket.rs rename to services/libs/aster-std/src/net/socket/unix/stream/socket.rs diff --git a/services/libs/jinux-std/src/net/socket/util/mod.rs b/services/libs/aster-std/src/net/socket/util/mod.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/util/mod.rs rename to services/libs/aster-std/src/net/socket/util/mod.rs diff --git a/services/libs/jinux-std/src/net/socket/util/send_recv_flags.rs b/services/libs/aster-std/src/net/socket/util/send_recv_flags.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/util/send_recv_flags.rs rename to services/libs/aster-std/src/net/socket/util/send_recv_flags.rs diff --git a/services/libs/jinux-std/src/net/socket/util/shutdown_cmd.rs b/services/libs/aster-std/src/net/socket/util/shutdown_cmd.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/util/shutdown_cmd.rs rename to services/libs/aster-std/src/net/socket/util/shutdown_cmd.rs diff --git a/services/libs/jinux-std/src/net/socket/util/sock_options.rs b/services/libs/aster-std/src/net/socket/util/sock_options.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/util/sock_options.rs rename to services/libs/aster-std/src/net/socket/util/sock_options.rs diff --git a/services/libs/jinux-std/src/net/socket/util/sockaddr.rs b/services/libs/aster-std/src/net/socket/util/sockaddr.rs similarity index 100% rename from services/libs/jinux-std/src/net/socket/util/sockaddr.rs rename to services/libs/aster-std/src/net/socket/util/sockaddr.rs diff --git a/services/libs/jinux-std/src/prelude.rs b/services/libs/aster-std/src/prelude.rs similarity index 89% rename from services/libs/jinux-std/src/prelude.rs rename to services/libs/aster-std/src/prelude.rs index d14de0724..13465285b 100644 --- a/services/libs/jinux-std/src/prelude.rs +++ b/services/libs/aster-std/src/prelude.rs @@ -12,14 +12,14 @@ pub(crate) use alloc::sync::Arc; pub(crate) use alloc::sync::Weak; pub(crate) use alloc::vec; pub(crate) use alloc::vec::Vec; +pub(crate) use aster_frame::config::PAGE_SIZE; +pub(crate) use aster_frame::sync::{Mutex, MutexGuard, RwLock, SpinLock, SpinLockGuard}; +pub(crate) use aster_frame::vm::Vaddr; pub(crate) use bitflags::bitflags; pub(crate) use core::any::Any; pub(crate) use core::ffi::CStr; pub(crate) use core::fmt::Debug; pub(crate) use int_to_c_enum::TryFromInt; -pub(crate) use jinux_frame::config::PAGE_SIZE; -pub(crate) use jinux_frame::sync::{Mutex, MutexGuard, RwLock, SpinLock, SpinLockGuard}; -pub(crate) use jinux_frame::vm::Vaddr; pub(crate) use log::{debug, error, info, trace, warn}; pub(crate) use pod::Pod; diff --git a/services/libs/jinux-std/src/process/clone.rs b/services/libs/aster-std/src/process/clone.rs similarity index 99% rename from services/libs/jinux-std/src/process/clone.rs rename to services/libs/aster-std/src/process/clone.rs index 3f6327477..4f901de00 100644 --- a/services/libs/jinux-std/src/process/clone.rs +++ b/services/libs/aster-std/src/process/clone.rs @@ -10,10 +10,10 @@ use crate::prelude::*; use crate::thread::{allocate_tid, thread_table, Thread, Tid}; use crate::util::write_val_to_user; use crate::vm::vmar::Vmar; -use jinux_frame::cpu::UserContext; -use jinux_frame::user::UserSpace; -use jinux_frame::vm::VmIo; -use jinux_rights::Full; +use aster_frame::cpu::UserContext; +use aster_frame::user::UserSpace; +use aster_frame::vm::VmIo; +use aster_rights::Full; bitflags! { pub struct CloneFlags: u32 { diff --git a/services/libs/jinux-std/src/process/credentials/credentials_.rs b/services/libs/aster-std/src/process/credentials/credentials_.rs similarity index 99% rename from services/libs/jinux-std/src/process/credentials/credentials_.rs rename to services/libs/aster-std/src/process/credentials/credentials_.rs index b26584da5..6b4f32e28 100644 --- a/services/libs/jinux-std/src/process/credentials/credentials_.rs +++ b/services/libs/aster-std/src/process/credentials/credentials_.rs @@ -2,7 +2,7 @@ use super::group::AtomicGid; use super::user::AtomicUid; use super::{Gid, Uid}; use crate::prelude::*; -use jinux_frame::sync::{RwLockReadGuard, RwLockWriteGuard}; +use aster_frame::sync::{RwLockReadGuard, RwLockWriteGuard}; #[derive(Debug)] pub(super) struct Credentials_ { diff --git a/services/libs/jinux-std/src/process/credentials/group.rs b/services/libs/aster-std/src/process/credentials/group.rs similarity index 100% rename from services/libs/jinux-std/src/process/credentials/group.rs rename to services/libs/aster-std/src/process/credentials/group.rs diff --git a/services/libs/jinux-std/src/process/credentials/mod.rs b/services/libs/aster-std/src/process/credentials/mod.rs similarity index 96% rename from services/libs/jinux-std/src/process/credentials/mod.rs rename to services/libs/aster-std/src/process/credentials/mod.rs index e346aeb96..f5e162a35 100644 --- a/services/libs/jinux-std/src/process/credentials/mod.rs +++ b/services/libs/aster-std/src/process/credentials/mod.rs @@ -4,8 +4,8 @@ mod static_cap; mod user; use crate::prelude::*; +use aster_rights::{FullOp, ReadOp, WriteOp}; use credentials_::Credentials_; -use jinux_rights::{FullOp, ReadOp, WriteOp}; pub use group::Gid; pub use user::Uid; diff --git a/services/libs/jinux-std/src/process/credentials/static_cap.rs b/services/libs/aster-std/src/process/credentials/static_cap.rs similarity index 98% rename from services/libs/jinux-std/src/process/credentials/static_cap.rs rename to services/libs/aster-std/src/process/credentials/static_cap.rs index ad2162844..07e9848a3 100644 --- a/services/libs/jinux-std/src/process/credentials/static_cap.rs +++ b/services/libs/aster-std/src/process/credentials/static_cap.rs @@ -1,9 +1,9 @@ use super::credentials_::Credentials_; use super::{Credentials, Gid, Uid}; use crate::prelude::*; -use jinux_frame::sync::{RwLockReadGuard, RwLockWriteGuard}; -use jinux_rights::{Dup, Read, TRights, Write}; -use jinux_rights_proc::require; +use aster_frame::sync::{RwLockReadGuard, RwLockWriteGuard}; +use aster_rights::{Dup, Read, TRights, Write}; +use aster_rights_proc::require; impl Credentials { /// Creates a root `Credentials`. This method can only be used when creating the first process diff --git a/services/libs/jinux-std/src/process/credentials/user.rs b/services/libs/aster-std/src/process/credentials/user.rs similarity index 100% rename from services/libs/jinux-std/src/process/credentials/user.rs rename to services/libs/aster-std/src/process/credentials/user.rs diff --git a/services/libs/jinux-std/src/process/exit.rs b/services/libs/aster-std/src/process/exit.rs similarity index 100% rename from services/libs/jinux-std/src/process/exit.rs rename to services/libs/aster-std/src/process/exit.rs diff --git a/services/libs/jinux-std/src/process/kill.rs b/services/libs/aster-std/src/process/kill.rs similarity index 100% rename from services/libs/jinux-std/src/process/kill.rs rename to services/libs/aster-std/src/process/kill.rs diff --git a/services/libs/jinux-std/src/process/mod.rs b/services/libs/aster-std/src/process/mod.rs similarity index 100% rename from services/libs/jinux-std/src/process/mod.rs rename to services/libs/aster-std/src/process/mod.rs diff --git a/services/libs/jinux-std/src/process/posix_thread/builder.rs b/services/libs/aster-std/src/process/posix_thread/builder.rs similarity index 98% rename from services/libs/jinux-std/src/process/posix_thread/builder.rs rename to services/libs/aster-std/src/process/posix_thread/builder.rs index ead10779d..5507dace7 100644 --- a/services/libs/jinux-std/src/process/posix_thread/builder.rs +++ b/services/libs/aster-std/src/process/posix_thread/builder.rs @@ -1,4 +1,4 @@ -use jinux_frame::user::UserSpace; +use aster_frame::user::UserSpace; use crate::{ prelude::*, diff --git a/services/libs/jinux-std/src/process/posix_thread/futex.rs b/services/libs/aster-std/src/process/posix_thread/futex.rs similarity index 99% rename from services/libs/jinux-std/src/process/posix_thread/futex.rs rename to services/libs/aster-std/src/process/posix_thread/futex.rs index 33a46b930..1259f3f3f 100644 --- a/services/libs/jinux-std/src/process/posix_thread/futex.rs +++ b/services/libs/aster-std/src/process/posix_thread/futex.rs @@ -1,6 +1,6 @@ use core::sync::atomic::{AtomicBool, Ordering}; -use jinux_frame::cpu::num_cpus; +use aster_frame::cpu::num_cpus; use crate::{ prelude::*, diff --git a/services/libs/jinux-std/src/process/posix_thread/mod.rs b/services/libs/aster-std/src/process/posix_thread/mod.rs similarity index 99% rename from services/libs/jinux-std/src/process/posix_thread/mod.rs rename to services/libs/aster-std/src/process/posix_thread/mod.rs index 414ab260e..e936663f7 100644 --- a/services/libs/jinux-std/src/process/posix_thread/mod.rs +++ b/services/libs/aster-std/src/process/posix_thread/mod.rs @@ -10,8 +10,8 @@ use crate::prelude::*; use crate::process::signal::constants::SIGCONT; use crate::thread::{thread_table, Tid}; use crate::util::write_val_to_user; +use aster_rights::{ReadOp, WriteOp}; use futex::futex_wake; -use jinux_rights::{ReadOp, WriteOp}; use robust_list::wake_robust_futex; mod builder; diff --git a/services/libs/jinux-std/src/process/posix_thread/name.rs b/services/libs/aster-std/src/process/posix_thread/name.rs similarity index 100% rename from services/libs/jinux-std/src/process/posix_thread/name.rs rename to services/libs/aster-std/src/process/posix_thread/name.rs diff --git a/services/libs/jinux-std/src/process/posix_thread/posix_thread_ext.rs b/services/libs/aster-std/src/process/posix_thread/posix_thread_ext.rs similarity index 97% rename from services/libs/jinux-std/src/process/posix_thread/posix_thread_ext.rs rename to services/libs/aster-std/src/process/posix_thread/posix_thread_ext.rs index b093cb2c7..8003bfbf4 100644 --- a/services/libs/jinux-std/src/process/posix_thread/posix_thread_ext.rs +++ b/services/libs/aster-std/src/process/posix_thread/posix_thread_ext.rs @@ -1,4 +1,4 @@ -use jinux_frame::{cpu::UserContext, user::UserSpace}; +use aster_frame::{cpu::UserContext, user::UserSpace}; use crate::{ fs::fs_resolver::{FsPath, FsResolver, AT_FDCWD}, diff --git a/services/libs/jinux-std/src/process/posix_thread/robust_list.rs b/services/libs/aster-std/src/process/posix_thread/robust_list.rs similarity index 100% rename from services/libs/jinux-std/src/process/posix_thread/robust_list.rs rename to services/libs/aster-std/src/process/posix_thread/robust_list.rs diff --git a/services/libs/jinux-std/src/process/process/builder.rs b/services/libs/aster-std/src/process/process/builder.rs similarity index 100% rename from services/libs/jinux-std/src/process/process/builder.rs rename to services/libs/aster-std/src/process/process/builder.rs diff --git a/services/libs/jinux-std/src/process/process/job_control.rs b/services/libs/aster-std/src/process/process/job_control.rs similarity index 100% rename from services/libs/jinux-std/src/process/process/job_control.rs rename to services/libs/aster-std/src/process/process/job_control.rs diff --git a/services/libs/jinux-std/src/process/process/mod.rs b/services/libs/aster-std/src/process/process/mod.rs similarity index 99% rename from services/libs/jinux-std/src/process/process/mod.rs rename to services/libs/aster-std/src/process/process/mod.rs index b0574666b..64cdeaf2a 100644 --- a/services/libs/jinux-std/src/process/process/mod.rs +++ b/services/libs/aster-std/src/process/process/mod.rs @@ -23,8 +23,8 @@ mod process_group; mod session; mod terminal; +use aster_rights::Full; pub use builder::ProcessBuilder; -use jinux_rights::Full; pub use job_control::JobControl; pub use process_group::ProcessGroup; pub use session::Session; diff --git a/services/libs/jinux-std/src/process/process/process_group.rs b/services/libs/aster-std/src/process/process/process_group.rs similarity index 100% rename from services/libs/jinux-std/src/process/process/process_group.rs rename to services/libs/aster-std/src/process/process/process_group.rs diff --git a/services/libs/jinux-std/src/process/process/session.rs b/services/libs/aster-std/src/process/process/session.rs similarity index 100% rename from services/libs/jinux-std/src/process/process/session.rs rename to services/libs/aster-std/src/process/process/session.rs diff --git a/services/libs/jinux-std/src/process/process/terminal.rs b/services/libs/aster-std/src/process/process/terminal.rs similarity index 100% rename from services/libs/jinux-std/src/process/process/terminal.rs rename to services/libs/aster-std/src/process/process/terminal.rs diff --git a/services/libs/jinux-std/src/process/process_filter.rs b/services/libs/aster-std/src/process/process_filter.rs similarity index 100% rename from services/libs/jinux-std/src/process/process_filter.rs rename to services/libs/aster-std/src/process/process_filter.rs diff --git a/services/libs/jinux-std/src/process/process_table.rs b/services/libs/aster-std/src/process/process_table.rs similarity index 100% rename from services/libs/jinux-std/src/process/process_table.rs rename to services/libs/aster-std/src/process/process_table.rs diff --git a/services/libs/jinux-std/src/process/process_vm/mod.rs b/services/libs/aster-std/src/process/process_vm/mod.rs similarity index 98% rename from services/libs/jinux-std/src/process/process_vm/mod.rs rename to services/libs/aster-std/src/process/process_vm/mod.rs index 8a9084146..468b7aa7e 100644 --- a/services/libs/jinux-std/src/process/process_vm/mod.rs +++ b/services/libs/aster-std/src/process/process_vm/mod.rs @@ -6,7 +6,7 @@ pub mod user_heap; -use jinux_rights::Full; +use aster_rights::Full; use user_heap::UserHeap; use crate::vm::vmar::Vmar; diff --git a/services/libs/jinux-std/src/process/process_vm/user_heap.rs b/services/libs/aster-std/src/process/process_vm/user_heap.rs similarity index 98% rename from services/libs/jinux-std/src/process/process_vm/user_heap.rs rename to services/libs/aster-std/src/process/process_vm/user_heap.rs index df78f10ea..7dff106e4 100644 --- a/services/libs/jinux-std/src/process/process_vm/user_heap.rs +++ b/services/libs/aster-std/src/process/process_vm/user_heap.rs @@ -7,7 +7,7 @@ use crate::{ vm::vmo::{VmoFlags, VmoOptions}, }; use align_ext::AlignExt; -use jinux_rights::{Full, Rights}; +use aster_rights::{Full, Rights}; pub const USER_HEAP_BASE: Vaddr = 0x0000_0000_1000_0000; pub const USER_HEAP_SIZE_LIMIT: usize = PAGE_SIZE * 1000; diff --git a/services/libs/jinux-std/src/process/program_loader/elf/aux_vec.rs b/services/libs/aster-std/src/process/program_loader/elf/aux_vec.rs similarity index 100% rename from services/libs/jinux-std/src/process/program_loader/elf/aux_vec.rs rename to services/libs/aster-std/src/process/program_loader/elf/aux_vec.rs diff --git a/services/libs/jinux-std/src/process/program_loader/elf/elf_file.rs b/services/libs/aster-std/src/process/program_loader/elf/elf_file.rs similarity index 100% rename from services/libs/jinux-std/src/process/program_loader/elf/elf_file.rs rename to services/libs/aster-std/src/process/program_loader/elf/elf_file.rs diff --git a/services/libs/jinux-std/src/process/program_loader/elf/init_stack.rs b/services/libs/aster-std/src/process/program_loader/elf/init_stack.rs similarity index 99% rename from services/libs/jinux-std/src/process/program_loader/elf/init_stack.rs rename to services/libs/aster-std/src/process/program_loader/elf/init_stack.rs index 2f1ce7861..3d53b8053 100644 --- a/services/libs/jinux-std/src/process/program_loader/elf/init_stack.rs +++ b/services/libs/aster-std/src/process/program_loader/elf/init_stack.rs @@ -8,9 +8,9 @@ use crate::{ vm::{vmar::Vmar, vmo::VmoOptions}, }; use align_ext::AlignExt; +use aster_frame::vm::{VmIo, VmPerm}; +use aster_rights::{Full, Rights}; use core::mem; -use jinux_frame::vm::{VmIo, VmPerm}; -use jinux_rights::{Full, Rights}; use super::aux_vec::{AuxKey, AuxVec}; use super::elf_file::Elf; diff --git a/services/libs/jinux-std/src/process/program_loader/elf/load_elf.rs b/services/libs/aster-std/src/process/program_loader/elf/load_elf.rs similarity index 99% rename from services/libs/jinux-std/src/process/program_loader/elf/load_elf.rs rename to services/libs/aster-std/src/process/program_loader/elf/load_elf.rs index d669ab3bd..af4fdbb69 100644 --- a/services/libs/jinux-std/src/process/program_loader/elf/load_elf.rs +++ b/services/libs/aster-std/src/process/program_loader/elf/load_elf.rs @@ -13,9 +13,9 @@ use crate::{ vm::{vmar::Vmar, vmo::Vmo}, }; use align_ext::AlignExt; -use jinux_frame::task::Task; -use jinux_frame::vm::{VmIo, VmPerm}; -use jinux_rights::{Full, Rights}; +use aster_frame::task::Task; +use aster_frame::vm::{VmIo, VmPerm}; +use aster_rights::{Full, Rights}; use xmas_elf::program::{self, ProgramHeader64}; use super::elf_file::Elf; diff --git a/services/libs/jinux-std/src/process/program_loader/elf/mod.rs b/services/libs/aster-std/src/process/program_loader/elf/mod.rs similarity index 100% rename from services/libs/jinux-std/src/process/program_loader/elf/mod.rs rename to services/libs/aster-std/src/process/program_loader/elf/mod.rs diff --git a/services/libs/jinux-std/src/process/program_loader/mod.rs b/services/libs/aster-std/src/process/program_loader/mod.rs similarity index 100% rename from services/libs/jinux-std/src/process/program_loader/mod.rs rename to services/libs/aster-std/src/process/program_loader/mod.rs diff --git a/services/libs/jinux-std/src/process/program_loader/shebang.rs b/services/libs/aster-std/src/process/program_loader/shebang.rs similarity index 100% rename from services/libs/jinux-std/src/process/program_loader/shebang.rs rename to services/libs/aster-std/src/process/program_loader/shebang.rs diff --git a/services/libs/jinux-std/src/process/rlimit.rs b/services/libs/aster-std/src/process/rlimit.rs similarity index 100% rename from services/libs/jinux-std/src/process/rlimit.rs rename to services/libs/aster-std/src/process/rlimit.rs diff --git a/services/libs/jinux-std/src/process/signal/c_types.rs b/services/libs/aster-std/src/process/signal/c_types.rs similarity index 97% rename from services/libs/jinux-std/src/process/signal/c_types.rs rename to services/libs/aster-std/src/process/signal/c_types.rs index 60ce41b7d..15f4a94af 100644 --- a/services/libs/jinux-std/src/process/signal/c_types.rs +++ b/services/libs/aster-std/src/process/signal/c_types.rs @@ -1,8 +1,8 @@ #![allow(non_camel_case_types)] use core::mem; -use jinux_frame::cpu::GeneralRegs; -use jinux_util::{read_union_fields, union_read_ptr::UnionReadPtr}; +use aster_frame::cpu::GeneralRegs; +use aster_util::{read_union_fields, union_read_ptr::UnionReadPtr}; use crate::{ prelude::*, diff --git a/services/libs/jinux-std/src/process/signal/constants.rs b/services/libs/aster-std/src/process/signal/constants.rs similarity index 100% rename from services/libs/jinux-std/src/process/signal/constants.rs rename to services/libs/aster-std/src/process/signal/constants.rs diff --git a/services/libs/jinux-std/src/process/signal/events.rs b/services/libs/aster-std/src/process/signal/events.rs similarity index 100% rename from services/libs/jinux-std/src/process/signal/events.rs rename to services/libs/aster-std/src/process/signal/events.rs diff --git a/services/libs/jinux-std/src/process/signal/mod.rs b/services/libs/aster-std/src/process/signal/mod.rs similarity index 99% rename from services/libs/jinux-std/src/process/signal/mod.rs rename to services/libs/aster-std/src/process/signal/mod.rs index 8ba2e74da..6415374fe 100644 --- a/services/libs/jinux-std/src/process/signal/mod.rs +++ b/services/libs/aster-std/src/process/signal/mod.rs @@ -17,9 +17,9 @@ pub use poll::{Pollee, Poller}; pub use sig_stack::{SigStack, SigStackFlags, SigStackStatus}; use align_ext::AlignExt; +use aster_frame::cpu::UserContext; +use aster_frame::task::Task; use core::mem; -use jinux_frame::cpu::UserContext; -use jinux_frame::task::Task; use super::posix_thread::{PosixThread, PosixThreadExt}; use crate::prelude::*; diff --git a/services/libs/jinux-std/src/process/signal/pauser.rs b/services/libs/aster-std/src/process/signal/pauser.rs similarity index 99% rename from services/libs/jinux-std/src/process/signal/pauser.rs rename to services/libs/aster-std/src/process/signal/pauser.rs index a242f8930..c277c895a 100644 --- a/services/libs/jinux-std/src/process/signal/pauser.rs +++ b/services/libs/aster-std/src/process/signal/pauser.rs @@ -1,7 +1,7 @@ use core::sync::atomic::{AtomicBool, Ordering}; use core::time::Duration; -use jinux_frame::sync::WaitQueue; +use aster_frame::sync::WaitQueue; use crate::events::Observer; use crate::prelude::*; diff --git a/services/libs/jinux-std/src/process/signal/poll.rs b/services/libs/aster-std/src/process/signal/poll.rs similarity index 100% rename from services/libs/jinux-std/src/process/signal/poll.rs rename to services/libs/aster-std/src/process/signal/poll.rs diff --git a/services/libs/jinux-std/src/process/signal/sig_action.rs b/services/libs/aster-std/src/process/signal/sig_action.rs similarity index 100% rename from services/libs/jinux-std/src/process/signal/sig_action.rs rename to services/libs/aster-std/src/process/signal/sig_action.rs diff --git a/services/libs/jinux-std/src/process/signal/sig_disposition.rs b/services/libs/aster-std/src/process/signal/sig_disposition.rs similarity index 100% rename from services/libs/jinux-std/src/process/signal/sig_disposition.rs rename to services/libs/aster-std/src/process/signal/sig_disposition.rs diff --git a/services/libs/jinux-std/src/process/signal/sig_mask.rs b/services/libs/aster-std/src/process/signal/sig_mask.rs similarity index 100% rename from services/libs/jinux-std/src/process/signal/sig_mask.rs rename to services/libs/aster-std/src/process/signal/sig_mask.rs diff --git a/services/libs/jinux-std/src/process/signal/sig_num.rs b/services/libs/aster-std/src/process/signal/sig_num.rs similarity index 100% rename from services/libs/jinux-std/src/process/signal/sig_num.rs rename to services/libs/aster-std/src/process/signal/sig_num.rs diff --git a/services/libs/jinux-std/src/process/signal/sig_queues.rs b/services/libs/aster-std/src/process/signal/sig_queues.rs similarity index 100% rename from services/libs/jinux-std/src/process/signal/sig_queues.rs rename to services/libs/aster-std/src/process/signal/sig_queues.rs diff --git a/services/libs/jinux-std/src/process/signal/sig_stack.rs b/services/libs/aster-std/src/process/signal/sig_stack.rs similarity index 100% rename from services/libs/jinux-std/src/process/signal/sig_stack.rs rename to services/libs/aster-std/src/process/signal/sig_stack.rs diff --git a/services/libs/jinux-std/src/process/signal/signals/fault.rs b/services/libs/aster-std/src/process/signal/signals/fault.rs similarity index 96% rename from services/libs/jinux-std/src/process/signal/signals/fault.rs rename to services/libs/aster-std/src/process/signal/signals/fault.rs index 3cf90533a..799af8113 100644 --- a/services/libs/jinux-std/src/process/signal/signals/fault.rs +++ b/services/libs/aster-std/src/process/signal/signals/fault.rs @@ -1,5 +1,5 @@ -use jinux_frame::cpu::{CpuException, CpuExceptionInfo}; -use jinux_frame::cpu::{ +use aster_frame::cpu::{CpuException, CpuExceptionInfo}; +use aster_frame::cpu::{ ALIGNMENT_CHECK, BOUND_RANGE_EXCEEDED, DIVIDE_BY_ZERO, GENERAL_PROTECTION_FAULT, INVALID_OPCODE, PAGE_FAULT, SIMD_FLOATING_POINT_EXCEPTION, X87_FLOATING_POINT_EXCEPTION, }; diff --git a/services/libs/jinux-std/src/process/signal/signals/kernel.rs b/services/libs/aster-std/src/process/signal/signals/kernel.rs similarity index 100% rename from services/libs/jinux-std/src/process/signal/signals/kernel.rs rename to services/libs/aster-std/src/process/signal/signals/kernel.rs diff --git a/services/libs/jinux-std/src/process/signal/signals/mod.rs b/services/libs/aster-std/src/process/signal/signals/mod.rs similarity index 100% rename from services/libs/jinux-std/src/process/signal/signals/mod.rs rename to services/libs/aster-std/src/process/signal/signals/mod.rs diff --git a/services/libs/jinux-std/src/process/signal/signals/user.rs b/services/libs/aster-std/src/process/signal/signals/user.rs similarity index 100% rename from services/libs/jinux-std/src/process/signal/signals/user.rs rename to services/libs/aster-std/src/process/signal/signals/user.rs diff --git a/services/libs/jinux-std/src/process/status.rs b/services/libs/aster-std/src/process/status.rs similarity index 100% rename from services/libs/jinux-std/src/process/status.rs rename to services/libs/aster-std/src/process/status.rs diff --git a/services/libs/jinux-std/src/process/term_status.rs b/services/libs/aster-std/src/process/term_status.rs similarity index 100% rename from services/libs/jinux-std/src/process/term_status.rs rename to services/libs/aster-std/src/process/term_status.rs diff --git a/services/libs/jinux-std/src/process/wait.rs b/services/libs/aster-std/src/process/wait.rs similarity index 100% rename from services/libs/jinux-std/src/process/wait.rs rename to services/libs/aster-std/src/process/wait.rs diff --git a/services/libs/jinux-std/src/sched/mod.rs b/services/libs/aster-std/src/sched/mod.rs similarity index 100% rename from services/libs/jinux-std/src/sched/mod.rs rename to services/libs/aster-std/src/sched/mod.rs diff --git a/services/libs/jinux-std/src/sched/priority_scheduler.rs b/services/libs/aster-std/src/sched/priority_scheduler.rs similarity index 96% rename from services/libs/jinux-std/src/sched/priority_scheduler.rs rename to services/libs/aster-std/src/sched/priority_scheduler.rs index 061b406ae..4523c1d98 100644 --- a/services/libs/jinux-std/src/sched/priority_scheduler.rs +++ b/services/libs/aster-std/src/sched/priority_scheduler.rs @@ -1,6 +1,6 @@ use crate::prelude::*; +use aster_frame::task::{set_scheduler, Scheduler, Task, TaskAdapter}; use intrusive_collections::LinkedList; -use jinux_frame::task::{set_scheduler, Scheduler, Task, TaskAdapter}; pub fn init() { let preempt_scheduler = Box::new(PreemptScheduler::new()); diff --git a/services/libs/jinux-std/src/syscall/accept.rs b/services/libs/aster-std/src/syscall/accept.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/accept.rs rename to services/libs/aster-std/src/syscall/accept.rs diff --git a/services/libs/jinux-std/src/syscall/access.rs b/services/libs/aster-std/src/syscall/access.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/access.rs rename to services/libs/aster-std/src/syscall/access.rs diff --git a/services/libs/jinux-std/src/syscall/arch_prctl.rs b/services/libs/aster-std/src/syscall/arch_prctl.rs similarity index 97% rename from services/libs/jinux-std/src/syscall/arch_prctl.rs rename to services/libs/aster-std/src/syscall/arch_prctl.rs index 9e9f8c119..c94a4a7e0 100644 --- a/services/libs/jinux-std/src/syscall/arch_prctl.rs +++ b/services/libs/aster-std/src/syscall/arch_prctl.rs @@ -1,4 +1,4 @@ -use jinux_frame::cpu::UserContext; +use aster_frame::cpu::UserContext; use crate::syscall::SYS_ARCH_PRCTL; use crate::{log_syscall_entry, prelude::*}; diff --git a/services/libs/jinux-std/src/syscall/bind.rs b/services/libs/aster-std/src/syscall/bind.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/bind.rs rename to services/libs/aster-std/src/syscall/bind.rs diff --git a/services/libs/jinux-std/src/syscall/brk.rs b/services/libs/aster-std/src/syscall/brk.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/brk.rs rename to services/libs/aster-std/src/syscall/brk.rs diff --git a/services/libs/jinux-std/src/syscall/chdir.rs b/services/libs/aster-std/src/syscall/chdir.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/chdir.rs rename to services/libs/aster-std/src/syscall/chdir.rs diff --git a/services/libs/jinux-std/src/syscall/chmod.rs b/services/libs/aster-std/src/syscall/chmod.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/chmod.rs rename to services/libs/aster-std/src/syscall/chmod.rs diff --git a/services/libs/jinux-std/src/syscall/clock_gettime.rs b/services/libs/aster-std/src/syscall/clock_gettime.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/clock_gettime.rs rename to services/libs/aster-std/src/syscall/clock_gettime.rs diff --git a/services/libs/jinux-std/src/syscall/clock_nanosleep.rs b/services/libs/aster-std/src/syscall/clock_nanosleep.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/clock_nanosleep.rs rename to services/libs/aster-std/src/syscall/clock_nanosleep.rs diff --git a/services/libs/jinux-std/src/syscall/clone.rs b/services/libs/aster-std/src/syscall/clone.rs similarity index 96% rename from services/libs/jinux-std/src/syscall/clone.rs rename to services/libs/aster-std/src/syscall/clone.rs index 655715b64..fc9d9f240 100644 --- a/services/libs/jinux-std/src/syscall/clone.rs +++ b/services/libs/aster-std/src/syscall/clone.rs @@ -1,4 +1,4 @@ -use jinux_frame::cpu::UserContext; +use aster_frame::cpu::UserContext; use crate::log_syscall_entry; use crate::process::{clone_child, CloneArgs, CloneFlags}; diff --git a/services/libs/jinux-std/src/syscall/close.rs b/services/libs/aster-std/src/syscall/close.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/close.rs rename to services/libs/aster-std/src/syscall/close.rs diff --git a/services/libs/jinux-std/src/syscall/connect.rs b/services/libs/aster-std/src/syscall/connect.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/connect.rs rename to services/libs/aster-std/src/syscall/connect.rs diff --git a/services/libs/jinux-std/src/syscall/constants.rs b/services/libs/aster-std/src/syscall/constants.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/constants.rs rename to services/libs/aster-std/src/syscall/constants.rs diff --git a/services/libs/jinux-std/src/syscall/dup.rs b/services/libs/aster-std/src/syscall/dup.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/dup.rs rename to services/libs/aster-std/src/syscall/dup.rs diff --git a/services/libs/jinux-std/src/syscall/epoll.rs b/services/libs/aster-std/src/syscall/epoll.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/epoll.rs rename to services/libs/aster-std/src/syscall/epoll.rs diff --git a/services/libs/jinux-std/src/syscall/execve.rs b/services/libs/aster-std/src/syscall/execve.rs similarity index 99% rename from services/libs/jinux-std/src/syscall/execve.rs rename to services/libs/aster-std/src/syscall/execve.rs index a4b624572..b15e8579d 100644 --- a/services/libs/jinux-std/src/syscall/execve.rs +++ b/services/libs/aster-std/src/syscall/execve.rs @@ -1,5 +1,5 @@ -use jinux_frame::cpu::UserContext; -use jinux_rights::WriteOp; +use aster_frame::cpu::UserContext; +use aster_rights::WriteOp; use super::{constants::*, SyscallReturn}; use crate::fs::file_table::FileDescripter; diff --git a/services/libs/jinux-std/src/syscall/exit.rs b/services/libs/aster-std/src/syscall/exit.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/exit.rs rename to services/libs/aster-std/src/syscall/exit.rs diff --git a/services/libs/jinux-std/src/syscall/exit_group.rs b/services/libs/aster-std/src/syscall/exit_group.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/exit_group.rs rename to services/libs/aster-std/src/syscall/exit_group.rs diff --git a/services/libs/jinux-std/src/syscall/fcntl.rs b/services/libs/aster-std/src/syscall/fcntl.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/fcntl.rs rename to services/libs/aster-std/src/syscall/fcntl.rs diff --git a/services/libs/jinux-std/src/syscall/fork.rs b/services/libs/aster-std/src/syscall/fork.rs similarity index 93% rename from services/libs/jinux-std/src/syscall/fork.rs rename to services/libs/aster-std/src/syscall/fork.rs index 11f2a365b..3fcbaf047 100644 --- a/services/libs/jinux-std/src/syscall/fork.rs +++ b/services/libs/aster-std/src/syscall/fork.rs @@ -3,7 +3,7 @@ use crate::{ prelude::*, process::{clone_child, CloneArgs}, }; -use jinux_frame::cpu::UserContext; +use aster_frame::cpu::UserContext; use crate::syscall::SYS_FORK; diff --git a/services/libs/jinux-std/src/syscall/futex.rs b/services/libs/aster-std/src/syscall/futex.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/futex.rs rename to services/libs/aster-std/src/syscall/futex.rs diff --git a/services/libs/jinux-std/src/syscall/getcwd.rs b/services/libs/aster-std/src/syscall/getcwd.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/getcwd.rs rename to services/libs/aster-std/src/syscall/getcwd.rs diff --git a/services/libs/jinux-std/src/syscall/getdents64.rs b/services/libs/aster-std/src/syscall/getdents64.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/getdents64.rs rename to services/libs/aster-std/src/syscall/getdents64.rs diff --git a/services/libs/jinux-std/src/syscall/getegid.rs b/services/libs/aster-std/src/syscall/getegid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/getegid.rs rename to services/libs/aster-std/src/syscall/getegid.rs diff --git a/services/libs/jinux-std/src/syscall/geteuid.rs b/services/libs/aster-std/src/syscall/geteuid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/geteuid.rs rename to services/libs/aster-std/src/syscall/geteuid.rs diff --git a/services/libs/jinux-std/src/syscall/getgid.rs b/services/libs/aster-std/src/syscall/getgid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/getgid.rs rename to services/libs/aster-std/src/syscall/getgid.rs diff --git a/services/libs/jinux-std/src/syscall/getgroups.rs b/services/libs/aster-std/src/syscall/getgroups.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/getgroups.rs rename to services/libs/aster-std/src/syscall/getgroups.rs diff --git a/services/libs/jinux-std/src/syscall/getpeername.rs b/services/libs/aster-std/src/syscall/getpeername.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/getpeername.rs rename to services/libs/aster-std/src/syscall/getpeername.rs diff --git a/services/libs/jinux-std/src/syscall/getpgrp.rs b/services/libs/aster-std/src/syscall/getpgrp.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/getpgrp.rs rename to services/libs/aster-std/src/syscall/getpgrp.rs diff --git a/services/libs/jinux-std/src/syscall/getpid.rs b/services/libs/aster-std/src/syscall/getpid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/getpid.rs rename to services/libs/aster-std/src/syscall/getpid.rs diff --git a/services/libs/jinux-std/src/syscall/getppid.rs b/services/libs/aster-std/src/syscall/getppid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/getppid.rs rename to services/libs/aster-std/src/syscall/getppid.rs diff --git a/services/libs/jinux-std/src/syscall/getrandom.rs b/services/libs/aster-std/src/syscall/getrandom.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/getrandom.rs rename to services/libs/aster-std/src/syscall/getrandom.rs diff --git a/services/libs/jinux-std/src/syscall/getresgid.rs b/services/libs/aster-std/src/syscall/getresgid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/getresgid.rs rename to services/libs/aster-std/src/syscall/getresgid.rs diff --git a/services/libs/jinux-std/src/syscall/getresuid.rs b/services/libs/aster-std/src/syscall/getresuid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/getresuid.rs rename to services/libs/aster-std/src/syscall/getresuid.rs diff --git a/services/libs/jinux-std/src/syscall/getsid.rs b/services/libs/aster-std/src/syscall/getsid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/getsid.rs rename to services/libs/aster-std/src/syscall/getsid.rs diff --git a/services/libs/jinux-std/src/syscall/getsockname.rs b/services/libs/aster-std/src/syscall/getsockname.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/getsockname.rs rename to services/libs/aster-std/src/syscall/getsockname.rs diff --git a/services/libs/jinux-std/src/syscall/getsockopt.rs b/services/libs/aster-std/src/syscall/getsockopt.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/getsockopt.rs rename to services/libs/aster-std/src/syscall/getsockopt.rs diff --git a/services/libs/jinux-std/src/syscall/gettid.rs b/services/libs/aster-std/src/syscall/gettid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/gettid.rs rename to services/libs/aster-std/src/syscall/gettid.rs diff --git a/services/libs/jinux-std/src/syscall/gettimeofday.rs b/services/libs/aster-std/src/syscall/gettimeofday.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/gettimeofday.rs rename to services/libs/aster-std/src/syscall/gettimeofday.rs diff --git a/services/libs/jinux-std/src/syscall/getuid.rs b/services/libs/aster-std/src/syscall/getuid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/getuid.rs rename to services/libs/aster-std/src/syscall/getuid.rs diff --git a/services/libs/jinux-std/src/syscall/ioctl.rs b/services/libs/aster-std/src/syscall/ioctl.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/ioctl.rs rename to services/libs/aster-std/src/syscall/ioctl.rs diff --git a/services/libs/jinux-std/src/syscall/kill.rs b/services/libs/aster-std/src/syscall/kill.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/kill.rs rename to services/libs/aster-std/src/syscall/kill.rs diff --git a/services/libs/jinux-std/src/syscall/link.rs b/services/libs/aster-std/src/syscall/link.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/link.rs rename to services/libs/aster-std/src/syscall/link.rs diff --git a/services/libs/jinux-std/src/syscall/listen.rs b/services/libs/aster-std/src/syscall/listen.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/listen.rs rename to services/libs/aster-std/src/syscall/listen.rs diff --git a/services/libs/jinux-std/src/syscall/lseek.rs b/services/libs/aster-std/src/syscall/lseek.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/lseek.rs rename to services/libs/aster-std/src/syscall/lseek.rs diff --git a/services/libs/jinux-std/src/syscall/madvise.rs b/services/libs/aster-std/src/syscall/madvise.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/madvise.rs rename to services/libs/aster-std/src/syscall/madvise.rs diff --git a/services/libs/jinux-std/src/syscall/mkdir.rs b/services/libs/aster-std/src/syscall/mkdir.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/mkdir.rs rename to services/libs/aster-std/src/syscall/mkdir.rs diff --git a/services/libs/jinux-std/src/syscall/mmap.rs b/services/libs/aster-std/src/syscall/mmap.rs similarity index 99% rename from services/libs/jinux-std/src/syscall/mmap.rs rename to services/libs/aster-std/src/syscall/mmap.rs index 5b58fe917..e739bae54 100644 --- a/services/libs/jinux-std/src/syscall/mmap.rs +++ b/services/libs/aster-std/src/syscall/mmap.rs @@ -5,8 +5,8 @@ use crate::vm::perms::VmPerms; use crate::vm::vmo::{VmoChildOptions, VmoOptions, VmoRightsOp}; use crate::{log_syscall_entry, prelude::*}; use align_ext::AlignExt; -use jinux_frame::vm::VmPerm; -use jinux_rights::Rights; +use aster_frame::vm::VmPerm; +use aster_rights::Rights; use crate::syscall::SYS_MMAP; diff --git a/services/libs/jinux-std/src/syscall/mod.rs b/services/libs/aster-std/src/syscall/mod.rs similarity index 99% rename from services/libs/jinux-std/src/syscall/mod.rs rename to services/libs/aster-std/src/syscall/mod.rs index dcd62aabb..731b41321 100644 --- a/services/libs/jinux-std/src/syscall/mod.rs +++ b/services/libs/aster-std/src/syscall/mod.rs @@ -69,7 +69,7 @@ use crate::syscall::wait4::sys_wait4; use crate::syscall::waitid::sys_waitid; use crate::syscall::write::sys_write; use crate::syscall::writev::sys_writev; -use jinux_frame::cpu::UserContext; +use aster_frame::cpu::UserContext; use self::accept::sys_accept; use self::bind::sys_bind; diff --git a/services/libs/jinux-std/src/syscall/mprotect.rs b/services/libs/aster-std/src/syscall/mprotect.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/mprotect.rs rename to services/libs/aster-std/src/syscall/mprotect.rs diff --git a/services/libs/jinux-std/src/syscall/munmap.rs b/services/libs/aster-std/src/syscall/munmap.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/munmap.rs rename to services/libs/aster-std/src/syscall/munmap.rs diff --git a/services/libs/jinux-std/src/syscall/open.rs b/services/libs/aster-std/src/syscall/open.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/open.rs rename to services/libs/aster-std/src/syscall/open.rs diff --git a/services/libs/jinux-std/src/syscall/pause.rs b/services/libs/aster-std/src/syscall/pause.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/pause.rs rename to services/libs/aster-std/src/syscall/pause.rs diff --git a/services/libs/jinux-std/src/syscall/pipe.rs b/services/libs/aster-std/src/syscall/pipe.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/pipe.rs rename to services/libs/aster-std/src/syscall/pipe.rs diff --git a/services/libs/jinux-std/src/syscall/poll.rs b/services/libs/aster-std/src/syscall/poll.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/poll.rs rename to services/libs/aster-std/src/syscall/poll.rs diff --git a/services/libs/jinux-std/src/syscall/prctl.rs b/services/libs/aster-std/src/syscall/prctl.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/prctl.rs rename to services/libs/aster-std/src/syscall/prctl.rs diff --git a/services/libs/jinux-std/src/syscall/pread64.rs b/services/libs/aster-std/src/syscall/pread64.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/pread64.rs rename to services/libs/aster-std/src/syscall/pread64.rs diff --git a/services/libs/jinux-std/src/syscall/prlimit64.rs b/services/libs/aster-std/src/syscall/prlimit64.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/prlimit64.rs rename to services/libs/aster-std/src/syscall/prlimit64.rs diff --git a/services/libs/jinux-std/src/syscall/read.rs b/services/libs/aster-std/src/syscall/read.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/read.rs rename to services/libs/aster-std/src/syscall/read.rs diff --git a/services/libs/jinux-std/src/syscall/readlink.rs b/services/libs/aster-std/src/syscall/readlink.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/readlink.rs rename to services/libs/aster-std/src/syscall/readlink.rs diff --git a/services/libs/jinux-std/src/syscall/recvfrom.rs b/services/libs/aster-std/src/syscall/recvfrom.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/recvfrom.rs rename to services/libs/aster-std/src/syscall/recvfrom.rs diff --git a/services/libs/jinux-std/src/syscall/rename.rs b/services/libs/aster-std/src/syscall/rename.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/rename.rs rename to services/libs/aster-std/src/syscall/rename.rs diff --git a/services/libs/jinux-std/src/syscall/rmdir.rs b/services/libs/aster-std/src/syscall/rmdir.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/rmdir.rs rename to services/libs/aster-std/src/syscall/rmdir.rs diff --git a/services/libs/jinux-std/src/syscall/rt_sigaction.rs b/services/libs/aster-std/src/syscall/rt_sigaction.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/rt_sigaction.rs rename to services/libs/aster-std/src/syscall/rt_sigaction.rs diff --git a/services/libs/jinux-std/src/syscall/rt_sigprocmask.rs b/services/libs/aster-std/src/syscall/rt_sigprocmask.rs similarity index 98% rename from services/libs/jinux-std/src/syscall/rt_sigprocmask.rs rename to services/libs/aster-std/src/syscall/rt_sigprocmask.rs index 0219d104c..c39356707 100644 --- a/services/libs/jinux-std/src/syscall/rt_sigprocmask.rs +++ b/services/libs/aster-std/src/syscall/rt_sigprocmask.rs @@ -4,7 +4,7 @@ use crate::prelude::*; use crate::process::posix_thread::PosixThreadExt; use crate::process::signal::constants::{SIGKILL, SIGSTOP}; use crate::process::signal::sig_mask::SigMask; -use jinux_frame::vm::VmIo; +use aster_frame::vm::VmIo; pub fn sys_rt_sigprocmask( how: u32, diff --git a/services/libs/jinux-std/src/syscall/rt_sigreturn.rs b/services/libs/aster-std/src/syscall/rt_sigreturn.rs similarity index 98% rename from services/libs/jinux-std/src/syscall/rt_sigreturn.rs rename to services/libs/aster-std/src/syscall/rt_sigreturn.rs index 4132b5ab7..c74e6f6e3 100644 --- a/services/libs/jinux-std/src/syscall/rt_sigreturn.rs +++ b/services/libs/aster-std/src/syscall/rt_sigreturn.rs @@ -4,7 +4,7 @@ use crate::{ process::{posix_thread::PosixThreadExt, signal::c_types::ucontext_t}, util::read_val_from_user, }; -use jinux_frame::cpu::UserContext; +use aster_frame::cpu::UserContext; use super::{SyscallReturn, SYS_RT_SIGRETRUN}; diff --git a/services/libs/jinux-std/src/syscall/sched_yield.rs b/services/libs/aster-std/src/syscall/sched_yield.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/sched_yield.rs rename to services/libs/aster-std/src/syscall/sched_yield.rs diff --git a/services/libs/jinux-std/src/syscall/select.rs b/services/libs/aster-std/src/syscall/select.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/select.rs rename to services/libs/aster-std/src/syscall/select.rs diff --git a/services/libs/jinux-std/src/syscall/sendto.rs b/services/libs/aster-std/src/syscall/sendto.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/sendto.rs rename to services/libs/aster-std/src/syscall/sendto.rs diff --git a/services/libs/jinux-std/src/syscall/set_robust_list.rs b/services/libs/aster-std/src/syscall/set_robust_list.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/set_robust_list.rs rename to services/libs/aster-std/src/syscall/set_robust_list.rs diff --git a/services/libs/jinux-std/src/syscall/set_tid_address.rs b/services/libs/aster-std/src/syscall/set_tid_address.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/set_tid_address.rs rename to services/libs/aster-std/src/syscall/set_tid_address.rs diff --git a/services/libs/jinux-std/src/syscall/setfsgid.rs b/services/libs/aster-std/src/syscall/setfsgid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/setfsgid.rs rename to services/libs/aster-std/src/syscall/setfsgid.rs diff --git a/services/libs/jinux-std/src/syscall/setfsuid.rs b/services/libs/aster-std/src/syscall/setfsuid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/setfsuid.rs rename to services/libs/aster-std/src/syscall/setfsuid.rs diff --git a/services/libs/jinux-std/src/syscall/setgid.rs b/services/libs/aster-std/src/syscall/setgid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/setgid.rs rename to services/libs/aster-std/src/syscall/setgid.rs diff --git a/services/libs/jinux-std/src/syscall/setgroups.rs b/services/libs/aster-std/src/syscall/setgroups.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/setgroups.rs rename to services/libs/aster-std/src/syscall/setgroups.rs diff --git a/services/libs/jinux-std/src/syscall/setpgid.rs b/services/libs/aster-std/src/syscall/setpgid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/setpgid.rs rename to services/libs/aster-std/src/syscall/setpgid.rs diff --git a/services/libs/jinux-std/src/syscall/setregid.rs b/services/libs/aster-std/src/syscall/setregid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/setregid.rs rename to services/libs/aster-std/src/syscall/setregid.rs diff --git a/services/libs/jinux-std/src/syscall/setresgid.rs b/services/libs/aster-std/src/syscall/setresgid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/setresgid.rs rename to services/libs/aster-std/src/syscall/setresgid.rs diff --git a/services/libs/jinux-std/src/syscall/setresuid.rs b/services/libs/aster-std/src/syscall/setresuid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/setresuid.rs rename to services/libs/aster-std/src/syscall/setresuid.rs diff --git a/services/libs/jinux-std/src/syscall/setreuid.rs b/services/libs/aster-std/src/syscall/setreuid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/setreuid.rs rename to services/libs/aster-std/src/syscall/setreuid.rs diff --git a/services/libs/jinux-std/src/syscall/setsid.rs b/services/libs/aster-std/src/syscall/setsid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/setsid.rs rename to services/libs/aster-std/src/syscall/setsid.rs diff --git a/services/libs/jinux-std/src/syscall/setsockopt.rs b/services/libs/aster-std/src/syscall/setsockopt.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/setsockopt.rs rename to services/libs/aster-std/src/syscall/setsockopt.rs diff --git a/services/libs/jinux-std/src/syscall/setuid.rs b/services/libs/aster-std/src/syscall/setuid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/setuid.rs rename to services/libs/aster-std/src/syscall/setuid.rs diff --git a/services/libs/jinux-std/src/syscall/shutdown.rs b/services/libs/aster-std/src/syscall/shutdown.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/shutdown.rs rename to services/libs/aster-std/src/syscall/shutdown.rs diff --git a/services/libs/jinux-std/src/syscall/sigaltstack.rs b/services/libs/aster-std/src/syscall/sigaltstack.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/sigaltstack.rs rename to services/libs/aster-std/src/syscall/sigaltstack.rs diff --git a/services/libs/jinux-std/src/syscall/socket.rs b/services/libs/aster-std/src/syscall/socket.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/socket.rs rename to services/libs/aster-std/src/syscall/socket.rs diff --git a/services/libs/jinux-std/src/syscall/socketpair.rs b/services/libs/aster-std/src/syscall/socketpair.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/socketpair.rs rename to services/libs/aster-std/src/syscall/socketpair.rs diff --git a/services/libs/jinux-std/src/syscall/stat.rs b/services/libs/aster-std/src/syscall/stat.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/stat.rs rename to services/libs/aster-std/src/syscall/stat.rs diff --git a/services/libs/jinux-std/src/syscall/statfs.rs b/services/libs/aster-std/src/syscall/statfs.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/statfs.rs rename to services/libs/aster-std/src/syscall/statfs.rs diff --git a/services/libs/jinux-std/src/syscall/symlink.rs b/services/libs/aster-std/src/syscall/symlink.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/symlink.rs rename to services/libs/aster-std/src/syscall/symlink.rs diff --git a/services/libs/jinux-std/src/syscall/tgkill.rs b/services/libs/aster-std/src/syscall/tgkill.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/tgkill.rs rename to services/libs/aster-std/src/syscall/tgkill.rs diff --git a/services/libs/jinux-std/src/syscall/time.rs b/services/libs/aster-std/src/syscall/time.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/time.rs rename to services/libs/aster-std/src/syscall/time.rs diff --git a/services/libs/jinux-std/src/syscall/umask.rs b/services/libs/aster-std/src/syscall/umask.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/umask.rs rename to services/libs/aster-std/src/syscall/umask.rs diff --git a/services/libs/jinux-std/src/syscall/uname.rs b/services/libs/aster-std/src/syscall/uname.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/uname.rs rename to services/libs/aster-std/src/syscall/uname.rs diff --git a/services/libs/jinux-std/src/syscall/unlink.rs b/services/libs/aster-std/src/syscall/unlink.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/unlink.rs rename to services/libs/aster-std/src/syscall/unlink.rs diff --git a/services/libs/jinux-std/src/syscall/utimens.rs b/services/libs/aster-std/src/syscall/utimens.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/utimens.rs rename to services/libs/aster-std/src/syscall/utimens.rs diff --git a/services/libs/jinux-std/src/syscall/wait4.rs b/services/libs/aster-std/src/syscall/wait4.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/wait4.rs rename to services/libs/aster-std/src/syscall/wait4.rs diff --git a/services/libs/jinux-std/src/syscall/waitid.rs b/services/libs/aster-std/src/syscall/waitid.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/waitid.rs rename to services/libs/aster-std/src/syscall/waitid.rs diff --git a/services/libs/jinux-std/src/syscall/write.rs b/services/libs/aster-std/src/syscall/write.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/write.rs rename to services/libs/aster-std/src/syscall/write.rs diff --git a/services/libs/jinux-std/src/syscall/writev.rs b/services/libs/aster-std/src/syscall/writev.rs similarity index 100% rename from services/libs/jinux-std/src/syscall/writev.rs rename to services/libs/aster-std/src/syscall/writev.rs diff --git a/services/libs/jinux-std/src/thread/exception.rs b/services/libs/aster-std/src/thread/exception.rs similarity index 98% rename from services/libs/jinux-std/src/thread/exception.rs rename to services/libs/aster-std/src/thread/exception.rs index 4bdd22fad..6a690c54a 100644 --- a/services/libs/jinux-std/src/thread/exception.rs +++ b/services/libs/aster-std/src/thread/exception.rs @@ -1,8 +1,8 @@ use crate::prelude::*; use crate::process::signal::signals::fault::FaultSignal; use crate::vm::page_fault_handler::PageFaultHandler; -use jinux_frame::cpu::*; -use jinux_frame::vm::VmIo; +use aster_frame::cpu::*; +use aster_frame::vm::VmIo; /// We can't handle most exceptions, just send self a fault signal before return to user space. pub fn handle_exception(context: &UserContext) { diff --git a/services/libs/jinux-std/src/thread/kernel_thread.rs b/services/libs/aster-std/src/thread/kernel_thread.rs similarity index 97% rename from services/libs/jinux-std/src/thread/kernel_thread.rs rename to services/libs/aster-std/src/thread/kernel_thread.rs index 1b0a5d788..be39fb5b3 100644 --- a/services/libs/jinux-std/src/thread/kernel_thread.rs +++ b/services/libs/aster-std/src/thread/kernel_thread.rs @@ -1,5 +1,5 @@ -use jinux_frame::cpu::CpuSet; -use jinux_frame::task::{Priority, TaskOptions}; +use aster_frame::cpu::CpuSet; +use aster_frame::task::{Priority, TaskOptions}; use crate::prelude::*; diff --git a/services/libs/jinux-std/src/thread/mod.rs b/services/libs/aster-std/src/thread/mod.rs similarity index 98% rename from services/libs/jinux-std/src/thread/mod.rs rename to services/libs/aster-std/src/thread/mod.rs index 86dab103a..c321170c7 100644 --- a/services/libs/jinux-std/src/thread/mod.rs +++ b/services/libs/aster-std/src/thread/mod.rs @@ -5,7 +5,7 @@ use core::{ sync::atomic::{AtomicU32, Ordering}, }; -use jinux_frame::task::Task; +use aster_frame::task::Task; use crate::prelude::*; diff --git a/services/libs/jinux-std/src/thread/status.rs b/services/libs/aster-std/src/thread/status.rs similarity index 100% rename from services/libs/jinux-std/src/thread/status.rs rename to services/libs/aster-std/src/thread/status.rs diff --git a/services/libs/jinux-std/src/thread/task.rs b/services/libs/aster-std/src/thread/task.rs similarity index 99% rename from services/libs/jinux-std/src/thread/task.rs rename to services/libs/aster-std/src/thread/task.rs index e5e7a567f..856161045 100644 --- a/services/libs/jinux-std/src/thread/task.rs +++ b/services/libs/aster-std/src/thread/task.rs @@ -1,4 +1,4 @@ -use jinux_frame::{ +use aster_frame::{ cpu::UserContext, task::{preempt, Task, TaskOptions}, user::{UserContextApi, UserEvent, UserMode, UserSpace}, diff --git a/services/libs/jinux-std/src/thread/thread_table.rs b/services/libs/aster-std/src/thread/thread_table.rs similarity index 100% rename from services/libs/jinux-std/src/thread/thread_table.rs rename to services/libs/aster-std/src/thread/thread_table.rs diff --git a/services/libs/jinux-std/src/thread/work_queue/mod.rs b/services/libs/aster-std/src/thread/work_queue/mod.rs similarity index 98% rename from services/libs/jinux-std/src/thread/work_queue/mod.rs rename to services/libs/aster-std/src/thread/work_queue/mod.rs index 5aae0107c..4e55e7b69 100644 --- a/services/libs/jinux-std/src/thread/work_queue/mod.rs +++ b/services/libs/aster-std/src/thread/work_queue/mod.rs @@ -1,5 +1,5 @@ use crate::prelude::*; -use jinux_frame::cpu::CpuSet; +use aster_frame::cpu::CpuSet; use spin::Once; use work_item::WorkItem; use worker_pool::WorkerPool; @@ -60,7 +60,7 @@ static WORKQUEUE_GLOBAL_HIGH_PRI: Once> = Once::new(); /// Certainly, users can also create a dedicated WorkQueue and WorkerPool. /// /// ```rust -/// use jinux_frame::cpu::CpuSet; +/// use aster_frame::cpu::CpuSet; /// use crate::thread::work_queue::{WorkQueue, WorkerPool, WorkItem}; /// /// fn deferred_task(){ diff --git a/services/libs/jinux-std/src/thread/work_queue/simple_scheduler.rs b/services/libs/aster-std/src/thread/work_queue/simple_scheduler.rs similarity index 100% rename from services/libs/jinux-std/src/thread/work_queue/simple_scheduler.rs rename to services/libs/aster-std/src/thread/work_queue/simple_scheduler.rs diff --git a/services/libs/jinux-std/src/thread/work_queue/work_item.rs b/services/libs/aster-std/src/thread/work_queue/work_item.rs similarity index 97% rename from services/libs/jinux-std/src/thread/work_queue/work_item.rs rename to services/libs/aster-std/src/thread/work_queue/work_item.rs index 343473213..919a5318d 100644 --- a/services/libs/jinux-std/src/thread/work_queue/work_item.rs +++ b/services/libs/aster-std/src/thread/work_queue/work_item.rs @@ -1,7 +1,7 @@ use crate::prelude::*; +use aster_frame::cpu::CpuSet; use core::sync::atomic::AtomicBool; use core::sync::atomic::Ordering; -use jinux_frame::cpu::CpuSet; /// A task to be executed by a worker thread. pub struct WorkItem { diff --git a/services/libs/jinux-std/src/thread/work_queue/worker.rs b/services/libs/aster-std/src/thread/work_queue/worker.rs similarity index 98% rename from services/libs/jinux-std/src/thread/work_queue/worker.rs rename to services/libs/aster-std/src/thread/work_queue/worker.rs index d988868ce..3ba850ed8 100644 --- a/services/libs/jinux-std/src/thread/work_queue/worker.rs +++ b/services/libs/aster-std/src/thread/work_queue/worker.rs @@ -2,8 +2,8 @@ use super::worker_pool::WorkerPool; use crate::prelude::*; use crate::thread::kernel_thread::{KernelThreadExt, ThreadOptions}; use crate::Thread; -use jinux_frame::cpu::CpuSet; -use jinux_frame::task::Priority; +use aster_frame::cpu::CpuSet; +use aster_frame::task::Priority; /// A worker thread. A `Worker` will attempt to retrieve unfinished /// work items from its corresponding `WorkerPool`. If there are none, diff --git a/services/libs/jinux-std/src/thread/work_queue/worker_pool.rs b/services/libs/aster-std/src/thread/work_queue/worker_pool.rs similarity index 98% rename from services/libs/jinux-std/src/thread/work_queue/worker_pool.rs rename to services/libs/aster-std/src/thread/work_queue/worker_pool.rs index 57fc0dfd1..462864cd1 100644 --- a/services/libs/jinux-std/src/thread/work_queue/worker_pool.rs +++ b/services/libs/aster-std/src/thread/work_queue/worker_pool.rs @@ -4,9 +4,9 @@ use super::{simple_scheduler::SimpleScheduler, worker::Worker, WorkItem, WorkPri use crate::prelude::*; use crate::thread::kernel_thread::{KernelThreadExt, ThreadOptions}; use crate::Thread; -use jinux_frame::cpu::CpuSet; -use jinux_frame::sync::WaitQueue; -use jinux_frame::task::Priority; +use aster_frame::cpu::CpuSet; +use aster_frame::sync::WaitQueue; +use aster_frame::task::Priority; /// A pool of workers. /// diff --git a/services/libs/jinux-std/src/time/mod.rs b/services/libs/aster-std/src/time/mod.rs similarity index 98% rename from services/libs/jinux-std/src/time/mod.rs rename to services/libs/aster-std/src/time/mod.rs index 5ffed2d13..7c9e737da 100644 --- a/services/libs/jinux-std/src/time/mod.rs +++ b/services/libs/aster-std/src/time/mod.rs @@ -3,7 +3,7 @@ use core::time::Duration; use crate::prelude::*; -use jinux_time::read_monotonic_time; +use aster_time::read_monotonic_time; mod system_time; diff --git a/services/libs/jinux-std/src/time/system_time.rs b/services/libs/aster-std/src/time/system_time.rs similarity index 95% rename from services/libs/jinux-std/src/time/system_time.rs rename to services/libs/aster-std/src/time/system_time.rs index e1584953d..bca7a387b 100644 --- a/services/libs/jinux-std/src/time/system_time.rs +++ b/services/libs/aster-std/src/time/system_time.rs @@ -1,5 +1,5 @@ +use aster_time::{read_monotonic_time, read_start_time}; use core::time::Duration; -use jinux_time::{read_monotonic_time, read_start_time}; use time::{Date, Month, PrimitiveDateTime, Time}; use crate::prelude::*; @@ -68,8 +68,8 @@ impl SystemTime { } } -/// convert jinux_frame::time::Time to System time -fn convert_system_time(system_time: jinux_time::SystemTime) -> Result { +/// convert aster_frame::time::Time to System time +fn convert_system_time(system_time: aster_time::SystemTime) -> Result { let month = match Month::try_from(system_time.month) { Ok(month) => month, Err(_) => return_errno_with_message!(Errno::EINVAL, "unknown month in system time"), diff --git a/services/libs/jinux-std/src/util/mod.rs b/services/libs/aster-std/src/util/mod.rs similarity index 98% rename from services/libs/jinux-std/src/util/mod.rs rename to services/libs/aster-std/src/util/mod.rs index 9441e989b..210358bc8 100644 --- a/services/libs/jinux-std/src/util/mod.rs +++ b/services/libs/aster-std/src/util/mod.rs @@ -1,5 +1,5 @@ use crate::prelude::*; -use jinux_frame::vm::VmIo; +use aster_frame::vm::VmIo; pub mod net; /// copy bytes from user space of current process. The bytes len is the len of dest. diff --git a/services/libs/jinux-std/src/util/net/addr.rs b/services/libs/aster-std/src/util/net/addr.rs similarity index 100% rename from services/libs/jinux-std/src/util/net/addr.rs rename to services/libs/aster-std/src/util/net/addr.rs diff --git a/services/libs/jinux-std/src/util/net/mod.rs b/services/libs/aster-std/src/util/net/mod.rs similarity index 100% rename from services/libs/jinux-std/src/util/net/mod.rs rename to services/libs/aster-std/src/util/net/mod.rs diff --git a/services/libs/jinux-std/src/util/net/socket.rs b/services/libs/aster-std/src/util/net/socket.rs similarity index 100% rename from services/libs/jinux-std/src/util/net/socket.rs rename to services/libs/aster-std/src/util/net/socket.rs diff --git a/services/libs/jinux-std/src/vdso.rs b/services/libs/aster-std/src/vdso.rs similarity index 96% rename from services/libs/jinux-std/src/vdso.rs rename to services/libs/aster-std/src/vdso.rs index 0a1432558..242b9a17f 100644 --- a/services/libs/jinux-std/src/vdso.rs +++ b/services/libs/aster-std/src/vdso.rs @@ -11,10 +11,10 @@ use alloc::boxed::Box; use alloc::sync::Arc; -use jinux_frame::{config::PAGE_SIZE, sync::Mutex, vm::VmIo}; -use jinux_rights::Rights; -use jinux_time::Instant; -use jinux_util::coeff::Coeff; +use aster_frame::{config::PAGE_SIZE, sync::Mutex, vm::VmIo}; +use aster_rights::Rights; +use aster_time::Instant; +use aster_util::coeff::Coeff; use pod::Pod; use spin::Once; @@ -108,7 +108,7 @@ impl VdsoData { /// Init vdso data based on the default clocksource. fn init(&mut self) { - let clocksource = jinux_time::default_clocksource(); + let clocksource = aster_time::default_clocksource(); let coeff = clocksource.coeff(); self.set_clock_mode(DEFAULT_CLOCK_MODE); self.set_coeff(coeff); @@ -249,7 +249,7 @@ fn init_vdso() { pub(super) fn init() { init_start_secs_count(); init_vdso(); - jinux_time::VDSO_DATA_UPDATE.call_once(|| Arc::new(update_vdso_instant)); + aster_time::VDSO_DATA_UPDATE.call_once(|| Arc::new(update_vdso_instant)); } /// Return the vdso vmo. diff --git a/services/libs/jinux-std/src/vm/mod.rs b/services/libs/aster-std/src/vm/mod.rs similarity index 100% rename from services/libs/jinux-std/src/vm/mod.rs rename to services/libs/aster-std/src/vm/mod.rs diff --git a/services/libs/jinux-std/src/vm/page_fault_handler.rs b/services/libs/aster-std/src/vm/page_fault_handler.rs similarity index 100% rename from services/libs/jinux-std/src/vm/page_fault_handler.rs rename to services/libs/aster-std/src/vm/page_fault_handler.rs diff --git a/services/libs/jinux-std/src/vm/perms.rs b/services/libs/aster-std/src/vm/perms.rs similarity index 97% rename from services/libs/jinux-std/src/vm/perms.rs rename to services/libs/aster-std/src/vm/perms.rs index 2e3794f6a..542235883 100644 --- a/services/libs/jinux-std/src/vm/perms.rs +++ b/services/libs/aster-std/src/vm/perms.rs @@ -1,6 +1,6 @@ +use aster_frame::vm::VmPerm; +use aster_rights::Rights; use bitflags::bitflags; -use jinux_frame::vm::VmPerm; -use jinux_rights::Rights; bitflags! { /// The memory access permissions of memory mappings. diff --git a/services/libs/jinux-std/src/vm/vmar/dyn_cap.rs b/services/libs/aster-std/src/vm/vmar/dyn_cap.rs similarity index 95% rename from services/libs/jinux-std/src/vm/vmar/dyn_cap.rs rename to services/libs/aster-std/src/vm/vmar/dyn_cap.rs index 9c3904459..138dcbe38 100644 --- a/services/libs/jinux-std/src/vm/vmar/dyn_cap.rs +++ b/services/libs/aster-std/src/vm/vmar/dyn_cap.rs @@ -1,6 +1,6 @@ +use aster_frame::vm::{Vaddr, VmIo}; +use aster_rights::Rights; use core::ops::Range; -use jinux_frame::vm::{Vaddr, VmIo}; -use jinux_rights::Rights; use crate::prelude::*; @@ -23,8 +23,8 @@ impl Vmar { /// # Example /// /// ``` - /// use jinux_std::prelude::*; - /// use jinux_std::vm::{PAGE_SIZE, Vmar, VmoOptions}; + /// use aster_std::prelude::*; + /// use aster_std::vm::{PAGE_SIZE, Vmar, VmoOptions}; /// /// let vmar = Vmar::new().unwrap(); /// let vmo = VmoOptions::new(PAGE_SIZE).alloc().unwrap(); @@ -156,13 +156,13 @@ impl Vmar { } impl VmIo for Vmar { - fn read_bytes(&self, offset: usize, buf: &mut [u8]) -> jinux_frame::Result<()> { + fn read_bytes(&self, offset: usize, buf: &mut [u8]) -> aster_frame::Result<()> { self.check_rights(Rights::READ)?; self.0.read(offset, buf)?; Ok(()) } - fn write_bytes(&self, offset: usize, buf: &[u8]) -> jinux_frame::Result<()> { + fn write_bytes(&self, offset: usize, buf: &[u8]) -> aster_frame::Result<()> { self.check_rights(Rights::WRITE)?; self.0.write(offset, buf)?; Ok(()) diff --git a/services/libs/jinux-std/src/vm/vmar/mod.rs b/services/libs/aster-std/src/vm/vmar/mod.rs similarity index 99% rename from services/libs/jinux-std/src/vm/vmar/mod.rs rename to services/libs/aster-std/src/vm/vmar/mod.rs index 4c19882a0..ced1b01df 100644 --- a/services/libs/jinux-std/src/vm/vmar/mod.rs +++ b/services/libs/aster-std/src/vm/vmar/mod.rs @@ -12,9 +12,9 @@ use alloc::collections::BTreeMap; use alloc::sync::Arc; use alloc::sync::Weak; use alloc::vec::Vec; +use aster_frame::vm::VmSpace; +use aster_rights::Rights; use core::ops::Range; -use jinux_frame::vm::VmSpace; -use jinux_rights::Rights; use self::vm_mapping::VmMapping; diff --git a/services/libs/jinux-std/src/vm/vmar/options.rs b/services/libs/aster-std/src/vm/vmar/options.rs similarity index 96% rename from services/libs/jinux-std/src/vm/vmar/options.rs rename to services/libs/aster-std/src/vm/vmar/options.rs index cb43a81ca..df0ae43cf 100644 --- a/services/libs/jinux-std/src/vm/vmar/options.rs +++ b/services/libs/aster-std/src/vm/vmar/options.rs @@ -1,7 +1,7 @@ //! Options for allocating child VMARs. -use jinux_frame::config::PAGE_SIZE; -use jinux_frame::{Error, Result}; +use aster_frame::config::PAGE_SIZE; +use aster_frame::{Error, Result}; use super::Vmar; @@ -13,7 +13,7 @@ use super::Vmar; /// A child VMAR created from a parent VMAR of _dynamic_ capability is also a /// _dynamic_ capability. /// ``` -/// use jinux_std::vm::{PAGE_SIZE, Vmar}; +/// use aster_std::vm::{PAGE_SIZE, Vmar}; /// /// let parent_vmar = Vmar::new(); /// let child_size = 10 * PAGE_SIZE; @@ -28,8 +28,8 @@ use super::Vmar; /// A child VMAR created from a parent VMAR of _static_ capability is also a /// _static_ capability. /// ``` -/// use jinux_std::prelude::*; -/// use jinux_std::vm::{PAGE_SIZE, Vmar}; +/// use aster_std::prelude::*; +/// use aster_std::vm::{PAGE_SIZE, Vmar}; /// /// let parent_vmar: Vmar = Vmar::new(); /// let child_size = 10 * PAGE_SIZE; @@ -139,8 +139,8 @@ mod test { use crate::vm::perms::VmPerms; use crate::vm::vmo::VmoRightsOp; use crate::vm::{vmar::ROOT_VMAR_HIGHEST_ADDR, vmo::VmoOptions}; - use jinux_frame::vm::VmIo; - use jinux_rights::Full; + use aster_frame::vm::VmIo; + use aster_rights::Full; #[ktest] fn root_vmar() { diff --git a/services/libs/jinux-std/src/vm/vmar/static_cap.rs b/services/libs/aster-std/src/vm/vmar/static_cap.rs similarity index 95% rename from services/libs/jinux-std/src/vm/vmar/static_cap.rs rename to services/libs/aster-std/src/vm/vmar/static_cap.rs index 76b900e1d..248ac40a7 100644 --- a/services/libs/jinux-std/src/vm/vmar/static_cap.rs +++ b/services/libs/aster-std/src/vm/vmar/static_cap.rs @@ -1,9 +1,9 @@ use core::ops::Range; use crate::prelude::*; -use jinux_frame::vm::VmIo; -use jinux_rights::{Dup, Rights, TRightSet, TRights}; -use jinux_rights_proc::require; +use aster_frame::vm::VmIo; +use aster_rights::{Dup, Rights, TRightSet, TRights}; +use aster_rights_proc::require; use crate::vm::{page_fault_handler::PageFaultHandler, vmo::Vmo}; @@ -28,8 +28,8 @@ impl Vmar> { /// # Example /// /// ``` - /// use jinux_std::prelude::*; - /// use jinux_std::vm::{PAGE_SIZE, Vmar, VmoOptions}; + /// use aster_std::prelude::*; + /// use aster_std::vm::{PAGE_SIZE, Vmar, VmoOptions}; /// /// let vmar = Vmar::>::new().unwrap(); /// let vmo = VmoOptions::new(PAGE_SIZE).alloc().unwrap(); @@ -177,13 +177,13 @@ impl Vmar> { } impl VmIo for Vmar> { - fn read_bytes(&self, offset: usize, buf: &mut [u8]) -> jinux_frame::Result<()> { + fn read_bytes(&self, offset: usize, buf: &mut [u8]) -> aster_frame::Result<()> { self.check_rights(Rights::READ)?; self.0.read(offset, buf)?; Ok(()) } - fn write_bytes(&self, offset: usize, buf: &[u8]) -> jinux_frame::Result<()> { + fn write_bytes(&self, offset: usize, buf: &[u8]) -> aster_frame::Result<()> { self.check_rights(Rights::WRITE)?; self.0.write(offset, buf)?; Ok(()) diff --git a/services/libs/jinux-std/src/vm/vmar/vm_mapping.rs b/services/libs/aster-std/src/vm/vmar/vm_mapping.rs similarity index 99% rename from services/libs/jinux-std/src/vm/vmar/vm_mapping.rs rename to services/libs/aster-std/src/vm/vmar/vm_mapping.rs index 53b603a64..b1c4bd952 100644 --- a/services/libs/jinux-std/src/vm/vmar/vm_mapping.rs +++ b/services/libs/aster-std/src/vm/vmar/vm_mapping.rs @@ -1,7 +1,7 @@ use crate::prelude::*; +use aster_frame::sync::Mutex; +use aster_frame::vm::{VmFrame, VmFrameVec, VmIo, VmMapOptions, VmPerm, VmSpace}; use core::ops::Range; -use jinux_frame::sync::Mutex; -use jinux_frame::vm::{VmFrame, VmFrameVec, VmIo, VmMapOptions, VmPerm, VmSpace}; use crate::vm::{ vmo::get_page_idx_range, diff --git a/services/libs/jinux-std/src/vm/vmo/dyn_cap.rs b/services/libs/aster-std/src/vm/vmo/dyn_cap.rs similarity index 96% rename from services/libs/jinux-std/src/vm/vmo/dyn_cap.rs rename to services/libs/aster-std/src/vm/vmo/dyn_cap.rs index 9eb0c6b34..0ee957d5e 100644 --- a/services/libs/jinux-std/src/vm/vmo/dyn_cap.rs +++ b/services/libs/aster-std/src/vm/vmo/dyn_cap.rs @@ -2,9 +2,9 @@ use core::ops::Range; use crate::prelude::*; -use jinux_frame::vm::VmIo; +use aster_frame::vm::VmIo; -use jinux_rights::{Rights, TRights}; +use aster_rights::{Rights, TRights}; use super::VmoRightsOp; use super::{ @@ -150,13 +150,13 @@ impl Vmo { } impl VmIo for Vmo { - fn read_bytes(&self, offset: usize, buf: &mut [u8]) -> jinux_frame::Result<()> { + fn read_bytes(&self, offset: usize, buf: &mut [u8]) -> aster_frame::Result<()> { self.check_rights(Rights::READ)?; self.0.read_bytes(offset, buf)?; Ok(()) } - fn write_bytes(&self, offset: usize, buf: &[u8]) -> jinux_frame::Result<()> { + fn write_bytes(&self, offset: usize, buf: &[u8]) -> aster_frame::Result<()> { self.check_rights(Rights::WRITE)?; self.0.write_bytes(offset, buf)?; Ok(()) diff --git a/services/libs/jinux-std/src/vm/vmo/mod.rs b/services/libs/aster-std/src/vm/vmo/mod.rs similarity index 98% rename from services/libs/jinux-std/src/vm/vmo/mod.rs rename to services/libs/aster-std/src/vm/vmo/mod.rs index 74d41c701..3d37eecf7 100644 --- a/services/libs/jinux-std/src/vm/vmo/mod.rs +++ b/services/libs/aster-std/src/vm/vmo/mod.rs @@ -3,8 +3,8 @@ use core::ops::Range; use align_ext::AlignExt; -use jinux_frame::vm::{VmAllocOptions, VmFrame, VmFrameVec, VmIo}; -use jinux_rights::Rights; +use aster_frame::vm::{VmAllocOptions, VmFrame, VmFrameVec, VmIo}; +use aster_rights::Rights; use crate::prelude::*; @@ -66,7 +66,7 @@ pub use pager::Pager; /// # Implementation /// /// `Vmo` provides high-level APIs for address space management by wrapping -/// around its low-level counterpart `jinux_frame::vm::VmFrames`. +/// around its low-level counterpart `aster_frame::vm::VmFrames`. /// Compared with `VmFrames`, /// `Vmo` is easier to use (by offering more powerful APIs) and /// harder to misuse (thanks to its nature of being capability). diff --git a/services/libs/jinux-std/src/vm/vmo/options.rs b/services/libs/aster-std/src/vm/vmo/options.rs similarity index 96% rename from services/libs/jinux-std/src/vm/vmo/options.rs rename to services/libs/aster-std/src/vm/vmo/options.rs index a1291eb98..88e559cc4 100644 --- a/services/libs/jinux-std/src/vm/vmo/options.rs +++ b/services/libs/aster-std/src/vm/vmo/options.rs @@ -4,15 +4,15 @@ use core::marker::PhantomData; use core::ops::Range; use align_ext::AlignExt; -use jinux_frame::vm::{VmAllocOptions, VmFrame}; -use jinux_rights_proc::require; +use aster_frame::vm::{VmAllocOptions, VmFrame}; +use aster_rights_proc::require; use typeflags_util::{SetExtend, SetExtendOp}; use crate::prelude::*; use crate::vm::vmo::get_inherited_frames_from_parent; use crate::vm::vmo::{VmoInner, Vmo_}; -use jinux_rights::{Dup, Rights, TRightSet, TRights, Write}; +use aster_rights::{Dup, Rights, TRightSet, TRights, Write}; use super::VmoRightsOp; use super::{Pager, Vmo, VmoFlags}; @@ -23,7 +23,7 @@ use super::{Pager, Vmo, VmoFlags}; /// /// Creating a VMO as a _dynamic_ capability with full access rights: /// ``` -/// use jinux_std::vm::{PAGE_SIZE, VmoOptions}; +/// use aster_std::vm::{PAGE_SIZE, VmoOptions}; /// /// let vmo = VmoOptions::new(PAGE_SIZE) /// .alloc() @@ -32,8 +32,8 @@ use super::{Pager, Vmo, VmoFlags}; /// /// Creating a VMO as a _static_ capability with all access rights: /// ``` -/// use jinux_std::prelude::*; -/// use jinux_std::vm::{PAGE_SIZE, VmoOptions}; +/// use aster_std::prelude::*; +/// use aster_std::vm::{PAGE_SIZE, VmoOptions}; /// /// let vmo = VmoOptions::::new(PAGE_SIZE) /// .alloc() @@ -44,7 +44,7 @@ use super::{Pager, Vmo, VmoFlags}; /// physically contiguous: /// /// ``` -/// use jinux_std::vm::{PAGE_SIZE, VmoOptions, VmoFlags}; +/// use aster_std::vm::{PAGE_SIZE, VmoOptions, VmoFlags}; /// /// let vmo = VmoOptions::new(10 * PAGE_SIZE) /// .flags(VmoFlags::RESIZABLE) @@ -164,7 +164,7 @@ fn committed_pages_if_continuous(flags: VmoFlags, size: usize) -> Result Result = VmoOptions::new(PAGE_SIZE) /// .alloc() @@ -196,7 +196,7 @@ fn committed_pages_if_continuous(flags: VmoFlags, size: usize) -> Result Result::new(PAGE_SIZE) /// .alloc() @@ -227,7 +227,7 @@ fn committed_pages_if_continuous(flags: VmoFlags, size: usize) -> Result Vmo> { } impl VmIo for Vmo> { - fn read_bytes(&self, offset: usize, buf: &mut [u8]) -> jinux_frame::Result<()> { + fn read_bytes(&self, offset: usize, buf: &mut [u8]) -> aster_frame::Result<()> { self.check_rights(Rights::READ)?; self.0.read_bytes(offset, buf)?; Ok(()) } - fn write_bytes(&self, offset: usize, buf: &[u8]) -> jinux_frame::Result<()> { + fn write_bytes(&self, offset: usize, buf: &[u8]) -> aster_frame::Result<()> { self.check_rights(Rights::WRITE)?; self.0.write_bytes(offset, buf)?; Ok(()) diff --git a/services/libs/jinux-util/Cargo.toml b/services/libs/aster-util/Cargo.toml similarity index 70% rename from services/libs/jinux-util/Cargo.toml rename to services/libs/aster-util/Cargo.toml index 77daec7cb..02d1401ad 100644 --- a/services/libs/jinux-util/Cargo.toml +++ b/services/libs/aster-util/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "jinux-util" +name = "aster-util" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -jinux-frame = { path = "../../../framework/jinux-frame" } +aster-frame = { path = "../../../framework/aster-frame" } pod = { git = "https://github.com/jinzhao-dev/pod", rev = "d7dba56" } typeflags-util = { path = "../typeflags-util" } -jinux-rights-proc = { path = "../jinux-rights-proc" } -jinux-rights = { path = "../jinux-rights" } +aster-rights-proc = { path = "../aster-rights-proc" } +aster-rights = { path = "../aster-rights" } bitvec = { version = "1.0", default-features = false, features = ["alloc"] } ktest = { path = "../../../framework/libs/ktest" } [features] diff --git a/services/libs/jinux-util/src/coeff.rs b/services/libs/aster-util/src/coeff.rs similarity index 100% rename from services/libs/jinux-util/src/coeff.rs rename to services/libs/aster-util/src/coeff.rs diff --git a/services/libs/jinux-util/src/dup.rs b/services/libs/aster-util/src/dup.rs similarity index 91% rename from services/libs/jinux-util/src/dup.rs rename to services/libs/aster-util/src/dup.rs index e4ece7d3c..0b9b9e99e 100644 --- a/services/libs/jinux-util/src/dup.rs +++ b/services/libs/aster-util/src/dup.rs @@ -9,5 +9,5 @@ /// _exclusively_ to one another. In other words, a type should not implement /// both traits. pub trait Dup: Sized { - fn dup(&self) -> jinux_frame::Result; + fn dup(&self) -> aster_frame::Result; } diff --git a/services/libs/jinux-util/src/id_allocator.rs b/services/libs/aster-util/src/id_allocator.rs similarity index 100% rename from services/libs/jinux-util/src/id_allocator.rs rename to services/libs/aster-util/src/id_allocator.rs diff --git a/services/libs/jinux-util/src/lib.rs b/services/libs/aster-util/src/lib.rs similarity index 100% rename from services/libs/jinux-util/src/lib.rs rename to services/libs/aster-util/src/lib.rs diff --git a/services/libs/jinux-util/src/safe_ptr.rs b/services/libs/aster-util/src/safe_ptr.rs similarity index 95% rename from services/libs/jinux-util/src/safe_ptr.rs rename to services/libs/aster-util/src/safe_ptr.rs index 220f57360..8d86bb25c 100644 --- a/services/libs/jinux-util/src/safe_ptr.rs +++ b/services/libs/aster-util/src/safe_ptr.rs @@ -1,10 +1,10 @@ +use aster_frame::vm::Paddr; +use aster_frame::vm::{HasPaddr, VmIo}; +use aster_frame::Result; +use aster_rights::{Dup, Exec, Full, Read, Signal, TRightSet, TRights, Write}; +use aster_rights_proc::require; use core::fmt::Debug; use core::marker::PhantomData; -use jinux_frame::vm::Paddr; -use jinux_frame::vm::{HasPaddr, VmIo}; -use jinux_frame::Result; -use jinux_rights::{Dup, Exec, Full, Read, Signal, TRightSet, TRights, Write}; -use jinux_rights_proc::require; pub use pod::Pod; pub use typeflags_util::SetContain; @@ -358,14 +358,14 @@ impl Debug for SafePtr { #[macro_export] macro_rules! field_ptr { ($ptr:expr, $type:ty, $($field:tt)+) => {{ - use jinux_frame::offset_of; - use jinux_frame::vm::VmIo; - use jinux_rights::Dup; - use jinux_rights::TRightSet; - use jinux_rights::TRights; - use jinux_util::safe_ptr::Pod; - use jinux_util::safe_ptr::SetContain; - use jinux_util::safe_ptr::SafePtr; + use aster_frame::offset_of; + use aster_frame::vm::VmIo; + use aster_rights::Dup; + use aster_rights::TRightSet; + use aster_rights::TRights; + use aster_util::safe_ptr::Pod; + use aster_util::safe_ptr::SetContain; + use aster_util::safe_ptr::SafePtr; #[inline] fn new_field_ptr( diff --git a/services/libs/jinux-util/src/slot_vec.rs b/services/libs/aster-util/src/slot_vec.rs similarity index 100% rename from services/libs/jinux-util/src/slot_vec.rs rename to services/libs/aster-util/src/slot_vec.rs diff --git a/services/libs/jinux-util/src/union_read_ptr.rs b/services/libs/aster-util/src/union_read_ptr.rs similarity index 95% rename from services/libs/jinux-util/src/union_read_ptr.rs rename to services/libs/aster-util/src/union_read_ptr.rs index 2cf404a1b..9e902c990 100644 --- a/services/libs/jinux-util/src/union_read_ptr.rs +++ b/services/libs/aster-util/src/union_read_ptr.rs @@ -35,7 +35,7 @@ macro_rules! read_union_fields { union_read_ptr.read_at(offset) }); ($container:ident.$($field:ident).*) => ({ - let field_offset = jinux_frame::value_offset!($container.$($field).*); + let field_offset = aster_frame::value_offset!($container.$($field).*); let union_read_ptr = UnionReadPtr::new(&*$container); union_read_ptr.read_at(field_offset) }); diff --git a/services/libs/typeflags-util/src/lib.rs b/services/libs/typeflags-util/src/lib.rs index df8f37a1b..bde39cbaf 100644 --- a/services/libs/typeflags-util/src/lib.rs +++ b/services/libs/typeflags-util/src/lib.rs @@ -1,7 +1,7 @@ //! The content of this crate is from another project CapComp. //! This crate defines common type level operations, like SameAsOp, and Bool type operations. //! Besides, this crate defines operations to deal with type sets, like SetContain and SetInclude. -//! When use jinux-typeflags or jinux-rights-poc, this crate should also be added as a dependency. +//! When use jinux-typeflags or aster-rights-poc, this crate should also be added as a dependency. #![no_std] pub mod assert; pub mod bool;