Commit Graph

115 Commits

Author SHA1 Message Date
Kevin Lange
027d979fbc Fix incorrectly 0'd userspace entry pointer; bad pointer validate in stat_node 2015-05-29 16:12:04 -07:00
Dale Weiler
5ddbbf8199 Some IRQ cleanup 2015-05-20 19:52:19 -04:00
Dale Weiler
51fbc77e3f Eliminate superfluous strlen pass in vasprintf 2015-05-20 18:21:39 -04: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
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
a2ed4b4f0e strip vim: lines from kernel 2014-06-07 23:43:21 -07:00
Kevin Lange
ef7d72c1e1 License headers and a tool to generate them 2014-06-07 23:13:29 -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
f054cebdce naive implementation of sudo and possibly insecure setuid support 2014-05-25 21:59:51 -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
5319ce7e80 Fix an edge case failure in elf allocation 2014-05-03 15:35:24 -07:00
Kevin Lange
2db3fccd24 Do a better job with page table management 2014-04-25 23:17:20 -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
dedc201bc1 Ensure {0,0} auxv makes it into memory 2014-04-24 23:02:28 -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
7d2083cae9 handle printf("%s", NULL) without crashing 2014-04-13 02:04:34 -07:00
Kevin Lange
1f4d108c6c Don't allocate buffer on stack 2014-04-13 02:01:31 -07:00
Kevin Lange
3d7a3969eb Support launching arbitrary debug shells 2014-04-11 22:43:39 -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
9b5cf9cec5 Video as a module, kill device_init 2014-03-19 18:56:07 -07:00
Kevin Lange
0a08fa257e Partition mappings 2014-03-16 18:39:03 -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
b46d632116 serial, null, zero to modules 2014-03-15 19:48:51 -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
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
d42617020f random rtl network stuff, not working yet 2014-02-26 21:00:16 -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
6629eed64a debug shell cleanup 2013-12-14 13:47:18 -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