Commit Graph

586 Commits

Author SHA1 Message Date
Philipp Oppermann
0b03c18b06 Rewrite interrupts::init using a lazy_static IDT again 2016-12-30 14:52:04 +01:00
Philipp Oppermann
3e6b1a8a35 Rewrite gdt module using an array instead of Vec 2016-12-30 14:52:04 +01:00
Philipp Oppermann
ceb44d9c2e Use x86's TaskStateSegment and use usize for stack pointers 2016-12-30 14:52:04 +01:00
Philipp Oppermann
d1fb1516fa Minor improvements to post 2016-12-30 14:52:04 +01:00
Philipp Oppermann
ef786e1fe8 Update post and code 2016-12-30 14:52:04 +01:00
Philipp Oppermann
038fd097b6 Update post 2016-12-30 14:52:04 +01:00
Philipp Oppermann
5f8de6e871 Create TSS and GDT modules and use a double fault stack 2016-12-30 14:52:04 +01:00
Philipp Oppermann
b4bc47d5d9 Add a new section about the causes of double faults
(+ many other improvements)
2016-12-30 14:51:47 +01:00
Philipp Oppermann
0cd2577abe Some code for double faults post 2016-12-30 14:50:53 +01:00
Philipp Oppermann
8eba47816f Begin new post about double faults 2016-12-30 14:50:52 +01:00
Philipp Oppermann
c33f01d8f7 Update printing-to-screen post to use spin 0.4.5 2016-12-30 14:47:39 +01:00
Philipp Oppermann
89abbf1038 Update to spin 0.4.5
Fixes #274
2016-12-30 14:40:57 +01:00
Philipp Oppermann
14babd8c2a Add a Xargo.toml for xargo 0.3.0 and update the corresponding post (#272) 2016-12-29 16:45:24 +01:00
Philipp Oppermann
02697891e2 Update x86 crate to version 0.8.0 (#266) 2016-12-21 14:59:57 +01:00
Philipp Oppermann
a7a9aabce7 Remove workspace from post as well (#267) 2016-12-21 14:55:09 +01:00
Philipp Oppermann
fcd453ac29 Remove cargo workspace (#265) 2016-12-21 00:19:30 +01:00
Philipp Oppermann
00452c2302 Revert "map the P4 table recursively before setting paging" (#259) 2016-12-19 11:34:21 +01:00
Philipp Oppermann
c5dd983949 Mark panic_fmt as no_mangle to work around rust-lang/rust#38281 (#262) 2016-12-19 11:32:20 +01:00
Philipp Oppermann
f4ff2b0000 Keep installed tools up-to-date using cargo-update 2016-12-19 11:01:21 +01:00
Philipp Oppermann
9583cdea28 Test for rustfmt/xargo instead of using || true (#257) 2016-11-30 16:29:01 +01:00
Anton Strömkvist
bef61116fd Minor grammatical error fix (#258)
In `02-entering-longmode.md`
2016-11-30 16:28:45 +01:00
Philipp Oppermann
c76f7b8b98 Merge pull request #256 from phil-opp/p1
Fix panic_fmt arguments: file is a &'static str
2016-11-26 12:27:42 +01:00
Philipp Oppermann
f4c9c12047 Fix panic_fmt arguments in post 2016-11-26 12:17:12 +01:00
Philipp Oppermann
e9735738f7 Fix panic_fmt arguments: file is a &'static str 2016-11-26 12:15:34 +01:00
Philipp Oppermann
c7268cff3b Fix CI for xargo 0.2.0 2016-11-19 10:46:07 +01:00
Philipp Oppermann
a1fccc12b6 Set date of last update correctly for posts (#254) 2016-11-08 17:45:36 +01:00
Philipp Oppermann
571f1d2fbf Merge pull request #252 from phil-opp/stack_frame-reference
Exceptions: Take the ExceptionStackFrame per reference
2016-11-01 17:56:25 +01:00
Philipp Oppermann
9963961f35 Test the handler_with_error_code macro in a different way
We now take stack_frame as a immutable reference and we shouldn't write to a &. So the old test example (page faults as breakpoints) becomes even more hacky. Instead, we're now deliberately entering an endless page fault loop to check our iretq logic.
2016-11-01 17:50:51 +01:00
Philipp Oppermann
67857bde2f Returning from Exceptions: Take stack_frame as reference 2016-11-01 17:46:57 +01:00
Philipp Oppermann
e129da8cc2 Better Exception Messages: Take stack_frame argument as reference 2016-11-01 17:46:57 +01:00
Philipp Oppermann
15feb9a120 Use references for the ExceptionStackFrame argument
We require/assume that these pointers are correct. Using references is cleaner than blindly dereferencing raw pointers.

Important: The Rust book guarantees that: “At runtime, a raw pointer * and a reference pointing to the same piece of data have an identical representation.”
2016-11-01 16:56:11 +01:00
Philipp Oppermann
f737c302e7 therefor -> for that 2016-10-31 15:31:32 +01:00
Philipp Oppermann
7a0bb1ff7b Print an empty line before exception error messages 2016-10-31 01:37:37 +01:00
Philipp Oppermann
7254528d53 Merge pull request #249 from phil-opp/fix-println-deadlock
Update `print` macro to avoid deadlock; remove hacky `print_error` function
2016-10-31 01:12:34 +01:00
Philipp Oppermann
3bfa5a8178 Update “Returning from Exceptions” to use println 2016-10-31 01:04:53 +01:00
Philipp Oppermann
25fca59248 Update “Better Exception Messages” to use println 2016-10-30 20:06:51 +01:00
Philipp Oppermann
f14baa218e Fix typo 2016-10-30 19:12:55 +01:00
Philipp Oppermann
ca522db7bf Exceptions inside printlns are no longer a problem
The recent update to the vga driver evaluates the arguments before locking the global stdout writer
2016-10-30 17:32:04 +01:00
Philipp Oppermann
41c87636e0 Improve wording and add some more QEMU screenshots 2016-10-30 17:23:17 +01:00
Philipp Oppermann
cfccffca39 Trigger and fix the deadlock for nested printlns 2016-10-30 16:54:03 +01:00
Philipp Oppermann
c69f73b9b2 Improve some explanations in the section about fomatting macros 2016-10-30 16:53:24 +01:00
Philipp Oppermann
9b83b2853e Remove print_error and use normal println in exception handlers 2016-10-30 16:51:59 +01:00
Philipp Oppermann
212dcfa592 Make print_error safe by using the global writer
This is now possible since we fixed the deadlock problem.
2016-10-30 16:51:59 +01:00
Philipp Oppermann
d96df500a7 Create a new print function and use it in the print macro
This fixes the deadlock problem, because the format_args is now evaluated before locking the screen writer. So `println!("{:?}", {println!("");})` no longer triggers a deadlock.
2016-10-30 16:51:59 +01:00
Dentosal
1fe9e87ead Remap the Kernel: Fixed broken link (#247) 2016-10-24 00:06:58 +02:00
Matanel Levi
f35ea9430c Page Tables: clarify that we need to map the P4 table recursively before enabling paging (#246)
We have to map the P4 table recursively before setting paging - can't do this wherever we'd like.
2016-10-23 16:04:09 +02:00
Philipp Oppermann
92b04dfba7 Remove old “Update” sections (#244)
Most of these updates are quite old and thus distracting. Instead, we now have a “Recent Changes” box in the sidebar of the front page.
2016-10-15 17:10:43 +02:00
Philipp Oppermann
941fca8b0d Better Exception Messages: Add example code that triggers the triple fault again (#242) 2016-10-12 16:56:25 +02:00
Philipp Oppermann
8bec3b42b0 Merge pull request #239 from phil-opp/vga_volatile
Printing to Screen: Use volatile operations for accessing the VGA Buffer
2016-10-08 15:49:00 +02:00
Philipp Oppermann
7db50a1a62 Fine-tune the section about volatiles 2016-10-08 15:41:59 +02:00