Philipp Oppermann
f4b961ad50
Update to latest bit_field version
...
(cherry picked from commit 46100ba24b )
2017-01-25 13:54:07 +01:00
Philipp Oppermann
f11a564f5a
The ReadWrite flag isn't needed for code segments ( #279 )
...
(cherry picked from commit fce85e68ee )
2017-01-18 13:14:02 +01:00
Philipp Oppermann
24e9bcb659
Load null selectors to all data registers
...
This is required for some instructions such as iretq (ss must be valid or 0).
(cherry picked from commit 8f8b46a9b6 )
2017-01-15 14:18:39 +01:00
Philipp Oppermann
5a87c688e9
Data segments aren't needed for 64-bit mode
...
(cherry picked from commit e179dadf70 )
2017-01-15 14:14:50 +01:00
Philipp Oppermann
4ce38163ba
Make panic_fmt public to fix private_no_mangle_fns warning
...
(cherry picked from commit 1be2f42791 )
2017-01-04 16:24:39 +01:00
Philipp Oppermann
229eb78279
Mark panic_fmt as no_mangle to work around rust-lang/rust#38281
...
(cherry picked from commit 081105bbb6 )
(cherry picked from commit 1acc1ff5806f2fa101f726644d258eb4e4543540)
2017-01-04 16:10:36 +01:00
Philipp Oppermann
6f259de5db
Add a Xargo.toml for xargo 0.3.0
...
(cherry picked from commit 14babd8c2a )
2016-12-29 16:46:45 +01:00
Philipp Oppermann
0b9c3734b2
Update x86 crate to version 0.8.0 ( #266 )
...
(cherry picked from commit 02697891e2 )
2016-12-21 15:10:29 +01:00
Philipp Oppermann
7ee6683cfa
Remove cargo workspace ( #265 )
...
(cherry picked from commit fcd453ac29 )
2016-12-21 14:48:31 +01:00
Philipp Oppermann
f643b2fd7b
Test for rustfmt/xargo instead of using || true ( #257 )
...
(cherry picked from commit 9583cdea28 )
2016-11-30 16:30:13 +01:00
Philipp Oppermann
0fa05fb187
Fix CI for xargo 0.2.0
...
(cherry picked from commit c7268cff3b )
2016-11-26 12:38:29 +01:00
Philipp Oppermann
36abafab8c
Fix panic_fmt arguments: file is a &'static str
...
(cherry picked from commit e9735738f7 )
2016-11-26 12:29:35 +01:00
Philipp Oppermann
29505630ea
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.”
(cherry picked from commit 15feb9a120 )
2016-11-01 18:02:09 +01:00
Philipp Oppermann
33a96b26d3
Remove print_error and use normal println in exception handlers
...
(cherry picked from commit 9b83b2853e )
2016-10-31 01:35:05 +01:00
Philipp Oppermann
987c56a153
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:20:22 +01:00
Philipp Oppermann
11516adc53
Use volatile operations for accessing the VGA buffer
...
(cherry picked from commit d7a445b1bb )
2016-10-08 15:55:30 +02:00
Philipp Oppermann
a5c96a048e
Add missing license headers and update copyright year ( #232 )
...
(cherry picked from commit a04924955a )
2016-10-02 18:31:22 +02:00
Philipp Oppermann
3dd5411608
Add missing license headers ( #233 )
...
(cherry picked from commit 0f4d1ce303 )
2016-10-02 18:29:54 +02:00
Philipp Oppermann
287e43a5c4
Use crates.io version of multiboot2
...
(cherry picked from commit c6b1346956 )
2016-09-27 13:57:25 +02:00
Calvin Lee
0cca3ae90c
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:05 +02:00
Philipp Oppermann
7ce8d08b2d
Update bit_field to 0.5.0 and use new API
...
(cherry picked from commit 6eba03dd58 )
2016-09-27 13:38:18 +02:00
Philipp Oppermann
bc4ebcf4e0
Fix .travis.yml for tag build
2016-09-21 15:24:06 +02:00
Philipp Oppermann
998064ae2c
Adjust README for returning_from_exceptions tag
2016-09-21 15:24:06 +02:00
Philipp Oppermann
d15f51d386
Remove blog and scripts subdirs
2016-09-21 15:22:40 +02:00
Philipp Oppermann
9f7994772b
Add ~/.cargo/bin to PATH
2016-09-21 15:17:39 +02:00
Philipp Oppermann
bd285b1731
Use kalakris-cmake for cmake 2.8.11
2016-09-21 14:54:49 +02:00
Philipp Oppermann
43ed189b35
Fix travis: Install xargo in before_script
2016-09-21 14:45:03 +02:00
Philipp Oppermann
5c05f7c438
Add new post to README
2016-09-21 14:41:47 +02:00
Philipp Oppermann
00701ca474
Add code for “Returning from Exceptions”
2016-09-21 14:34:32 +02:00
Philipp Oppermann
a4054c478c
We require xargo now
2016-09-21 14:33:09 +02:00
Philipp Oppermann
f38805c3d3
Final improvements
2016-09-21 14:32:42 +02:00
Philipp Oppermann
706c48a410
Add source files for the diagrams
2016-09-20 17:35:39 +02:00
Philipp Oppermann
5a00bddd7c
Write introduction
2016-09-20 17:31:28 +02:00
Philipp Oppermann
626763d452
Write “What's next?”
2016-09-20 17:16:13 +02:00
Philipp Oppermann
e4ae45e863
Write “Exceptions with Error Codes” section
2016-09-20 16:17:22 +02:00
Philipp Oppermann
0bb7f1a53e
New post about returning from exceptions
2016-09-20 02:47:55 +02:00
Philipp Oppermann
8cee4161de
Update to hugo 0.16
2016-09-18 19:26:45 +02:00
Philipp Oppermann
9b842e9578
Rename posts: Use ascending numbers instead of date
2016-09-18 19:25:08 +02:00
dns2utf8
917eb78255
Add mtools to readme ( #213 )
2016-09-12 11:22:42 +02:00
Philipp Oppermann
9830f4ef48
Check rustfmt formatting in travis builds ( #210 )
...
* Install rustfmt
* Check formatting in travis builds
2016-08-27 13:45:18 +02:00
Philipp Oppermann
68921b625d
Cache cargo directories ( #209 )
2016-08-27 13:11:44 +02:00
Philipp Oppermann
18d02e01e1
Merge pull request #208 from KarboniteKream/master
...
Fix various typos
2016-08-20 14:05:19 +02:00
Klemen Košir
30a8c06295
reexport -> re-export
2016-08-20 13:04:26 +02:00
Klemen Košir
e56df793d4
Fix an incorrect function name
2016-08-20 13:03:54 +02:00
Klemen Košir
02ef52c677
Fix an incorrect year of update in post title
2016-08-20 13:03:25 +02:00
Klemen Košir
a33bf9c889
Fix a function name typo
2016-08-20 13:02:41 +02:00
Philipp Oppermann
7c0082ecb4
Fix broken unwinding link (link to nomicon now) ( #207 )
2016-08-17 14:35:42 +02:00
Jeremy Ruten
c6f35a953a
Fix code to trigger memcpy linker errors ( #206 )
...
Fixes #205
2016-08-16 12:49:36 +02:00
Leon Loopik
98c3b2a4a1
Fix incorrect uses of therefor ( #204 )
...
* Fix typo (therefor -> therefore)
* Rephrased a sentence
* Added backticks back in
2016-08-10 12:22:53 +02:00
Philipp Oppermann
462a38d0ca
Merge pull request #203 from phil-opp/kernel-heap-improvements
...
Various improvements to “Kernel Heap”
2016-08-05 11:25:06 +02:00
Philipp Oppermann
72199bb7d7
Fix link and link to both “page tables” and “remap the kernel”
2016-08-05 11:22:20 +02:00
Philipp Oppermann
86efbda8d8
Remove panic=abort note
2016-08-05 11:22:20 +02:00
Philipp Oppermann
a5acfee7c3
Improve some heading levels
2016-08-05 11:22:20 +02:00
Philipp Oppermann
9603ac1ccc
Create a cargo workspace for subcrates ( #202 )
2016-08-05 11:21:57 +02:00
Philipp Oppermann
a01034cbfc
Merge pull request #201 from phil-opp/lazy_static
...
Use upstream lazy_static and upgrade `once` to latest version
2016-08-04 20:14:55 +02:00
Philipp Oppermann
4a1fa3a65a
Explain how to add lazy_static to the main crate
2016-08-04 20:09:25 +02:00
Philipp Oppermann
3bd5e56e3f
Use upstream lazy_static and update once crate
2016-08-04 20:09:25 +02:00
Mark Schmale
74cadb15a3
removed extra "use" ( #197 )
...
I'm not a native speaker so I'm not 100% sure but I guess this "use" shouldn't be there.
2016-08-04 13:58:49 +02:00
Philipp Oppermann
9ec1860f02
Merge pull request #196 from phil-opp/p1
...
Fix clobber syntax and add missing rsi clobber in code
2016-08-04 01:12:50 +02:00
Philipp Oppermann
46d41d9c3d
Add missing rsi clobber in code as well
2016-08-04 01:07:51 +02:00
Philipp Oppermann
cde3f535c7
Fix clobber syntax in post
2016-08-04 01:07:39 +02:00
Philipp Oppermann
3a62b42414
Link to nightly docs as stable still has wrong clobber syntax
...
See #195
2016-08-04 01:00:55 +02:00
Leon Loopik
ca925c49e0
Add rsi to the clobber list ( #195 )
...
In the second macro (handler_with_error_code), we pop the error code into rsi, this means we are changing the value of rsi in the assembly block, so we should add it to the clobbers.
I am quite new to this, so please close this request if I am completely wrong.
(Side question: An other thing I came across while trying to figure out if this was correct, is that every documentation says you should add curly brackets around register names, can someone tell me why this is not done here?)
2016-08-04 00:19:12 +02:00
Philipp Oppermann
5e6a8cb69b
Link gitter chat
2016-08-03 20:48:24 +02:00
Philipp Oppermann
88fe633b87
Merge pull request #194 from phil-opp/better-exception-messages
...
New post: Better Exception Messages
2016-08-03 17:03:13 +02:00
Philipp Oppermann
3312478f71
Include “Better Exception Messages” in README
2016-08-03 17:00:18 +02:00
Philipp Oppermann
60a58a8c9c
Fix github tag link
2016-08-03 17:00:18 +02:00
Philipp Oppermann
2b629415a4
Final improvements
2016-08-03 17:00:18 +02:00
Philipp Oppermann
d13460812d
Run rustfmt
2016-08-03 17:00:18 +02:00
Philipp Oppermann
a9319ea83e
Translate error code and print cr2 register
2016-08-03 17:00:18 +02:00
Philipp Oppermann
69f1b58bb0
Add and test a handler_with_error_code macro and a page fault handler
2016-08-03 17:00:18 +02:00
Philipp Oppermann
df1e39edb2
Add and test an invalid opcode handler function
2016-08-03 17:00:18 +02:00
Philipp Oppermann
71ebb23ec3
Add a handler macro that creates wrapper functions
2016-08-03 17:00:18 +02:00
Philipp Oppermann
e7ee1faaba
Add a wrapper function and print the exception stack frame
2016-08-03 17:00:18 +02:00
Philipp Oppermann
d97a8a3210
Silence dead code warnings
2016-08-03 17:00:18 +02:00
Philipp Oppermann
297f8442b9
Reset src to master to be able to follow step-by-step
2016-08-03 17:00:18 +02:00
Philipp Oppermann
398ba7a424
Provoke a page fault
2016-08-03 17:00:18 +02:00
Philipp Oppermann
261f92e2e5
Print cr2 in page_fault_handler
2016-08-03 17:00:18 +02:00
Philipp Oppermann
1ba595aab3
Rename to better-exception-messages
2016-08-03 17:00:18 +02:00
Philipp Oppermann
710cebe695
Finish exceptions diagnostics post
2016-08-03 17:00:18 +02:00
Philipp Oppermann
e9d2d594ab
Add handler! macros
2016-08-03 17:00:18 +02:00
Philipp Oppermann
f14876dfff
Next section: Debug the failure on real hardware
2016-08-03 17:00:18 +02:00
Philipp Oppermann
b1de7a9100
Add a ToC
2016-08-03 17:00:18 +02:00
Philipp Oppermann
40b565947b
Test the two-stage exception handler in code
2016-08-03 17:00:18 +02:00
Philipp Oppermann
e8220b3781
Describe the two-stage exception handler
2016-08-03 17:00:18 +02:00
Philipp Oppermann
2e0f4f9161
Begin code for upcoming post
2016-08-03 17:00:11 +02:00