Justin C. Miller
14f51436d7
Load ELF file with bootloader instead of flat binary
2018-04-28 02:12:08 -07:00
Justin C. Miller
57e5465c2d
Add -fno-exceptions and QEMU logging to Makefile
2018-04-27 22:20:46 -07:00
Justin C. Miller
d9619e65a2
Fix indirection bug with marked offset pointer mapping
2018-04-26 17:27:55 -07:00
Justin C. Miller
9754994e0c
Standardize types used in memory_pages
2018-04-26 16:47:51 -07:00
Justin C. Miller
34c894b15d
Enable allocation and mapping of pages
2018-04-26 11:10:32 -07:00
Justin C. Miller
a2665d9247
Fix printf bug in page_block::dump
2018-04-26 11:09:34 -07:00
Justin C. Miller
1e3ae67646
Add -no-reboot to QEMUOPTS
2018-04-26 11:07:58 -07:00
Justin C. Miller
25b9625635
paging finally works
2018-04-25 19:53:22 -07:00
Justin C. Miller
2404b22c1f
support widths in printf
2018-04-25 19:52:27 -07:00
Justin C. Miller
bed882f41c
Enable paging WIP
2018-04-25 10:48:14 -07:00
Justin C. Miller
fd9e0944cb
Add rudimentary printf to console
2018-04-25 10:43:17 -07:00
Justin C. Miller
7e462319c9
Fix inconsistenly-named frame_buffer_size
2018-04-24 09:50:07 -07:00
Justin C. Miller
94de87ef86
Refactor screen ouput from main console code
2018-04-24 09:32:57 -07:00
Justin C. Miller
eb13f1f4fb
Fix missing return
2018-04-24 08:54:38 -07:00
Justin C. Miller
0a6c39ded4
Remove -ggdb from LDFLAGS
2018-04-23 20:37:15 -07:00
Justin C. Miller
ff1aac64c1
Use our own stack space, not efi's.
2018-04-23 10:22:43 -07:00
Justin C. Miller
ef24894211
Add stupid first serial output
2018-04-23 10:22:02 -07:00
Justin C. Miller
1113164505
Join page_block insert methods into one
2018-04-22 23:27:15 -07:00
Justin C. Miller
1de73de2e3
Move page table allocation to top 256GiB.
...
I forgot to account for tracking page table physical addresses, so
this is a bit of an overhaul. Major changes:
- Refactor bootstrap code into more functions and:
- Only allocate 32 pages of scratch space
- Remap remaining space into top 256GiB, the "page table space"
- Use the page table space to directly offset-map page table pages
from their physical addresses, to avoid tracking overhead.
- Refactor page_block list functions into static functions to better
handle null/empty lists
2018-04-22 21:52:59 -07:00
Justin C. Miller
571cc5a1da
Add mmu logging to qemu.bat
2018-04-22 21:50:35 -07:00
Justin C. Miller
8cb0803605
Make page_manager::unmap_pages() handle multiple blocks
2018-04-22 13:37:44 -07:00
Justin C. Miller
95d52b87f4
Initialize page_manager.
...
Page manager now:
- Caches mapped pages and page_block structs
- Can unmap memory ranges
- Unmaps extra kernel memory during it's init
2018-04-22 02:48:45 -07:00
Justin C. Miller
07fd3abe2c
Move page size and higher half offset to constants
2018-04-21 20:58:58 -07:00
Justin C. Miller
5dedd2e0e0
Finish memory bootstrap sequence.
...
Now we're setting up all our own page tables, and handing off to
page_manager's init function. (Which is still NYI.)
2018-04-21 19:32:39 -07:00
Justin C. Miller
57abb03deb
Rearrange memory manager into two classes.
...
page_manager and memory_manager are now separate, and are also pre
allocated in the kernel so they don't have to allocate themselves.
2018-04-21 17:34:33 -07:00
Justin C. Miller
4a38a74b16
Refactor memory code.
...
Break out some more bootstrap code into functions. Add the start of
some Doxygen doc comments to help organize my thoughts.
2018-04-21 16:49:39 -07:00
Justin C. Miller
9a45ea562b
Updating notes
v0.1.1
2018-04-21 02:53:18 -07:00
Justin C. Miller
da404f520d
Rearrange memory bootstrapping code.
...
Move EFI-related code and initial memory manager bootstrap code
to memory_bootstrap.cpp, move memory page structs to their own
memory_page.h/cpp files.
2018-04-21 02:52:52 -07:00
Justin C. Miller
799ad8b264
Add operator| to enum_bitfields
2018-04-21 02:47:37 -07:00
Justin C. Miller
818b51d57c
Make qemu.bat log to popcorn.log
2018-04-21 02:45:33 -07:00
Justin C. Miller
e8866abc7a
Bootstrap in-kernel memory management
2018-04-20 02:15:56 -07:00
Justin C. Miller
3b560c063a
Move kernel to higher half.
...
Return to having the bootloader re-map the kernel into the higher
half before jumping into the kernel entrypoint, so we don't have
to juggle pointers inside the kernel.
2018-04-19 01:37:34 -07:00
Justin C. Miller
a27b8d6a3a
Add/move code into kutil library
2018-04-17 23:41:28 -07:00
Justin C. Miller
2050b89334
Move src/modules/main -> src/kernel
2018-04-17 09:45:05 -07:00
Justin C. Miller
504de44ff3
Make APIC addresses uint32_t*
...
APIC registers need to be read/written 32 bits at a time, so
best to keep these as pointers to that size.
2018-04-17 09:20:56 -07:00
Justin C. Miller
71a6f13fa5
Make interrupt_isrs.inc the one source of ISRs
2018-04-17 01:39:21 -07:00
Justin C. Miller
f62fbefe54
Parse APIC addresses out of ACPI tables.
2018-04-16 23:56:03 -07:00
Justin C. Miller
6c29024eac
Remove broken console QEMU bat file.
2018-04-16 01:17:11 -07:00
Justin C. Miller
b7f18c0d31
Parse the ACPI XSDT and find ACPI tables.
2018-04-16 01:15:42 -07:00
Justin C. Miller
696c29086b
Clean up isr references in main.cpp
2018-04-15 18:44:47 -07:00
Justin C. Miller
bce281606e
Finish ISR code for CPU faults (ISRs 0-31)
2018-04-15 18:40:21 -07:00
Justin C. Miller
2388a92085
Add initial IDT and GDT setup.
...
WIP interrupt handling. Interrupts do not yet return.
2018-04-15 15:46:20 -07:00
Justin C. Miller
447991e82b
Add comment to assert
2018-04-15 09:14:02 -07:00
Justin C. Miller
a8984350da
Add new kassert macro.
2018-04-14 18:34:34 -07:00
Justin C. Miller
4d5da72e2e
Add parse_memmap.py script
2018-04-13 23:54:34 -07:00
Justin C. Miller
712df97dfc
Add a better boot message with version
v0.1.0
2018-04-12 09:17:59 -07:00
Justin C. Miller
656d5dfedf
Save tool scripts like parse_font.py in a scripts dir
2018-04-12 09:02:56 -07:00
Justin C. Miller
1f396ced8e
Make console support 256 color mode
2018-04-12 00:19:43 -07:00
Justin C. Miller
7f805fae1a
Fix only allocating one page for log
2018-04-11 10:14:13 -07:00
Justin C. Miller
2d52f64eb6
Implement scrolling console
2018-04-10 02:15:41 -07:00