Commit Graph

11 Commits

Author SHA1 Message Date
secXsQuared
1f080a6b80 BROKEN AF 2016-09-13 00:41:09 -04:00
secXsQuared
ba7672dd00 Fixing stuff. Still broken 2016-08-28 02:14:22 -07:00
secXsQuared
4032174150 huh 2016-08-05 22:55:55 -07:00
secXsQuared
03d3d4ab70 Everything compiled again, with a lot of changes to the design of HAL.
Although a lot of things are not working yet. It's getting closer.
2016-07-08 20:01:33 -07:00
secXsQuared
8da028f518 Eventually went with not using in-place linked list for PMM (Don't really want to mix up PMM and VMM).
So yeah, now keep trace of those physical pages on kernel heap, Windows does that, linux does that, I have to do that since there are more attributes(paged/non-paged) that the kernel requires.
Hmm finished PMM alpha and redefined all those PMM/VMM interfaces.
The code is still broken right now.
2016-06-25 00:25:54 -07:00
secXsQuared
be746b4f6f Figuring out PMM/VMM and ASM. 2016-06-24 18:47:29 -07:00
secXsQuared
af7401a7ed Keep it up 2016-06-23 18:48:34 -07:00
secXsQuared
22ad3c25c2 Restructure kernel (separate modules to be shared + private) and defined/implemented more HAL interrupt APIs. 2016-06-15 00:29:46 -07:00
secXsQuared
0188fe66a5 Push missing write/read ports w/ diff operand sizes. 2016-06-13 23:57:38 -07:00
secXsQuared
b2254e207d Interrupt working (Except that I need to remap PIC).
1. Fix a stupid mistake in idt dispatch table (IDT_ENTRY_NUM instead of IDT_ENTRY_SIZE)!
2. Figured out that before enabling APIC, the PIC is not completely disabled/remapped. Took hours to debug why immediately after enabling interrupt, a double fault happens when executing "mov eax, 0". Turned out that PIC maps timer interrupt to int vet 8, which is double fault in the vector table. The double fault normally pushes an error code 0, the ISR is expecting the error code but the timer interrupt does not push an error code thereby screwing up the interrupt stack completely. The kernel runs normally after "sti" after changing the int 8 vector to just "iretq". (Remapping the PIC: http://wiki.osdev.org/I_Cant_Get_Interrupts_Working#I.27m_receiving_EXC9_instead_of_IRQ1_when_striking_a_key_.3F.21). Oh FML, hours wasted..
2016-06-13 23:33:31 -07:00
secXsQuared
bc49a854dd Set up interrupt dispatching
Set up APIC. Timer setup atrociously close.
Bochs keeps giving the god damn triple fault (IDT broken)??
2016-06-12 21:11:38 -07:00