Commit Graph

615 Commits

Author SHA1 Message Date
Philipp Oppermann
8f8b46a9b6 Load null selectors to all data registers
This is required for some instructions such as iretq (ss must be valid or 0).
2017-01-14 16:38:33 +01:00
Philipp Oppermann
e179dadf70 Data segments aren't needed for 64-bit mode 2017-01-12 17:23:50 +01:00
Philipp Oppermann
a8847c22ef Fix broken links 2017-01-04 16:36:25 +01:00
Philipp Oppermann
ae1c9b3739 Merge pull request #276 from phil-opp/p
Make panic_fmt public to fix private_no_mangle_fns warning
2017-01-04 16:21:19 +01:00
Philipp Oppermann
64cbabd1c2 make panic_fmt public in posts 2017-01-04 16:15:59 +01:00
Philipp Oppermann
1be2f42791 Make panic_fmt public to fix private_no_mangle_fns warning 2017-01-04 16:13:27 +01:00
Philipp Oppermann
f6a1faab96 Fix broken links in “Double Faults” (#275) 2017-01-02 19:39:19 +01:00
Philipp Oppermann
1549e318a5 Merge pull request #270 from phil-opp/new-post
New post about double faults
2017-01-02 19:19:29 +01:00
Philipp Oppermann
c39070da4a “Double Faults” is the 12th post 2017-01-02 19:15:50 +01:00
Philipp Oppermann
a43b23b619 Catch double faults on a separate stack 2017-01-02 19:11:56 +01:00
Philipp Oppermann
006619920e Reload code segment register and load TSS 2017-01-02 19:11:56 +01:00
Philipp Oppermann
c0d7206249 Make TSS and GDT statics by using spin::Once 2017-01-02 19:11:56 +01:00
Philipp Oppermann
31ffe60052 Add a new GDT module 2017-01-02 19:11:56 +01:00
Philipp Oppermann
d330a67659 Create a new TaskStateSegment
(that contains the double fault stack in its IST)
2017-01-02 19:11:56 +01:00
Philipp Oppermann
e08bd375ae Allocate a new double fault stack in interrupts::init 2017-01-02 19:11:56 +01:00
Philipp Oppermann
8ad76ba496 Create a new MemoryAllocator (and initialize it) 2017-01-02 19:11:56 +01:00
Philipp Oppermann
4347ff235f Add a new stack_allocator module 2017-01-02 19:11:56 +01:00
Philipp Oppermann
47755d541d Trigger a stack overflow (still causes a triple fault) 2017-01-02 19:11:56 +01:00
Philipp Oppermann
dfa1cc48c9 Add a double fault handler (and trigger it) 2017-01-02 19:11:56 +01:00
Philipp Oppermann
9090bf0c06 Set correct release date 2017-01-02 19:11:56 +01:00
Philipp Oppermann
7db15cf892 Reset source code to master again
(in order to follow the post and test the exact code from it)
2017-01-02 19:11:56 +01:00
Philipp Oppermann
055c534b4e Add a section about possible safety problems 2017-01-02 19:11:56 +01:00
Philipp Oppermann
80354c8a72 Multiple code corrections in post 2017-01-02 19:11:56 +01:00
Philipp Oppermann
cce40a1d67 Many small improvements 2016-12-30 14:54:46 +01:00
Philipp Oppermann
e121edced2 Change the GDT push logic
Instead of looking for a zero field, we now keep track of the next free index in a separate field. This avoids the bug that the high u64 of a pushed TSS descriptor is treated as empty.
2016-12-30 14:54:46 +01:00
Philipp Oppermann
1e45ddd79c Link double fault post and source in Readme 2016-12-30 14:52:04 +01:00
Philipp Oppermann
ec358321da Finish first draft of double faults post 2016-12-30 14:52:04 +01:00
Philipp Oppermann
c3bfcbcd8d Silence dead code warning 2016-12-30 14:52:04 +01:00
Philipp Oppermann
58e7cc77d0 Data segment descriptors are not needed in 64-bit mode 2016-12-30 14:52:04 +01:00
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