Commit Graph

485 Commits

Author SHA1 Message Date
Philipp Oppermann
e8d1f96b76 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.

(cherry picked from commit d96df500a7)
2016-10-31 01:22:52 +01:00
Philipp Oppermann
e09df45b9b Use volatile operations for accessing the VGA buffer
(cherry picked from commit d7a445b1bb)
2016-10-08 15:55:28 +02:00
Philipp Oppermann
7f80db6fb4 Add missing license headers and update copyright year (#232)
(cherry picked from commit a04924955a)
2016-10-02 18:31:20 +02:00
Philipp Oppermann
c764e6bb43 Add missing license headers (#233)
(cherry picked from commit 0f4d1ce303)
2016-10-02 18:29:52 +02:00
Philipp Oppermann
0ec126fc7d Use crates.io version of multiboot2
(cherry picked from commit c6b1346956)
2016-09-27 13:56:43 +02:00
Calvin Lee
258a7d1aba Fixes #220: BumpAllocator overflow
I also fixed a spelling error and replaced a tab with a space
in the blog post where `allocate()` was created.

(cherry picked from commit 54e02fd6b5)
(cherry picked from commit 3a2f0b33297164ebbfab92ee76881b6c06c4914d)
2016-09-27 13:41:01 +02:00
Philipp Oppermann
6e20fe17db Update bit_field to 0.5.0 and use new API
(cherry picked from commit 6eba03dd58)
2016-09-27 13:38:15 +02:00
Philipp Oppermann
2aeeaecf86 Create a cargo workspace for subcrates
(cherry picked from commit 488a3c16f0)
2016-08-05 11:29:19 +02:00
Philipp Oppermann
e63dda6953 Add missing rsi clobber in code as well
(cherry picked from commit 46d41d9c3d)
2016-08-04 01:13:34 +02:00
Philipp Oppermann
af8578ec78 Fix .travis.yml for tag build 2016-08-03 16:54:27 +02:00
Philipp Oppermann
4c9f7cfbee Update README for better_exception_messages tag 2016-08-03 16:53:44 +02:00
Philipp Oppermann
c26fb53547 Remove blog and scripts subdirs 2016-08-03 16:51:58 +02:00
Philipp Oppermann
7871e4008a Fix github tag link 2016-08-03 16:48:02 +02:00
Philipp Oppermann
e1a90fe3ab Final improvements 2016-08-03 16:42:47 +02:00
Philipp Oppermann
e17fd2d0de Run rustfmt 2016-08-03 16:41:49 +02:00
Philipp Oppermann
2df8517816 Translate error code and print cr2 register 2016-08-03 16:39:38 +02:00
Philipp Oppermann
550a99cfd4 Add and test a handler_with_error_code macro and a page fault handler 2016-08-03 16:36:58 +02:00
Philipp Oppermann
86a757cb61 Add and test an invalid opcode handler function 2016-08-03 16:26:22 +02:00
Philipp Oppermann
bf72618647 Add a handler macro that creates wrapper functions 2016-08-03 16:24:43 +02:00
Philipp Oppermann
308b033ea9 Add a wrapper function and print the exception stack frame 2016-08-03 16:22:59 +02:00
Philipp Oppermann
07bef978ad Silence dead code warnings 2016-08-03 16:00:04 +02:00
Philipp Oppermann
ee48ec5e29 Reset src to master to be able to follow step-by-step 2016-08-03 16:00:04 +02:00
Philipp Oppermann
6590531a41 Provoke a page fault 2016-08-03 16:00:04 +02:00
Philipp Oppermann
df99382cda Print cr2 in page_fault_handler 2016-08-03 16:00:04 +02:00
Philipp Oppermann
979663acda Rename to better-exception-messages 2016-08-03 16:00:04 +02:00
Philipp Oppermann
8bb46c6b62 Finish exceptions diagnostics post 2016-08-03 16:00:03 +02:00
Philipp Oppermann
4eda7993a2 Add handler! macros 2016-08-03 16:00:03 +02:00
Philipp Oppermann
b949fba62f Next section: Debug the failure on real hardware 2016-08-03 14:44:52 +02:00
Philipp Oppermann
83978e8417 Add a ToC 2016-08-03 14:44:52 +02:00
Philipp Oppermann
9113a63f5e Test the two-stage exception handler in code 2016-08-03 14:44:52 +02:00
Philipp Oppermann
9e45cf65bc Describe the two-stage exception handler 2016-08-03 14:44:52 +02:00
Philipp Oppermann
06fb4d6596 WIP code for upcoming post 2016-08-03 14:44:52 +02:00
Philipp Oppermann
95c0452bcb Begin new post 2016-08-03 14:44:52 +02:00
Philipp Oppermann
68e2495d9c Rename modifying-page-tables.md to page-tables.md 2016-08-03 14:43:01 +02:00
Philipp Oppermann
9469dc5891 Remove coarse class from ToCs
We will add it dynamically via javascript when the Toc is higher than the viewport.
2016-07-28 19:42:37 +02:00
Anton Strömkvist
6b2f1281ae Fix hex constant (#193)
I assume these were in the wrong order since all the others looked this way :)
2016-07-28 18:01:42 +02:00
Philipp Oppermann
826e303ed0 Merge pull request #192 from phil-opp/post-toc
Add tables of contents to all blog posts
2016-07-17 17:14:50 +02:00
Philipp Oppermann
d4e82b0aa4 Improve heading levels 2016-07-17 17:10:42 +02:00
Philipp Oppermann
bc6f496eb5 Add tables of contents to all blog posts 2016-07-17 17:10:23 +02:00
Philipp Oppermann
62dd13b2e7 Merge pull request #190 from phil-opp/p1
Add aligned .got and .got.plt sections to linker script
2016-07-16 17:22:25 +02:00
Philipp Oppermann
68c1e42356 Update linker script in post (add .got and .got.plt) 2016-07-14 18:11:58 +02:00
Philipp Oppermann
2445b47661 Add aligned .got and .got.plt sections to linker script 2016-07-14 18:07:26 +02:00
Philipp Oppermann
d64e4ba2fc Update x86 crate to 0.7.1 (#189) 2016-07-14 11:21:04 +02:00
Aaron Hill
48e7faa521 Add ENTRY(start) to 'Allocating Frames' blog post linker script (#188) 2016-06-29 09:19:08 +02:00
Philipp Oppermann
f8c5bc5dec Merge pull request #187 from phil-opp/divide_by_zero
Catch divide error instead of page fault
2016-06-25 17:13:29 +02:00
Philipp Oppermann
ca438d9740 Revise plans for the upcoming post 2016-06-25 17:12:04 +02:00
Philipp Oppermann
702e49eaf7 Catch divide-by-zero errors and introduce inline assembly
This commit updates the “Catching Exceptions” post to catch divide-by-zero errors instead of page faults. The reason is a subtle stack alignment bug, which is somehow caused by the additional error code on a page fault. This commit also adds a short introduction to inline assembly.
2016-06-25 17:12:04 +02:00
Philipp Oppermann
e8b3a1fff1 Catch divide error instead of page fault
The divide error pushes no error code. Thus we avoid stack misalignment (see #184).
2016-06-25 17:12:04 +02:00
Philipp Oppermann
c9d8afe434 Run rustfmt 2016-06-25 17:08:26 +02:00
Philipp Oppermann
2f9e6cc0d0 Minor improvements to catching exceptions post 2016-06-25 17:06:57 +02:00