Commit Graph

2543 Commits

Author SHA1 Message Date
Jonas 'Sortie' Termansen 7304c8f528 Fixed uninitialized memory bug in the keyboard driver.
This often prevented the letter 'c' from working in x64.
2011-12-01 17:30:14 +01:00
Jonas 'Sortie' Termansen f5b46a89ed uname(1) now reports whether the system is 32-bit or 64-bit. 2011-12-01 15:30:17 +01:00
Jonas 'Sortie' Termansen ae1c157445 Temporary hack to make x64 system calls use the right registers. 2011-12-01 14:54:47 +01:00
Jonas 'Sortie' Termansen 6562da4092 waitpid(2) now returns ECHILD on error. 2011-12-01 14:54:19 +01:00
Jonas 'Sortie' Termansen cf53e4a020 Fixed 64-bit resumed system calls. 2011-12-01 14:29:49 +01:00
Jonas 'Sortie' Termansen c0c20860ed Lots of improvements to 64-bit Sortix.
Fixed 64-bit-ness bug in BSR() and BSF().
Added 64-bit system call stubs in libmaxsi.
Added a Elf64 program loader.
Fixed uninitialized memory bug in the scheduler.
x64/boot.s now takes care of user-space memory permissions.
Fixed bug in x64/syscall.s

That's right. The system now boots in 64-bit mode.

It is horribly unstable, though.
2011-12-01 10:45:44 +01:00
Jonas 'Sortie' Termansen f460c4abec Added support for 64-bit interrupts. 2011-11-30 23:30:14 +01:00
Jonas 'Sortie' Termansen f0ec4ffacc Forgot to push %rbp in x64/syscall.s 2011-11-29 11:45:00 +01:00
Jonas 'Sortie' Termansen 0b1c2a77c9 x64 now compiles again and runs on real hardware.
A nasty bug was fixed that caused triple faults on systems with > 1 GiB RAM.
2011-11-29 01:31:54 +01:00
Jonas 'Sortie' Termansen 8c146f14c0 Added uptime(1). 2011-11-28 16:29:53 +01:00
Jonas 'Sortie' Termansen f232a054d3 Added O=-ON and PANIC_SHORT=1 variables to the makefile. 2011-11-28 15:25:00 +01:00
Jonas 'Sortie' Termansen 965f3e3dbf Pong no longer shakes as much the first few frames. 2011-11-28 11:48:02 +01:00
Jonas 'Sortie' Termansen 1686b2b903 Removed hello program. 2011-11-28 11:34:50 +01:00
Jonas 'Sortie' Termansen 6781308360 Rewrote the memory allocation functions.
free(3) can now unify unused neighbor blocks, reducing mem usage.
2011-11-27 22:53:05 +01:00
Jonas 'Sortie' Termansen cd936886e6 Writing to /dev/vga hides the cursor until a write to /dev/tty. 2011-11-27 12:03:33 +01:00
Jonas 'Sortie' Termansen 4f3a7230b0 Destroying the addressspace after exit prevents leak of at least 16 KiB. 2011-11-27 12:02:34 +01:00
Jonas 'Sortie' Termansen 06909c6df9 Fixed panic when executing non-existent file. 2011-11-27 00:20:23 +01:00
Jonas 'Sortie' Termansen d96d790de7 Oops, meant 'used' instead of 'free' in memstat. 2011-11-26 21:10:08 +01:00
Jonas 'Sortie' Termansen bd1b1fe3bc Added isatty(2), which is used by editor. 2011-11-26 21:00:40 +01:00
Jonas 'Sortie' Termansen 3f50a335bb devfs now correctly manages sizes of files.
This fixes a regression caused by the RAM fix a few commits ago.
2011-11-26 21:00:37 +01:00
Jonas 'Sortie' Termansen ce9787a439 Greatly reduced RAM usage in ramfs. 2011-11-26 20:25:25 +01:00
Jonas 'Sortie' Termansen 9152443816 Added memstat, a program for displaying memory usage. 2011-11-26 20:14:57 +01:00
Jonas 'Sortie' Termansen f45def4a68 cat(1) now writes to fd 1 instead of /dev/tty. 2011-11-26 19:14:08 +01:00
Jonas 'Sortie' Termansen 4cac495121 mxsh now ignores trailing whitespace. 2011-11-26 13:27:15 +01:00
Jonas 'Sortie' Termansen d4231b2027 Added program_invocation_name(3), error(3), and perror(3) and used them. 2011-11-26 11:00:45 +01:00
Jonas 'Sortie' Termansen 867627c085 Added echo(1). 2011-11-26 00:54:17 +01:00
Jonas 'Sortie' Termansen b6a0fd0374 Removed deprecated VGA API and moved it to /dev/vga. 2011-11-25 13:38:31 +01:00
Jonas 'Sortie' Termansen c0fa3a6aae Editor no longer moves the cursor if not needed. 2011-11-24 20:25:52 +01:00
Jonas 'Sortie' Termansen 63b622a086 The shell now supports sending stdout to a file. 2011-11-24 17:42:40 +01:00
Jonas 'Sortie' Termansen 724305f3a7 Merge commit '7a233f2938f4e28d61504853e2f6daf4904aab33'
Conflicts:
	sortix/fs/ramfs.cpp
2011-11-24 15:38:45 +01:00
Jonas 'Sortie' Termansen 7aff476117 Fixed bug in the remove function of the sorted list class. 2011-11-24 10:41:13 +01:00
Jonas 'Sortie' Termansen 4890c306c4 printf(3) now writes to fd 1. 2011-11-24 10:26:36 +01:00
Jonas 'Sortie' Termansen e72d086a8f Disallow / in filenames in ramfs. 2011-11-23 17:51:18 +01:00
Jonas 'Sortie' Termansen 481ddfa7e4 rm(1) usage now works without crashing. 2011-11-23 17:05:09 +01:00
Jonas 'Sortie' Termansen 5bf22b2c4a ramfs doesn't allow opening files as directories. 2011-11-23 14:14:59 +01:00
Jonas 'Sortie' Termansen 1f4dc3d0b5 The shell can now print %. 2011-11-23 14:07:02 +01:00
Jonas 'Sortie' Termansen 2b032b0414 Initial signal support. Please squash improvements into this commit. 2011-11-23 00:19:09 +01:00
Jonas 'Sortie' Termansen 7a9afd66fe cat(1) now writes to /dev/tty.
Someone really ought to implement stdout.
2011-11-23 00:18:04 +01:00
Jonas 'Sortie' Termansen 46c0cc6a12 -1 is no longer an allowed system call.
This treats a nasty bug where forking and exiting before the child
causes the kernel to panic, because the syscall -1 is run, which
just contains a trash value that happened to be 0.

The cause is still unknown. Might be the scheduler.

This won't help me sleep at night.
2011-11-22 22:08:34 +01:00
Jonas 'Sortie' Termansen b15763b2de Fixed descriptors not being reset by SysExit.
Indirectly, this fixes the snake; snake; panic bug.
2011-11-22 19:12:04 +01:00
Jonas 'Sortie' Termansen e234e0a2d4 execve(2) now sets errno=EACCESS on non-buffer files. 2011-11-22 18:21:01 +01:00
Jonas 'Sortie' Termansen 9deb183786 The ELF loader now uses errno. 2011-11-22 18:06:40 +01:00
Jonas 'Sortie' Termansen 6986963b4b cp(1) can now support the syntax cp /bin/snake / 2011-11-22 17:57:10 +01:00
Jonas 'Sortie' Termansen 1b56d01f17 Improved error codes in devfs. 2011-11-22 17:56:58 +01:00
Jonas 'Sortie' Termansen 9f35df813e Implemented errno(3), added support in both kernel and utils. 2011-11-22 17:26:47 +01:00
Jonas 'Sortie' Termansen 8678ad6444 / is no longer a valid filename under ramfs. 2011-11-22 15:33:47 +01:00
Jonas 'Sortie' Termansen 2c3fb60d52 execve(2) now works relative to current dir. 2011-11-22 15:27:58 +01:00
Jonas 'Sortie' Termansen e8fb8d885b execve(2) can now load programs from the filesystem.
Previously it was restricted to only the ramdisk.
2011-11-22 14:02:33 +01:00
Jonas 'Sortie' Termansen 324a9a1a22 Fixed bug in initfs causing panics. 2011-11-22 12:44:23 +01:00
Jonas 'Sortie' Termansen 55240fb3f5 Added devfs, with files /tty and /null and mounted it at /dev. 2011-11-21 21:49:13 +01:00