Commit Graph

85 Commits

Author SHA1 Message Date
Bananymous 1687028ed5 Kernel: Add constructor and destructor to MMU 2023-01-30 18:54:04 +02:00
Bananymous 6dc22b7251 Kernel: Add actual register values to x86_64 kernel panic
Very hackish implementation, but we now get actual registers at the
time of the interrupt happening
2023-01-30 18:52:38 +02:00
Bananymous aa0757e135 Kernel: Move dump_stacktrace from panic -> debug 2023-01-26 02:57:14 +02:00
Bananymous e87026f01d Kernel: I have no idea what this commit does
I had committed a change in IDT but reverted it now.

This propably only adds a spurious interrupt detection to common cpp
interrupt handler?
2023-01-26 02:55:37 +02:00
Bananymous c0bc002ac6 Kernel: Move debug printing to its own file
It didn't make sense that dprint was defined in Serial.h.
We also now dump dprint to tty if there is no serial and tty is initialized
2023-01-25 22:51:42 +02:00
Bananymous ba53582f23 Kernel: Rewrite APIC and PIC more OOP friendly
x86_64 port is slowly coming together
2023-01-23 20:13:57 +02:00
Bananymous b50bb03ed4 Kernel: Panic now halts machine even if we get spurious irqs 2023-01-23 18:25:48 +02:00
Bananymous 1b9f7aa815 Kernel: Rewrite the whole VESA driver
We dont support vga text mode currently. I might add it later if needed.

I also removed mouse 'support' from Shell since it didn't do anything
and I didn't implement arbitary bitmap rendering to framebuffer
2023-01-23 13:21:53 +02:00
Bananymous cdd27ae3db Kernel: rename MMU::m_page_directory_pointer_table -> m_highest_paging_stuct
This might not always be pdpt. In x86_64 it is pml4/pml5
2023-01-22 03:03:58 +02:00
Bananymous 491610db2c Kernel: move GDT initialization to boot.S 2023-01-22 00:48:12 +02:00
Bananymous bb051604a1 Kernel: Move dump_stacktrace() to arch folder
It uses mov instruction which has different register on x86/x86-64
2023-01-21 22:16:31 +02:00
Bananymous b9a4530e54 Kernel: Kernel::Panic now dumps stacktrace to com1 2023-01-16 21:50:50 +02:00
Bananymous 7540fa0385 Kernel: Shell now 'properly' parses commandline 2023-01-16 20:09:22 +02:00
Bananymous e307db47eb Kernel: Kernel::Panic() will now always print to serial output 2023-01-16 15:44:27 +02:00
Bananymous 46e5b3f3d6 Kernel: Move GDT to its own namespace and cleanup 2023-01-16 15:24:10 +02:00
Bananymous 8881c1e117 Kernel: Shell is no longer singleton 2023-01-16 15:16:39 +02:00
Bananymous 1545850be3 Kernel: Input callbacks use the new BAN::Function 2023-01-16 15:15:02 +02:00
Bananymous d5e162b1ea Kernel: fix kmalloc header 2023-01-16 12:10:50 +02:00
Bananymous f547a788f2 Kernel: Add support for arrow keys in Shell 2023-01-13 15:07:24 +02:00
Bananymous 416a41745f Kernel: Kernel::Panic now checks that TTY is initialized instead of VESA 2023-01-13 15:04:06 +02:00
Bananymous 7f01eaa936 Kernel: Move CPUID feature strings to cpp file 2023-01-13 00:03:37 +02:00
Bananymous 301ad89783 Kernel: Unallocate RSDT after we are done with it 2023-01-12 13:45:01 +02:00
Bananymous 33a4fcc662 Kernel: Add helper macro for bochs magic break point 2023-01-12 13:24:41 +02:00
Bananymous 8fd51fb47d Kernel: Replace Paging{.h,.cpp} with better MMU{.h,.cpp} 2023-01-12 13:24:36 +02:00
Bananymous 64c57ea3d0 Kernel: Remove obsole CPUID::IsAvailable
This is now a harware requirement that is verified already in boot.S
2023-01-10 21:28:59 +02:00
Bananymous 7d45b3cbd6 Kernel: Rewrote kmalloc to be much simpler and allow alignment 2023-01-10 21:10:36 +02:00
Bananymous d89b6aa9ce Kernel: Serial output now gives clickable links 2023-01-10 21:09:59 +02:00
Bananymous 85068e27d6 BAN: BAN/Memory.h now provides the operator new and delete 2023-01-10 17:51:33 +02:00
Bananymous c6467b8ebc Kernel: Multiboot data and kernel command lines are now global variables 2023-01-10 17:50:24 +02:00
Bananymous 5106552bfd Kernel: Serial output uses now "\r\n" as line endings 2023-01-10 11:24:30 +02:00
Bananymous 979a5960e4 Kernel: We don't use floating point arithemtic anymore in kernel 2023-01-10 11:10:17 +02:00
Bananymous efd8638a96 Kernel: Improve kernel panic message and rename it 'panic'->'Panic' 2023-01-09 21:57:03 +02:00
Bananymous 531f470132 Kernel: Add helper to map pages with base address and size
This allows us to easily map enough pages for buffer with known size

VESA driver can now allocate enough memory for whole framebuffer if it
doesn't fit in a single page (1920x1080 for example)
2023-01-05 03:44:41 +02:00
Bananymous d6623def32 Kernel: Paging uses now PAE with 2 MiB pages 2023-01-05 02:00:18 +02:00
Bananymous fcec793873 Kernel: Shell now renders a mouse
PS/2 mouse doesn't seem to work with PIC.
2022-12-30 20:48:15 +02:00
Bananymous 9d9a6b2fec Kernel: VESA can now print 8x16 bitmaps 2022-12-30 20:47:25 +02:00
Bananymous fc05642b74 Kernel: Make Render from buffer public tty function 2022-12-30 19:57:44 +02:00
Bananymous ef0b2010e0 Kernel: Add basic PS/2 Mouse driver 2022-12-30 19:38:21 +02:00
Bananymous 3c92aa45fb Kernel: 'cpuinfo' command in shell now shows wheter you are running on 64-bit cpu 2022-12-28 19:46:37 +02:00
Bananymous 5d7a767f8b Kernel: Enable basic paging 2022-12-28 04:17:34 +02:00
Bananymous fd4fdffd46 BAN::Formatter now takes putc like function as a parameter
This allows us to use capturing lambdas as a putc like function
2022-12-27 19:55:07 +02:00
Bananymous 620b836fc3 Kernel: VESA now somewhat handles Cursor in Graphics mode 2022-12-27 18:29:02 +02:00
Bananymous 5ae1fc58e9 Kernel: Clean code in tty and vesa 2022-12-27 17:22:45 +02:00
Bananymous 2535eb1c4c Kernel: TTY now handles keeping terminal buffer
VESA Driver cannot scroll anymore, this is handled by tty
2022-12-27 17:06:33 +02:00
Bananymous d8fd6afd12 Kernel: Make TTY a class 2022-12-23 15:55:45 +02:00
Bananymous 3f7a61a4d2 Kernel: VESA driver has now second buffer for fast scrolling
This allows us to not read from video memory, since it was very slow

I also implemented fast path for graphics clearing and scrolling if bpp is 32
2022-12-20 14:02:44 +02:00
Bananymous 5e2680cade Kernel: You can now disable APIC from the grub commandline 2022-12-20 11:57:09 +02:00
Bananymous 0bdb01ee04 Kernel: Replace PIC with APIC
If APIC/IOAPIC is not found, we fallback to PIC

Interrupts don't seem to work on real hardware (?)
2022-12-19 11:46:25 +02:00
Bananymous f244728d33 Kernel: Add unicode support 2022-12-16 03:55:13 +02:00
Bananymous 6fe0d04f07 Kernel: Implement basic VESA Graphics mode driver
We now support VESA Graphics mode with some bitmap fonts
2022-12-16 00:47:03 +02:00