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
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
Philipp Oppermann
84ba085a0a
The section will be only about exceptions ( #186 )
2016-06-24 13:59:17 +02:00
Philipp Oppermann
b7a47ee001
Add gitter badge ( #183 )
2016-06-24 13:54:35 +02:00
Philipp Oppermann
e4cc5b84f1
Merge pull request #185 from phil-opp/unwind_resume
...
Create dummy _Unwind_Resume function to fix libcore linker errors
2016-06-24 13:44:54 +02:00
Philipp Oppermann
f00360d553
Add and explain dummy _Unwind_Resume function in “Set Up Rust” post
2016-06-24 13:37:03 +02:00
Philipp Oppermann
952f7ed5e3
Create dummy _Unwind_Resume function to fix libcore linker errors
2016-06-24 13:37:02 +02:00
Philipp Oppermann
76b83c623e
Revert "Remove unneeded gcc_except_table section" ( #180 )
2016-06-13 18:36:01 +02:00
Philipp Oppermann
20d9037740
Merge pull request #178 from phil-opp/patch5
...
Remove unneeded gcc_except_table section
2016-06-12 16:36:00 +02:00
Philipp Oppermann
1fb6369f61
Remove unneeded gcc_except_table section from blog post
2016-06-12 16:33:55 +02:00
Philipp Oppermann
1083ac9bac
Remove unneeded gcc_except_table section
2016-06-12 16:32:34 +02:00
Ryan Campbell
793eeebfb3
Add missing open brace ( #177 )
2016-06-10 20:36:33 +02:00
Steve Klabnik
1183f5d1e1
Update section header to reflect changes in the text ( #176 )
2016-06-07 21:48:54 +02:00
Philipp Oppermann
bddf35f365
Add missing link to bit_field crate ( #174 )
2016-06-01 01:21:16 +02:00
Jordan Danford
bf0e70746d
Change 'boot load' to 'boot loop' in 'Remap the Kernel' section ( #173 )
2016-05-31 09:11:14 +02:00
Homu
c22e1e8bb1
Auto merge of #172 - phil-opp:phil-opp-patch-1, r=phil-opp
...
Recommend rustup instead of multirust
2016-05-30 23:58:02 +09:00
Philipp Oppermann
4fae6e4731
Recommend rustup instead of multirust
2016-05-30 16:57:28 +02:00
Philipp Oppermann
c2336ceece
Make cross-compile-* and set-up-gdb pages additional resourses
2016-05-29 19:58:44 +02:00
Philipp Oppermann
2f0a3459ad
Merge pull request #170 from phil-opp/cargo-panic-abort
...
Use the `panic=abort` option instead of `-Z no-landing-pads`
2016-05-29 18:49:30 +02:00
Philipp Oppermann
0f5ec6f129
Update “Kernel Heap”: The _Unwind_Resume linker error shouldn't occur anymore
2016-05-29 18:47:38 +02:00
Philipp Oppermann
5d13ff7c3a
Add update note
2016-05-29 18:38:14 +02:00
Philipp Oppermann
d7b05bc6b4
Update “Set Up Rust” post to use the cargo panic option
2016-05-29 18:35:16 +02:00
Philipp Oppermann
f4eb589f19
We don't need _Unwind_Resume anymore
2016-05-29 18:00:58 +02:00
Philipp Oppermann
725c452157
Use the panic=abort option instead of -Z no-landing-pads
2016-05-29 18:00:29 +02:00
Philipp Oppermann
01f9f1056c
Merge pull request #169 from phil-opp/missing-pub
...
Make methods of EntryOptions public
2016-05-29 17:26:48 +02:00
Philipp Oppermann
9ea7ee6f57
Make methods of EntryOptions public in post
2016-05-29 17:25:11 +02:00
Philipp Oppermann
480265872d
Make methods of EntryOptions public
2016-05-29 17:24:21 +02:00
Philipp Oppermann
165bf096a7
Merge pull request #164 from phil-opp/catching-exceptions
...
Add new post about “Catching Exceptions”
2016-05-28 16:00:31 +02:00
Philipp Oppermann
f58a6fe185
Add a print_error function, which works for exceptions inside println
2016-05-28 15:47:34 +02:00
Philipp Oppermann
c1df1d3354
Initialize the IDT and provoke a page fault
2016-05-28 15:47:34 +02:00
Philipp Oppermann
2d15a7bdb1
Make HandlerFunc public, because it is part of a public interface
2016-05-28 15:47:34 +02:00
Philipp Oppermann
c65b16f42d
Create a static IDT with a page fault handler function
2016-05-28 15:47:34 +02:00
Philipp Oppermann
b84c5822df
Create interrupt module with IDT submodule
2016-05-28 15:47:34 +02:00
Philipp Oppermann
245125cb4a
Minor improvements to post
2016-05-28 15:47:33 +02:00
Philipp Oppermann
e2b45d3971
Fix minor errors in code snippets
2016-05-28 15:46:47 +02:00
Philipp Oppermann
865e74bfad
We don't overhaul our build system yet
2016-05-28 14:37:19 +02:00
Philipp Oppermann
745b1f6a0b
Improve _Unwind_Resume description and remove claim about the “next post”
2016-05-28 14:36:23 +02:00
Philipp Oppermann
3b71e9e5a0
Add “Catching Exceptions” post to README
2016-05-28 14:15:20 +02:00
Philipp Oppermann
e4b42b106f
Reset source code to master again
2016-05-28 14:09:45 +02:00
Philipp Oppermann
08540eb602
Remove unneeded unsafe
2016-05-28 14:09:17 +02:00
Philipp Oppermann
4633f84af6
Finish catching-exceptions post
2016-05-28 14:09:17 +02:00
Philipp Oppermann
5054e48c9a
Remove unneeded pubs
2016-05-28 14:09:17 +02:00
Philipp Oppermann
13e94de7b4
Make the load function safe
2016-05-28 14:09:17 +02:00
Philipp Oppermann
8540d3844b
Use new x86::segmentation::cs function and merge set_handler and options
...
We avoid inline assembly and increase safety (it is no longer possible to set the non-present initilization entries to present).
2016-05-28 14:09:17 +02:00
Philipp Oppermann
968ae00de7
Update blog post
2016-05-28 14:09:17 +02:00
Philipp Oppermann
cbe034f3a5
wip
2016-05-28 14:09:17 +02:00
Philipp Oppermann
c961fdc32b
wip
2016-05-28 14:09:17 +02:00
Philipp Oppermann
59382699d0
wip
2016-05-28 14:09:17 +02:00
Philipp Oppermann
74f33c0f44
Use own Itd entry type
2016-05-28 14:09:17 +02:00
Philipp Oppermann
78655d6bef
Add bit_field dependency
2016-05-28 14:09:17 +02:00
Philipp Oppermann
431bb39fdb
Begin work for exceptions post
2016-05-28 14:09:17 +02:00
Philipp Oppermann
7c565abba8
Fix: hole_list_allocator instead of linked_list_allocator ( #161 )
...
Reported by @simonlovgren in #160
2016-05-17 14:35:53 +02:00
Philipp Oppermann
a59f51766a
Merge pull request #159 from phil-opp/update_bitflags
...
Update bitflags to 0.7.0
2016-05-15 12:32:22 +02:00
Philipp Oppermann
e383a9235a
Update post to use bitflags 0.7.0
2016-05-15 12:29:29 +02:00
Philipp Oppermann
1703827da2
Update to bitflags 0.7.0
2016-05-15 12:27:43 +02:00
Philipp Oppermann
a39c59801b
Use upstream lazy static as it has a spin_no_std feature now ( #158 )
2016-05-14 16:25:15 +02:00
Philipp Oppermann
7170c658a7
Add missing mut ( #156 )
2016-05-07 15:01:39 +02:00
William Orr
07d534e4b4
Add missing use statements in printing-to-screen ( #154 )
2016-05-03 09:14:34 +02:00
William Orr
a9f41d7303
Replace movaps with movups
...
objdump on my system and code snippet in blog agree - problem is caused
by `movups` not `movaps`. Fix surrounding text and doc link to reflect
this.
2016-05-02 20:18:15 +02:00
Philipp Oppermann
301859a4b9
Merge pull request #153 from phil-opp/patch5
...
The no-landing-pads snippet already generates SSE instructions
2016-05-02 17:02:31 +02:00
Philipp Oppermann
088e87b23a
The no-landing-pads snippet already generates SSE instructions
2016-05-02 16:58:49 +02:00
Philipp Oppermann
0d210e554f
Fix: pass the commit hash instead of the variable name
2016-05-02 16:16:24 +02:00
Philipp Oppermann
622c4f0797
Pass commit hash for update commit message
2016-05-02 16:09:15 +02:00
Philipp Oppermann
b633b29b6c
Fix rendering of repr(C)
...
Fixes #151
2016-05-02 15:47:41 +02:00
Philipp Oppermann
f1c68fd6dc
Remove installation of pygments
...
We don't deploy on this branch, so syntax highlighting is not needed.
2016-05-02 15:44:36 +02:00
Philipp Oppermann
d056a41154
Trigger rebuild of hugo branch instead of deploying ourselves
2016-05-02 15:32:10 +02:00
Philipp Oppermann
2cecc5abeb
Copy all files (inclusive the hidden .nojekyll)
2016-05-01 15:20:17 +02:00
Philipp Oppermann
e95710c66e
Merge pull request #150 from phil-opp/travis_hugo
...
Build hugo blog using travis
2016-05-01 15:12:58 +02:00
Philipp Oppermann
1e69a0c627
Build hugo blog using travis
2016-05-01 15:07:07 +02:00
Philipp Oppermann
40170d0039
Add contact page
2016-04-30 13:27:30 +02:00
Philipp Oppermann
192780e219
Merge pull request #148 from phil-opp/convert-posts-for-hugo
...
Convert posts for hugo
2016-04-30 13:22:49 +02:00
Philipp Oppermann
568e95605b
Add more redirects for old url formats
2016-04-25 23:25:59 +02:00
Philipp Oppermann
0fc63576e7
fix link
2016-04-25 22:44:33 +02:00
Philipp Oppermann
fe9b742978
Improve presentation of code snippets
2016-04-25 22:44:33 +02:00
Philipp Oppermann
aeb3100ee4
Don't link to src subdir
2016-04-25 22:44:33 +02:00
Philipp Oppermann
ed1b23a386
Improve wording and mention possibility of disabling SSE
2016-04-25 22:44:33 +02:00
Philipp Oppermann
bbb77e2f9b
Link to a specific github revision (so that the line number won't change anymore)
2016-04-25 22:44:33 +02:00
Philipp Oppermann
7b2d40d3f0
Improve indentation, line length, and syntax highlighting
2016-04-25 22:44:33 +02:00
Philipp Oppermann
7b2bdf5c3c
Convert links to hugo format and insert more breaks
2016-04-25 22:44:33 +02:00
Philipp Oppermann
cdc0b0748b
Convert front matters to hugo's toml-based format
2016-04-25 22:44:33 +02:00
Philipp Oppermann
814fc5c3c0
Reorganize posts and pages inside a blog directory
2016-04-25 21:44:08 +02:00
Philipp Oppermann
8651fafb2c
Prepare hugo migration: Disable automatic blog update
2016-04-25 19:29:01 +02:00
Philipp Oppermann
0d539a6dae
Remove wrong claims about the linux allocator ( #147 )
2016-04-25 16:51:51 +02:00
Philipp Oppermann
9e74969732
Merge pull request #143 from phil-opp/kernel-heap-final
...
Add new post about creating a kernel heap
2016-04-12 09:44:00 +02:00
Philipp Oppermann
a365d19c46
Fix whitespace in rustc error message
2016-04-12 09:41:23 +02:00
Philipp Oppermann
43e73ff050
Add kernel heap post to readme
2016-04-12 00:47:05 +02:00
Philipp Oppermann
6839321233
Formatting: Run rustfmt
2016-04-12 00:47:05 +02:00
Philipp Oppermann
f2f2568e26
Formatting: Use same format as cargo-edit
2016-04-12 00:47:05 +02:00
Philipp Oppermann
2b85f38b41
Use new hole_list_allocator instead of bump_allocator
2016-04-12 00:47:05 +02:00
Philipp Oppermann
6a45b29560
Create hole_list_allocator crate
2016-04-12 00:47:05 +02:00
Philipp Oppermann
eac60162ad
Fix page fault by mapping the complete heap
2016-04-12 00:47:05 +02:00
Philipp Oppermann
fbc1c60164
Ensure that memory::init is only called once
2016-04-12 00:47:05 +02:00
Philipp Oppermann
cea73b3ab9
Move memory intialization to memory::init function
2016-04-12 00:47:05 +02:00
Philipp Oppermann
9e46fb21c7
Try to allocate something (causes a page fault)
2016-04-12 00:47:05 +02:00
Philipp Oppermann
f25cb599c2
Link bump_allocator and alloc and collections crates
2016-04-12 00:47:05 +02:00
Philipp Oppermann
c6981c2f24
Create bump_allocator crate
2016-04-12 00:47:05 +02:00
Philipp Oppermann
5f84061469
Add new post about creating a kernel heap
2016-04-12 00:47:04 +02:00
Philipp Oppermann
05f76f525c
Merge pull request #141 from phil-opp/patch1
...
Fix bug in frame iteration
2016-03-06 15:03:51 +01:00
Philipp Oppermann
1d8a36a14b
Rewrite remap_the_kernel post to use range_inclusive instead of step_by
2016-03-06 15:01:48 +01:00
Philipp Oppermann
03ed3ce9a0
Replace buggy range.step_by with a Frame::range_inclusive function
2016-03-06 13:42:31 +01:00
Philipp Oppermann
23df363136
Update to changes introduced in 4fcb4b3424
2016-02-24 17:35:47 +01:00
Philipp Oppermann
4fcb4b3424
Make some more types public since they are part of the public interface
2016-02-24 17:34:36 +01:00
Philipp Oppermann
c145f9f1d1
Use function in post as well
2016-02-24 17:18:59 +01:00
Philipp Oppermann
941b1fab1c
Use new section.is_allocated function
2016-02-24 17:14:39 +01:00
Philipp Oppermann
3b7638bb1d
Merge pull request #131 from phil-opp/remap-the-kernel-update
...
Identity map the multiboot structure to fix the frame allocator
2016-02-24 17:02:47 +01:00
Philipp Oppermann
6734417e0f
Add update note
2016-02-24 17:00:09 +01:00
Philipp Oppermann
0aa9b27f9b
Add `Fixing the FrameAllocator section
...
Document changes from e3021d17d542e10328985ae5d0e0e373897835b3
2016-02-24 16:53:47 +01:00
Philipp Oppermann
5ee21d43f7
Use new linker script in post as well
...
New linker script from 86a59723bc0ead07497b0ea84d9543761a9f4430
2016-02-24 16:53:47 +01:00
Philipp Oppermann
635f7d3f9d
Align section size instead of section start due to #126
...
This fixes the problem that GRUB sometimes puts the multiboot info struct between kernel sections if the hole is big enough. This leads to problems since we would try to map the same page twice in that case.
2016-02-24 16:52:19 +01:00
Philipp Oppermann
4142cff3e6
Identity map the multiboot info structure
2016-02-24 16:52:19 +01:00
Philipp Oppermann
75aa669cdb
Merge pull request #135 from phil-opp/phil-opp-patch-1
...
Add `#[allow(dead_code)]` to Color enum
2016-02-22 07:30:54 +01:00
Philipp Oppermann
8b2ec752b7
Add #[allow(dead_code)] to Color enum
2016-02-22 07:28:58 +01:00
Philipp Oppermann
aea5054cf3
Change email of travis update bot
2016-02-18 17:56:16 +01:00
Philipp Oppermann
ac9044bd96
Some improvements to remap-the-kernel and allocating-frames
2016-02-13 22:44:09 +01:00
Philipp Oppermann
d321982755
Merge pull request #130 from phil-opp/phil-opp-patch-1
...
Improve introduction for frame allocation and explain what a frame is
2016-02-05 10:52:41 +01:00
Philipp Oppermann
2795b33fd6
Improve introduction for frame allocation and explain what a frame is
2016-02-04 20:05:25 +01:00
Philipp Oppermann
75bd3c8785
Merge pull request #129 from phil-opp/phil-opp-patch-1
...
Improve Printing to Screen post
2016-02-04 17:10:32 +01:00
Philipp Oppermann
d421bac590
Remove mention of byte strings as they are not compatible to write_str
2016-02-04 16:41:58 +01:00
Philipp Oppermann
b092e79495
Better document changes required for unstable feature & extern crate
2016-02-04 16:40:18 +01:00
Philipp Oppermann
aaffb32bbd
Make clear in which file the code fragments go
2016-02-03 18:01:58 +01:00
Philipp Oppermann
937224a2c7
Merge pull request #127 from phil-opp/phil-opp-patch-1
...
Add/extend explanations in Entering Longmode
2016-02-02 23:13:14 +01:00
Philipp Oppermann
de2305038a
Improve comments in code as well
2016-02-02 23:11:19 +01:00
Philipp Oppermann
bb4d64dc99
Extend explanation for long mode test and improve code comments
2016-02-02 23:09:44 +01:00
Philipp Oppermann
d6efe62c80
Add some explanation for the long mode check
2016-02-01 23:57:09 +01:00
Philipp Oppermann
c2c863c7f3
Use cmp and je instead of xor and jz
2016-02-01 23:42:09 +01:00
Philipp Oppermann
b9c94baaaa
Explain the CPUID check
2016-02-01 23:40:45 +01:00
Philipp Oppermann
cbf4534eca
Explain cmp, jmp and jne instructions more detailed
2016-02-01 19:28:18 +01:00
Philipp Oppermann
7b16d80d98
Merge pull request #125 from phil-opp/phil-opp-patch-1
...
Link travis build and note that the code works for the newest nightly
2016-01-27 17:42:09 +01:00
Philipp Oppermann
1a886fed5d
Link travis build and note that the code should work for the newest nightly
2016-01-27 17:38:07 +01:00
Philipp Oppermann
df72565933
Merge pull request #123 from FreeFull/patch-1
...
Fix type name: `Entry` instead of `EntryFlags`
2016-01-20 14:40:37 +01:00
Filip Szczepański
cb8c438820
Fix type name: Entry instead of EntryFlags
...
Fix for #120
2016-01-20 13:34:15 +00:00
Philipp Oppermann
954ec78a44
Merge pull request #122 from phil-opp/update-x86-crate
...
Update x86 crate to version 0.6 and disable performance counter
2016-01-20 00:13:15 +01:00
Philipp Oppermann
865dd9cd72
Update x86 crate to version 0.6 and disable performance counter
2016-01-20 00:06:46 +01:00
Philipp Oppermann
23ee000f70
Split large command block
2016-01-19 23:24:07 +01:00
Philipp Oppermann
49b78f59e2
Merge pull request #121 from phil-opp/grub-troubleshooting
...
Add grub-mkrescue troubleshooting steps
2016-01-19 23:23:31 +01:00
Philipp Oppermann
4beecbe138
Add grub-mkrescue troubleshooting steps
2016-01-19 23:07:23 +01:00
Philipp Oppermann
86d27933ff
Merge pull request #120 from phil-opp/phil-opp-patch-1
...
Fix type name: `EntryFlags` instead of `TableEntryFlags`
2016-01-19 13:07:38 +01:00
Philipp Oppermann
1bd054d718
Fix type name: EntryFlags instead of TableEntryFlags
2016-01-19 13:04:27 +01:00
Philipp Oppermann
5bc31e7c46
Mention xorriso in Readme
...
See #104
2016-01-18 23:16:17 +01:00
Philipp Oppermann
a6632af0b6
Remove call to non-existent Writer::new
...
The creation of a `Writer` is the same as before, so we omit it.
Fixes #118
2016-01-17 13:24:16 +01:00
Philipp Oppermann
1284ea3657
Merge pull request #115 from mhlopko/patch-2
...
Add missing brackets
2016-01-14 14:55:33 +01:00
Marcel Hlopko
db9e6c5739
Add missing brackets
2016-01-14 14:52:02 +01:00
Philipp Oppermann
0c45cf1b97
Merge pull request #114 from mhlopko/patch-1
...
Add missing semicolon
2016-01-14 14:43:56 +01:00
Marcel Hlopko
59d9a08aea
Add missing semicolon
2016-01-14 14:33:33 +01:00
Philipp Oppermann
16eef8e945
Merge pull request #112 from phil-opp/official-bitflags
...
Use official bitflags crate
2016-01-14 09:36:35 +01:00
Philipp Oppermann
9ed358c54c
Use official bitflags
2016-01-14 09:21:15 +01:00
Philipp Oppermann
e320e4d1d9
Merge pull request #107 from jonfk/master
...
Added missing `unsafe` in printing-to-screen post
2016-01-09 13:15:41 +01:00
Jonathan Fok kan
cd9441fe13
Fixed small error in printing-to-screen post
2016-01-09 13:15:06 +01:00
Philipp Oppermann
555096c953
Merge pull request #106 from phil-opp/phil-opp-patch-1
...
Add building instructions and links to posts and source code in README
2016-01-09 13:05:15 +01:00
Philipp Oppermann
519bb2b385
Merge pull request #108 from jonfk/fixed/alloc-frames
...
Fixed typos in post Allocating Frames
2016-01-09 12:57:58 +01:00
Jonathan Fok kan
376ab13f1a
Fixed typos in post Allocating Frames
2016-01-09 01:30:06 -05:00
Philipp Oppermann
73673f759d
Add building instructions and links to posts and source code
2016-01-06 19:01:43 +01:00
Philipp Oppermann
43a86e7b86
Merge pull request #105 from heathtechnical/master
...
Fixed typo in 'CPUID check' heading
2016-01-05 00:13:17 +01:00
Dan Heath
3828ba8830
Fixed typo in 'CPUID check' heading
2016-01-04 22:38:49 +00:00
Philipp Oppermann
a338bf5d98
Merge pull request #103 from phil-opp/qemu-cdrom
...
Use `-cdrom` instead of `-drive` as it's shorter
2016-01-02 16:35:01 +01:00
Philipp Oppermann
be251361fa
Use -cdrom instead of -drive as it's shorter
...
Right now, it does not matter whether we boot from a drive or a cdrom. Therefore we use the shorter `-cdrom`.
2016-01-02 16:28:09 +01:00
Philipp Oppermann
d57657ac29
Merge pull request #102 from phil-opp/cpuid-comments
...
Improve comments for CPUID check
2016-01-02 16:10:01 +01:00
Philipp Oppermann
157b3b208d
Improve comments for CPUID check
2016-01-02 16:01:42 +01:00
Philipp Oppermann
980c94202f
Merge pull request #100 from phil-opp/remap-the-kernel
...
New post about remapping the kernel
2016-01-01 18:34:29 +01:00
Philipp Oppermann
cfe03f612d
Remove printing of memory areas and elf sections
2016-01-01 18:05:16 +01:00
Philipp Oppermann
ac6c1af84f
Remove test_paging function
2016-01-01 18:05:16 +01:00
Philipp Oppermann
1c2e6fca64
Remove unused imports
2016-01-01 18:05:16 +01:00
Philipp Oppermann
db928db0b5
Unmap the old P4 page to create a basic guard page for the kernel stack
2016-01-01 18:05:16 +01:00
Philipp Oppermann
e2b99ac8c1
Set the NXE and the WP bit
2016-01-01 18:05:16 +01:00
Philipp Oppermann
76d1c41e96
Use correct section flags (causes a page fault)
2016-01-01 18:05:16 +01:00
Philipp Oppermann
b64f980c34
Identity map the vga text buffer
2016-01-01 18:05:16 +01:00
Philipp Oppermann
051596d8f9
Try to switch tables, causes boot loop
2016-01-01 18:05:16 +01:00
Philipp Oppermann
33322ec49b
Test it
2016-01-01 18:05:16 +01:00
Philipp Oppermann
8e65034643
Align sections in linker script
2016-01-01 18:05:16 +01:00
Philipp Oppermann
dd51bde9f9
Add remap_the_kernel function
2016-01-01 18:05:16 +01:00
Philipp Oppermann
fe8c81a531
Backup and restore original recursive mapping in with
2016-01-01 18:05:16 +01:00
Philipp Oppermann
c16b3059cf
Add ActivePageTable::with draft
2016-01-01 18:05:16 +01:00
Philipp Oppermann
a100d5f63f
Split mapping functions of ActivePageTable into mapper subtype
2016-01-01 18:05:16 +01:00
Philipp Oppermann
716e3f7359
Zero and recursive map inactive table on creation
2016-01-01 18:05:16 +01:00
Philipp Oppermann
7ce86b3a80
Add temporary_page submodule
2016-01-01 18:05:16 +01:00
Philipp Oppermann
a7000e537c
Add InactivePageTableSkeleton
2016-01-01 18:05:16 +01:00
Philipp Oppermann
2198d09695
Add clone methods to Page(public) and Frame(private)
2016-01-01 18:05:16 +01:00
Philipp Oppermann
f378e6aed3
Set up GDB
2016-01-01 18:05:16 +01:00
Philipp Oppermann
295ae7ba89
Add new post about remapping the kernel
2016-01-01 18:05:16 +01:00
Philipp Oppermann
9bad9020f6
Make Page::containing address public in post
...
This brings it in line with the code
2015-12-31 00:00:41 +01:00
Philipp Oppermann
b11ed7bd46
Merge pull request #97 from phil-opp/gdb-update
...
Update the gdb overview
2015-12-30 02:21:39 +01:00
Philipp Oppermann
5c6630fa97
Add tui commands
2015-12-30 02:18:54 +01:00
Philipp Oppermann
b58bca6fe9
Link Beej's Quick guide
...
Recommended by Julia Evans on hackernews: https://news.ycombinator.com/item?id=10808362
2015-12-30 02:18:25 +01:00
Philipp Oppermann
350069fd44
Merge pull request #96 from phil-opp/dual-license
...
Dual license the code
2015-12-29 12:35:57 +01:00
Philipp Oppermann
a9e5b7fd28
Update license headers
2015-12-29 12:31:25 +01:00
Philipp Oppermann
543f202412
Dual license code under apache2/mit
2015-12-29 12:21:29 +01:00
Philipp Oppermann
6f3daa8a2a
Merge pull request #91 from phil-opp/patch1
...
Use new example code to cause SSE failure
2015-12-26 13:41:01 +01:00
Philipp Oppermann
36cf22895a
Use new example code to cause SSE failure
2015-12-26 13:38:27 +01:00
Philipp Oppermann
97d381198b
Merge pull request #90 from phil-opp/update-page-tables-post
...
Explain lifetime elision in `next_table` methods
2015-12-26 04:36:45 +01:00
Philipp Oppermann
049fc4d74d
Explain lifetime elision in next_table methods
...
Also, improve headings and the ActivePageTable section a bit.
2015-12-26 04:33:02 +01:00
Philipp Oppermann
65d2f7e013
Merge pull request #88 from phil-opp/patch1
...
Rename RecursivePageTable to ActivePageTable
2015-12-25 13:17:49 +01:00
Philipp Oppermann
b39bb643dd
Rename RecursivePageTable to ActivePageTable
2015-12-25 13:14:14 +01:00
Philipp Oppermann
d28548fa10
Link next post
2015-12-24 03:15:09 +01:00
Philipp Oppermann
d9eff3e50a
Merge pull request #86 from phil-opp/gdb-support
...
Add page about GDB support
2015-12-24 03:06:18 +01:00
Philipp Oppermann
6470e2f56d
Add page about GDB support
2015-12-24 03:02:58 +01:00
Philipp Oppermann
ad8e9da766
Merge pull request #85 from alicemaz/master
...
Add missing unsafe to Unique::new
2015-12-23 12:50:15 +01:00
Alice Maz
4aec3b3d78
Add unsafe to Unique::new
...
previously compile would fail with E0133
2015-12-23 01:35:53 -05:00
Philipp Oppermann
c19d176aa0
Merge pull request #81 from 'rafalmiel-master'
...
Fix HierachicalLevel typo
2015-12-20 15:58:54 +01:00
Rafal Mielniczuk
337799599a
Fix HierachicalLevel typo
2015-12-20 15:52:14 +01:00
Philipp Oppermann
74e84c7ea4
The core_str_ext feature is no longer needed
2015-12-20 15:47:51 +01:00
Philipp Oppermann
14166b3a35
Remove old features
2015-12-20 15:40:43 +01:00
Philipp Oppermann
dced423588
Improve tag update script
2015-12-20 15:32:26 +01:00
Philipp Oppermann
60eb7ed4a7
Merge pull request #79 from phil-opp/rustfmt
...
Run rustfmt
2015-12-20 15:09:39 +01:00
Philipp Oppermann
165e6ebff8
Run rustfmt
2015-12-20 15:05:08 +01:00
Philipp Oppermann
52f239e5b4
Add a link to the x86 crate
...
Also, fix some formatting.
2015-12-16 14:01:13 +01:00
Philipp Oppermann
f00366d09f
Merge pull request #75 from phil-opp/rename-paging-post
...
Change title to `Page Tables`
2015-12-16 12:35:58 +01:00
Philipp Oppermann
de50b37443
Change title to Page Tables
2015-12-16 12:26:53 +01:00
Philipp Oppermann
bb0bd73584
Merge pull request #72 from phil-opp/fix-1
...
Rename `test_*` functions to `check_*` again
2015-12-14 01:08:28 +01:00
Philipp Oppermann
6e60552e87
Rename test_* functions to check_*
2015-12-14 01:03:55 +01:00
Philipp Oppermann
3c6057dd76
Merge pull request #71 from phil-opp/rename-min_by
...
The `Iterator::min_by` was renamed to `min_by_key`
2015-12-14 00:14:13 +01:00
Philipp Oppermann
7e83931746
The Iterator::min_by was renamed to min_by_key
2015-12-14 00:08:54 +01:00
Philipp Oppermann
7675a08ebe
Merge pull request #70 from phil-opp/stable-no_std
...
The `no_std` attribute is stable now
2015-12-14 00:08:30 +01:00
Philipp Oppermann
22014eb38d
The no_std attribute is stable now
2015-12-14 00:03:55 +01:00
Philipp Oppermann
87b8fc6a29
Merge pull request #68 from phil-opp/update_tag
...
Rename tag to `modifying_page_tables`
2015-12-14 00:03:03 +01:00
Philipp Oppermann
ce5c4b970a
Rename tag to modifying_page_tables
2015-12-14 00:00:32 +01:00
Philipp Oppermann
807e8110be
Merge pull request #67 from phil-opp/grammar-set_up
...
Fix grammar: `set up` instead of `setup`
2015-12-13 19:36:00 +01:00
Philipp Oppermann
c0439cf194
Fix Grammar
...
`set up` not `setup`
2015-12-13 18:53:15 +01:00
Philipp Oppermann
26fc76fbda
Merge pull request #65 from phil-opp/move-setup-SSE
...
Move `setup_SSE` to boot.asm
2015-12-12 15:03:13 +01:00
Philipp Oppermann
953704f103
Move setup_SSE to boot.asm
2015-12-12 15:00:14 +01:00
Philipp Oppermann
e272cc9257
Merge pull request #62 from phil-opp/fix-1
...
Use a more expressive variable name
2015-12-10 16:59:18 +01:00
Philipp Oppermann
617c92d017
Use a more expressive variable name
2015-12-10 16:55:54 +01:00
Philipp Oppermann
5cc6f9ec4b
Merge pull request #61 from phil-opp/paging-module
...
New post about accessing and modifying page tables
2015-12-09 16:23:27 +01:00
Philipp Oppermann
3a82ca32cd
Publish Accessing and Modifying Page Tables post
2015-12-09 16:18:16 +01:00
Philipp Oppermann
9366db272c
Finish introduction and other TODOs
2015-12-09 16:14:25 +01:00
Philipp Oppermann
b3cb09ba8d
Add short conclusion
2015-12-09 15:46:15 +01:00
Philipp Oppermann
329a64c9a1
Some small improvements
2015-12-09 15:46:15 +01:00
Philipp Oppermann
75264e7cac
Fix unmap function by flushing the TLB
2015-12-09 15:46:15 +01:00
Philipp Oppermann
8bb09f47f8
Test unmap function
2015-12-09 15:46:15 +01:00
Philipp Oppermann
cf5ea7664e
Test map_to function
2015-12-09 15:46:15 +01:00
Philipp Oppermann
5b4e457439
Double stack size to avoid stack overflow
2015-12-09 15:46:14 +01:00
Philipp Oppermann
786e1d5cab
Test translate function
2015-12-09 15:46:14 +01:00
Philipp Oppermann
d8c6b6f5b7
Add and call test_paging function
2015-12-09 15:46:14 +01:00
Philipp Oppermann
4fd8891aff
Add (buggy) unmap function
2015-12-09 15:46:14 +01:00
Philipp Oppermann
d52c79b106
Add map and identity_map functions
2015-12-09 15:46:14 +01:00
Philipp Oppermann
86d8e99271
Make translate and map_to safe by making them RecursivePageTable methods
2015-12-09 15:46:14 +01:00
Philipp Oppermann
fb7d2d22b6
Add RecursivePageTable as an owner for the P4 table
2015-12-09 15:46:14 +01:00
Philipp Oppermann
46b93e0650
Add unsafe map_to function and make translate unsafe, too
...
These functions are unsafe because it's possible to get aliased &mut references.
2015-12-09 15:46:14 +01:00
Philipp Oppermann
e84344f59a
Add function to translate virtual to physical address
2015-12-09 15:46:14 +01:00
Philipp Oppermann
d267ac1c98
Define the next_table methods only for P4, P3, and P2 tables
2015-12-09 15:46:14 +01:00
Philipp Oppermann
e5a4114262
Add unsafe next_table methods
2015-12-09 15:46:14 +01:00
Philipp Oppermann
e071c24680
Recursive map the P4 table
2015-12-09 15:46:14 +01:00
Philipp Oppermann
96b0dc0c66
Model page tables
2015-12-09 15:46:14 +01:00
Philipp Oppermann
14384fb27f
Model page table entries
2015-12-09 15:46:14 +01:00
Philipp Oppermann
d827f51bb6
Create basic paging module
2015-12-09 15:46:14 +01:00
Philipp Oppermann
dabef43db9
Reset src to master to be able to follow step-by-stp
2015-12-09 15:46:14 +01:00
Philipp Oppermann
9019309d40
Many wording improvements
2015-12-09 15:46:14 +01:00
Philipp Oppermann
9f509aec80
Improve post and rewrite recursive mapping section
2015-12-09 15:46:14 +01:00
Philipp Oppermann
fd42d634ad
Change title and add some incomplete introduction variants
2015-12-09 15:44:17 +01:00
Philipp Oppermann
2b8838459c
Add image sources
2015-12-09 15:42:45 +01:00
Philipp Oppermann
bf6bcdcc82
Add paging introduction
2015-12-09 15:42:45 +01:00
Philipp Oppermann
fac58a003a
Describe unwrap function
2015-12-09 15:42:45 +01:00
Philipp Oppermann
57fbd2efc5
Specify some imports
2015-12-09 15:42:45 +01:00
Philipp Oppermann
bd00921dac
Use expect instead of unwrap
2015-12-09 15:42:45 +01:00
Philipp Oppermann
67b30314c4
Use relative links for images
2015-12-09 15:42:45 +01:00
Philipp Oppermann
e331a6610b
Describe p*_index functions
2015-12-09 15:42:45 +01:00
Philipp Oppermann
15427b363a
Take page by value in mapping functions
...
(there is no reason to borrow it at the moment)
2015-12-09 15:42:45 +01:00
Philipp Oppermann
b314d4827f
Move Frame::start_address to memory/mod.rs and use it in identity_map()
2015-12-09 15:42:44 +01:00
Philipp Oppermann
6ed376112d
PAGE_SIZE is already defined in memory/mod.rs
2015-12-09 15:42:44 +01:00
Philipp Oppermann
a279609c26
Add images, TODOs, RecursivePageTable::new, and many improvements
2015-12-09 15:42:44 +01:00
Philipp Oppermann
557738e705
Add a RecursivePageTable::new function
2015-12-09 15:42:44 +01:00
Philipp Oppermann
92194d8354
Remove unused feature and import
2015-12-09 15:42:44 +01:00
Philipp Oppermann
05873d9dae
Improve next_table_create
2015-12-09 15:42:44 +01:00
Philipp Oppermann
c5fac2647e
Merge lock.rs into mod.rs
2015-12-09 15:42:44 +01:00
Philipp Oppermann
5113fce8f7
Big update and many new sections...
2015-12-09 15:42:44 +01:00
Philipp Oppermann
f912dfa506
Improve huge_page closure
2015-12-09 15:42:44 +01:00
Philipp Oppermann
4aeda180a1
Remove old content and add skeletons for new sections
2015-12-09 15:42:36 +01:00
Philipp Oppermann
cdaad86a06
Change semantics of start_address and containing_address
...
The page numbers now respect the memory hole between higher and lower half.
2015-12-09 15:38:46 +01:00
Philipp Oppermann
c52f58cc4c
Rename and use is_unused()
2015-12-09 15:38:46 +01:00
Philipp Oppermann
bd05aa7715
Add section about type system magic
2015-12-09 15:38:46 +01:00
Philipp Oppermann
b1a2c8caad
Rename PhantomData field
2015-12-09 15:38:46 +01:00
Philipp Oppermann
7005cd7819
Start rewriting post for new design
2015-12-09 15:38:46 +01:00
Philipp Oppermann
e88de41914
Calculate next_table_address through directly through addresses
2015-12-09 15:38:46 +01:00
Philipp Oppermann
4a54a24145
Reorganize imports
2015-12-09 15:38:46 +01:00
Philipp Oppermann
799067f8b1
Add Frame::start_address
2015-12-09 15:38:46 +01:00
Philipp Oppermann
51f83717d6
Use Frame::containing_address
2015-12-09 15:38:46 +01:00
Philipp Oppermann
7e5da6c897
Modify pointed_frame to return an Option
2015-12-09 15:38:46 +01:00
Philipp Oppermann
2d9b619587
Begin updating post
2015-12-09 15:38:46 +01:00
Philipp Oppermann
6535aa017d
Add lock module (name is temporary)
2015-12-09 15:38:46 +01:00
Philipp Oppermann
6c5b932fbc
Split translate into translate_page and rest
2015-12-09 15:38:46 +01:00
Philipp Oppermann
44fd5f682d
Some new test printlns
2015-12-09 15:38:46 +01:00
Philipp Oppermann
a8df7b2e4d
Finish basics of new paging module
2015-12-09 15:38:46 +01:00
Philipp Oppermann
562221d725
Add some unstable features and some printing tests
2015-12-09 15:38:46 +01:00
Philipp Oppermann
b7debed3b7
Increase stack size to 4096*2
2015-12-09 15:38:46 +01:00
Philipp Oppermann
204a9d9c9d
Add some sections (now outdated)
2015-12-09 15:38:46 +01:00
Philipp Oppermann
c7fe1348f0
Old attempts for a new design
2015-12-09 15:38:46 +01:00
Philipp Oppermann
ace53fad91
Updates for the old paging code
2015-12-09 15:38:46 +01:00
Philipp Oppermann
ae49ab5072
Add alternative paging module with new design
2015-12-09 15:38:45 +01:00
Philipp Oppermann
540c398ec3
Alternative, more advanced design
2015-12-09 15:38:45 +01:00
Philipp Oppermann
907f51bb5b
Add section about modifying table entries
2015-12-09 15:38:45 +01:00
Philipp Oppermann
882af6f14e
Make p{1,2,3}_table functions unsafe
2015-12-09 15:38:45 +01:00
Philipp Oppermann
cf5e2715ae
Add section about translating virtual addresses
2015-12-09 15:38:45 +01:00
Philipp Oppermann
08a9743caa
Describle implementation of recursive mapping
2015-12-09 15:38:45 +01:00
Philipp Oppermann
90dba32898
Add “Mapping Page Tables” section and extract page table entry flags
2015-12-09 15:38:45 +01:00
Philipp Oppermann
6462a3263c
Add basic module and corresponding documentation
2015-12-09 15:38:33 +01:00
Philipp Oppermann
6b72dd8223
Remove Lock structure again as we changed design
2015-12-08 22:20:19 +01:00
Philipp Oppermann
f917bd67a1
Begin paging module
2015-12-08 22:20:19 +01:00
Philipp Oppermann
0e574426c5
Add recursive mapping and start describing it
2015-12-08 22:20:19 +01:00
Philipp Oppermann
38849516a1
Add preliminary outline for next post
2015-12-08 22:20:19 +01:00
Philipp Oppermann
f1f1e66dce
Improve wording (frame instead of page)
2015-12-03 18:41:51 +01:00
Philipp Oppermann
0cfb38ee6e
Merge pull request #59 from phil-opp/mac-os-note
...
Add a note about Mac OS and virtual machines
2015-11-28 18:06:41 +01:00
Philipp Oppermann
2d069d636f
Add a note about Mac OS and virtual machines
2015-11-28 18:04:37 +01:00
Philipp Oppermann
0a6a174e54
Fix broken markdown link
2015-11-24 00:18:32 +01:00
Philipp Oppermann
9b6bb7f895
Merge pull request #56 from phil-opp/qemu-warning
...
Specify `raw` ISO format explicitely to avoid QEMU warning
2015-11-24 00:10:04 +01:00
Philipp Oppermann
e52d8bcfd2
Specify raw ISO format explicitely to avoid QEMU warning
2015-11-24 00:08:34 +01:00
Philipp Oppermann
43924afbbf
Make internal links relative
2015-11-23 23:42:35 +01:00
Philipp Oppermann
5137ad103a
Merge pull request #54 from phil-opp/phil-opp-patch-1-1
...
Recommend `multirust override nighly`
2015-11-22 23:07:02 +01:00
Philipp Oppermann
84813d9b08
Recommend multirust override nighly
...
Resolves #53
2015-11-22 23:04:32 +01:00
Philipp Oppermann
cefe95dc88
Merge pull request #52 from phil-opp/remove_copy_for_frame
...
Don't derive Copy/Clone for Frame so we can be sure that it's free
2015-11-19 19:57:29 +01:00
Philipp Oppermann
a8600a00b6
Don't derive Copy/Clone for Frame so we can be sure that it's free
...
If a Frame would be clonable or even Copy, the frame could be freed (e.g. passed to deallocate_frame) and used thereafter. Or it could be freed multiple times.
2015-11-19 19:56:22 +01:00
Philipp Oppermann
c71981947b
Update URL
2015-11-19 16:07:01 +01:00
Philipp Oppermann
4e0071cf3d
Merge pull request #50 from phil-opp/fix-2
...
Don't set `write protect` bit when enabling paging
2015-11-19 15:29:26 +01:00
Philipp Oppermann
88eb0636f3
Don't set write protect bit as we don't need it now
2015-11-19 15:26:58 +01:00
Philipp Oppermann
f4c61f7634
Merge pull request #49 from phil-opp/fix-1
...
VGA buffer: `bit` instead of `byte`
2015-11-19 15:24:35 +01:00
Philipp Oppermann
0e31d4a221
Fix #48
2015-11-19 15:23:25 +01:00
Philipp Oppermann
25122bc05c
Correct the reason for using clone
2015-11-16 15:01:39 +01:00
Philipp Oppermann
fc856a55a6
Merge pull request #44 from alevy/patch-1
...
Small grammar nit in "Entering Longmode" post
2015-11-15 20:18:45 +01:00
Amit Levy
fc55d6dc06
Small grammar nit in "Entering Longmode" post
...
'a' vs 'an'
2015-11-15 14:17:27 -05:00
Philipp Oppermann
eb93c94d6d
Merge pull request #43 from alevy/patch-1
...
Fix typo in "Entering long mode"
2015-11-15 20:13:52 +01:00
Amit Levy
a1d744cf5a
Fix typo in "Entering long mode"
...
I think there is a typo in the section describing how the P2 mapping is set up. The corresponding code sets _P2_'s third entry.
2015-11-15 13:55:58 -05:00
Philipp Oppermann
f08b2cb340
Merge pull request #42 from phil-opp/allocating-frames-motivation
...
Discuss alternative frame stack designs
2015-11-15 17:17:08 +01:00
Philipp Oppermann
ced6edbdd1
Discuss alternative frame stack designs
2015-11-15 17:13:20 +01:00
Philipp Oppermann
e380129fde
Merge pull request #40 from phil-opp/allocating-frames
...
New post about allocating frames
2015-11-15 12:03:11 +01:00
Philipp Oppermann
f997f1f0f0
Small wording improvement
2015-11-15 12:00:03 +01:00
Philipp Oppermann
96cee9ab2b
Link github repository
2015-11-15 12:00:03 +01:00
Philipp Oppermann
5de4255fca
Add a conclusion to the allocating frames post
2015-11-15 12:00:03 +01:00
Philipp Oppermann
78c2fd6acc
Many small improvements
2015-11-15 12:00:03 +01:00
Philipp Oppermann
28c56f2c06
Publish Allocating Frames post
2015-11-15 12:00:03 +01:00
Philipp Oppermann
18d397b48d
Some improvements to the allocating frames post
2015-11-15 12:00:03 +01:00
Philipp Oppermann
a8580ad3a2
Fix: next_free_frame must be increased to the start of the current area
2015-11-15 12:00:03 +01:00
Philipp Oppermann
6ce34f5e2b
Add introduction
2015-11-15 12:00:03 +01:00
Philipp Oppermann
d0cf5e7c61
Link from Printing to Screen
2015-11-15 12:00:03 +01:00
Philipp Oppermann
ca07527ede
Add What's next? text
2015-11-15 12:00:03 +01:00
Philipp Oppermann
cf835e19ae
Recommend Eric Kidd's Bare Metal Rust series
2015-11-15 12:00:03 +01:00
Philipp Oppermann
939d33efce
Many improvements to allocating frames post
2015-11-15 12:00:03 +01:00
Philipp Oppermann
16078431db
Add basic description for frame allocator methods
2015-11-15 12:00:03 +01:00
Philipp Oppermann
8304439c82
Add a FrameAllocator trait
2015-11-15 12:00:03 +01:00
Philipp Oppermann
75988f1324
Test: allocate all frames
2015-11-15 12:00:03 +01:00
Philipp Oppermann
a2047bc70a
Add an AreaFrameAllocator
2015-11-15 12:00:03 +01:00
Philipp Oppermann
6f8a21eba6
Create a memory module with a Frame struct
2015-11-15 12:00:03 +01:00
Philipp Oppermann
ccaa2ed645
Add section about start and end of kernel/multiboot
2015-11-15 12:00:03 +01:00
Philipp Oppermann
718db100cd
Add let bindings for tags
2015-11-15 12:00:03 +01:00
Philipp Oppermann
f2b91d3d61
Improve panic handler
2015-11-15 12:00:03 +01:00
Philipp Oppermann
fc389c9e9e
Increase stack size to 4096
2015-11-15 12:00:03 +01:00
Philipp Oppermann
2d1c801c72
Rename post to Allocating Frames
2015-11-15 12:00:03 +01:00
Philipp Oppermann
895d40cd13
Add section about kernel elf sections
2015-11-15 12:00:03 +01:00
Philipp Oppermann
33fdbce530
Print available memory areas using multiboot info
2015-11-15 12:00:03 +01:00
Philipp Oppermann
73aa41e25e
Pass multiboot pointer as argument to rust_main
2015-11-15 12:00:03 +01:00
Philipp Oppermann
d07530d660
Rename new post to Remapping the Kernel
2015-11-15 12:00:03 +01:00
Philipp Oppermann
a54b2d8f47
Remove detailed description of multiboot structures
...
Instead, we will use the external crate `multiboot2-elf64` at https://github.com/phil-opp/multiboot2-elf64 . The removed parts were added to its README for documentation
2015-11-15 12:00:03 +01:00
Philipp Oppermann
c064de5190
Add description of info struct and elf tag
2015-11-15 12:00:03 +01:00
Philipp Oppermann
1f074264c0
Rename and restructure multiboot info post
2015-11-15 12:00:03 +01:00
Philipp Oppermann
4d59d7350c
Add skeleton for next post
2015-11-15 12:00:03 +01:00
Philipp Oppermann
b8d1dfd84d
Merge pull request #41 from phil-opp/mention-no-redzone
...
Mention `-C no-redzone` in the `Setup Rust` post
2015-11-15 10:59:45 +01:00
Philipp Oppermann
65b4b4f027
Mention -C no-redzone in the Setup Rust post
2015-11-15 10:58:01 +01:00
Philipp Oppermann
340e1ff670
Merge pull request #39 from phil-opp/tools
...
Add script to cherry-pick commits to tags
2015-11-13 18:15:08 +01:00
Philipp Oppermann
d082f802f4
Move scripts to scripts folder
2015-11-13 18:13:01 +01:00
Philipp Oppermann
2a83b3440e
Split script to allow switching branches & simplify code
2015-11-13 18:13:01 +01:00
Philipp Oppermann
79bd6873fb
Added script to cherry-pick a commit to multiple tags
2015-11-13 18:13:01 +01:00
Philipp Oppermann
86d1ff145d
Merge pull request #38 from phil-opp/replace_wildcard_dependecies
...
Replace wildcards in dependencies with a lower bound
2015-11-13 18:06:42 +01:00
Philipp Oppermann
6d05d4513c
Replace wildcards in dependencies with a lower bound
2015-11-13 18:05:03 +01:00
Philipp Oppermann
b9a35036e3
Fix redirects
2015-11-07 01:12:33 +01:00
Philipp Oppermann
e8b6947555
Travis bugfix
2015-11-07 00:38:47 +01:00
Philipp Oppermann
6646326fb0
One more cosmetical thing
2015-11-07 00:34:16 +01:00
Philipp Oppermann
8dfc8531e4
Some cosmetical improvements for the blog update commits
2015-11-07 00:28:47 +01:00
Philipp Oppermann
91f7c70194
Last final travis fix: there is no _pages folder
2015-11-07 00:22:32 +01:00
Philipp Oppermann
2691f2b5d7
Final travis fix: add -r flag to copy
2015-11-07 00:19:09 +01:00
Philipp Oppermann
5978234f15
Fix: travis needs to clone it again because it needs gh-pages
2015-11-07 00:10:53 +01:00
Philipp Oppermann
753c8d4aea
Fix ssh key name
2015-11-07 00:02:22 +01:00
Philipp Oppermann
5a49d761d9
Remove wrong include
2015-11-06 23:59:09 +01:00
Philipp Oppermann
1b2ff0f66e
Merge pull request #28 from phil-opp/travis_blog_update
...
Use travis to update blog on master push
2015-11-06 23:56:10 +01:00
Philipp Oppermann
7e5dad2277
Update blog on push to master through travis
2015-11-06 23:55:00 +01:00
Philipp Oppermann
6e93a7d528
Add redirects again
2015-11-06 22:57:06 +01:00
Philipp Oppermann
e759a6826c
Merge pull request #26 from phil-opp/merge_posts_pr
...
Move blog posts/pages into code repository
2015-11-06 22:50:07 +01:00
Philipp Oppermann
885168bea4
Move blog posts/pages into code repository
...
For history see the `rust_os_posts` tag in the phil-opp/phil-opp.github.io repository.
2015-11-06 22:47:39 +01:00
Philipp Oppermann
fa78bd82a8
Add missing license header
2015-11-03 19:53:28 +01:00
Homu
9986ee22d4
Auto merge of #23 - phil-opp:phil-opp-patch-1, r=phil-opp
...
Add travis badge to README
2015-11-02 06:39:20 +09:00
Philipp Oppermann
2b075af068
Add travis badge
2015-11-01 19:53:25 +01:00
Homu
77373d59b2
Auto merge of #22 - phil-opp:phil-opp-patch-1, r=phil-opp
...
Link the blog in README
2015-11-02 03:35:33 +09:00
Philipp Oppermann
fa96486353
Add link to blog
2015-11-01 18:59:45 +01:00
Philipp Oppermann
e582b37f19
Merge pull request #21 from phil-opp/imul_mul
...
Use unsigned `mul` instead of signed `imul`
2015-10-31 13:50:46 +01:00
Philipp Oppermann
8789fa8531
Use unsigned mul instead of signed imul
2015-10-31 13:48:58 +01:00
Philipp Oppermann
1e7236caf5
Merge pull request #18 from phil-opp/2mib_pages
...
Use 2MiB pages instead of one 1GiB page
2015-10-29 18:20:58 +01:00
Philipp Oppermann
2a35ec19b6
Use 2MiB pages instead of one 1GiB page
2015-10-29 17:47:21 +01:00
Philipp Oppermann
dfabc0ff32
Merge pull request #15 from phil-opp/printing_to_screen_improvements
...
Add the clear_screen function from the blog post
2015-10-27 20:50:08 +01:00
Philipp Oppermann
e439e9eb5d
Use a byte char instead of casting
2015-10-27 20:48:14 +01:00
Philipp Oppermann
c36a3d19d2
Add and use a clear_screen function
2015-10-27 20:47:58 +01:00
Philipp Oppermann
54b47aaac1
Merge pull request #14 from phil-opp/multiboot_header_section_name
...
Rename `multiboot` section to `multiboot_header`
2015-10-27 18:47:03 +01:00
Philipp Oppermann
7b0428b07a
Rename multiboot section to multiboot_header
2015-10-27 18:42:28 +01:00
Philipp Oppermann
8640091bc6
Merge pull request #12 from phil-opp/a_minimal_kernel_fixes
...
Makefile fixes
2015-10-26 23:02:34 +01:00
Philipp Oppermann
5e5374cd7d
Update grub.cfg to use renamed kernel file
...
Renaming occurred in 37b576e to be in line with the blog posts.
2015-10-26 16:54:45 +01:00
Jacob Krall
37b576eb3c
Explicitly rename copied kernel to kernel.bin
...
Otherwise your `grub.cfg` from earlier in the article will be out of date (we're producing `kernel-x86_64.bin`, but grub expects `kernel.bin`).
2015-10-26 15:45:46 +01:00
Jacob Krall
9ecaf0fe0c
make iso depends on grub.cfg
...
This way, if you fix a typo in grub.cfg, you don't have to `make clean` to get `make iso` to pick it up.
2015-10-26 15:45:19 +01:00
Philipp Oppermann
1e90a1e78d
Merge pull request #8 from phil-opp/printing_to_screen_repr_c
...
Add #[repr(C)] to ScreenChar
2015-10-25 15:53:45 +01:00
Philipp Oppermann
34dd42a6fc
Add #[repr(C)] to ScreenChar
2015-10-25 15:38:08 +01:00
Philipp Oppermann
68c0ab0d59
Merge pull request #7 from phil-opp/fix_long_mode_test
...
Fix long mode test
2015-10-25 01:51:43 +02:00
Philipp Oppermann
f670e330f5
Fix long mode test ( fixes #6 )
2015-10-25 01:49:42 +02:00
Philipp Oppermann
a39a611629
Wording: replace check with test
2015-10-25 01:48:57 +02:00
Philipp Oppermann
9cd9ec25db
Merge pull request #5 from phil-opp/rust-target
...
Specify rust target
2015-10-24 16:25:50 +02:00
Philipp Oppermann
3d94304bbb
Specify rust target
2015-10-24 16:20:46 +02:00
Philipp Oppermann
95028c0f5d
Merge pull request #3 from phil-opp/vga_buffer
...
Add a VGA buffer module
2015-10-23 12:47:44 +02:00
Philipp Oppermann
5b1f2361f2
Use println! to print the `Hello World!
2015-10-23 01:45:10 +02:00
Philipp Oppermann
4d29482952
Add custom print and println macros
2015-10-23 01:45:10 +02:00
Philipp Oppermann
e4a8c4c9fa
Silence dead code warnings for unused colors
2015-10-23 01:45:10 +02:00
Philipp Oppermann
c547b128e5
Implement fmt::Write trait for Writer
2015-10-23 01:45:10 +02:00
Philipp Oppermann
4668acb09e
Add a public static writer
...
Since `unsafe const` aren't allowed yet, we temorary add a custom version of Unique to make `Unique::new` const (instead of unsafe).
2015-10-23 01:45:10 +02:00
Philipp Oppermann
ab464b107d
Add a basic writer type to print single bytes
...
It prints always to the last line and shifts lines up on newline or line wrap. To easily shift lines up, we make the ColorCode and ScreenChar types Copy.
2015-10-23 01:45:10 +02:00
Philipp Oppermann
49fd8926a5
Add a VGA buffer module skeleton
...
It contains basic types for colors, screen characters, and the buffer itself.
2015-10-23 01:45:10 +02:00
Philipp Oppermann
3e7fd1b433
Merge pull request #4 from phil-opp/better_hello_world
...
Improve `Hello World!` code
2015-10-03 17:40:14 +02:00
Philipp Oppermann
5bcd6d2c2d
Improve Hello World! code
...
Avoid special core features and complicated iterator chaining to make the code simpler overall.
2015-10-03 17:38:41 +02:00