Commit Graph

  • 79ca4681ff Make tests independent of structures in header files thomas 2018-02-15 09:20:29 +01:00
  • 9dbbc7013c Use debug macros thomas 2018-02-13 18:19:54 +01:00
  • 497bdef9f4 Debug print some of the multiboot data thomas 2017-12-06 00:25:20 +01:00
  • 49f7738be2 Parse multiboot information thomas 2017-12-04 22:09:14 +01:00
  • d0b946f327 Chapter 6: Debug Output - COMPLETE thomas 2017-12-04 12:27:45 +01:00
  • 9e2483d78e Halt-And-Catch-Fire macro thomas 2018-03-06 10:59:23 +01:00
  • 2da088f031 Clean up interface thomas 2018-02-15 10:22:16 +01:00
  • e6d046d593 A bit of cleanup in vga functions thomas 2017-12-14 23:49:46 +01:00
  • 15bbfd6e6a A real memmove function thomas 2017-12-14 15:32:57 +01:00
  • 042f61bdb3 Add padding to field width (right adjust) thomas 2017-12-06 19:43:59 +01:00
  • 0f5445da62 Script for viewing the serial log in glorious technicolor thomas 2017-12-07 21:43:18 +01:00
  • 0659cf73f6 Some more debug macros thomas 2017-12-07 21:43:00 +01:00
  • 572bee19cc Add ability to disable debug printing and gdb symbols thomas 2017-12-07 12:59:01 +01:00
  • a9831c1038 A macro for debug printing thomas 2017-12-04 22:07:39 +01:00
  • a652bbb05e Remove magic numbers thomas 2017-12-04 13:27:04 +01:00
  • b50b32afa9 Move VGA cursor when writing to screen thomas 2017-12-04 12:25:04 +01:00
  • 055c41adb3 Scrolling screen when necessary thomas 2017-12-04 01:30:18 +01:00
  • 4f00d428bf Writing (debug output) to screen thomas 2017-12-04 00:22:39 +01:00
  • b9e9df32f5 Tests for memory copy and write functions thomas 2017-12-03 23:44:35 +01:00
  • 954696728c Add memory copy and move functions. Required by gcc, and we'll also use them soon thomas 2017-12-03 22:28:58 +01:00
  • c19bc51bdc Output serial to a file thomas 2017-12-02 00:34:19 +01:00
  • 034a870ac7 Sending data (debug printing) to serial port thomas 2017-12-01 22:50:51 +01:00
  • d05ddfeab4 Debug printing functions thomas 2017-12-01 22:16:26 +01:00
  • a766726065 CLEANUP - Remove test tests thomas 2018-02-14 14:52:39 +01:00
  • 6730c599d2 Chapter 5: Unit Testing - COMPLETE thomas 2017-12-04 00:25:46 +01:00
  • 6f463b17d3 Turn off debug functions when testing thomas 2018-02-15 10:13:19 +01:00
  • 6c30e282ef Add tests for pointer comparison thomas 2018-02-14 16:11:59 +01:00
  • 498a78cd9f Tougher tests, and test the tests. thomas 2018-02-14 14:51:01 +01:00
  • 2b8fa6047d Use for instead of while - just a bit of cleanup thomas 2018-02-09 23:16:26 +01:00
  • 126ed26b3d A lot of refactoring thomas 2018-01-09 22:55:51 +01:00
  • 52846ceeac I just discovered __attribute__((constructor))! thomas 2018-01-06 01:28:34 +01:00
  • 71bee24e51 Make stuff happen in the right order thomas 2017-12-09 22:05:46 +01:00
  • dbd2017df7 A bit cleaner error string handling thomas 2017-12-09 21:32:37 +01:00
  • 81730fe96a Move ttest include file thomas 2017-12-09 21:26:53 +01:00
  • b82405a4c4 Make BEFORE and AFTER definiton function-like thomas 2017-12-05 22:52:17 +01:00
  • e29262e9aa Add AFTER() for cleanup thomas 2017-12-05 22:49:42 +01:00
  • 187d131ab0 Nicer test error output thomas 2017-12-05 22:48:49 +01:00
  • 512e1a988a Make test definitions more function like thomas 2017-12-05 22:47:27 +01:00
  • 826885df8a Make ttest compile under clang thomas 2017-12-05 11:55:18 +01:00
  • ad74123882 Handle null pointers in string comparisons thomas 2017-12-04 22:04:41 +01:00
  • cfa1a15076 Define TTEST when ttesting. Also allow multiple assertions per test thomas 2017-12-03 23:38:33 +01:00
  • 1b80c00658 Fix overflow bug when comparing strings thomas 2017-12-03 23:05:22 +01:00
  • e50fbff2d1 Handle compilation errors of tests thomas 2017-12-03 21:46:03 +01:00
  • 96849d6600 Keep going if a test fails, but report it thomas 2017-12-01 21:48:46 +01:00
  • cba19b62df More assertions and catching crashes thomas 2017-12-01 21:45:09 +01:00
  • 337d2cb032 Correct filenames in test error output thomas 2017-12-01 21:35:45 +01:00
  • faaedb212d A simple testing framework thomas 2017-12-01 15:48:04 +01:00
  • a908284dc6 Chapter 4: Higher Half Kernel - COMPLETE thomas 2017-11-17 23:20:50 +01:00
  • 823560d3ae Simplify P2V and V2P macros - also makes them more useful thomas 2018-01-04 00:53:47 +01:00
  • 8e47d7625f Don't set fs and gs. thomas 2017-12-18 23:54:41 +01:00
  • 950de8645c Update GDT pointer after unmapping GDT thomas 2017-12-18 23:23:08 +01:00
  • b5e0d749b8 Reload cr3 after updating P4 thomas 2017-12-08 15:55:41 +01:00
  • 83f81b9a74 Cleaning up and commenting thomas 2017-11-18 16:23:22 +01:00
  • ab1a471857 Call a c function. thomas 2017-11-17 22:58:14 +01:00
  • 0a4b5ebd51 Update the stack pointer and remove identity mapping thomas 2017-11-17 22:49:49 +01:00
  • 663668ff93 Move the kernel to high memory thomas 2017-11-17 19:49:42 +01:00
  • 8f8e03de10 Chapter 3: Enter Long Mode - COMPLETE thomas 2017-11-14 20:01:18 +01:00
  • 646d25825a Don't use huge pages, for simplicity thomas 2018-03-20 14:01:26 +01:00
  • 99ecff44d8 Save one byte! thomas 2018-02-05 16:46:07 +01:00
  • 3122de1666 Remove cpuid and longmode checks. Let's assume we have a modern processor thomas 2018-02-05 14:09:36 +01:00
  • 3d380f462b Use 2 Mb translation instead of 1 Gb thomas 2018-01-01 22:39:56 +01:00
  • 78dc192a16 Don't load fs and gs. They have special meaning in long mode. thomas 2017-12-18 23:56:52 +01:00
  • 6511c39762 Gdb function for printing register values thomas 2017-11-15 20:45:48 +01:00
  • bb25b7ea35 Change comment style, and more commenting thomas 2017-11-15 21:43:00 +01:00
  • 4f9a4292e5 Some simplification and commenting thomas 2017-11-15 20:37:22 +01:00
  • 93d60294ba Move include files thomas 2018-02-02 13:45:24 +01:00
  • 5ddf0173c2 Remove magic numbers. Also, no code segment - not needed. thomas 2017-11-14 16:26:11 +01:00
  • dd7636e906 Simplest possible long-mode entry thomas 2017-11-12 00:22:51 +01:00
  • eb637d0bbb Move stack to .bss and use it for function calls as well thomas 2017-11-11 19:43:14 +01:00
  • dd565454e3 Check if long mode is available thomas 2017-11-03 21:06:09 +01:00
  • a9328d6b67 Chapter 2: A Bootable Kernel - COMPLETE thomas 2017-10-24 22:49:42 +02:00
  • 607266bfd3 Clean up interface thomas 2018-02-15 10:50:03 +01:00
  • eed3bb693b Commenting and cleanup thomas 2018-02-02 13:27:18 +01:00
  • 2451851b9f Remove Multiboot1 support thomas 2017-12-07 22:47:52 +01:00
  • 05efb98b06 Use classic variables for installing kernel thomas 2017-11-13 22:52:39 +01:00
  • bc8f16e270 Also simplify the kernel code as much as possible. thomas 2017-11-01 19:57:12 +01:00
  • e2ecdb6154 Keep the multiboot header as simple as possible thomas 2017-10-31 09:27:06 +01:00
  • ca36e0ad0e Indicate multiboot version on boot thomas 2017-10-31 09:00:16 +01:00
  • a44d0d7500 Move Multiboot headers to separate file thomas 2017-10-31 08:59:18 +01:00
  • f5fb6241f2 Simplify linker script thomas 2017-10-30 22:33:06 +01:00
  • e016c5dc52 Cleaning up the kernel makefile thomas 2017-10-30 22:16:10 +01:00
  • d7560b775c Remove hardcoded buildroot from kernel makefile and gdbinit thomas 2017-10-29 21:07:37 +01:00
  • 0f8d38938b Make git ignore stuff that isn't source files thomas 2017-10-24 22:48:42 +02:00
  • a0f3953365 Make debugging work thomas 2017-10-24 22:47:01 +02:00
  • de73851481 Dependency file generation - rebuild if a header file is updated thomas 2017-10-24 22:42:29 +02:00
  • dda15ea889 Save eax after boot, so we can check that we're actually loaded via multiboot thomas 2017-10-24 22:27:48 +02:00
  • d80e87991e A bit of cleanup thomas 2017-10-24 22:25:26 +02:00
  • fef9a11d16 Use either multiboot1 or multiboot2 thomas 2017-10-24 21:59:41 +02:00
  • 14cd812e34 Add grub menu item to boot automatically thomas 2017-10-24 21:45:12 +02:00
  • a8fbcd9e03 Top level makefile. Also make clean thomas 2017-10-24 16:18:27 +02:00
  • 39b43d825a Building a multiboot 1 compatible executable thomas 2017-10-24 16:04:09 +02:00
  • 0df19ec2b7 Chapter 1: Toolchain - COMPLETE thomas 2017-10-24 11:46:48 +02:00
  • bbd88e8567 Some commenting and cleanup thomas 2018-02-02 07:37:23 +01:00
  • 64af272ef1 Include host compiler and valgrind in docker image thomas 2017-12-01 15:44:04 +01:00
  • 2b1d17d944 Run docker as user, not root thomas 2017-11-19 20:49:08 +01:00
  • aee015eebc Use new version of qemu to avoid problems when changing to long mode thomas 2017-11-14 21:26:36 +01:00
  • a44876fd2e Update binutils and gcc version thomas 2017-11-13 13:21:48 +01:00
  • d339e27080 Compile binutils and gcc from scratch thomas 2017-11-11 17:53:09 +01:00
  • 261cc76e8f Don't hardcode paths thomas 2017-10-29 11:31:59 +01:00
  • 177be9dcc5 Rename debug script to gdb so that it overloads the gdb command thomas 2017-10-26 22:13:55 +02:00