Commit Graph

106 Commits

Author SHA1 Message Date
Rob Gries
5e937e6e20 Panic on alloc::oom instead of calling intrinsics::abort (#375) 2017-12-15 09:20:50 +01:00
Isaac Woods
cf2c5550aa Fix sign extension bug in next_table_address (#372)
Fixes #362

Fix an issue where the left shift of the old table address would overwrite the sign extension, making the address non-canonical and leading to #GPs. This calculates the correct sign extension for the new table address.
2017-12-05 20:22:29 +01:00
Philipp Oppermann
e89e4f5277 Rewrite bump allocator and integrate it in main crate 2017-11-19 15:29:36 +01:00
johanmon
30fcae9dce A rewrite of the bump allocator to conform to the new API (#361) 2017-10-24 08:31:08 +02:00
Will
0175e83387 Update to use the new API for custom allocators (#348)
* Update to new allocator API

* Change linked_list_allocator dependency to link directly to git repository

* Add Cargo.lock to gitignore
2017-08-20 19:36:30 +07:00
Tim Crawford
2ebd4ed954 Use new Unique API (#346)
Change Unique to use `new_unchecked`. Fixes #345.
2017-08-05 12:47:15 +08:00
Tim Crawford
e54cfa4378 Update bitflags to 0.9.1 (#347)
Signed-off-by: Tim Crawford <crawfxrd@gmail.com>
2017-08-05 12:33:56 +08:00
Philipp Oppermann
559a90ad8b Format using rustfmt-nightly 2017-06-20 18:09:09 +02:00
Philipp Oppermann
f3829346bc Unique::get/get_mut were renamed to as_ref/as_mut (#325) 2017-05-12 21:32:38 +02:00
Philipp Oppermann
02eaeb7af1 Switch to x86_64 crate and use its idt module 2017-03-15 16:58:15 +01:00
Philipp Oppermann
68dc7447f4 Run rustfmt 2017-03-09 17:50:44 +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
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
c3bfcbcd8d Silence dead code warning 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
ef786e1fe8 Update post and code 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
02697891e2 Update x86 crate to version 0.8.0 (#266) 2016-12-21 14:59:57 +01:00
Philipp Oppermann
a04924955a Add missing license headers and update copyright year (#232) 2016-10-02 18:20:48 +02:00
Philipp Oppermann
c9d8afe434 Run rustfmt 2016-06-25 17:08:26 +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
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
4142cff3e6 Identity map the multiboot info structure 2016-02-24 16:52:19 +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
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
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
a9e5b7fd28 Update license headers 2015-12-29 12:31:25 +01:00
Philipp Oppermann
b39bb643dd Rename RecursivePageTable to ActivePageTable 2015-12-25 13:14:14 +01:00
Rafal Mielniczuk
337799599a Fix HierachicalLevel typo 2015-12-20 15:52:14 +01:00