100 Commits
Author SHA1 Message Date
thomas 8fac92474a Update readme for publishing 2019-06-30 09:38:57 +02:00
thomas f78cb6fbe9 DOC - CH10 More WIP 2018-09-11 14:36:24 +02:00
thomas 6749a63145 DOC - CH10 WIP 2018-03-29 19:36:33 +02:00
thomas 7648358078 A bit of ACPI code cleanup 2018-03-29 19:36:33 +02:00
thomas 9d9515c399 Read and save data from MADT 2018-03-29 19:36:33 +02:00
thomas f0e6a35941 Find and read ACPI tables 2018-03-29 19:36:33 +02:00
thomas 20ae7d56b3 TODO - Distribute those changes earlier 2018-03-29 19:36:33 +02:00
thomas 80aad418fc Cleanup and commenting 2018-03-29 19:36:33 +02:00
thomas cce444f546 Reference cpu specific information via gs segment 2018-03-29 19:36:33 +02:00
thomas 01ff25eefb Collect cpu specific information at one place 2018-03-29 19:36:33 +02:00
thomas 18481604f9 Chapter 13: Process Memory Management - NOTHING 2018-03-29 19:36:33 +02:00
thomas 4c4e7136cc Handle pagefaults caused by running of the stack 2018-03-29 19:36:33 +02:00
thomas 28c82567a0 Process page fault handler 2018-03-29 19:36:33 +02:00
thomas 4ecec1eec6 Stupidly simple process memory manager with brk() 2018-03-29 19:36:33 +02:00
thomas 19d58ec71d Functions for copying stuff between kernel and user space 2018-03-29 19:36:33 +02:00
thomas ace36fe919 Chapter 12: User Mode 2018-03-29 19:36:33 +02:00
thomas 42baf14321 A bit of cleanup 2018-03-29 19:36:33 +02:00
thomas 68ec6fa575 Running in user mode 2018-03-29 19:36:32 +02:00
thomas 6c078289f9 Load TSS 2018-03-29 19:36:32 +02:00
thomas 132645c0e6 Reload GDT from c 2018-03-29 19:36:32 +02:00
thomas 04f2123499 Move BootGDT definition to C 2018-03-29 19:36:32 +02:00
thomas 3508b182b7 Chapter 11: Processes 2018-03-29 19:36:32 +02:00
thomas e868b83f50 At this point the threads are really processes... 2018-03-29 19:36:32 +02:00
thomas 6523b10984 Threads have isolated memory spaces 2018-03-29 19:36:32 +02:00
thomas 2d0f539e23 Create and load new page directories 2018-03-29 19:36:32 +02:00
thomas d483d8f39e Global variables are overwritten... let's fix that 2018-03-29 19:36:32 +02:00
thomas 2de7e537ea Chapter 10: Threading 2018-03-29 19:36:32 +02:00
thomas a39fdcf3ce Adding a scheduler function and cleanup 2018-03-29 19:36:32 +02:00
thomas b5f5a40fbc Further queue improvements 2018-03-21 23:12:43 +01:00
thomas e5da45df2f Queue improvements 2018-03-21 23:12:43 +01:00
thomas 8af18644a3 Interface cleanup 2018-03-21 23:12:43 +01:00
thomas 024d772be8 Queues using some macro magic 2018-03-21 23:12:43 +01:00
thomas fd0ca6f617 Rename some stuff - cleanup 2018-03-21 23:12:43 +01:00
thomas 13946b1758 Pass around tcbs instead of thread stacks 2018-03-21 23:12:43 +01:00
thomas 1fca5af522 Change interface for getting and setting current thread 2018-03-21 23:12:43 +01:00
thomas c26434f814 Some threading code cleanup 2018-03-21 23:12:43 +01:00
thomas 251b5f71c9 Simple scheduler 2018-03-21 23:12:43 +01:00
thomas 1e2f81a5d8 Very simple threading and context switching. 2018-03-21 23:12:43 +01:00
thomas 63ae2a0b9d Chapter 9: Memory Management - COMPLETE 2018-03-21 23:12:43 +01:00
thomas fc6c7f3bc7 VMM -- Interface cleanup 2018-03-21 09:21:40 +01:00
thomas 4011b5f12f VMM -- Use a simple uint64 for page table entries 2018-03-20 15:41:27 +01:00
thomas cb09833ebc VMM -- Know what? Let's ignore huge pages for simplicity 2018-03-20 14:11:22 +01:00
thomas ae2de799f3 VMM -- Various cleanup 2018-03-20 14:11:22 +01:00
thomas e86857dca4 PMM -- simplification of code 2018-03-20 14:11:22 +01:00
thomas 9bc1abceff VMM -- Touch and set page in one operation 2018-03-20 14:11:22 +01:00
thomas df0df93da7 Don't put multiboot data in page stack 2018-03-20 14:11:22 +01:00
thomas 36c517dd82 Use a direct address for P4 rather than a pointer 2018-03-20 14:11:22 +01:00
thomas 8711fee390 Interface cleanup 2018-03-20 14:11:22 +01:00
thomas 9a479b1132 Add a PAGE_GLOBAL flag for kernel pages 2018-03-20 14:11:22 +01:00
thomas 470eb5e9f9 Also map non-free memory areas into kernel space 2018-03-20 14:11:22 +01:00
thomas 3a4136c225 PMM -- calloc function for getting cleared pages 2018-03-20 14:11:22 +01:00
thomas 5dc4e27392 Map all free memory pages and add to page stack 2018-03-20 14:11:22 +01:00
thomas cf1b631461 VMM -- making sure things will work with virtual memory 2018-03-20 14:11:22 +01:00
thomas 8ac8bc7b6c VMM -- adding interface to header file 2018-03-20 14:11:22 +01:00
thomas ce937c8088 VMM - free_page does not unset P2 entry if P1 is not empty 2018-03-20 14:11:22 +01:00
thomas 96a877c95b VMM - touch_page stops at P2 for huge pages 2018-03-20 14:11:22 +01:00
thomas e68698ff80 VMM - set_page does not overwrite 4kb pages with 2mb 2018-03-20 14:11:22 +01:00
thomas 518eaf73c3 VMM - set_page sets 2Mb pages 2018-03-20 14:11:22 +01:00
thomas f81e5cd8b0 VMM - get_page gets 2mb pages 2018-03-20 14:11:22 +01:00
thomas 69022cadd5 VMM -- refactoring, break out test for page presence 2018-03-20 14:11:22 +01:00
thomas d54a206f82 VMM - free_page returns P1 to PMM if empty 2018-03-20 14:11:22 +01:00
thomas 46e27fb817 VMM - free_page deos not unset P2 entry if P1 is not empty 2018-03-20 14:11:22 +01:00
thomas 992930d293 VMM - free_page deos not unset P2 entry if not asked to 2018-03-20 14:11:22 +01:00
thomas 3134a1d6ad VMM - free_page unsets P2 entry if P1 is empty 2018-03-20 14:11:22 +01:00
thomas e62c167494 VMM -- refactor page table setup in tests 2018-03-20 14:11:22 +01:00
thomas 063c065d2f VMM - free_page unsets page 2018-03-20 14:11:22 +01:00
thomas bbd220a395 VMM -- test refactoring 2018-03-20 14:11:22 +01:00
thomas f78500d603 PMM -- Make sure stuff works even with V2P and P2V 2018-03-20 14:11:22 +01:00
thomas acf9a43980 VMM - touch_page fails if out of pages 2018-03-20 14:11:22 +01:00
thomas 59ffd9d5f5 VMM - touch_page sets flags 2018-03-20 14:11:22 +01:00
thomas 86d8aea9ea VMM - touch_page adds P2 and P1 2018-03-20 14:11:22 +01:00
thomas 1d4b689215 VMM - touch_page adds P3 2018-03-20 14:11:22 +01:00
thomas 28c8afe3c5 VMM - set_page with tests 2018-03-20 14:11:21 +01:00
thomas cd7ed38a40 VMM -- get_page should include flags 2018-03-20 14:11:21 +01:00
thomas 57482136ae VMM - get_page fails if PTE not present 2018-03-20 14:11:21 +01:00
thomas d32e93b72b VMM - get_page works for different address 2018-03-20 14:11:21 +01:00
thomas 1ad156902a VMM - get_page ignores flags -- also restructuring - bad Thomas! 2018-03-20 14:11:21 +01:00
thomas 1b928b3c97 VMM - get_page returns correct address 2018-03-20 14:11:21 +01:00
thomas 1a7852de4d PMM -- finishing up and changing names, types 2018-03-20 14:11:21 +01:00
thomas 28916257f1 PMM -- Fix type for pointer to next block 2018-03-20 14:11:21 +01:00
thomas 82fbafc38e PMM -- Convert between virtual and physical address 2018-03-20 14:11:21 +01:00
thomas 1daf8ed47b PMM - alloc two pages 2018-03-20 14:11:21 +01:00
thomas e7bdea771b PMM - alloc zero after all free pages 2018-03-20 14:11:21 +01:00
thomas 9b930ae5d3 PMM - alloc return 0 if no free pages 2018-03-20 14:11:21 +01:00
thomas 776fd87862 PMM - alloc returns freed page 2018-03-20 14:11:21 +01:00
thomas 80cc165957 Read memory map tags from multiboot 2018-03-20 14:11:21 +01:00
thomas 0b3648de7c Chapter 8: Exceptions - COMPLETE 2018-03-20 14:11:21 +01:00
thomas 73a33c23a4 Clean up header file for interrupts 2018-03-20 14:11:21 +01:00
thomas 6f0a745adc Ability to bind handler functions to interrupts 2018-03-20 14:11:21 +01:00
thomas c1c3842ace Functions for reading/writing some special registers 2018-03-20 14:11:21 +01:00
thomas 96d2ebd977 Collect the cpu specific stuff 2018-03-20 14:11:21 +01:00
thomas b801c7cf3c Make tests unassuming 2018-03-20 14:11:21 +01:00
thomas 86808bce0d Breakpoint in int_handler. Function for checking fault in gdb 2018-03-20 14:11:21 +01:00
thomas 61bc1221bf Make python script py3 compatible 2018-03-20 14:11:21 +01:00
thomas 83e204e52e Change the way python generates .o files via .S 2018-03-20 14:11:21 +01:00
thomas 6cbdb8f7de Remove magic numbers 2018-03-20 14:11:21 +01:00
thomas 127d6ca5a4 Interrupt cleanup 2018-03-20 14:11:21 +01:00
thomas cbcc67fc31 Quick and dirty IDT setup 2018-03-20 14:11:21 +01:00
thomas 25ef5f4688 Chapter 7: Multiboot Data - COMPLETE 2018-03-20 14:11:21 +01:00
thomas e4e891bb86 Clean up interface 2018-03-20 14:11:21 +01:00