Michael Shaw
fdc559f07a
dev: move block.c into dev directory
2024-02-25 17:33:01 -05:00
Michael Shaw
8abbc590a3
serial: mark serial_write inline
2024-02-22 03:15:33 -05:00
Michael Shaw
6d67d7fbfe
devfs: alloc devfs_dev_info struct for each dev
2024-02-12 23:48:58 -05:00
Michael Shaw
3b247ad5e9
devfs: add console to devfs
2024-02-12 23:24:15 -05:00
Michael Shaw
a10509f1e5
lib: move lib headers into lib directory
2024-01-30 22:00:20 -05:00
Michael Shaw
dc8f7126dc
console: add license identifier
2023-11-29 20:04:37 -05:00
Michael Shaw
874e63e41c
tty: add stubs for console_write and console_read
2023-11-29 19:37:04 -05:00
Michael Shaw
e2d9609bf7
console: rename console_write to console_putchar
2023-11-29 19:33:56 -05:00
Michael Shaw
f6e1419961
console: clear line on exec
2023-11-22 22:04:11 -05:00
Michael Shaw
0a0235612e
syscall: change handling of exceptions and traps
2023-11-21 19:19:35 -05:00
Michael Shaw
8cb6d80f8c
entry: clean up assembly
2023-11-20 22:29:59 -05:00
Michael Shaw
37518aea81
usr: implement user process switching
...
This is a rather large commit, so the gist of it is this:
User context switching is now functional, after a change to the TSS, and
a few minor details in the scheduler and loader.
ELF parsing is rather primitive, but basically functional, as long as it
only loads code.
The interrupt 0x80 is for syscalls, and will switch from user mode to
kernel mode. It is currently the only interrupt that can be called from
user mode
This adds the syscall functionality, which currently uses a red-black
tree to store the function pointers, although when the table is more
flushed out, it will probably be replaced with an array
The pager now correctly marks the parent nodes with attributes as it
allocates them. Without doing this, the page table entries will never be
reached in lower privilege modes, causing page faults
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
2023-11-20 22:07:35 -05:00
Michael Shaw
ec4d266abd
ahci: relocate ahci_vbase to unmapped region
2023-11-15 20:16:21 -05:00
Michael Shaw
2fe0b0068b
sched: begin scheduling module
2023-11-13 22:23:06 -05:00
Michael Shaw
eaf5254b3b
apic: enable LAPIC on application processors
2023-11-01 19:18:31 -04:00
Michael Shaw
1cf54c7fd3
panic: add panic function
...
also remove print messages from APIC driver
2023-10-27 22:41:10 -04:00
Michael Shaw
e27faa1a02
apic: enable IOAPIC and LAPIC, disable 8259
2023-10-27 00:54:51 -04:00
Michael Shaw
4dc4f07dc6
mem: improve device memory mapping
...
MMIO ports will no longer directly map to HHDM addresses and will need
to be searched for in the memory mapping tree
2023-10-24 22:16:33 -04:00
Michael Shaw
ad2de927e2
ext2/vfs: implement read fs call
...
also implement the cat command!
2023-10-21 00:46:42 -04:00
Michael Shaw
0029621ada
cmd: add initial commands ls and help
2023-10-20 23:56:01 -04:00
Michael Shaw
4362172967
console: prepare console for command input
2023-10-20 23:15:28 -04:00
Michael Shaw
8584c56f5e
fs: add detection for ext2 filesystems
...
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
2023-06-10 20:24:17 -04:00
Michael Shaw
95ce2af5c6
console: change input to console_write
2023-05-25 23:13:14 -04:00
Michael Shaw
29a0435cf6
slab: replace struct slab with slab_t
...
This type should never be modified by the user, and only passed into the
functions in slab.c. Using a typedef to notifies the user semantically
of this fact
2023-05-19 16:49:34 -04:00
Michael Shaw
0395b65ad8
stdio: add vsnprintf and change printf to kprintf
2023-05-14 01:23:21 -04:00
Michael Shaw
05c528f64c
block: read GPT header from block devices on init
2023-05-13 23:04:15 -04:00
Michael Shaw
b90946e1f8
mem: adjust MMIO addresses
2023-05-10 01:14:33 -04:00
Michael Shaw
0b81c6cccc
ahci: fix bug with block read and write
2023-05-10 00:40:14 -04:00
Michael Shaw
03eb0b0048
fs: begin basic block driver
...
This just makes the API for accessing drives generic, instead of
relying solely on the corresponding driver code
2023-05-09 21:52:35 -04:00
Michael Shaw
b760b9bace
ahci: fix bug causing count sent to device to be incorrect
2023-05-09 17:29:52 -04:00
Michael Shaw
8544efe1ab
slab: upgrade kmalloc to allow DMA regions
...
these DMA regions are only meant to comply with certain AHCI
requirements, and are not yet general purpose
2023-05-08 01:14:11 -04:00
Michael Shaw
20d19ed994
ahci: fix step bug
2023-05-07 19:04:47 -04:00
Michael Shaw
1598837f9a
ahci: remove hello test
2023-05-07 15:38:27 -04:00
Michael Shaw
f0d072713f
pci: cleanup pci_scan_function
2023-05-07 15:32:47 -04:00
Michael Shaw
17addbb55c
ahci: remove unwanted auto-include
2023-05-07 15:23:26 -04:00
Michael Shaw
69ee1fd79c
ahci: complete read/write sectors function
2023-05-07 15:21:04 -04:00
Michael Shaw
7db20603f6
ahci: add ahci_read_sectors function
2023-05-06 23:50:14 -04:00
Michael Shaw
0c7c542eb5
ahci: parse devices and add them to list
2023-05-06 22:25:07 -04:00
Michael Shaw
637c9b2d71
pci: add func field to struct pci_device
2023-05-06 22:01:38 -04:00
Michael Shaw
ca0835028f
pci: fix pci implementation
2023-05-06 21:57:35 -04:00
Michael Shaw
aa3eb7805d
continue ahci development
2023-05-06 21:30:05 -04:00
Michael Shaw
970b34de9a
ahci: enumerate ahci bus
2023-05-06 20:48:23 -04:00
Michael Shaw
9ac63f29dd
improve pci driver
2023-05-06 17:59:46 -04:00
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
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
dcf299fada
console: add ready message
2023-04-30 01:09:23 -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