Commit Graph

924 Commits

Author SHA1 Message Date
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
Kevin Lange
9dbb0f4422 0.5.0-rel tag 2013-07-14 22:38:24 -07:00
Kevin Lange
046d972694 docs 2013-07-11 18:17:26 -07:00
Kevin Lange
147f73b305 Temporarily use a tmpfs for local's home dir 2013-06-28 00:16:56 -07:00
Kevin Lange
4c2801beeb Even more strict ext2fs write disabling 2013-06-12 22:24:02 -07:00
Kevin Lange
1dde9dfcb5 Fix argv storage for init 2013-06-06 18:29:22 -07:00
Kevin Lange
0f344f2900 Rewrite fork/clone.
This is still a bit ugly, needs cleanup.
Fixes that weird GCC issue.
2013-06-06 18:04:13 -07:00
Kevin Lange
e70ebf8857 Big fat cleanup and GCC fix batch 2013-06-05 23:10:36 -07:00
Kevin Lange
ff8fd63e62 Fix bad assignment in tmpfs (thx clang) 2013-05-22 16:26:37 -07:00
Kevin Lange
0a064bf3da Remove an unused thing 2013-05-22 01:47:43 -07:00
Kevin Lange
ae08c74115 I'll stop the world and melt with you
(but I won't stop the world to load binaries)
2013-05-22 01:34:56 -07:00
Kevin Lange
ad19c5eb01 change comment in randomdev 2013-05-21 15:34:18 -06:00
Kevin Lange
4868960364 Build ALL the things! 2013-05-12 00:38:56 -07:00
Kevin Lange
c8aa5462a8 Cleaner syscall handling 2013-05-08 22:11:02 -07:00
Kevin Lange
1e664bef2b Integrate signals into libc 2013-05-05 15:00:24 -07:00
Kevin Lange
edccf2927b Unbreak ramdisks 2013-04-27 22:04:20 -07:00
Kevin Lange
71bafd0174 Fix kernel heap allocation 2013-04-27 22:04:03 -07:00
Kevin Lange
fde9c6d652 New ioctl commands and userspace improvements 2013-04-27 01:16:36 -07:00
Kevin Lange
5d71eeb013 Kernel stacks are big enough for those... 2013-04-27 01:13:47 -07:00
Kevin Lange
672274d5ae More initial stack space [maybe temporary] 2013-04-26 01:04:21 -07:00
Kevin Lange
fdc442714a Disable EXT2 with a #define 2013-04-25 23:06:51 -07:00
Kevin Lange
0e76870d00 Remove some unused header defines 2013-04-24 20:24:33 -07:00
Kevin Lange
c1ac928af6 Fix mappings so SHM is table aligned 2013-04-24 20:20:34 -07:00
Kevin Lange
16da56ea9b General support for open() flags
Includes truncation support in tmpfs, and changes the signure of the VFS
open() method. Also tweaked some comment style in the VFS.
2013-04-24 00:19:08 -07:00
Kevin Lange
8c16a86206 Directory support in tmpfs 2013-04-23 23:21:16 -07:00
Kevin Lange
409052e568 Free that temp block... 2013-04-23 23:05:57 -07:00
Kevin Lange
a2a890e1a8 Fresh new VFS syscalls: unlink, chmod, umask 2013-04-23 01:14:33 -07:00
Kevin Lange
6f096454cd Some additions to the VFS 2013-04-22 22:36:47 -07:00
Kevin Lange
7c8d34d1b6 Disable EXT2 writes; add experimental tmpfs
This is still a work in progress. ext2 writes are quite broken, so they
have been completely disabled, but there's a new tmpfs mounted to /tmp
that you can try to poke at. I'm still fixing up quirks in the VFS that
make it incompatible with a bunch of stuff, but I did manage to write
some files with vim, and swap files appear to be working at least
somewhat. It's all still broken as fuck.
2013-04-21 23:17:26 -07:00
Kevin Lange
9901767cbe Retry failed reads 2013-04-21 20:46:48 -07:00
Kevin Lange
ade59a11bc XXX ABI BREAKING CHANGE - New load/heap/stack/shm
Address for program loading, kernel heap, userspace SHM regions, and
stacks have been changed.

Delete:
  toolchain/build
  toolchain/local
  .userspace_check

Run:
  python userspace/build.py clean
  make clean-disk
  make clean
  ./build.sh
2013-04-21 17:35:03 -07:00
Kevin Lange
2de26fafe1 Lazy FPU/SSE, more correct-er 2013-04-16 00:03:23 -07:00
Kevin Lange
41030465a8 Save/restore sse (poorly) 2013-04-15 23:23:56 -07:00
Kevin Lange
3871cfcf31 Fix up the serial console so it works again 2013-04-15 01:26:03 -07:00
Kevin Lange
cd677b44c3 Fix up some terminal bits, add F keys 2013-04-13 20:21:40 -07:00
Kevin Lange
bc51b20380 Generic ringbuffer ds for kernel 2013-04-02 23:02:43 -07:00
Kevin Lange
7303be0eee Also verify those aren't null 2013-04-02 18:06:06 -07:00
Kevin Lange
3ddb877b32 [grok.org.uk advisory] validate more syscall pointers 2013-04-02 15:23:40 -07:00
Kevin Lange
7c4cd8dd51 fix nulldev, add zerodev 2013-03-31 13:01:05 -07:00
Kevin Lange
a55a652e0e new fs node device pointer 2013-03-25 21:48:16 -07:00
Kevin Lange
bac4d54bed Revert version to 0.4.99 2013-03-25 21:48:03 -07:00
Kevin Lange
afac5cd955 fix derp in dev FSes, add /dev/random 2013-03-22 22:38:10 -07:00
Kevin Lange
bc2e4741c7 Random bits and pieces 2013-03-22 15:11:19 -07:00
Kevin Lange
674f047bde fix stat for missing file 2013-03-22 12:14:04 -07:00
Kevin Lange
fa79c89e54 Some fixes and cleanup 2013-03-22 11:58:22 -07:00
Kevin Lange
afd0c59de1 Fix warning in syscalls.c 2013-03-21 00:03:05 -07:00
Kevin Lange
ef459bdaad More rough stubs and fixes 2013-03-20 21:24:55 -07:00
Kevin Lange
21aeb34ea4 Rough ioctl with support for winsize 2013-03-18 23:57:40 -07:00
Kevin Lange
6f94ce2296 procfs extensions and ps command 2013-03-18 21:52:45 -07:00
Kevin Lange
ff429a7d07 Fix termios.h in newlib 2013-03-18 13:23:25 -07:00
Kevin Lange
71342f842d procfs, and more pty cleanup 2013-03-18 00:52:12 -07:00
Kevin Lange
e02cf79e2a Rough PTY support (needs work) 2013-03-17 16:34:23 -07:00
Kevin Lange
cef1d359a1 Blocking serial reads 2013-03-17 16:34:01 -07:00
Kevin Lange
e223c57af8 Reserve some entries for process scheduling 2013-03-17 16:33:28 -07:00
Kevin Lange
71931b3cf3 Improvements to lists 2013-03-17 16:32:44 -07:00
Kevin Lange
eb92cccecd Cleanup 2013-03-15 00:52:09 -07:00
Kevin Lange
8dd2686b40 Really hack VFS implementation 2013-03-15 00:20:55 -07:00
Kevin Lange
22f04f137b Relatively compliant uname() implementation
Also, sleep() as a function (implemented by way of nanosleep) and new
absolute and relative sleep system calls added to newlib.

[ci skip] I damn well know this is going to break CI.
2013-03-13 21:55:25 -07:00
Kevin Lange
09ec69340c New version tree 2013-03-03 17:11:41 -08:00
Kevin Lange
c4545dcc51 bump version in light of toolchain updates 2013-01-25 21:39:12 -08:00
Kevin Lange
acb362e191 Update copyright in kernel/main.c 2013-01-04 20:42:18 -08:00
Kevin Lange
3b06b5c464 bump version to 0.4.2 2012-12-10 20:38:59 -08:00
Kevin Lange
3a977369af Timed process sleeping (and bug fixes) 2012-12-10 20:28:31 -08:00
Kevin Lange
0e3c9f1241 Fix leap year calculation 2012-12-09 17:08:03 -08:00
Kevin Lange
e83f88bacb Add time support to vfs 2012-12-09 16:59:55 -08:00
Kevin Lange
3cdb7b8748 make most of ext2fs use debug_print 2012-12-09 16:19:25 -08:00
Kevin Lange
a1099c1566 Bump kernel version 2012-12-08 00:25:01 -08:00
Kevin Lange
cd929b1ceb Fix some minor input issues 2012-12-08 00:24:43 -08:00
Kevin Lange
3ca94a0528 fix unsigned/signed compare 2012-12-07 19:29:54 -08:00
Kevin Lange
a5b00112af Add tick counts 2012-12-07 19:06:43 -08:00
Kevin Lange
a9d895a923 unify logging 2012-12-07 18:33:07 -08:00
Kevin Lange
f5b5b8821d Clean up some minor bits and pieces. 2012-12-04 20:09:06 -08:00
Kevin Lange
a201ea07b1 Clean up kernel/devices/kbd
Remove a bunch of unused macros and variables.
2012-12-04 15:41:01 -08:00
Kevin Lange
c90bf5cbc9 Remove a bitmask.
Adds a byte to the process struct, but avoids GCC-specific extensions of
using a single byte for a bitmask. May or may not have any effect
anywhere, but will make ./analyze happier.
2012-12-04 15:16:53 -08:00
Kevin Lange
ce1a0ed15d bump to 0.4.0 2012-12-03 00:10:31 -08:00
Kevin Lange
6cb9664b69 Fix some VESA woes 2012-12-02 23:28:29 -08:00
Kevin Lange
3b316b0603 add some indication of video driver status 2012-12-02 22:41:40 -08:00
Kevin Lange
3a45200d3d lol wat 2012-12-02 22:16:59 -08:00
Kevin Lange
50ea1462c3 Fix IDE on new qemu, virtualbox 2012-12-02 21:43:54 -08:00
Kevin Lange
c9448437dc Fix long-standing issues in qemu/bochs
and possibly other environments - fixes the long-standing issue with
keyboard/mouse getting disabled sometimes on bootup, especially if you
tried to interact with the qemu window during the boot process
2012-11-30 19:32:38 -08:00
Kevin Lange
193158079d Bunch of kernel cleanup 2012-11-30 18:26:47 -08:00
Kevin Lange
ed5b9543fb Big commit: Serial console
* fix some terminal bugs (some, not all)
* add a serial device to the VFS
* fix up serial so it works better
* add a serial-console application
* fix a bug in some other stuff relating to allocations
* change size of the terminal described by toaru.terminfo
* adds a new system call
2012-11-28 23:05:19 -08:00
Kevin Lange
6e909acd07 Save/restore FPU state on task switch 2012-10-21 20:17:47 -07:00
Kevin Lange
5fc2a56c05 Meh.
I'm trying to get PATA access to work on real hardware (and in
VirtualBox, specifically), but it's not working out well. Unless there's
a major breakthrough tomorrow, I'm going to set it aside for a while.
2012-10-17 22:23:10 -07:00
Kevin Lange
4da4ab63c0 [debug] warn if vid mem can't be located 2012-10-16 23:31:55 -07:00
Kevin Lange
05728b0e2f Fix large files on modern ext2 configurations 2012-10-16 22:30:57 -07:00
Kevin Lange
5e39fe9bfa Fix something I failed to clear out. 2012-10-14 20:27:04 -07:00
Kevin Lange
7d5eb42400 Userspace keyboard handling
Kernel driver sends raw scancodes, compositor or terminal handle the
rest. Support for F* keys will be added soon, in the mean time userspace
applications can know about the status of modifiers (control, shift,
alt, and super).

Compositor actions have been changed to Alt+Left Click for move and
Alt+Middle Click for resize. I'll work on adding more mouse events once
I get them to be faster (they're annoyingly slow at the moment... I want
more accuracy and less latency).
2012-10-14 19:53:16 -07:00
Kevin Lange
9d84988778 Bump version number to 0.3.7
Getting close to the big 0.4.0, but I really want to fix my ATA drivers
and possibly get some CD/ISO stuff in before then.

[ci skip]
2012-10-13 22:06:51 -07:00
Kevin Lange
217f66e23e Mouse-driven window resizing 2012-10-13 20:19:43 -07:00
Kevin Lange
deaa6ad513 Rough support for environment variables
- libc functions not implemented yet
- see `env` for an example of reading variables
- see `esh` for an example of how to set and maintain variables for
  sending to other applications

  Both of the above will be the basis for the libc implementation.
2012-10-07 20:46:35 -07:00
Kevin Lange
77ed41c225 kernel vga term, commas in arguments, ide fixes 2012-10-03 22:03:21 -07:00
Kevin Lange
742a6e7448 Fix up style in system.c, fix some bugs, too 2012-10-03 22:01:45 -07:00
Kevin Lange
2eb953f1f1 Massive fixes to the EXT2 driver.
* Works with different block sizes
* Works with different inode sizes
* Tested on a real EXT2 file system made with mkfs.ext2

* MBR reading is available
* You can specify a partition with hdd=0 or hdd=1 etc.

* If you make a "real" disk image, you can get GRUB installed in
  its MBR, toss in a suitable config file, and boot right off the
  disk rather than having to use QEMU to boot the kernel or using
  some silly CDROM ramdisk nonsense.
2012-09-29 00:39:01 -07:00
Kevin Lange
8c20e96fb6 reboot syscall will sync disks 2012-09-29 00:38:45 -07:00
Kevin Lange
f79f345956 Giant ramdisks (works on my desktop)
But not on my laptop...
2012-09-18 22:20:04 -07:00
Kevin Lange
9f282a7916 Fix alloc init bug, bump version.
We'll keep that graphic testing thing in there just in case.
2012-09-18 01:19:30 -07:00
Kevin Lange
57534cf009 Fix things up to prepare a working ramdisk. 2012-09-18 00:06:32 -07:00
Kevin Lange
a212a93942 Draw some pretty stuff and halt without a disk img
Don't push this to master!

[ci skip]
2012-09-17 22:58:49 -07:00
Kevin Lange
777b442a1e Finish rename of bochs driver to lfb driver.
* Removed some deprecated header stuff.
* Renamed functions / global variables.
2012-09-17 22:46:43 -07:00
Kevin Lange
5ce042f2d8 Deprecate VESA support.
This is in favor of bootloader-assisted mode switching. Grub has a
wonderful option we will exploit to set the video mode.

My laptop supports a couple of 32-bit video modes, which is nice,
because I'm not support 24-bit modes.

I'm not sure whether the super-sketchy video memory locator will work
in the real world, but we'll find out sometime soon.
2012-09-17 22:22:25 -07:00
Kevin Lange
4c67b5da84 Completely rewrote compositing engine
The compositor itself still needs work, but the compositing engine
within now does full blitting and is faster than the old method.
Transparency is now supported properly, though telling the compositor to
use it on a window will degrade performance. One terminal is usually
okay, and everything runs faster than it did before; two terminals is
pushing it; three will make you very sad. The stacking logic has also
been updated. Presumably, alpha blitting for transparent windows could
be done with SIMD instructions and be extremely fast.

All graphics libraries have also been updated to (hopefully) work
properly with alpha bits.
2012-09-13 22:12:47 -07:00
Kevin Lange
cea692b577 And now with more login.
* Also cleaning up some kernel logging options here.
* You can log in as local or root with passwords local and toor
* Graphical sessions are still buggy, so don't kill that terminal.
2012-09-12 23:19:07 -07:00
Kevin Lange
ba358a51ff Bump kernel version
* Panel now displays actual kernel version using the uname hack
2012-09-12 20:08:30 -07:00
Kevin Lange
03181de68b One line fix to a big bug in the ext2 driver
[ci skip]
2012-09-11 00:26:39 -07:00
Kevin Lange
af6be648d4 A lot of refactoring 2012-09-07 20:17:00 -07:00
Kevin Lange
5914a09735 Neglected to remove an include... 2012-09-04 20:58:19 -07:00
Kevin Lange
07955c83c6 Fix dozens of build warnings and other oddities.
* Finally bring syscall.h up to speed and include all syscalls in the
  syscall module of the C library.
* Remove the third-party obfuscated C demos (we have nyancat, good
  enough)
* Fix userspace apps to build without complaining about undeclared
  strtok_r by disable __STRICT_ANSI__
* Fix .eh_frame by including the proper stuff with libgcc.
2012-09-04 20:27:49 -07:00
Kevin Lange
0cdecac8e0 Disable size overrides in rme
(Fixes a warning that was caused by a "fix" to a undefined reference to
a missing 64-bit floating-point division function)
2012-09-04 14:45:09 -07:00
Kevin Lange
8ed06789ed New debug printing facilities.
- Can now register a userspace file descriptor as the output for kernel
  print statements through kprintf()
- Can set logging levels for debug print messages, which are separate
  from kernel log events and meant to be more readily visible. Log
  events are recorded in a buffer to be viewed later, though nothing
  actually using logging at the moment.
- Serial output is disabled by default now. You can enable it yourself
  by appending the logtoserial argument to the kernel on boot.
2012-09-03 22:35:11 -07:00
Kevin Lange
bba242dd62 Add a testing framework.
This is an automated system by which we boot qemu headless and use the
serial line to capture output from a testing application that is started
on bootup, running with the VGA terminal shell. This might be expanded
to boot to the graphical display within VNC and perform more advanced
tests with the Python shim using a VNC module for Python; we'll see.
2012-09-02 02:24:25 -07:00
Kevin Lange
c7cec92f35 Deprecate ',' in kernel args and fix run-fullscreen 2012-08-15 22:44:20 -07:00
Kevin Lange
444207cbd2 SIGCAT and fix alignment 2012-08-13 14:47:22 -07:00
Kevin Lange
baaa8bc6c8 Stylistic whitespace update to syscall.c 2012-07-06 21:16:19 -07:00
Kevin Lange
989b43ee68 Fix malloc in libc? 2012-06-01 02:02:02 +09:00
Kevin Lange
84ccf49990 Delayed writes [use sysfunc 3 to sync disc]
Please note that 'reboot' will not call sync yet, so make sure you do it
yourself.
2012-05-31 20:52:47 +09:00
Kevin Lange
0242e8aa11 [hopefully] Fix the EXT2 write support 2012-05-31 20:37:38 +09:00
Kevin Lange
5457de3906 System Debugging Functions syscall 2012-05-16 20:51:37 -04:00
Kevin Lange
5a1a45bc09 Faster mouse response
- Discard lots of packets
- Don't yield?
2012-04-12 23:21:38 -05:00
Kevin Lange
915ebc1dac Increment version to 0.2.1 2012-04-11 00:16:24 -05:00
Kevin Lange
85b958b2cd This is what happens when we don't maintain legacy stuff. 2012-04-10 23:49:22 -05:00
Kevin Lange
ac7720f396 Reenable support for a VGA text-mode terminal. 2012-04-10 23:35:12 -05:00
Kevin Lange
8096d89c16 [temp] Stop freeing file nodes (XXX) 2012-04-03 13:17:26 -05:00
Kevin Lange
35eb731ccb Bump version to 0.2.0, change branch to -dev 2012-03-27 21:52:38 -05:00
Kevin Lange
f68ca25622 Boot-to-shell through kernel argument 'single' 2012-03-27 21:47:25 -05:00
Kevin Lange
958262e69d Fix argv[0] bug 2012-03-27 21:36:39 -05:00
Kevin Lange
0ce4e02cba Actually release directories again so we don't run out of RAM 2012-03-27 19:38:04 -05:00
Kevin Lange
639881f931 Make things faster, better, stronger, etc. 2012-03-27 19:09:11 -05:00
Kevin Lange
9fd73be686 Trying a few fixes... We're still doing some things very, very wrong. 2012-03-27 16:52:46 -05:00
Kevin Lange
fb6e5d59e3 Completely rewrite rendering model for compositor.
We know longer accept DAMAGE and REDRAW commands. Instead, we just loop
and redraw everything anyway (efficiently, mind you). Pipes still have
issues when closed and various other different things.
2012-03-27 13:58:21 -05:00
Kevin Lange
29e031e6f6 [docs] Clean up some fixed XXXs and TODOs 2012-03-15 13:15:57 -05:00
Kevin Lange
816ddc8f3e Lots of process cleanup implemented; improved cursor rendering 2012-03-14 22:03:55 -05:00
Kevin Lange
ffbe7b7b38 A bunch of stuff. 2012-03-14 15:04:12 -05:00
Kevin Lange
03ee7ed9a9 Fix a kernel elf loader bug that was breaking getopt() 2012-03-13 17:43:35 -05:00
Kevin Lange
2791e7fd35 We've been doing some really stupid shit here... 2012-03-10 18:20:34 -06:00
Kevin Lange
66ba18fc33 Ug. 2012-03-10 15:03:59 -06:00
Kevin Lange
aa6e7ca62b Actually, I'm just a complete moron, lolz 2012-03-10 13:36:16 -06:00
Kevin Lange
cf6437c477 We were also leaking on sigkills 2012-03-10 13:34:15 -06:00
Kevin Lange
4b132c195b Thar's the problem. 2012-03-10 12:47:33 -06:00
Kevin Lange
e586a9361d No, I was an idiot. 2012-03-10 12:42:23 -06:00
Kevin Lange
1c288e1c8b We never freed nodes from the scheduler queue :( 2012-03-10 12:39:35 -06:00
Kevin Lange
1b2d0e2c75 Bump version number to 0.1.0 for EOH 2012-03-07 19:35:30 -06:00
Kevin Lange
8fb8edba3a I have no idea idea what I'm doing. 2012-03-01 21:13:52 -06:00
Kevin Lange
2b0d6f6759 Some very simplistic window management 2012-02-25 23:52:09 -06:00
Kevin Lange
db8a75071d We have a terminal. In a window. Seriously. 2012-02-23 00:36:49 -06:00
Kevin Lange
2da22312a5 Merge branch 'master' of github.com:klange/osdev 2012-02-20 23:32:10 -06:00
Kevin Lange
de7a984938 Fix a bunch of bugs in signal handling and scheduling 2012-02-20 23:31:00 -06:00
Kevin Lange
e335a2970a [glogin] Working on the graphical login application 2012-02-19 21:29:40 -06:00
Kevin Lange
e1beca4127 CPU detection moved to userspace app 2012-02-19 19:39:18 -06:00
Kevin Lange
e5ed5cdca0 Disable line buffering in pipes. Totally not our job. 2012-02-17 15:01:09 -06:00
Kevin Lange
7c41cd7080 Fix compile warnings 2012-02-17 01:27:56 -06:00
Kevin Lange
220e9cbc57 Hopefully fix some latent signal bugs 2012-02-17 01:21:11 -06:00
Kevin Lange
678ed81c65 Extensive stability fixes. I think I finally squashed those stack bugs. 2012-02-16 22:43:41 -06:00
Kevin Lange
531d70f933 Ugly fix to bootup stack fault bug 2012-02-16 15:51:26 -06:00
Kevin Lange
8fb69d44cd I have no frickin' clue what's causing these startup crashes. Requires further investigation. 2012-02-16 15:09:56 -06:00
Kevin Lange
a1d821de9b Various fixes 2012-02-16 14:38:50 -06:00
Kevin Lange
a72f9bc7cf Fix stack bug. 2012-02-16 14:31:40 -06:00
Markus Schober
6dc90b1ac2 shm_obtain takes a (size_t *) and modifies the value based on the true
size of the block returned.
2012-02-16 03:34:42 -06:00
Kevin Lange
c67d2796ef Finish threading (might still be some bugs) 2012-02-16 01:06:44 -06:00
Markus Schober
4453aba2de can haz threads? 2012-02-15 22:56:16 -06:00
Kevin Lange
cffbb02240 Stuff and things 2012-02-15 20:50:31 -06:00
Kevin Lange
de0bbe739b Fix a bunch of system calls... 2012-02-12 18:47:01 -06:00
Kevin Lange
9b1e227c0f Fix a dozen different things. 2012-02-12 16:45:23 -06:00
Kevin Lange
cc7354d298 Fix bad process switch handling on empty queues 2012-02-11 18:27:28 -06:00
Kevin Lange
89c7ef9620 Add signal header... 2012-02-11 18:02:22 -06:00
Markus Schober
45903b204b fixed a subtle bug in shm; added a bunch of utilities to test it 2012-02-10 22:31:38 -06:00
Kevin Lange
58c176dfa0 Syscalls to share file descriptors over a shared memory region 2012-02-08 20:59:34 -06:00
Kevin Lange
180342822a Merge branch 'master' of github.com:klange/osdev 2012-02-08 20:09:33 -06:00
Kevin Lange
79fcaf5136 Stability fixes. 2012-02-08 20:09:28 -06:00
Markus Schober
27d0deed5b [shm] fork() and execve() don't wreak havoc on shm 2012-02-08 19:59:34 -06:00
Kevin Lange
aa73f6fc6e Fix a task 0 exit bug 2012-02-08 19:30:35 -06:00
Kevin Lange
ea961ea0e3 Fix compilation warnings 2012-02-08 16:07:54 -06:00
Kevin Lange
65fa12f482 SIGNALS 2012-02-08 02:40:44 -06:00
Markus Schober
aec24c08f1 Attaching nearly works! 2012-02-07 02:29:28 -06:00
Kevin Lange
a190f9995c shm negotiate comments 2012-02-06 15:37:40 -06:00
Kevin Lange
fdaf53b0c4 [shm] Working on negotiation functions 2012-02-05 19:56:21 -06:00
Kevin Lange
1a5057e1fa [minor] typo 2012-02-05 18:14:29 -06:00
Kevin Lange
aba36f4dce Reserving syscall numbers for shared memory 2012-02-05 18:12:50 -06:00
Kevin Lange
c4e33117c0 mkdir and creat testing 2012-02-05 16:04:41 -06:00
Kevin Lange
6590b285b5 Mouse improvements (stability, scaling) 2012-02-04 22:29:46 -06:00
Kevin Lange
3bade472f2 Change comment regarding version names 2012-02-03 22:41:55 -06:00
Kevin Lange
2e8144493d Bootsplash testing (launches terminal afterwards) 2012-02-03 18:16:47 -06:00
Kevin Lange
78e96435ad [util] Script to run fullscreen 2012-02-03 12:23:49 -06:00
Kevin Lange
aac1d78e35 Drop packets from the mouse if the client isn't reading fast enough 2012-02-02 20:37:50 -06:00
Kevin Lange
4366a20a8f Pipe and packet-based mouse device 2012-02-02 16:16:29 -06:00
Kevin Lange
6f773cf407 Fix a cast warning 2012-01-31 20:12:19 -06:00
Kevin Lange
89d9265c73 Actually deschedule processes when they are waiting 2012-01-31 19:27:38 -06:00
Kevin Lange
71298a5c83 Relatively broken local echo support 2012-01-31 00:16:09 -06:00
Kevin Lange
a8cc561cce Try to write good documentation for the vfs module 2012-01-30 16:48:54 -06:00
Kevin Lange
238278c3fc init, get/sethostname 2012-01-30 12:10:53 -06:00
Kevin Lange
047f209357 Style guide. 2012-01-29 12:46:34 -06:00
Kevin Lange
c9d5e735ed Getting ready for thread support 2012-01-28 17:06:07 -06:00
Kevin Lange
a47fe02224 Directory switching 2012-01-27 13:10:58 -06:00
Markus Schober
405868ac8a First commit of readdir/ls support. 2012-01-27 04:04:04 -06:00
Kevin Lange
9061f91e74 stat(), fstat(), /bin/stat 2012-01-27 03:12:29 -06:00
Kevin Lange
71f5a8e3e4 New MOTD, bump version number (0.0.2-testing uiharu) 2012-01-27 00:25:28 -06:00
Kevin Lange
d112f6fedb Reboot [and fix user/group permissions in fork()] 2012-01-26 23:11:43 -06:00
Kevin Lange
ac8354d805 Add some system calls, plus a fakish /bin/login 2012-01-26 22:46:18 -06:00
Tianyi Wang
35ce150bb0 Fixes where the block number of inode is incorrectly changed. 2012-01-25 23:30:41 -06:00
Kevin Lange
c7afd7b941 HACF should return non-zero. 2012-01-25 20:08:22 -06:00
Tianyi Wang
cbb739e14b [fix merge conflict] 2012-01-25 19:30:45 -06:00