Philipp Oppermann
f4eb589f19
We don't need _Unwind_Resume anymore
2016-05-29 18:00:58 +02:00
Philipp Oppermann
480265872d
Make methods of EntryOptions public
2016-05-29 17:24:21 +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
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
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
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
1703827da2
Update to bitflags 0.7.0
2016-05-15 12:27:43 +02:00
Philipp Oppermann
6839321233
Formatting: Run rustfmt
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
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
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
4fcb4b3424
Make some more types public since they are part of the public interface
2016-02-24 17:34:36 +01:00
Philipp Oppermann
941b1fab1c
Use new section.is_allocated function
2016-02-24 17:14:39 +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
de2305038a
Improve comments in code as well
2016-02-02 23:11:19 +01:00
Philipp Oppermann
c2c863c7f3
Use cmp and je instead of xor and jz
2016-02-01 23:42:09 +01:00
Philipp Oppermann
157b3b208d
Improve comments for CPUID check
2016-01-02 16:01:42 +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