Michael Shaw
b8b67aadc9
irq: make IRQs dynamically mappable
2023-05-04 22:10:23 -04:00
Michael Shaw
87146087ca
begin ahci driver
2023-05-04 21:47:48 -04:00
Michael Shaw
ce430f490d
pci: change messages to debug prints
...
this also disables interrupts during ISRs
2023-05-04 16:25:43 -04:00
Michael Shaw
1799cb5abf
stdio: add LOG_DEBUG
2023-05-04 15:36:54 -04:00
Michael Shaw
47edaa8512
slab: add kzalloc
2023-05-04 15:26:40 -04:00
Michael Shaw
39c778d2f0
add some asserts
2023-05-04 02:02:17 -04:00
Michael Shaw
605507a688
pci: add simple pci driver
...
this driver only prints devices on the pci bus.
2023-05-03 23:55:54 -04:00
Michael Shaw
e1108b3493
mem: improve slabbing to include flags
2023-04-29 16:54:12 -04:00
Michael Shaw
9222a373fc
buddy: replace free-lists with binary tree
...
before this patch, the buddy allocator used a hybrid bitmap-freelist
approach where free would use the bitmap to determine size, but all
other operations we O(n) traversals of the free-list.
now, both alloc and free use the bitmap exclusively for allocation.
2023-04-29 00:15:50 -04:00
Michael Shaw
22762339f9
irq: begin moving away from 8259
...
8259 PIC was used for interrupts for bootstrap development while the memory manager was being constructed. now that this is complete, a transition to the apic will begin
this patch fixes memory mapping issues with the reserved regions that caused page faults before.
2023-04-22 13:01:46 -04:00
Michael Shaw
794c328809
mem: update slab allocator
...
the slab allocator will now free slabs if they are not the first slab
for a given size and they are empty
2023-04-20 19:22:07 -04:00
Michael Shaw
577779f8ae
mem: add kmalloc and kfree
2023-04-20 17:03:10 -04:00
Michael Shaw
74a58d6641
mem: add basic slab allocator
2023-04-20 16:06:49 -04:00
Michael Shaw
43d36f8703
math: add SPDX-License-Identifiers
...
Add the GPL-2.0-only license identifier to the top of these source files
2023-04-19 17:37:56 -04:00
Michael Shaw
035bffc092
apic: remove erroneous line in header file
2023-04-18 14:13:22 -04:00
Michael Shaw
4595f35e4f
mem: rename mem_region_header to buddy_region_header
2023-04-14 12:47:30 -04:00
Michael Shaw
59509f4448
mem.h: remove incorrect HHDM_START macro
2023-04-14 12:39:44 -04:00
Michael Shaw
b8fa30c8ed
mem: change buddy allocator api
...
the buddy allocator now returns HHDM addresses as void* rather than
zero-based adddresses as paddr_t. it also automatically searches regions
now, rather than requiring a (struct mem_region_header *) for each
alloc/free
2023-04-13 17:36:04 -04:00
Michael Shaw
4f4af0946d
mem: implement buddy allocator
2023-04-12 13:58:22 -04:00
Michael Shaw
fe93196a01
remove atoi test
2023-03-24 03:45:11 -04:00
Michael Shaw
3215605b2d
add console
2023-03-15 03:33:03 -04:00
Michael Shaw
f001be171c
console: add console_resize()
2023-03-15 03:32:47 -04:00
Michael Shaw
9a4ff385bd
pic: enable legacy pic serial interrupts
2023-03-14 04:25:06 -04:00
Michael Shaw
667d01e418
serial.h: change type of serial_init to int
2023-03-13 18:16:02 -04:00
Michael Shaw
bb6de2047e
serial: move COM1 to serial.h
2023-03-13 18:10:19 -04:00
Michael Shaw
04805857c4
apic.h: add apic redirection entry struct
2023-03-13 17:53:17 -04:00
Michael Shaw
48e24085f6
stdio.h: shortened LOG_ prefixes
2023-03-11 20:43:40 -05:00
Michael Shaw
d5f388208c
mem: formatting fix
2023-03-09 01:59:21 -05:00
Michael Shaw
84b40e3eda
mem: add type paddr_t
2023-03-05 17:10:08 -05:00
Michael Shaw
bb76bcac6c
Modify to allow unmapping easily
2023-03-05 17:02:02 -05:00
Michael Shaw
e1fa7736a1
common.h: add bitwise.h
2023-03-05 04:59:15 -05:00
Michael Shaw
705abf3234
mem: fixed memory mapping bugs with kmap
...
function `kmap` is now capable of reliably mapping physical addresses to
virtual addresses
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
2023-03-04 22:42:08 -05:00
Michael Shaw
ffddd592da
mem: begin work on pager
2023-03-04 16:46:33 -05:00
Michael Shaw
2b9d76d015
mem: add page entry type
2023-03-01 14:20:13 -05:00
Michael Shaw
644508ee45
Added license identifiers to all files
2023-02-28 22:14:06 -05:00
Michael Shaw
0088870a82
apic: added lapic register offset macros
2023-02-28 21:43:07 -05:00
Michael Shaw
2c590e677d
moved apic init to apic_init()
2023-02-28 21:30:38 -05:00
Michael Shaw
249231e7ea
edited some printf messages
2023-02-28 21:17:48 -05:00
Michael Shaw
92396db851
stdio: Added LOG_ specifiers to all prints
...
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
2023-02-28 20:32:39 -05:00
Michael Shaw
25abb1f0f5
stdio: Added LOG_ERROR and LOG_SUCCESS
...
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
2023-02-28 20:25:50 -05:00
Michael Shaw
93fe0a1d2f
removed temporary printf_error
2023-02-28 20:04:14 -05:00
Michael Shaw
39cbf48b63
stdio: added printf_error
2023-02-28 20:00:53 -05:00
Michael Shaw
57ed3eefe6
apic: Added madt entry struct types
...
This also moves madt parsing to apic.c
2023-02-28 19:51:37 -05:00
Michael Shaw
d5ea43e05a
add support for MSRs and basic bitwise ops
2023-02-28 18:07:12 -05:00
Michael Shaw
b8599a4e8e
Add madt_entry_types and print out value
2023-02-28 17:24:32 -05:00
Michael Shaw
2146b49bb3
added rsdt parse functionality
...
this function prints out the RSDT entries present in the system
2023-02-27 22:55:06 -05:00
Michael Shaw
0cc86fc37d
Add support for limine RSDP request
2023-02-27 20:53:41 -05:00
Michael Shaw
4410dde3f2
Change _start to kmain
2023-02-27 18:46:50 -05:00
Michael Shaw
ca5351b847
Added support for basic x86 features
...
Includes 'gdt', 'idt' and a serial driver
2023-02-27 18:36:15 -05:00
Michael Shaw
bae9ffa930
Initial commit
2023-02-27 14:14:37 -05:00