Commit Graph

924 Commits

Author SHA1 Message Date
Matt White
46345f9c29 Rudimentary support for multiple connections. Seq/Acks are probably not great 2015-07-31 00:41:35 -07:00
Matt White
4547929321 Can successfully send valid SYN packet 2015-07-30 22:40:21 -07:00
Matt White
f34285a3de Removed bit fields and change to doing some bit math to remove compiler warnings 2015-07-30 17:02:14 -07:00
Matt White
de43948e73 Fix wrong struct name 2015-07-30 16:54:07 -07:00
Matt White
19c5b581ab Remove dependency of net module on rtl module 2015-07-30 16:46:08 -07:00
Matt White
3447ffcb03 Super basic outline of separating network stuff from rtl module into net module 2015-07-30 15:48:31 -07:00
Kevin Lange
514fef6b9f Bump version to v0.11.1 2015-07-12 19:08:38 +09:00
Kevin Lange
a0c1350369 Fix next_pid to not reallocate PIDs immediately 2015-07-02 21:39:43 -07:00
Kevin Lange
ce05bdbff7 Actually fix the math on bitsets 2015-07-02 21:25:11 -07:00
Kevin Lange
cb8f821489 Fix incorrect default state and bit math for bitsets 2015-07-02 14:56:35 -07:00
Kevin Lange
b2d0021a63 Terrible hack for combining modules [ci skip]
Please don't use this, it's a workaround for iPXE module limits.
2015-06-23 20:15:19 -07:00
Kevin Lange
3b48ab5be1 Bump version to 0.11.0 2015-06-10 21:00:47 -07:00
Kevin Lange
20367b15f9 Fixups for merging symlinks 2015-06-10 20:59:27 -07:00
Mike Gerow
a7f27a604d Cleaned up debug_print calls 2015-06-05 00:38:13 -07:00
Mike Gerow
84846c6dac Added symlink support to ext2 module 2015-06-03 19:08:38 -07:00
Mike Gerow
e8689bb0c6 Added symlink support to vfs and plumbed it to syscall layer
This commit requires a rebuild of the toolchain.
2015-06-03 19:07:08 -07:00
Kevin Lange
7f07d7403e Fix very broken comparisons 2015-06-02 21:29:28 -07:00
Kevin Lange
212efda313 Fix a bad memset that was breaking reboots on ramdisks 2015-06-02 12:15:38 -07:00
Kevin Lange
20c9535d29 Clean up termemu and add a new kernel vga logging mechanism 2015-06-01 00:20:02 -07:00
Kevin Lange
027d979fbc Fix incorrectly 0'd userspace entry pointer; bad pointer validate in stat_node 2015-05-29 16:12:04 -07:00
Kevin Lange
a4d749a91a fix memcpy/memset clobbers, etc. 2015-05-26 23:38:21 -07:00
Kevin Lange
3bf0d0ed89 Mark off 0.10.1 2015-05-21 14:39:00 -07:00
Dale Weiler
d6ff2dc428 Better PID allocation technique 2015-05-21 16:23:31 -04:00
Dale Weiler
e27cb1b96f Align stack pointer on kernel proper entry to 16-byte. Eliminate dead-lock in frame allocator on OOM. Formatting. 2015-05-21 15:09:42 -04:00
Dale Weiler
a699c91ddd ISR/IRQ cleanup 2015-05-21 13:22:06 -04:00
Dale Weiler
0dbd5ab089 Cleanup and improve spin lock code 2015-05-21 04:28:14 -04:00
Dale Weiler
3820512357 Merge branch 'strawberry-dev' of github.com:klange/toaruos into strawberry-dev 2015-05-21 03:15:19 -04:00
Dale Weiler
57de8417fa formattng 2015-05-21 03:13:47 -04:00
Dale Weiler
cb0e217c31 Cleaned up, optimized and rewrote crucial parts of libc for the kernel, fixed a few bugs as well. 2015-05-21 03:12:09 -04:00
Kevin Lange
1654d371e3 Marking off 0.10.0 2015-05-20 20:34:20 -07:00
Dale Weiler
12ef7fba8b Optimizations 2015-05-20 23:32:21 -04:00
Dale Weiler
6e1a594adc Wait for IO on IRQ remap. 2015-05-20 23:08:58 -04:00
Dale Weiler
5ddbbf8199 Some IRQ cleanup 2015-05-20 19:52:19 -04:00
Dale Weiler
82d706f453 Rewrite IDT code 2015-05-20 18:53:03 -04:00
Dale Weiler
51fbc77e3f Eliminate superfluous strlen pass in vasprintf 2015-05-20 18:21:39 -04:00
Dale Weiler
d6a7db993e Use PUSH macro when setting up thread argument and return address 2015-05-20 16:53:14 -04:00
Dale Weiler
333d97bc7a Fix system calls 2015-05-20 16:45:30 -04:00
Dale Weiler
c9f9625722 Use uintptr_t and document sys_mount arguments which are not used with a TODO 2015-05-20 14:59:47 -04:00
Dale Weiler
117225b626 Cleanup system call code and improve branch prediction. 2015-05-20 14:14:51 -04:00
Dale Weiler
31900155fb ring3 switch code in user.S now 2015-05-20 04:46:10 -04:00
Dale Weiler
ca5a319ee6 Validate syscall inputs 2015-05-20 03:34:39 -04:00
Dale Weiler
01176e0f97 Use GAS instead of YASM. 2015-05-20 03:12:20 -04:00
Kevin Lange
9d41b3fc25 Merge branch 'mixer-rebase' of https://github.com/gerow/toaruos into gerow-mixer-rebase 2015-05-18 21:15:25 -07:00
Kevin Lange
9a72bfc4cd Add half-assed support for IRQ chaining.
We only support 4 total chain entries at the moment, but that can be
"easily expanded"... We don't really have a lite dynamic vector, just
the big fat dynamic lists, so improving on this needs some extra effort.

This commit also drags in a bunch of random network work by necessity.
2015-05-18 21:07:06 -07:00
Kevin Lange
b4d7e263b6 Fix critical issue in spawn_process 2015-05-18 21:05:41 -07:00
Mike Gerow
0f35a5bfe3 Add ioctl interface for snd mixer 2015-05-17 20:31:36 -07:00
Mike Gerow
f53ea98e05 Implement snd mixer interface in ac97.c 2015-05-17 20:31:36 -07:00
Mike Gerow
ad708efd5a Add support for managing mixer knobs to snd interface 2015-05-17 20:31:36 -07:00
Kevin Lange
9df3810da9 Separate pipe write/read locking 2015-05-15 22:51:27 -07:00
Mike Gerow
b06b4af8b9 Add snd sound subsystem.
It's got a long way to go, but this provides basic mixing between
applications.
2015-05-15 01:04:07 -07:00
Mike Gerow
fd8c5db72a Surround list macros in parens in order to allow calls like this:
list_t list;
foreach(node, &list) {
  ...
}
2015-05-15 01:04:07 -07:00
Kevin Lange
e1720dbc8a Fix allocation of common symbols in modules
Fixes #87
2015-05-14 09:47:23 -07:00
Kevin Lange
66938e3123 Fix symbols not marked extern 2015-05-14 09:32:52 -07:00
Mike Gerow
ac17214207 Added ability to check if an IRQ is already occupied.
A proper solution would probably be to introduce shared IRQs at some
point in time.
2015-05-13 01:33:05 -07:00
Kevin Lange
648aedc0a4 Use a different resynch strategy for timer 2015-05-01 23:01:12 -07:00
Kevin Lange
4fd1ae9aa3 Support scrollwheel mice 2015-04-26 18:05:14 -07:00
Kevin Lange
7344a50fe0 Major changes to timing interfaces
- The kernel version has been bumped to 0.9.0
- The timer resolution in the kernel has been increased to millseconds.
- The preemptive scheduling interval has been descreased to one
  millisecond.
- Relative sleep continues to use 10 millsecond intervals for legacy
  reasons.
- `gettimeofday` now uses the internal tick counter to calculate the
  current time. Drift is calculated from the CMOS every 5 seconds and
  applies only to `gettimeofday` and other places that use it.
- The resolution of timing information provided by debug functions has
  been increased to three digits (milliseconds).
- The resolution of timing information provided by the procfs uptime
  virtual file has been increased to three digits (milliseconds).
- Functions have been added to the debug shell to read the TSC. The TSC
  is not used in timing functions at this time.
2015-04-14 23:05:07 -07:00
Kevin Lange
4a36d6bb9e Fix a potential deadlock and improve irq on/off 2015-04-13 23:39:23 -07:00
Kevin Lange
5f84e679ca Add more flags to <ipv4.h> 2015-04-04 12:18:36 -07:00
Kevin Lange
a73a033a29 Experimental updates to write support in ext2 (incomplete, internals only) 2015-02-11 23:12:01 -08:00
Kevin Lange
990d6ae269 Fix #54 - missing close/free in sys_chdir 2014-10-07 10:46:54 -07:00
Kevin Lange
6d2bcef1cb Fix root= argument 2014-08-15 16:25:15 -07:00
Kevin Lange
09a38b3abb Remove unused label 2014-06-11 18:51:36 -07:00
Kevin Lange
87c212017b Various bits of cleanup to unbreak mounting 2014-06-09 21:21:46 -07:00
Kevin Lange
17e332b5e7 expose mounting to userspace 2014-06-09 20:13:11 -07:00
Kevin Lange
d3cddf169a And then some more magic to merge the vimhints and the copyright headers 2014-06-07 23:58:31 -07:00
Kevin Lange
1287af81ef Reinsert vim hints magically 2014-06-07 23:51:01 -07:00
Kevin Lange
71fa8d5185 ... missed a couple 2014-06-07 23:48:18 -07:00
Kevin Lange
a2ed4b4f0e strip vim: lines from kernel 2014-06-07 23:43:21 -07:00
Kevin Lange
e1a9cd87d2 Include additional contributors in kernel/main.c 2014-06-07 23:31:45 -07:00
Kevin Lange
ef7d72c1e1 License headers and a tool to generate them 2014-06-07 23:13:29 -07:00
Kevin Lange
dcaa023347 Processes now inherit names 2014-06-07 18:32:10 -07:00
Kevin Lange
02dbc0e1f4 some vague attempt at revealing links in stat 2014-06-07 12:58:45 -07:00
Kevin Lange
f21ab2b3fb Default st_nlink to 1, not 0 2014-06-05 22:19:46 -07:00
Kevin Lange
34d81fca37 Probably fix mkdir in tmpfs 2014-06-05 19:08:07 -07:00
Kevin Lange
3f6a5e0fdc remove debug output from shebang exec 2014-06-03 23:21:38 -07:00
Kevin Lange
3e03dffc4b merge 2014-06-03 23:20:46 -07:00
Kevin Lange
5eacca2361 Fix argument handling and recursive shebangs 2014-06-03 20:42:59 -07:00
Kevin Lange
4733a26c74 Fix argument offsets 2014-06-01 23:37:00 -07:00
Kevin Lange
389f20f140 fairly naïve shebang implementation 2014-06-01 23:10:11 -07:00
Kevin Lange
fb49a12728 Add reverse foreach for lists 2014-06-01 12:56:55 -07:00
Kevin Lange
9eb63b4bfd more room for panic messages 2014-06-01 01:32:33 -07:00
Kevin Lange
6296aff867 Fix handling of eof in login 2014-05-30 17:05:49 -07:00
Kevin Lange
9eef96cb6a ^D should actually not echo 2014-05-29 23:41:17 -07:00
Kevin Lange
d4b334f119 Remove redundant r_b_interrupts in tty 2014-05-29 22:08:52 -07:00
Kevin Lange
53aee7dc38 Implement ^D 2014-05-29 21:39:56 -07:00
Kevin Lange
84420f9e5c Support closing packetfs connections 2014-05-28 19:21:56 -07:00
Kevin Lange
252fe84ab0 Close and cleanup before we reap. 2014-05-27 23:20:02 -07:00
Kevin Lange
c5d79b2bc6 Fix a memory leak in file opening 2014-05-27 22:52:37 -07:00
Kevin Lange
049057cd23 reenable sigpipe delivery 2014-05-27 21:42:22 -07:00
Kevin Lange
d696f51f8b Real unix pipes 2014-05-27 21:38:30 -07:00
Kevin Lange
ab2a9f056f Quick and dirty display server nesting - lots of mouse event changes 2014-05-26 12:43:22 -07:00
Kevin Lange
f054cebdce naive implementation of sudo and possibly insecure setuid support 2014-05-25 21:59:51 -07:00
Kevin Lange
18251f66c1 Merge pull request #46 from lioncash/leak
Fix a memory leak within vfs.c in kopen.
2014-05-21 17:55:49 -07:00
Lioncash
935f594cd3 Fix a memory leak within vfs.c in kopen. 2014-05-21 20:41:26 -04:00
Lioncash
55bf5fe03d Fix incorrect module size in kmain. 2014-05-21 20:22:24 -04:00
Kevin Lange
290eb0f344 Some IRC cleanup 2014-05-19 19:39:04 -07:00
Kevin Lange
dff654ae93 Reduce debug messages for waitpid to INFO level 2014-05-18 10:27:28 -07:00
Kevin Lange
1dfa71aee9 A start on cleaning up network stack 2014-05-17 23:16:30 -07:00
Kevin Lange
03f8f5062c Interactive IRC connection 2014-05-17 12:40:01 -07:00
Kevin Lange
3ae82af245 Fix DHCP packets 2014-05-14 00:37:06 -07:00
Kevin Lange
98d6516cd4 Craft our own packets instead of using prebuilt ones 2014-05-13 22:09:15 -07:00
Kevin Lange
1f3066d949 Display graphical panic on out-of-memory 2014-05-10 20:22:04 -07:00
Kevin Lange
913c4b004f make the video panic screen display a message 2014-05-10 19:12:31 -07:00
Kevin Lange
898c5f23d3 Desaturate entire display on kernel panic 2014-05-10 14:03:13 -07:00
Kevin Lange
e37fdd2b4b Various bits of cleanup; actually examine packets 2014-05-08 19:29:23 -07:00
Kevin Lange
cecf4f619d Oops, only do that for certain allocations 2014-05-07 00:09:15 -07:00
Kevin Lange
d50710e250 Fix erroneous irq ack 2014-05-06 23:27:58 -07:00
Kevin Lange
e5a8ed3a68 Not the cleanest, but better than before... 2014-05-06 22:38:21 -07:00
Kevin Lange
b824abf250 Kill lwip stuff; add back in native rtl driver
Now with actual working stuff.
2014-05-06 22:14:05 -07:00
Kevin Lange
5319ce7e80 Fix an edge case failure in elf allocation 2014-05-03 15:35:24 -07:00
Kevin Lange
15c0208e99 Show user EIP for segfaults in kernel 2014-05-03 15:35:03 -07:00
Kevin Lange
ce48da7973 Fix debug_shell module 2014-05-03 00:15:07 -07:00
Kevin Lange
edd086b4aa Bump version to 0.7.2 2014-05-02 23:28:27 -07:00
Kevin Lange
10e241e982 Fix non-syscall validate 2014-05-02 19:28:14 -07:00
Kevin Lange
976c086e9c Define num_syscalls at compile time 2014-05-02 18:52:43 -07:00
Kevin Lange
fe19f4ad19 Extensive syscall table cleanup 2014-05-02 18:47:41 -07:00
Kevin Lange
bff1314c29 Add a header with syscall numbers 2014-05-02 18:34:38 -07:00
Kevin Lange
ac32220090 Remove disabled block of unneeded code in fork 2014-05-02 18:34:25 -07:00
Kevin Lange
bd73b07da9 Drop a few more legacy syscalls 2014-05-02 10:58:28 -07:00
Kevin Lange
e16043684a Only bother to deliver non-ignored blocked signals
So we don't accidentally interrupt a read or something.
2014-04-29 00:52:36 -07:00
Kevin Lange
4d8335ad75 Implement proper wait/waitpid.
This is a pretty big commit, so let's run through it in parts:

- All of the userspace changes are to switch away from syscall_wait
  Mostly, this is to waitpid; some things were tweaked to do things
  "properly" instead of waiting for particular processes. Init has
  been fixed to do a proper spin wait.
- syscall_wait is gone - as are its uses. newlib bindings have been
  using just waitpid for a while now.
- waitpid now performs like a Unix waitpid
- process reaping is no longer a "do this on next change thing":
  it happens when a process is waited on, like it should
  (That means we can have real zombies: terminated processes that
  have not yet been waited on)
- Reparenting of children to init has been implemented, so you
  can fork-daemonize!

Overall, this is pretty big... So I hope it doesn't break everything.
2014-04-27 01:37:33 -07:00
Kevin Lange
1c65d3d663 Include git short sha in version string instead of -dev 2014-04-26 22:17:30 -07:00
Kevin Lange
2db3fccd24 Do a better job with page table management 2014-04-25 23:17:20 -07:00
Kevin Lange
f9db32ec99 Bump version 2014-04-25 20:39:09 -07:00
Kevin Lange
1f235bb3e7 Don't forget to invalidate page directories after we free everything 2014-04-25 20:02:30 -07:00
Kevin Lange
8a786b6ffe Fix some potential mapping issues 2014-04-25 19:48:43 -07:00
Kevin Lange
4beb3a42dc throw frame allocation behind a lock so it's atomic 2014-04-25 00:15:08 -07:00
Kevin Lange
dedc201bc1 Ensure {0,0} auxv makes it into memory 2014-04-24 23:02:28 -07:00
Kevin Lange
e2a6ce072d Fix call to external malloc from klrealloc 2014-04-24 22:38:12 -07:00
Kevin Lange
e3ffd36083 Fix critical exec issue with not freeing old dir
We weren't freeing old page directories on exec, so regardless of the
actual size needed for the new process, we ended up with a huge address
space usage. Now, all of the memory from the other process is going to
be copied on the fork, and we can't do anything about that (beyond
writing a separate syscall that forks+replaces without the copy, or
implementing CoW, the latter being preferred) but that's at least a
well-know "problem".
2014-04-24 00:03:55 -07:00
Kevin Lange
c31bedd69e Let's just ... not do that 2014-04-21 19:40:28 -07:00
Kevin Lange
d0bfc0a5bb Efficient reallocation of SHM chunks (mostly) 2014-04-20 17:11:35 -07:00
Kevin Lange
d967fae3a5 Track down the root of that malloc problem 2014-04-20 13:19:52 -07:00
Kevin Lange
d99dc5688e Fix a glitch with signal handling 2014-04-19 19:10:22 -07:00
Kevin Lange
ff56f48ed5 Handle common symbols in module loader 2014-04-19 13:21:56 -07:00
Kevin Lange
3459f19443 List all undefined symbols before bailing when loading modules 2014-04-19 00:08:42 -07:00
Kevin Lange
ead93c5307 Probably as good a time as any to mark off 0.7.0 2014-04-18 20:40:25 -07:00
Kevin Lange
9b3cfc7fe6 More gracefully handle cases where ramdisk is big 2014-04-15 23:10:00 -07:00
Kevin Lange
6c6c3e18c1 Don't spam the log when increases the kernel heap 2014-04-15 19:57:25 -07:00
Kevin Lange
9ad1b50cb8 Change how we determine that a process is in a queue 2014-04-13 02:05:12 -07:00
Kevin Lange
d43f517464 Remove a lock from something that shouldn't be locking anyway 2014-04-13 02:05:01 -07:00
Kevin Lange
7d2083cae9 handle printf("%s", NULL) without crashing 2014-04-13 02:04:34 -07:00
Kevin Lange
20a1c56023 Fix some major paging issues 2014-04-13 02:04:01 -07:00
Kevin Lange
c1a2c312bb Fix a typo and a potentially crash with timers 2014-04-13 02:03:11 -07:00
Kevin Lange
d25e66b4bf Fix a null dereference from lists/trees 2014-04-13 02:02:17 -07:00
Kevin Lange
bf5d607a83 Fix extern declaration of isrs table 2014-04-13 02:01:56 -07:00
Kevin Lange
1f4d108c6c Don't allocate buffer on stack 2014-04-13 02:01:31 -07:00
Kevin Lange
0033d16cfa Fix a bad printf in syscalls 2014-04-13 02:01:20 -07:00
Kevin Lange
402392c109 Fix a potential crash on kernel tasklet startup 2014-04-13 02:01:08 -07:00
Kevin Lange
5a5cb62ce0 kill sockfs, what even is this 2014-04-13 00:51:37 -07:00
Kevin Lange
367c31c687 Restructuring intial paging setup 2014-04-12 23:03:56 -07:00
Kevin Lange
5673c2ee8f Cleanup fault handling 2014-04-12 23:03:44 -07:00
Kevin Lange
8cd386ba5b Set up a fake device for early boot logging 2014-04-12 23:02:03 -07:00
Kevin Lange
9e50872d5e Add multiboot mem map struct 2014-04-12 23:01:38 -07:00
Kevin Lange
e11edbbfd4 Don't calculate syscall table size at runtime 2014-04-12 23:00:59 -07:00
Kevin Lange
5a134e9a67 Fix missing header include 2014-04-12 18:46:25 -07:00
Kevin Lange
bf5409d0da Fix a problem with list merging / trees 2014-04-12 18:30:42 -07:00
Kevin Lange
7cb739b7cd Fix signalled wakeups from timed sleeps 2014-04-12 18:25:56 -07:00
Kevin Lange
ed6dc9507d Fix signal wakeups from existing sleeps 2014-04-12 18:15:28 -07:00
Kevin Lange
597a17949e Lists should have owners. 2014-04-12 18:15:10 -07:00
Kevin Lange
d771a2bff2 Don't forget to free those 2014-04-12 18:14:52 -07:00
Kevin Lange
2a53068ddc pipes and ringbuffers should have two wait queues 2014-04-12 18:14:35 -07:00
Kevin Lange
b09c08e48b Remove dead code 2014-04-12 18:14:07 -07:00
Kevin Lange
3d7a3969eb Support launching arbitrary debug shells 2014-04-11 22:43:39 -07:00
Kevin Lange
a5a17099f6 pretty kernel debug shell 'help' command 2014-04-11 18:29:28 -07:00
Kevin Lange
860ded23d2 update some copyright years 2014-04-11 09:41:46 -07:00
Kevin Lange
9b2d31f51f make pci_scan take an extra arg 2014-04-10 23:34:55 -07:00
Kevin Lange
75a7d5e7f2 Fix some module loading silliness 2014-04-10 23:08:07 -07:00
Kevin Lange
7009e4ec1c Continued progress on Yutani 2014-04-06 18:21:35 -07:00
Kevin Lange
a9b9c2e20d Random header cleanup 2014-04-05 16:36:17 -07:00
Kevin Lange
521dc9b77b rename fs_printf, move it to logging, kill kprintf
fs_printf is now fprintf
kprint_to_file is now debug_file

debug_file and fprintf are defined in logging
kprintf has been removed
2014-04-05 16:12:09 -07:00
Kevin Lange
51d398fc76 Remove special handling for tty access, make init do it 2014-04-05 15:43:14 -07:00
Kevin Lange
f16145cff6 lots of log overhauling 2014-04-05 15:23:17 -07:00
Kevin Lange
7dd6646ae3 Logging tweaks to kill some kprintfs 2014-04-05 15:05:24 -07:00
Kevin Lange
f8deaed26a Dirty hack to fix breakage when nothing is running 2014-04-04 21:30:14 -07:00
Kevin Lange
5277e3ce64 More PEX cleanup 2014-04-02 22:50:32 -07:00
Kevin Lange
8b64e2b7d9 read/write when not present should return errors 2014-04-02 00:26:04 -07:00
Kevin Lange
c74ede8c3b Remove superfluous definition of kernel_symbol_t 2014-03-27 23:39:54 -07:00
Kevin Lange
9ff5bd39da Expose tmpfs functionality so modules can extend it later 2014-03-27 23:38:22 -07:00
Kevin Lange
8980f568a3 Consolidate datastructure libraries 2014-03-24 20:18:40 -07:00
Kevin Lange
1e91dea4cc Move rtl experiments into separate module 2014-03-24 20:00:16 -07:00
Kevin Lange
9b5cf9cec5 Video as a module, kill device_init 2014-03-19 18:56:07 -07:00
Kevin Lange
17d092e3ff Ramdisk support (again) 2014-03-18 21:37:12 -07:00
Kevin Lange
8080a74a2d Module dependencies 2014-03-18 20:11:56 -07:00
Kevin Lange
e5aa49beda (hack) make /dev listings work
This is a bit of a hack. /dev is presented as a new pseudo file type
until I finish the VFS overhaul. This fake file presents a directory
with entries for all of the VFS nodes that are children of it. The
future VFS will do this on its own, thus making this superfluous.
2014-03-16 21:41:19 -07:00
Kevin Lange
aa8ac11dd2 Fix GRUB boot stuff 2014-03-16 18:54:32 -07:00
Kevin Lange
0a08fa257e Partition mappings 2014-03-16 18:39:03 -07:00
Kevin Lange
ee30393e48 Keyboard + Mouse as modules 2014-03-16 15:13:27 -07:00
Kevin Lange
cc0c32f278 Detect segfaults in modules and print information 2014-03-16 14:39:39 -07:00
Kevin Lange
013939fbc3 New ext2 module 2014-03-16 13:30:25 -07:00
Kevin Lange
984fa1d4c6 EXT2 backed by block device
WARNING: THIS BREAKS PARTITIONS

Until I get partition maps and can produce device entries like
/dev/hda1, partitions will be broken, so DON'T TRY TO BUILD AN IMAGE
WITH THE IMAGE BUILDER.

Hopefully this is all rectified in under 24 hours...
2014-03-16 01:33:01 -07:00
Kevin Lange
1ccd39de5c kill kprint_to_screen 2014-03-15 23:56:10 -07:00
Kevin Lange
82a917d270 no more serial syscall
More cleanup

Oopsy
2014-03-15 20:51:11 -07:00
Kevin Lange
877c2d9d6f tmpfs, random to mods; drop ext2ramdisk 2014-03-15 19:58:38 -07:00
Kevin Lange
b46d632116 serial, null, zero to modules 2014-03-15 19:48:51 -07:00
Kevin Lange
f5bbab90c1 Drop the device 'hello world' sample 2014-03-15 19:28:16 -07:00
Kevin Lange
ccc86c4dc3 Fix multiple modules, make procfs a module 2014-03-15 17:51:33 -07:00
Kevin Lange
c1a77bc3c5 early placement heap doesn't need alignment 2014-03-15 00:43:12 -07:00
Kevin Lange
dafc4f93b6 woops, accidentally left debug output on 2014-03-15 00:37:43 -07:00
Kevin Lange
c4fc02f87d Support modules from bootloader (again) 2014-03-15 00:36:50 -07:00
Kevin Lange
99db031259 Module listing shell commands 2014-03-15 00:03:48 -07:00
Kevin Lange
818fe2787b include stuff 2014-03-14 23:47:07 -07:00
Kevin Lange
903f7f6524 Expose shell to other modules (TODO: dependencies) 2014-03-14 23:37:42 -07:00
Kevin Lange
91767bcc69 Debug shell as a module 2014-03-14 23:17:59 -07:00
Kevin Lange
e9e892bae5 Unresolved symbol handling 2014-03-12 00:18:55 -07:00
Kevin Lange
ed03c517ad More real module loading
Still need to do proper loading of the ELF sections somewhere, but other
than that, we've got a standard interface now. Needs a syscall so we can
write an insmod or something like that.
2014-03-11 23:56:08 -07:00
Kevin Lange
c67d054526 Actually need to handle these as errors, but let's just be safe. 2014-03-11 07:59:00 -07:00
Kevin Lange
47ace6c8d6 Cleanup headers 2014-03-09 23:31:13 -07:00
Kevin Lange
be7dc6fb17 Support more relocation methods 2014-03-09 23:01:30 -07:00
Kevin Lange
1389916cba quick cleanup 2014-03-09 22:37:49 -07:00
Kevin Lange
c051fe7ee1 First module load! 2014-03-09 22:31:34 -07:00
Kevin Lange
cc4391d783 Initial work on modules
There's a lot here, so let's through it:
- Lots of work to include a symbol table in the kernel. We can't rely on
  our bootloader to give us our own ELF information, so we do this
  separately. This probably should be changed to output a C source
  rather than assembly, but that's a TODO.
- Makefile can now generate modules. It works basically the same way any
  other kernel object works, expect with a slightly different linking
  scheme.
- Commands have been added to the debug shell to load modules, but they
  don't work yet - still need to get through relocation and linking.
- Commands have been added to the debug shell to print the symbol list,
  as well as print symbol values (but note that printing symbol values
  is kinda dangerous if you don't know what they are, so don't just go
  printing things willy-nilly).
2014-03-09 19:36:28 -07:00
Kevin Lange
1655cfc600 Suggested cleanups from sortie 2014-02-26 21:10:56 -08:00
Kevin Lange
d42617020f random rtl network stuff, not working yet 2014-02-26 21:00:16 -08:00
Kevin Lange
608b0406e6 Update pci headers 2014-02-26 20:59:25 -08:00
Kevin Lange
010a461d65 Minor cleanup 2014-02-26 20:59:10 -08:00
Kevin Lange
3749c6e954 more debug shell socket stuff 2014-01-14 21:21:33 -08:00
Kevin Lange
18f3f54494 kinda silly, but whatever 2014-01-10 00:45:59 -08:00
Kevin Lange
f5be45a2c9 lots of legacy cleanup 2013-12-15 21:33:46 -08:00
Kevin Lange
2ced88cf33 make kernel hashmap generic 2013-12-15 20:27:06 -08:00
Kevin Lange
6629eed64a debug shell cleanup 2013-12-14 13:47:18 -08:00
Kevin Lange
ed3c578e64 clean up some legacy util stuff 2013-12-13 20:50:04 -08:00
Kevin Lange
ebe1c24dbd Some sort of PCI subsystem, maybe 2013-12-12 23:40:52 -08:00
Kevin Lange
ee978f3dbe Fix freeing keys, add another test 2013-12-01 23:50:13 -08:00
Kevin Lange
902b0342b9 Add some more hashmap functions
And port kernel console command lookup to use a hashmap.
2013-12-01 23:29:40 -08:00
Kevin Lange
204d9bb6ce Remove debug logging from hashmap 2013-12-01 21:46:23 -08:00
Kevin Lange
6fde2533a1 Better hash function 2013-12-01 21:40:39 -08:00
Kevin Lange
26cfa78f89 Use hashmap for args
There, now it's fast.
2013-12-01 21:22:06 -08:00
Kevin Lange
68941f6afd Simple hashmap 2013-12-01 21:19:09 -08:00
Kevin Lange
a376ab2563 Fix some weirdness 2013-12-01 20:07:31 -08:00
Kevin Lange
56ad9598d0 New kernel args parser
I know, this is a lot slower than the old one, but it's a transition to
a new-new args parser that will use a hashmap... as soon as I get around
to writing a hashmap implementation.
2013-12-01 19:37:22 -08:00
Kevin Lange
1cbd26689b Some FS navigation in the debug console
Since I'm working on VFS rewrites...
2013-11-30 22:27:45 -08:00
Kevin Lange
89cb3c8dbd A reasonable shell command system 2013-11-30 00:09:04 -08:00
Kevin Lange
382a24adb8 Fix run-config to work with serial tty 2013-11-28 15:58:57 -08:00
Kevin Lange
2978d31461 Unrecognized command 2013-11-27 22:47:05 -08:00
Kevin Lange
283ac3c824 Add some tokenizing 2013-11-27 22:41:27 -08:00
Kevin Lange
8c469883bc Wrap serial console in a TTY 2013-11-27 22:24:58 -08:00
Kevin Lange
3c9a717429 Tasklet cleanups, make kttydebug useful 2013-11-27 21:21:39 -08:00
Kevin Lange
e95c9eb40b Fix procfs when no cmdline is present 2013-11-27 21:21:09 -08:00
Kevin Lange
5a422a58c7 Bump version number 2013-11-27 19:15:36 -08:00
Kevin Lange
10f4cc6811 Tasklets; fix dead sleep; kernel serial console
- Tasklets are essentially kernel threads. Still working on passing
  arguments to them, but they essentially just run functions and have
  special names like [[kttydebug]]. Eventually, I want disk scheduling
  and various (non-interrupt-driven) drivers running on these, but I'm
  still not sure how stable they are.
- Fix the scheduler so it supports not having anything to run. This took
  some tracking of what's running, and then inserting some liberal
  sleeps. Doesn't appear to break anything. Makes the system work when
  you try to sleep with only one process "running", so that's good.
- Start working on reimplementing the old kernel shell, but this time as
  a tasklet running in the background over serial. Probably going to try
  to add all the same features as before (tab completion, history, rich
  editing), but it may take some time to get it all in there. This
  console is mostly focused on helping with debugging EXT2 and other
  future stuff.
2013-11-27 19:11:58 -08:00
Kevin Lange
8dfd4ff20a Make serial devices more useful
They now use interrupts and thus can be blocked on without sitting in a
busy loop. Not sure if they still work perfectly, need to debug. Works
fine with the console "serial" stuff in qemu.

Todo: Investigate further.
2013-11-27 19:10:38 -08:00
Kevin Lange
922fdd5f38 None of this actually works, but whatever 2013-08-19 19:38:15 -07:00
Kevin Lange
7351fa308b Various fixes to help get bash working 2013-08-04 00:04:22 -07:00
Kevin Lange
948813d0be Fix buffer clearing and dumping when switching modes 2013-07-27 22:21:04 -07:00
Kevin Lange
720a62d6aa ICANON support (still a bit rough)
This is a massive hack and I admit it.
2013-07-27 22:01:08 -07:00
Kevin Lange
40f0c41932 Preliminary termios support
This is some initial work on support real PTYs.
Canonical mode is not supported at the moment.
2013-07-27 00:18:29 -07:00
Kevin Lange
6ad55d68d2 (debugging) export files to sdb with a sysfunc 2013-07-22 22:41:14 -07:00
Kevin Lange
ee90317940 bump version for new development line 2013-07-22 20:50:49 -07:00