Antoine
babf9d8cce
Introduce an InterruptIndex enum ( #557 )
...
The following modifications aim to group the hardware interrupts' indexes in an easily accessible structure, while being more friendly to eventual evolutions.
* the hardware interrupts' indexes `TIMER_INTERRUPT_ID` and `KEYBOARD_INTERRUPT_ID` have been replaced by the attributes `Timer` and `Keyboard` contained in `enum InterruptIndex`.
* only the first attribute `Timer` is explicitly declared, the following as inferred by the compiler.
* the functions `as_u8` and `as_usize` avoid the need of casts to `u8` or `usize`.
2019-02-12 19:28:24 +01:00
Philipp Oppermann
0a10b3e784
Merge branch 'post-09' into post-10
2019-02-05 10:45:12 +01:00
Philipp Oppermann
9617680e45
Merge branch 'post-08' into post-09
2019-02-05 10:45:12 +01:00
Philipp Oppermann
3bb30fd1e8
Merge branch 'post-06' into post-07
2019-02-05 10:45:12 +01:00
Philipp Oppermann
62e2cee989
Merge branch 'post-05' into post-06
2019-02-05 10:45:12 +01:00
Philipp Oppermann
8f18fb4282
Merge branch 'post-07' into post-08
2019-02-05 10:45:12 +01:00
Philipp Oppermann
69ab78108b
Merge branch 'post-04' into post-05
2019-02-05 10:45:12 +01:00
Philipp Oppermann
2db616bd7d
Merge branch 'post-03' into post-04
2019-02-05 10:45:11 +01:00
Philipp Oppermann
af0b258279
Make vga_buffer::{ScreenChar, Buffer} repr(transparent)
2019-02-05 10:44:52 +01:00
Philipp Oppermann
e5dfbd4b23
Merge branch 'post-09' into post-10
2019-01-28 11:51:35 +01:00
Philipp Oppermann
4e6ce8d16e
Merge branch 'post-08' into post-09
2019-01-28 11:51:23 +01:00
Philipp Oppermann
519f47286c
Merge branch 'post-07' into post-08
2019-01-28 11:51:03 +01:00
Philipp Oppermann
f76ec1ae32
Only set double fault handler once
2019-01-28 11:50:59 +01:00
Philipp Oppermann
a56e22b6fc
Use BootInfoFrameAllocator instead of EmptyFrameAllocator
2019-01-28 11:30:27 +01:00
Philipp Oppermann
67f536d7c6
Add a BootInfoFrameAllocator
2019-01-28 11:28:51 +01:00
Philipp Oppermann
741224411b
Use the BootInfo struct passed by the bootloader
2019-01-28 11:24:16 +01:00
Philipp Oppermann
818417d119
Try to create example mapping for page 0xdeadbeaf000
2019-01-28 11:23:46 +01:00
Philipp Oppermann
f272785861
Create example mapping for page 0x1000
2019-01-28 11:19:46 +01:00
Philipp Oppermann
5d807ee622
Run rustfmt
2019-01-28 11:19:34 +01:00
Philipp Oppermann
f2bc2d33f0
Rewrite translation function on top of RecursivePageTable
2019-01-27 14:38:49 +01:00
Philipp Oppermann
38a121a887
Test translate_addr by translating some virtual addresses
2019-01-27 14:38:49 +01:00
Philipp Oppermann
8b380f0692
Create a new memory module with a translate_addr function
2019-01-27 14:38:49 +01:00
Philipp Oppermann
b184f7d996
Move the testing code to the end of _start
2019-01-26 12:57:32 +01:00
Philipp Oppermann
7c07a67bf5
Merge branch 'z_post_08' into z_post_09
2019-01-25 14:47:46 +01:00
Philipp Oppermann
ec2da4bebd
Merge branch 'z_post_07' into z_post_08
2019-01-25 14:47:32 +01:00
Philipp Oppermann
90ad333e90
Merge branch 'z_post_06' into z_post_07
2019-01-25 14:46:29 +01:00
Philipp Oppermann
cc3a868863
Merge branch 'z_post_05' into z_post_06
2019-01-25 14:46:17 +01:00
Philipp Oppermann
d1545e7fbf
Merge branch 'z_post_04' into z_post_05
2019-01-25 14:46:04 +01:00
Philipp Oppermann
be46130322
Merge branch 'z_post_03' into z_post_04
2019-01-25 14:45:46 +01:00
Philipp Oppermann
afe8dc3dcf
Add stack overflow integration test
2019-01-25 14:45:02 +01:00
Philipp Oppermann
8bb0187f35
Run rustfmt
2019-01-25 14:44:42 +01:00
Philipp Oppermann
b5c05193e1
Document vga buffer methods
2019-01-25 14:39:47 +01:00
Philipp Oppermann
e0ed423e52
Explain the LLVM bug on Windows in more detail
2019-01-25 14:37:46 +01:00
Philipp Oppermann
abaf5bd862
Use PageTable struct of x86_64 crate for accessing entries
2019-01-25 14:29:50 +01:00
Philipp Oppermann
b7005b766f
Print first 10 entries of level 4 page table
2019-01-25 14:29:04 +01:00
Philipp Oppermann
91ca04e8c2
Retrieve address of level 4 page table
2019-01-25 14:28:23 +01:00
Philipp Oppermann
ada45c6e52
Provoke page fault
2019-01-25 14:27:31 +01:00
Philipp Oppermann
207a466707
Add a page fault handler
2019-01-25 14:26:35 +01:00
Philipp Oppermann
a954c02fbe
Use pc-keyboard crate to translate all scancodes
2019-01-25 14:23:23 +01:00
Philipp Oppermann
895991fee3
Translate keycodes for keys 0-9
2019-01-25 14:22:25 +01:00
Philipp Oppermann
25796110f3
Read and print scancodes in keyboard interrupt handler
2019-01-25 14:21:49 +01:00
Philipp Oppermann
1d153d694e
Add a keyboard interrupt handler
2019-01-25 14:21:12 +01:00
Philipp Oppermann
c2e4e8c96f
Add and use hlt_loop function
2019-01-25 14:21:12 +01:00
Philipp Oppermann
599a643d97
Remove deadlock provoking code again
...
This reverts commit 1a39774ead .
2019-01-25 14:14:45 +01:00
Philipp Oppermann
5efcecc2f2
Avoid deadlock by disabling interrupts in print! and serial_print! macros
2019-01-25 14:14:26 +01:00
Philipp Oppermann
1a39774ead
Provoke a print! deadlock
2019-01-25 14:12:14 +01:00
Philipp Oppermann
1ea8cf6ed1
Send end of interrupt signal
2019-01-25 14:09:47 +01:00
Philipp Oppermann
4060ac558c
Add a timer interrupt handler
2019-01-25 14:09:12 +01:00
Philipp Oppermann
28a11e47bc
Enable hardware interrupts
2019-01-25 14:05:20 +01:00
Philipp Oppermann
6504bed810
Initialize the PIC
2019-01-25 14:04:55 +01:00