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
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
00701ca474
Add code for “Returning from Exceptions”
2016-09-21 14:34:32 +02:00
Philipp Oppermann
3bd5e56e3f
Use upstream lazy_static and update once crate
2016-08-04 20:09:25 +02:00
Philipp Oppermann
46d41d9c3d
Add missing rsi clobber in code as well
2016-08-04 01:07:51 +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
e9d2d594ab
Add handler! macros
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
2e0f4f9161
Begin code for upcoming post
2016-08-03 17:00:11 +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
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
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
1083ac9bac
Remove unneeded gcc_except_table section
2016-06-12 16:32:34 +02:00
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