From: David Devecsery Date: Tue, 19 May 2020 18:58:00 +0000 (-0400) Subject: About to do big changes to console... X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=d2e0c5f1018b56a2f2631ad435bf9d2fec80f966;p=cs3210-lab1.git About to do big changes to console... --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 78ac704..65345c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 "") diff --git a/include/mmu.h b/include/mmu.h index 96900aa..1c4fefb 100644 --- a/include/mmu.h +++ b/include/mmu.h @@ -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 diff --git a/kernel/include/mp.h b/kernel/include/mp.h index 4d17283..764f027 100644 --- a/kernel/include/mp.h +++ b/kernel/include/mp.h @@ -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_ diff --git a/kernel/include/proc.h b/kernel/include/proc.h index 0c574b9..59e4580 100644 --- a/kernel/include/proc.h +++ b/kernel/include/proc.h @@ -1,5 +1,10 @@ +#ifndef KERNEL_INCLUDE_PROC_h_ +#define KERNEL_INCLUDE_PROC_h_ + #include +#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_ diff --git a/kernel/src/console.c b/kernel/src/console.c index d8a1d9e..2658003 100644 --- a/kernel/src/console.c +++ b/kernel/src/console.c @@ -81,6 +81,7 @@ cprintf(char *fmt, ...) printint(*argp++, 10, 1); break; case 'x': + case 'X': case 'p': printint(*argp++, 16, 0); break;