guttatus 3 hónapja
szülő
commit
22054e2db2
2 módosított fájl, 5 hozzáadás és 4 törlés
  1. 3 2
      bench-kernel/src/main.rs
  2. 2 2
      test-kernel/src/main.rs

+ 3 - 2
bench-kernel/src/main.rs

@@ -24,7 +24,7 @@ use uart16550::Uart16550;
 const RISCV_HEAD_FLAGS: u64 = 0;
 const RISCV_HEADER_VERSION: u32 = 0x2;
 const RISCV_IMAGE_MAGIC: u64 = 0x5643534952; /* Magic number, little endian, "RISCV" */
-const RISCV_INAGE_MAGIC2: u32 = 0x05435352; /* Magic number 2, little endian, "RSC\x05" */
+const RISCV_IMAGE_MAGIC2: u32 = 0x05435352; /* Magic number 2, little endian, "RSC\x05" */
 
 /// boot header
 #[naked]
@@ -48,7 +48,7 @@ unsafe extern "C" fn _boot_header() -> ! {
         RISCV_HEAD_FLAGS = const RISCV_HEAD_FLAGS,
         RISCV_HEADER_VERSION = const RISCV_HEADER_VERSION,
         RISCV_IMAGE_MAGIC = const RISCV_IMAGE_MAGIC,
-        RISCV_IMAGE_MAGIC2 = const RISCV_INAGE_MAGIC2,
+        RISCV_IMAGE_MAGIC2 = const RISCV_IMAGE_MAGIC2,
         options(noreturn)
     );
 }
@@ -61,6 +61,7 @@ const MAX_HART_NUM: usize = 128;
 struct HartStack([u8; STACK_SIZE]);
 
 impl HartStack {
+    #[inline]
     pub const fn new() -> Self {
         HartStack([0; STACK_SIZE])
     }

+ 2 - 2
test-kernel/src/main.rs

@@ -13,7 +13,7 @@ use uart16550::Uart16550;
 const RISCV_HEAD_FLAGS: u64 = 0;
 const RISCV_HEADER_VERSION: u32 = 0x2;
 const RISCV_IMAGE_MAGIC: u64 = 0x5643534952; /* Magic number, little endian, "RISCV" */
-const RISCV_INAGE_MAGIC2: u32 = 0x05435352; /* Magic number 2, little endian, "RSC\x05" */
+const RISCV_IMAGE_MAGIC2: u32 = 0x05435352; /* Magic number 2, little endian, "RSC\x05" */
 
 /// boot header
 #[naked]
@@ -37,7 +37,7 @@ unsafe extern "C" fn _boot_header() -> ! {
         RISCV_HEAD_FLAGS = const RISCV_HEAD_FLAGS,
         RISCV_HEADER_VERSION = const RISCV_HEADER_VERSION,
         RISCV_IMAGE_MAGIC = const RISCV_IMAGE_MAGIC,
-        RISCV_IMAGE_MAGIC2 = const RISCV_INAGE_MAGIC2,
+        RISCV_IMAGE_MAGIC2 = const RISCV_IMAGE_MAGIC2,
         options(noreturn)
     );
 }