]> Devi Nivas Git - cs3210-lab1.git/commitdiff
About to do big changes to console...
authorDavid Devecsery <ddevec@gatech.edu>
Tue, 19 May 2020 18:58:00 +0000 (14:58 -0400)
committerDavid Devecsery <ddevec@gatech.edu>
Tue, 19 May 2020 18:58:00 +0000 (14:58 -0400)
CMakeLists.txt
include/mmu.h
kernel/include/mp.h
kernel/include/proc.h
kernel/src/console.c

index 78ac7047101dd2067a2e4b431fc80c9e296233e9..65345c34ce824bc71274aa9ef4a772b7805b7899 100644 (file)
@@ -6,13 +6,13 @@ endif()
 
 project(xv6)
 
-#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -MD -ggdb -Werror -fno-omit-frame-pointer -fno-stack-protector")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-strict-aliasing -Wall -ggdb -Werror -fno-omit-frame-pointer -fno-stack-protector")
+#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -MD -gstabs+ -Werror -fno-omit-frame-pointer -fno-stack-protector")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-strict-aliasing -Wall -gstabs -Werror -fno-omit-frame-pointer -fno-stack-protector")
 
 set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
-set(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb3")
+set(CMAKE_C_FLAGS_DEBUG "-O0 -gstabs")
 
-set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS}")
+set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -gdwarf-2 -Wa,-divide")
 
 function(add_prefix_suffix var prefix suffix)
   set(listVar "")
index 96900aab83d9c122bae4ab02ca32c9749bfb4ae4..1c4fefb805196f8aaaf0ccea47ccc22f6f37c18a 100644 (file)
@@ -3,6 +3,11 @@
 #ifndef INCLUDE_MMU_h_
 #define INCLUDE_MMU_h_
 
+// Include types.h if this is a c processor, and not an assembly file...
+#ifndef __ASSEMBLER__
+#  include "types.h"
+#endif
+
 // Eflags register
 #define FL_IF           0x00000200      // Interrupt Enable
 
index 4d172839bbd594ee3535d901af7c9c7a93f81c8e..764f027850e81b55f50348c1e9f8bbb0bebce3dd 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef KERNEL_INCLUDE_MP_h_
+#define KERNEL_INCLUDE_MP_h_
+
 // See MultiProcessor Specification Version 1.[14]
 
 struct mp {             // floating pointer
@@ -54,3 +57,5 @@ struct mpioapic {       // I/O APIC table entry
 
 //PAGEBREAK!
 // Blank page.
+
+#endif  // KERNEL_INCLUDE_MP_h_
index 0c574b946ef84d4a63eecc256a9c85e0788ac0ac..59e458026e463df98d1c103260406d5cc8041200 100644 (file)
@@ -1,5 +1,10 @@
+#ifndef KERNEL_INCLUDE_PROC_h_
+#define KERNEL_INCLUDE_PROC_h_
+
 #include <stdatomic.h>
 
+#include "param.h"
+
 // Per-CPU state
 struct cpu {
   uchar apicid;                // Local APIC ID
@@ -58,3 +63,5 @@ struct proc {
 //   original data and bss
 //   fixed-size stack
 //   expandable heap
+
+#endif  // KERNEL_INCLUDE_PROC_h_
index d8a1d9e597e2df2d9fa1a1f511f1ae82e91148e4..2658003b9cbdac5920020799a6a91fbe8e605946 100644 (file)
@@ -81,6 +81,7 @@ cprintf(char *fmt, ...)
       printint(*argp++, 10, 1);
       break;
     case 'x':
+    case 'X':
     case 'p':
       printint(*argp++, 16, 0);
       break;