]> Zhao Yanbai Git Server - kernel.git/commitdiff
fix typo
authoracevest <zhaoyanbai@126.com>
Thu, 12 Oct 2023 00:39:02 +0000 (08:39 +0800)
committeracevest <zhaoyanbai@126.com>
Thu, 12 Oct 2023 00:39:02 +0000 (08:39 +0800)
Makefile
include/buffer.h [new file with mode: 0644]
kernel/buffer.c [moved from fs/buffer.c with 80% similarity]
kernel/sched.c
kernel/setup.c
kernel/syscall.c

index 1ef94365a30b83c8789663517e8d7a2b030451a4..533d3512b29d046aac6de7a4816c263eab402a3e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ CFLAGS     += -fno-omit-frame-pointer
 # 禁用控制流保护: Control-Flow Enforcement Technology (CET)
 CFLAGS     += -fcf-protection=none
 CFLAGS     += -DNR_TTYS=3
-CFLAGS     += -DFIX_SYSENTER_ESP_MODE=1
+CFLAGS     += -DFIXED_SYSENTER_ESP_MODE=1
 CFLAGS     += -DENABLE_BOOT_WAIT=0
 
 SYSTEMMAP      = System.map
diff --git a/include/buffer.h b/include/buffer.h
new file mode 100644 (file)
index 0000000..fe84e13
--- /dev/null
@@ -0,0 +1,10 @@
+/*
+ * ------------------------------------------------------------------------
+ *   File Name: buffer.h
+ *      Author: Zhao Yanbai
+ *              2023-10-11 23:47:15 Wednesday CST
+ * Description: none
+ * ------------------------------------------------------------------------
+ */
+
+#pragma once
similarity index 80%
rename from fs/buffer.c
rename to kernel/buffer.c
index c6d01af43c16f97667fded8f8e0c9ffa8b980f5b..18b7c9be7814c1a4174f6cb624465154d2723d28 100644 (file)
@@ -6,3 +6,9 @@
  * Description: none
  * ------------------------------------------------------------------------
  */
+
+typedef struct buffer {
+    //
+} buffer_t;
+
+void init_buffer() {}
index 9c8aa3e178d22d89b7277ab6a3e9ea05981e9a50..50bdb3db5aa89f43e079c8abaf73a5b7fb531383 100644 (file)
@@ -77,7 +77,7 @@ void init_root_task() {
     root_task.cr3 = va2pa((unsigned long)(init_pgd));
 
     tss.esp0 = root_task.esp0;
-#if FIX_SYSENTER_ESP_MODE
+#if FIXED_SYSENTER_ESP_MODE
     // do nothing
 #else
     wrmsr(MSR_SYSENTER_ESP, root_task.esp0, 0);
@@ -109,7 +109,7 @@ task_union *alloc_task_union() {
 void switch_to() {
     LoadCR3(current->cr3);
     tss.esp0 = current->esp0;
-#if FIX_SYSENTER_ESP_MODE
+#if FIXED_SYSENTER_ESP_MODE
     // do nothing
 #else
     wrmsr(MSR_SYSENTER_ESP, current->esp0, 0);
index c8fad041ed3f3fbc2da7eb8a8125e294f638347f..cfda533dc2b1e2ebd70571be0eb28aeaff6efe06 100644 (file)
@@ -46,7 +46,7 @@ const char *version = "KERNEL v" VERSION " @" BUILDER
 
 void setup_kernel() {
     printk("sysenter esp mode: %s\n",
-#if FIX_SYSENTER_ESP_MODE
+#if FIXED_SYSENTER_ESP_MODE
            "fixed to &tss.esp0"
 #else
            "use task union stack"
index a6d4414b71b57cd7c3578fbcddabb66624f6573d..9979ce1938ce3185bf5ac35ff46cc1356db4aeed 100644 (file)
@@ -27,7 +27,7 @@ unsigned long sysc_handler_table[SYSC_NUM];
 void setup_sysc() {
     wrmsr(MSR_SYSENTER_CS, SELECTOR_KRNL_CS, 0);
     wrmsr(MSR_SYSENTER_EIP, syscall_entry, 0);
-#if FIX_SYSENTER_ESP_MODE
+#if FIXED_SYSENTER_ESP_MODE
     wrmsr(MSR_SYSENTER_ESP, &(tss.esp0), 0);
 #endif
     init_sysc_handler_table();