]> Zhao Yanbai Git Server - kernel.git/commitdiff
mov include/boot/*.h to boot/
authoracevest <zhaoyanbai@126.com>
Thu, 4 Nov 2021 02:40:31 +0000 (10:40 +0800)
committeracevest <zhaoyanbai@126.com>
Thu, 4 Nov 2021 02:40:31 +0000 (10:40 +0800)
Makefile
boot/boot.c
boot/boot.h [moved from include/boot/boot.h with 100% similarity]
boot/multiboot.S
boot/multiboot.h [moved from include/boot/multiboot.h with 100% similarity]
include/stdio.h
kernel/setup.c
mm/bootmem.c
mm/buddy.c
mm/mm.c
mm/slub.c

index 7648af5c686aacf6b0acaf4415a8ca1ebc4dbcff..428b585a16b0aecc39d04075b37645b1ba2674e0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ KERNELBIN     = KERNEL.BIN
 LINKSCRIPT     = scripts/link.ld
 
 SRC_DIRS = boot mm lib fs kernel drivers
-INC_DIRS = include drivers
+INC_DIRS = include drivers boot
 
 CFLAGS += ${INC_DIRS:%=-I%}
 
index c3e3ee795c1249b97e033a7de50995c2c6e869a1..35b9fc46367f3c2f60d6d0d8f8f99bfdc6e9c284 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <assert.h>
 #include <bits.h>
-#include <boot/boot.h>
+#include <boot.h>
 #include <page.h>
 #include <system.h>
 
similarity index 100%
rename from include/boot/boot.h
rename to boot/boot.h
index 372e07a14ccc538672fa24768b9106ea82b65ec4..2209b1eab0da306bb46040f3c628987c679cc8ef 100644 (file)
@@ -14,7 +14,7 @@
  *--------------------------------------------------------------------------
  */
 #define ASM
-#include "boot/boot.h"
+#include "boot.h"
 #include "system.h"
 #include "task.h"
 .global kernel_entry
@@ -148,4 +148,4 @@ GDTR:
     # Flags
     .long MULTIBOOT_HEADER_FLAGS
     # Checksum
-    .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
\ No newline at end of file
+    .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
similarity index 100%
rename from include/boot/multiboot.h
rename to boot/multiboot.h
index 1b36e1da1c61e8c1095a112012402172b2837b36..b6ba90ddde350b7118ab53351110cacd3c3d255c 100644 (file)
@@ -19,6 +19,7 @@
 #include <string.h>
 #include <syscall.h>
 extern int write(int fd, const char *buf, unsigned long size);
+extern int vsprintf(char *buf, const char *fmt, char *args);
 static inline int printf(const char *fmt, ...) {
     char ptfbuf[512];
     char *args = (char *)(((char *)&fmt) + 4);
index e6a0c4341ef8cf2a1a598d2b39f3b8e4e781ecad..fcddc9d8ff1859443bd41346683d8935d919901b 100644 (file)
@@ -18,6 +18,8 @@
 #include <printk.h>
 #include <system.h>
 
+extern void vga_init();
+extern void init_mm();
 extern void setup_gdt();
 extern void setup_idt();
 extern void setup_gate();
@@ -26,6 +28,7 @@ extern void setup_sysc();
 extern void setup_pci();
 extern void set_tss();
 extern void setup_tasks();
+extern void setup_irqs();
 extern void ide_init();
 extern void setup_fs();
 extern void setup_ext2();
index c6eaa084897321b30828e78f66f4fac7fffce41a..418f313649945839b3c4d021bc159bf3745e4e37 100644 (file)
@@ -6,7 +6,7 @@
  * Description: none
  * ------------------------------------------------------------------------
  */
-#include <boot/boot.h>
+#include <boot.h>
 #include <mm.h>
 #include <printk.h>
 #include <system.h>
@@ -209,4 +209,4 @@ find_next_block:
     printk("%s alloc bootmem size: %x pfn cnt: %d [%d, %d)\n", title, size, pfn_cnt, bgn_pfn, end_pfn);
 
     return region;
-}
\ No newline at end of file
+}
index d2ceed71b807e42522eeab53685bfd98867928c1..e7f58cf007117d8a2acdeaf8733d5e7eddb85e09 100644 (file)
@@ -8,6 +8,7 @@
  */
 #include <irq.h>
 #include <mm.h>
+#include <string.h>
 #include <sysctl.h>
 
 struct buddy_system {
diff --git a/mm/mm.c b/mm/mm.c
index cd4509ea96cf927182361e0964b9a33dac894f6a..323306e4a6a76639a1df73b5b0179b3bcd22dd76 100644 (file)
--- a/mm/mm.c
+++ b/mm/mm.c
@@ -14,7 +14,7 @@
  *--------------------------------------------------------------------------
  */
 #include <bits.h>
-#include <boot/boot.h>
+#include <boot.h>
 #include <linkage.h>
 #include <mm.h>
 #include <page.h>
index d182f2cc49105866d5ced71f058718cdc31400d4..92547e96c5fb58dc710eb7639c9e02cfda01ebc0 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -310,5 +310,5 @@ void init_slub_system() {
         printk("kmalloc addr %08x\n", (unsigned long) addr);
         addrs[i] = addr;
     }
-#endifq
+#endif
 }