Commit Graph

546 Commits

Author SHA1 Message Date
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