Commit Graph

128 Commits

Author SHA1 Message Date
Kevin Lange
9901f15d70 Allow esoteric boot configs 2016-12-24 14:06:05 +09: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
6d2bcef1cb Fix root= argument 2014-08-15 16:25:15 -07:00
Kevin Lange
17e332b5e7 expose mounting to userspace 2014-06-09 20:13:11 -07:00
Kevin Lange
e1a9cd87d2 Include additional contributors in kernel/main.c 2014-06-07 23:31:45 -07:00
Lioncash
55bf5fe03d Fix incorrect module size in kmain. 2014-05-21 20:22:24 -04:00
Kevin Lange
c1a2c312bb Fix a typo and a potentially crash with timers 2014-04-13 02:03:11 -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
860ded23d2 update some copyright years 2014-04-11 09:41:46 -07:00
Kevin Lange
75a7d5e7f2 Fix some module loading silliness 2014-04-10 23:08:07 -07:00
Kevin Lange
f16145cff6 lots of log overhauling 2014-04-05 15:23:17 -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
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
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
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
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
818fe2787b include stuff 2014-03-14 23:47:07 -07:00
Kevin Lange
91767bcc69 Debug shell as a module 2014-03-14 23:17:59 -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
47ace6c8d6 Cleanup headers 2014-03-09 23:31:13 -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
f5be45a2c9 lots of legacy cleanup 2013-12-15 21:33:46 -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
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
147f73b305 Temporarily use a tmpfs for local's home dir 2013-06-28 00:16:56 -07:00
Kevin Lange
edccf2927b Unbreak ramdisks 2013-04-27 22:04:20 -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
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
41030465a8 Save/restore sse (poorly) 2013-04-15 23:23:56 -07:00
Kevin Lange
7c4cd8dd51 fix nulldev, add zerodev 2013-03-31 13:01:05 -07:00
Kevin Lange
afac5cd955 fix derp in dev FSes, add /dev/random 2013-03-22 22:38:10 -07:00
Kevin Lange
71342f842d procfs, and more pty cleanup 2013-03-18 00:52:12 -07:00
Kevin Lange
8dd2686b40 Really hack VFS implementation 2013-03-15 00:20:55 -07:00
Kevin Lange
acb362e191 Update copyright in kernel/main.c 2013-01-04 20:42:18 -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
6cb9664b69 Fix some VESA woes 2012-12-02 23:28:29 -08:00