52 Commits

Author SHA1 Message Date
3d380f462b Use 2 Mb translation instead of 1 Gb 2018-03-19 20:29:40 +01:00
78dc192a16 Don't load fs and gs. They have special meaning in long mode. 2018-03-19 20:29:40 +01:00
6511c39762 Gdb function for printing register values 2018-03-19 20:29:40 +01:00
bb25b7ea35 Change comment style, and more commenting 2018-03-19 20:29:40 +01:00
4f9a4292e5 Some simplification and commenting 2018-03-19 20:29:40 +01:00
93d60294ba Move include files 2018-03-19 20:29:40 +01:00
5ddf0173c2 Remove magic numbers. Also, no code segment - not needed. 2018-03-19 20:29:40 +01:00
dd7636e906 Simplest possible long-mode entry 2018-03-19 20:29:40 +01:00
eb637d0bbb Move stack to .bss and use it for function calls as well 2018-03-19 20:29:40 +01:00
dd565454e3 Check if long mode is available 2018-03-19 20:29:40 +01:00
a9328d6b67 Chapter 2: A Bootable Kernel - COMPLETE 2018-03-19 20:29:40 +01:00
607266bfd3 Clean up interface 2018-03-19 20:29:40 +01:00
eed3bb693b Commenting and cleanup 2018-03-19 20:29:40 +01:00
2451851b9f Remove Multiboot1 support 2018-03-19 20:29:40 +01:00
05efb98b06 Use classic variables for installing kernel 2018-03-19 20:29:40 +01:00
bc8f16e270 Also simplify the kernel code as much as possible. 2018-03-19 20:29:40 +01:00
e2ecdb6154 Keep the multiboot header as simple as possible 2018-03-19 20:29:40 +01:00
ca36e0ad0e Indicate multiboot version on boot 2018-03-19 20:29:40 +01:00
a44d0d7500 Move Multiboot headers to separate file 2018-03-19 20:29:40 +01:00
f5fb6241f2 Simplify linker script 2018-03-19 20:29:40 +01:00
e016c5dc52 Cleaning up the kernel makefile 2018-03-19 20:29:40 +01:00
d7560b775c Remove hardcoded buildroot from kernel makefile and gdbinit 2018-03-19 20:29:40 +01:00
0f8d38938b Make git ignore stuff that isn't source files 2018-03-19 20:29:40 +01:00
a0f3953365 Make debugging work 2018-03-19 20:29:40 +01:00
de73851481 Dependency file generation - rebuild if a header file is updated 2018-03-19 20:29:40 +01:00
dda15ea889 Save eax after boot, so we can check that we're actually loaded via
multiboot
2018-03-19 20:29:40 +01:00
d80e87991e A bit of cleanup 2018-03-19 20:29:40 +01:00
fef9a11d16 Use either multiboot1 or multiboot2 2018-03-19 20:29:40 +01:00
14cd812e34 Add grub menu item to boot automatically 2018-03-19 20:29:40 +01:00
a8fbcd9e03 Top level makefile. Also make clean 2018-03-19 20:29:40 +01:00
39b43d825a Building a multiboot 1 compatible executable 2018-03-19 20:29:39 +01:00
0df19ec2b7 Chapter 1: Toolchain - COMPLETE 2018-03-19 20:29:39 +01:00
bbd88e8567 Some commenting and cleanup 2018-03-19 20:29:39 +01:00
64af272ef1 Include host compiler and valgrind in docker image 2018-03-19 20:29:39 +01:00
2b1d17d944 Run docker as user, not root 2018-03-19 20:29:39 +01:00
aee015eebc Use new version of qemu to avoid problems when changing to long mode 2018-03-19 20:29:39 +01:00
a44876fd2e Update binutils and gcc version 2018-03-19 20:29:39 +01:00
d339e27080 Compile binutils and gcc from scratch
Turns out the alpine versione doesn't quite work well with low-level 32
bit code...
2018-03-19 20:29:39 +01:00
261cc76e8f Don't hardcode paths 2018-03-19 20:29:39 +01:00
177be9dcc5 Rename debug script to gdb so that it overloads the gdb command 2018-03-19 20:29:39 +01:00
9a3281ff56 Use silent docker commands for cleaner scripting 2018-03-19 20:29:39 +01:00
851f4cb7f3 Describe the setup in the README file.
Most of this should probably move to a documentation folder...
2018-03-19 20:29:39 +01:00
6f61f380ee Compress environment checking 2018-03-19 20:29:39 +01:00
82a8676056 A script for running the debugger. Also, some debugger settings 2018-03-19 20:29:39 +01:00
6919f9c8ed Split iso generation and emulation into two scripts 2018-03-19 20:29:39 +01:00
7d0fe7e944 A script for generating an iso file and running the emulator 2018-03-19 20:29:39 +01:00
979027102d Set an environment variable to know if we're inside the docker container 2018-03-19 20:29:39 +01:00
9daacb1402 A script for running commands in the docker container 2018-03-19 20:29:39 +01:00
e30ed2ae56 A basic docker image for compiling and emulating an x86_64 os 2018-03-19 20:29:39 +01:00
ffe5d3dfe7 Chapter 0: Introduction 2018-03-19 20:29:39 +01:00