497 Commits

Author SHA1 Message Date
699f53ac15 Initialize USB after enabling interrupts so Time can be used 2024-02-20 11:17:29 -05:00
1119855215 Fix mapping PCI regions as writable 2024-02-20 11:17:01 -05:00
0c82250bd2 Fix Time.msleep() when inlined in a loop 2024-02-20 11:16:34 -05:00
2a66443a49 Add DoorbellRegister comment 2024-02-09 13:02:05 -05:00
9874802ee4 Add new threads to runnable threads list
More safely handle nested interrupts.
Switch to newly created thread immediately.
2023-12-08 12:16:35 -05:00
44a305721e Allow use of {suspend,resume}_interrupts() from within an ISR
Move functions from hulk.cpu to hulk.him.
2023-12-01 07:54:37 -05:00
73f4d6b728 Rename hulk.idt to hulk.him 2023-12-01 07:49:52 -05:00
0efe8af5aa Commonize ISR handling as much as possible 2023-11-30 20:32:06 -05:00
edc9b2c3ff Remove thread test 2023-11-28 10:47:44 -05:00
c8a9fcf0d5 idt: add INT_KERNEL_SWINT 2023-11-28 10:30:16 -05:00
dc231741b7 cpu: add swint() 2023-11-28 10:30:03 -05:00
fbaf9df59f Add kernel threading test
Kernel multithreading is working!
Threads cannot exit for now.
Scheduling is round-robin for now.
2023-11-27 20:07:08 -05:00
58a74e4859 Fix PCI device list 2023-11-27 19:37:14 -05:00
cc1753a75d Move system time display to Rtc.initialize() 2023-11-27 19:36:04 -05:00
3c8587acf5 Redesign List as a mixin template 2023-11-27 15:30:09 -05:00
db2814596b Move PIT test to test module 2023-11-25 21:01:46 -05:00
8cfa7bc009 Add hulk.thread module 2023-11-25 20:58:11 -05:00
d100ab53a8 Add read_rflags() 2023-11-25 13:02:27 -05:00
35e5aa2ee5 Add hulk.test module to test kernel functionality 2023-11-22 20:47:21 -05:00
cd9a3a7284 Rework List to allow removing nodes 2023-11-22 20:46:48 -05:00
294500fb70 Squelch linker warning about a RWX segment 2023-11-21 12:13:29 -05:00
bb4404df23 Add suspend_interrupts() and resume_interrupts() 2023-11-21 11:36:22 -05:00
aa5ca83889 Disable the red zone
This fixes the interrupt handler from clobbering local variables.
2023-11-20 16:18:41 -05:00
f2839cdd0f Handle all APIC IRQ redirects specified in MADT 2023-11-07 17:19:56 -05:00
31bf82e2ae Store all registers in interrupt stack frame
Do not clear console when printing interrupt stack frame
2023-11-02 16:32:42 -04:00
4f9206af91 Build with debugging symbols 2023-11-02 11:54:08 -04:00
2eec448653 Update gcc and binutils 2023-11-02 11:53:35 -04:00
9932b92963 Change orange screen of death to red bar 2023-11-02 10:34:29 -04:00
5d8343ed40 Preserve registers and align stack in interrupt handlers 2023-11-02 10:29:27 -04:00
2fa4193517 Pass exception stack frame pointer to exception handler
Show exception stack frame contents on exception
2023-11-01 21:22:54 -04:00
01c73f8474 Add check that PIT ISR is firing 2023-11-01 14:45:43 -04:00
7264a31ff3 Rework scanning MADT table entries
Get I/O APIC address from MADT entry.
Add DEBUG flag for APIC.
Show number of CPUs found.
2023-10-31 13:29:23 -04:00
c0a00b528e Run in QEMU with 4 CPUs by default 2023-10-31 11:56:39 -04:00
9f8a4ea100 Add hulk.time and msleep() 2023-10-26 16:18:26 -04:00
6251fee3ff Store item in List rather than pointer to item 2023-10-25 21:28:27 -04:00
f5c6a35cef Move MCFG ACPI table processing from ACPI to PCI 2023-10-25 21:18:36 -04:00
e32282f6f0 Move MADT table processing from ACPI to APIC 2023-10-25 21:11:21 -04:00
2b87792c67 Store ACPI table pointers in list 2023-10-25 19:13:36 -04:00
e480bd0ed0 Enable PIT ISR to count milliseconds 2023-10-25 12:02:44 -04:00
e357f2ba44 Initialize USB controllers from Usb instead of Pci 2023-10-24 10:44:48 -04:00
f8f9b72588 Store PCI addresses and types as 32-bit uints 2023-10-24 10:25:16 -04:00
d86bf47211 Store a List of discovered PCI devices 2023-10-24 08:49:11 -04:00
757f8f8c65 Make A1.allocate() zero returned memory 2023-10-24 08:48:26 -04:00
8303451929 Add List class 2023-10-24 08:48:00 -04:00
1c6c922b45 Add Pci.Type struct 2023-10-22 21:30:36 -04:00
7632445d43 Add console escape sequences to draw headings 2023-10-21 22:13:20 -04:00
601ea50e4b Console: delay newline rendering until non newline character 2023-10-21 21:21:46 -04:00
722494af44 Console: do not index nonexistent character codes 2023-10-21 21:04:18 -04:00
e1f38bd5ea Initialize RTC after APIC 2023-10-21 20:47:15 -04:00
bcf1bd3bde HELLO: Zero HULK BSS region after mapping it 2023-10-21 20:46:27 -04:00