From cb79f3a13acfcc7785de98dbd95832b534de5722 Mon Sep 17 00:00:00 2001 From: Putta Khunchalee Date: Sat, 26 Oct 2024 21:44:09 +0700 Subject: [PATCH] Moves macros to top-level (#1070) --- Cargo.toml | 2 +- kernel/Cargo.toml | 2 +- kernel/src/x86_64.rs | 6 +++--- {src/macros => macros}/Cargo.toml | 0 {src/macros => macros}/src/elf.rs | 0 {src/macros => macros}/src/enum_conversions.rs | 0 {src/macros => macros}/src/errno.rs | 0 {src/macros => macros}/src/lib.rs | 0 {src/macros => macros}/src/vpath.rs | 0 src/kernel/Cargo.toml | 2 +- 10 files changed, 6 insertions(+), 6 deletions(-) rename {src/macros => macros}/Cargo.toml (100%) rename {src/macros => macros}/src/elf.rs (100%) rename {src/macros => macros}/src/enum_conversions.rs (100%) rename {src/macros => macros}/src/errno.rs (100%) rename {src/macros => macros}/src/lib.rs (100%) rename {src/macros => macros}/src/vpath.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 0efc5740..1e92c650 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,11 +4,11 @@ members = [ "arch/x86-64", "gui", "kernel", + "macros", "src/fs", "src/gmtx", "src/kernel", "src/llt", - "src/macros", "src/obconf", "src/param", "src/pfs", diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index 2302b296..50d4f2f6 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" anstyle = { version = "1.0.8", default-features = false } bitfield-struct = "0.8.0" hashbrown = "0.14.5" -macros = { path = "../src/macros" } +macros = { path = "../macros" } obconf = { path = "../src/obconf", features = ["virt"] } spin = { version = "0.9.8", features = ["spin_mutex"], default-features = false } talc = { version = "4.4.1", default-features = false } diff --git a/kernel/src/x86_64.rs b/kernel/src/x86_64.rs index 33f47573..9ce6a3d9 100644 --- a/kernel/src/x86_64.rs +++ b/kernel/src/x86_64.rs @@ -128,7 +128,7 @@ pub unsafe fn setup_main_cpu() { let mask = Rflags::new() .with_cf(true) .with_tf(true) - .with_if(true) + .with_if(true) // https://wiki.osdev.org/SWAPGS#Complications,_Part_2 .with_df(true) .with_nt(true) .into_bits() @@ -192,9 +192,9 @@ global_asm!( ); // See Xfast_syscall on the PS4 for a reference. -global_asm!("syscall_entry64:", "ud2"); +global_asm!("syscall_entry64:", "swapgs", "ud2"); -// See fast_syscall32 on the PS4 for a reference. +// See Xfast_syscall32 on the PS4 for a reference. global_asm!("syscall_entry32:", "ud2"); /// Raw value of a Global Descriptor-Table Register. diff --git a/src/macros/Cargo.toml b/macros/Cargo.toml similarity index 100% rename from src/macros/Cargo.toml rename to macros/Cargo.toml diff --git a/src/macros/src/elf.rs b/macros/src/elf.rs similarity index 100% rename from src/macros/src/elf.rs rename to macros/src/elf.rs diff --git a/src/macros/src/enum_conversions.rs b/macros/src/enum_conversions.rs similarity index 100% rename from src/macros/src/enum_conversions.rs rename to macros/src/enum_conversions.rs diff --git a/src/macros/src/errno.rs b/macros/src/errno.rs similarity index 100% rename from src/macros/src/errno.rs rename to macros/src/errno.rs diff --git a/src/macros/src/lib.rs b/macros/src/lib.rs similarity index 100% rename from src/macros/src/lib.rs rename to macros/src/lib.rs diff --git a/src/macros/src/vpath.rs b/macros/src/vpath.rs similarity index 100% rename from src/macros/src/vpath.rs rename to macros/src/vpath.rs diff --git a/src/kernel/Cargo.toml b/src/kernel/Cargo.toml index bdab5e67..45a1cba3 100644 --- a/src/kernel/Cargo.toml +++ b/src/kernel/Cargo.toml @@ -14,7 +14,7 @@ gmtx = { path = "../gmtx" } iced-x86 = { version = "1.18", features = ["code_asm"] } libc = "0.2" llt = { path = "../llt" } -macros = { path = "../macros" } +macros = { path = "../../macros" } param = { path = "../param" } serde = { version = "1.0", features = ["derive"] } serde_yaml = "0.9"