summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* arch: i386: simplifiy GDT setupDanny Holman2022-01-154-68/+176
| | | | | | Simplify the setup and definitions of GDT/TSS entries. Signed-off-by: Danny Holman <dholman@gymli.org>
* Makefile: add dry run and debug targetsDanny Holman2022-01-151-0/+6
| | | | | | Add targets to perform a test run and debug run inside a VM. Signed-off-by: Danny Holman <dholman@gymli.org>
* arch: i386: simplify IDT setupDanny Holman2022-01-155-31/+128
| | | | | | Simplify the interrupt descriptor table setup and frame assembly. Signed-off-by: Danny Holman <dholman@gymli.org>
* arch: i386: add support for tab charactersDanny Holman2021-11-291-0/+10
| | | | | | Add support for the tab character in the virtual terminal. Signed-off-by: Danny Holman <dholman@gymli.org>
* arch: i386: rename the GDT array pointerDanny Holman2021-10-091-7/+7
| | | | | | | Rename the array/pointer to the GDT array in gdt.c pointer to be a bit clearer. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* arch: i386: include more information in IDTDanny Holman2021-10-094-73/+129
| | | | | | Include information about the current stack frame in the IDT handler(s). Signed-off-by: Danny Holman <dholman@gymli.xyz>
* arch: i386: add PIC register supportDanny Holman2021-09-282-0/+19
| | | | | | | Add functions that let the OS read the internal state registers of the 8259 PIC. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* arch: i386: fix IDT exception handlerDanny Holman2021-09-284-45/+145
| | | | | | | Fix the i386's general exception handler to actually work. Fix provided by Jon Sanderson (jjs295356@gmail.com). Signed-off-by: Danny Holman <dholman@gymli.xyz>
* arch: i386: fix GDT segment mismatchDanny Holman2021-09-281-1/+1
| | | | | | | Fix a bug in which the size of the main GDT array and the actual number of descriptors are different values. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* arch: i386: add support for 8259 PICDanny Holman2021-09-287-19/+103
| | | | | | Add support for the 8259 programmable interrupt controller. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* i386: create idt.c and isr.sDanny Holman2021-08-305-2/+118
| | | | | | Create files that add IDT support for i386. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* git: stop ignoring assembly filesDanny Holman2021-08-301-1/+36
| | | | | | | Remove the '*.s' line from .gitignore. There are important assembler files that should be in a distribution. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* doc: add the Developer's Certificate of OriginDanny Holman2021-08-301-0/+26
| | | | | | | Add the Developer's Certificate of Origin to the documentation directory. This allows developers to keep their own copyright. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* arch: i386: add ring-3 descriptors to the GDTDanny Holman2021-08-271-1/+3
| | | | | | Add two ring-3 segment discriptors to the GDT during gdt_install. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* arch: i386: surround GDT macros with parensDanny Holman2021-07-251-15/+14
| | | | | | | Add parenthesis around the GDT setup macros. This is done to prevent having to do it when using them. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* arch: i386: add GDT setup routinesDanny Holman2021-07-245-70/+99
| | | | | | Add a set of routines that setup the x86's global descriptor table. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* arch: i386: move the kernel to high memoryDanny Holman2021-07-203-13/+66
| | | | | Move the start of the kernel image to the "higher half" of memory. This also enables paging.
* io: prefix a 'k' to print functionsDanny Holman2021-07-203-8/+6
| | | | Add a 'k' prefix to the kernel versions of the printf family.
* Makefile: clean up targetsDanny Holman2021-06-041-8/+11
| | | | | | Clean up the Makefile to be more clear and readable. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* Makefile: include dependency filesDanny Holman2021-03-091-0/+2
| | | | | | | Add an include directive in the main Makefile that includes the dependency files generated by GCC. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* README: fix improper formattingDanny Holman2021-03-091-0/+1
| | | | | | | Fix wrong formatting in the project README file. Lists should have an empty line proceeding them, otherwise the first element is italicized. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* Makefile: fix wrong -I directive to compilerDanny Holman2021-03-092-4/+3
| | | | | | | Fix a bug in which the architecture specific include directories are not properly included in the main Makefile. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* README: add project README fileDanny Holman2021-01-281-0/+14
| | | | | | | Add a README to the root of the project. This will act as a point of information to new users/developers. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* i386: create terminal_scroll functionDanny Holman2021-01-281-10/+25
| | | | | | Add support for scrolling the terminal at the end of the VGA buffer. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* i386: add support for newlinesDanny Holman2021-01-251-0/+7
| | | | | | Add support for the newline character in the TTY layer. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* x86: reorganize the i386 directoryDanny Holman2021-01-2410-11/+84
| | | | | | Add structure to the internals of the x86 directory. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* serial: add serial_writestring as a functionDanny Holman2021-01-203-0/+9
| | | | | | | Add a function in the serial interface that writes an entire string to the serial line. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* kernel: iterate over string with indexDanny Holman2021-01-201-6/+6
| | | | | | | | Iterate over a formatted string with an index and strlen instead of using a non-const pointer. The latter method may result in unsafe memory conditions. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* kernel: maintain const on stringsDanny Holman2021-01-201-2/+2
| | | | | | Keep const pointers const when casting from void to char. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* serial: don't declare serial_init as staticDanny Holman2021-01-203-2/+3
| | | | | | | | The function serial_init should not be declared as static. This function could change under a different architecture and should be defined with the target architecture. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* i386: add serial port supportDanny Holman2021-01-205-1/+67
| | | | | | Add support for serial communication in the i386 architecture. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* include: append "_H" to include guardsDanny Holman2021-01-201-2/+2
| | | | | | Add a "_H" to the end of the include guards in tty.h. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* kernel: finish implementing string functionsDanny Holman2021-01-181-4/+38
| | | | | | Finish implementing the functions from string.h in string.c. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* include: remove an include to the tty layer in ioDanny Holman2021-01-171-1/+0
| | | | | | Remove the include to the tty layer in io.h. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* kernel: implement a basic printf functionDanny Holman2021-01-172-0/+82
| | | | | | Implement a basic printf function using primitives from the TTY library. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* kernel: add main initialization functionsDanny Holman2021-01-171-0/+7
| | | | | | Add the main initialiazation functions within the main kernel directory. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* kernel: add string.h implementationsDanny Holman2021-01-171-0/+24
| | | | | | Add implementations for functions declared in string.h. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* arch: i386: add support for x86 processorsDanny Holman2021-01-175-0/+142
| | | | | | Add support for 32-bit x86 processors, i.e. the 80386 and above. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* include: create basic C library functionsDanny Holman2021-01-172-0/+23
| | | | | | Create the basic C library functions for use inside the kernel. Signed-off-by: Danny Holman <dholman@gymli.xyz>
* Initial commitDanny Holman2021-01-175-0/+439
Signed-off-by: Danny Holman <dholman@gymli.xyz>