Renames ps4k to korbis

This commit is contained in:
Putta Khunchalee 2024-05-11 20:16:50 +07:00
parent 0249fd37c7
commit db4ea69345
15 changed files with 22 additions and 22 deletions

View File

@ -5,14 +5,14 @@ edition = "2021"
[dependencies]
bitflags = "2.5.0"
ps4k = { path = "ps4k" }
korbis = { path = "korbis" }
x86_64 = { version = "0.15.1", features = ["instructions"], default-features = false }
[target.'cfg(fw = "1100")'.dependencies]
ps4k-1100 = { path = "ps4k-1100" }
korbis-1100 = { path = "korbis-1100" }
[profile.release]
opt-level = "z"
[workspace]
members = ["ps4k", "ps4k-1100", "ps4k-macros"]
members = ["korbis", "korbis-1100", "korbis-macros"]

View File

@ -1,8 +1,8 @@
[package]
name = "ps4k-1100"
name = "korbis-1100"
version = "0.1.0"
edition = "2021"
links = "orbiskernel"
[dependencies]
ps4k = { path = "../ps4k" }
korbis = { path = "../korbis" }

View File

@ -2,7 +2,7 @@
use self::thread::Thread;
use core::ffi::{c_char, c_int};
use ps4k::offset;
use korbis::offset;
mod thread;
@ -11,7 +11,7 @@ pub struct Kernel {
elf: &'static [u8],
}
impl ps4k::Kernel for Kernel {
impl korbis::Kernel for Kernel {
type Thread = Thread;
unsafe fn new(base: *const u8) -> Self {

View File

@ -1,11 +1,11 @@
/// Implementation of [`ps4k::thread::Thread`] for 11.00.
/// Implementation of [`korbis::thread::Thread`] for 11.00.
#[repr(C)]
pub struct Thread {
pad: [u8; 0x398],
ret: [usize; 2], // td_retval
}
impl ps4k::thread::Thread for Thread {
impl korbis::thread::Thread for Thread {
fn ret(&self, i: usize) -> usize {
self.ret[i]
}

View File

@ -1,5 +1,5 @@
[package]
name = "ps4k-macros"
name = "korbis-macros"
version = "0.1.0"
edition = "2021"

7
korbis/Cargo.toml Normal file
View File

@ -0,0 +1,7 @@
[package]
name = "korbis"
version = "0.1.0"
edition = "2021"
[dependencies]
korbis-macros = { path = "../korbis-macros" }

View File

@ -4,7 +4,7 @@ use self::elf::ProgramType;
use self::thread::Thread;
use core::ffi::{c_char, c_int};
pub use ps4k_macros::*;
pub use korbis_macros::*;
pub mod elf;
pub mod thread;

View File

@ -1,7 +0,0 @@
[package]
name = "ps4k"
version = "0.1.0"
edition = "2021"
[dependencies]
ps4k-macros = { path = "../ps4k-macros" }

View File

@ -7,7 +7,7 @@ use core::cmp::min;
use core::ffi::c_int;
use core::mem::{size_of_val, zeroed};
use core::panic::PanicInfo;
use ps4k::Kernel;
use korbis::Kernel;
use x86_64::registers::model_specific::LStar;
mod method;
@ -163,7 +163,7 @@ fn notify(method: &impl DumpMethod, msg: impl AsRef<[u8]>) {
#[cfg(fw = "1100")]
unsafe fn init(base: *const u8) -> impl Kernel {
ps4k_1100::Kernel::new(base)
korbis_1100::Kernel::new(base)
}
#[panic_handler]

View File

@ -2,8 +2,8 @@ use crate::method::{DumpMethod, OpenFlags, OwnedFd};
use core::ffi::{c_int, c_void, CStr};
use core::mem::transmute;
use core::num::NonZeroI32;
use ps4k::thread::Thread;
use ps4k::Kernel;
use korbis::thread::Thread;
use korbis::Kernel;
use x86_64::registers::control::Cr0;
/// Implementation of [`DumpMethod`] using syscalls.