Commit graph

  • df87dda63c Implement argc/argv support for spawned tasks. Andreas Kling 2018-10-26 11:16:56 +02:00
  • 53abfa7ea1 Add sys$gethostname and /bin/hostname Andreas Kling 2018-10-26 09:54:29 +02:00
  • 3faaa3e04a Add /bin/false and /bin/true for fun. :^) Andreas Kling 2018-10-25 21:39:37 +02:00
  • dc6f57f19c Add gettimeofday() syscall and LibC wrappers gettimeofday() and time(). Andreas Kling 2018-10-25 17:29:49 +02:00
  • 5978185242 Add a "sleep" syscall that sleeps for N seconds. Andreas Kling 2018-10-25 13:53:49 +02:00
  • c6f2890d8e Implement a basic way for read() to block. Andreas Kling 2018-10-25 13:07:59 +02:00
  • ba56f4afde If no context switch occurs, add 1 to the timesScheduled() for current. Andreas Kling 2018-10-25 12:45:29 +02:00
  • 571dc8234f Make the stage2 init task sleep dreamily when finished. Andreas Kling 2018-10-25 12:39:59 +02:00
  • fdc782c1d1 Add a very naive block cache to the DiskBackedFileSystem. Andreas Kling 2018-10-25 12:35:49 +02:00
  • 82bbfa8496 Keyboard should support the space character (jeez!) Andreas Kling 2018-10-25 12:10:25 +02:00
  • 260b14e505 Implement errno in LibC. Andreas Kling 2018-10-25 12:06:00 +02:00
  • 434b6a8688 Unify the Task constructors. Andreas Kling 2018-10-25 11:15:17 +02:00
  • dff516f6d0 Remove unused Task states. Andreas Kling 2018-10-25 10:51:51 +02:00
  • 4bd69d4352 Remove old DatBuffer class. Andreas Kling 2018-10-25 10:49:43 +02:00
  • de7c54545a Remove age-old IPC stuff that wasn't working anyway. Andreas Kling 2018-10-25 10:39:39 +02:00
  • ce126120d1 Add a few more InterruptDisablers. Andreas Kling 2018-10-25 10:33:10 +02:00
  • 1c49b34b93 Selectively disable interrupts in MM. Andreas Kling 2018-10-25 10:15:28 +02:00
  • 86a547dcac Add parent PIDs to /proc/summary Andreas Kling 2018-10-25 10:15:13 +02:00
  • 16f318408d ELFLoader should fail with an error message for unresolved symbols. Andreas Kling 2018-10-25 10:00:37 +02:00
  • ec1d16b307 Add a "pwd" utility to userland. Andreas Kling 2018-10-24 14:28:22 +02:00
  • eb4074bb9d Put more logspam behind EXT2_DEBUG. Andreas Kling 2018-10-24 13:38:53 +02:00
  • 5f36a5f22e Add an lstat() syscall and use it to make "ls" nicer. Andreas Kling 2018-10-24 13:19:36 +02:00
  • bca4b71bfa Lots of hacking to make a very simple "ls" utility. Andreas Kling 2018-10-24 12:43:52 +02:00
  • 0c5bbac86e Add an InterruptDisabler helper class and use that for kmalloc. Andreas Kling 2018-10-24 11:07:53 +02:00
  • 9a296d63f3 Add simplified mmap() and munmap() syscalls. Andreas Kling 2018-10-24 09:48:24 +02:00
  • a5caf7ca99 Make the kmalloc global stats variable volatile. Andreas Kling 2018-10-24 01:02:55 +02:00
  • 82dae8fc90 Add a kmalloc lock. This definitely reduces flakiness. Andreas Kling 2018-10-24 00:51:19 +02:00
  • 8e27cf2428 Cleanup. Andreas Kling 2018-10-24 00:51:09 +02:00
  • 57136ad87e synthfs: generated files should have size=0. Andreas Kling 2018-10-24 00:50:23 +02:00
  • b40c851fce Unbreak crashy user process test. Andreas Kling 2018-10-24 00:35:07 +02:00
  • 3253a23b91 Add a simplified waitpid() so that sh can wait on spawned commands. Andreas Kling 2018-10-24 00:20:34 +02:00
  • 018da1be11 Generalize the SpinLock and move it to AK. Andreas Kling 2018-10-23 23:32:53 +02:00
  • e4bfcd2346 Add "times scheduled" field to /proc/summary Andreas Kling 2018-10-23 15:59:38 +02:00
  • 44045b258c Teach MM to flush individual TLB entries only. Andreas Kling 2018-10-23 15:53:11 +02:00
  • 3676214a62 Remove remains of the old "panel" task. Andreas Kling 2018-10-23 15:47:03 +02:00
  • d90d125dfe Add an undertaker task that is responsible for destroying dead tasks. Andreas Kling 2018-10-23 15:41:55 +02:00
  • 1c1d0f5362 ExecSpace should free its own allocations on destruction. Andreas Kling 2018-10-23 15:31:23 +02:00
  • ccd15e0590 Various things: Andreas Kling 2018-10-23 15:19:02 +02:00
  • c80a1f39ce Minor userland tweaks. Andreas Kling 2018-10-23 13:57:17 +02:00
  • 71ed63c91d Assume commands are binaries in /bin for now. Andreas Kling 2018-10-23 13:05:50 +02:00
  • d133a2845f Add missing TLB flushes. Andreas Kling 2018-10-23 13:03:11 +02:00
  • 77821da42f Also send console output to port 0xe9 (bochs console.) Andreas Kling 2018-10-23 13:02:38 +02:00
  • 63e253bac9 Generate a basic /proc/summary file with some info about all tasks. Andreas Kling 2018-10-23 12:44:46 +02:00
  • ed2422d7af Start adding a basic /proc filesystem and a "ps" utility. Andreas Kling 2018-10-23 11:57:38 +02:00
  • 98f76f0153 Flush the TLB after modifying page tables. Andreas Kling 2018-10-23 11:03:56 +02:00
  • 56ed448424 Move ELFLoader debug output behind flags. Andreas Kling 2018-10-23 11:03:26 +02:00
  • fe237ee215 Lots of hacking: Andreas Kling 2018-10-23 10:12:50 +02:00
  • 72514c8b97 Don't use doubles in RandomDevice. Andreas Kling 2018-10-23 00:35:11 +02:00
  • c8b7173aa8 Add a CircularQueue template class to AK. Andreas Kling 2018-10-22 22:46:02 +02:00
  • b824f15619 Launching an arbitrary ELF executable from disk works! :^) Andreas Kling 2018-10-22 15:42:39 +02:00
  • befeabd8fe Okay, with some mucking around, there is now a /bin/id and it runs! Andreas Kling 2018-10-22 14:41:54 +02:00
  • 38a621c721 Link "id" against the LibC. Andreas Kling 2018-10-22 14:13:17 +02:00
  • 63764b3a65 Import very modest Userland. Andreas Kling 2018-10-22 14:06:22 +02:00
  • 4cbf079a17 Start work on a standard C library. I'm calling it... LibC. Andreas Kling 2018-10-22 13:57:25 +02:00
  • 85bcf2ed0f Add getgid() and getpid() syscalls. Prep for LibC. Andreas Kling 2018-10-22 13:55:11 +02:00
  • bae59609e3 Move kprintf to its own file. It has nothing to do with VGA anymore. Andreas Kling 2018-10-22 13:20:35 +02:00
  • 702d308e67 Oops, StringImpl's "the empty string" global was not always initialized. Andreas Kling 2018-10-22 13:10:08 +02:00
  • c5e55f4737 Use UD2 instead of CLI;HLT for CRASH(). Andreas Kling 2018-10-22 13:07:06 +02:00
  • a9ca75c98b Add IRQHandler class that can be subclasses to handle an IRQ. Andreas Kling 2018-10-22 12:58:29 +02:00
  • 8f941561b4 Add ALWAYS_INLINE macro. Andreas Kling 2018-10-22 12:55:59 +02:00
  • ba185e3eba Zero out VirtualFileSystem::s_the in initializeGlobals(). Andreas Kling 2018-10-22 12:54:19 +02:00
  • e4afa2a041 Tweak _test.o to use the putch() syscall. Andreas Kling 2018-10-22 11:53:30 +02:00
  • 3a3c57357c Add a sys$exit and make init_stage2 call it when finished. Andreas Kling 2018-10-22 11:43:55 +02:00
  • 79ffdb7205 A lot of hacking: Andreas Kling 2018-10-22 11:15:16 +02:00
  • df4fdd6f1e printf format fixups in ELFLoader. Andreas Kling 2018-10-22 00:29:35 +02:00
  • 09fc9c0698 Make Console::m_rows/m_columns const for now. Andreas Kling 2018-10-21 23:48:50 +02:00
  • e38f40a83c Add an InlineLinkedList::containsSlow(T*) helper. Andreas Kling 2018-10-21 23:48:27 +02:00
  • a89bebfda4 printf -> kprintf Andreas Kling 2018-10-21 23:48:13 +02:00
  • fc88368582 Have Console::write() directly call vga_putch. Andreas Kling 2018-10-21 22:11:46 +02:00
  • a70bfb87d5 Add a Console device and start refactoring screen output. Andreas Kling 2018-10-21 21:59:43 +02:00
  • d5ec18027e Protect the first 4 KB of memory. Andreas Kling 2018-10-21 21:57:59 +02:00
  • dd6706a1a1 Fix null deref in contextSwitch(). Andreas Kling 2018-10-21 21:57:43 +02:00
  • 2f99ff801e Move post-boot kernel stack pointer to 0x4000. Andreas Kling 2018-10-21 21:51:12 +02:00
  • 46ff281695 Turn the syscall interrupt into a trap (by switching the gate type.) Andreas Kling 2018-10-19 11:28:43 +02:00
  • 2d1d01661b Add a way to initialize VFS globals. Andreas Kling 2018-10-19 11:20:49 +02:00
  • 97e0d75bcb ELFLoader works inside the kernel! Andreas Kling 2018-10-18 15:38:04 +02:00
  • 6ab0649ad6 ksprintf() should null-terminate strings. Andreas Kling 2018-10-18 15:24:07 +02:00
  • c149d2a8f0 Build ELFLoader into Kernel. Andreas Kling 2018-10-18 15:03:10 +02:00
  • 3649638259 Add Regions concept to Task. Andreas Kling 2018-10-18 14:53:00 +02:00
  • 5b10846bed Add a simple ELF binary called _test.o to the test fs. Andreas Kling 2018-10-18 13:16:30 +02:00
  • f67d695254 More paging stuff. Andreas Kling 2018-10-18 13:05:00 +02:00
  • 89851a9ded Use FileHandle from VFS. Andreas Kling 2018-10-18 10:28:09 +02:00
  • e86cadc7af Add an fd field to FileHandle in Kernel builds. Andreas Kling 2018-10-18 10:27:07 +02:00
  • 9d5de91cf3 Actually destroy tasks after they crash. Andreas Kling 2018-10-18 00:26:30 +02:00
  • 1a801e5737 Hang if we GPF in ring 0. Andreas Kling 2018-10-18 00:12:52 +02:00
  • 56c1f9db8e A userspace process can now GPF and the OS goes on! Andreas Kling 2018-10-17 23:49:32 +02:00
  • 77299cf54d Add basic paging. Only identity maps the bottom 4MB as a start. Andreas Kling 2018-10-17 23:13:55 +02:00
  • 286e27ef40 Allow running in QEMU with "./run q" Andreas Kling 2018-10-17 16:58:35 +02:00
  • 8ff394f83f Fix a dumb in buffer_putch. Andreas Kling 2018-10-17 16:56:47 +02:00
  • 9aa88fe186 Add a PIC::getISR() helper. Andreas Kling 2018-10-17 16:53:06 +02:00
  • e0f31d38a2 Add -fno-pic -fno-pie to build flags. Andreas Kling 2018-10-17 16:49:30 +02:00
  • f82b25d4f9 Fix some minor build warnings. Andreas Kling 2018-10-17 16:48:16 +02:00
  • 347e202f7f Add size_t and ssize_t to kernel builds. Andreas Kling 2018-10-17 16:47:19 +02:00
  • 7580ac576f Make VFS host build work again. Andreas Kling 2018-10-17 12:23:19 +02:00
  • 39fa1eb2c2 Print the contents of motd.txt on boot. Andreas Kling 2018-10-17 12:07:39 +02:00
  • 705832f387 List the root directory after mounting /. Andreas Kling 2018-10-17 11:47:14 +02:00
  • b05ed591ab VFS mounts an ext2fs root! :^) Andreas Kling 2018-10-17 11:44:06 +02:00
  • d2425495ca VirtualFileSystem class builds inside Kernel. Andreas Kling 2018-10-17 11:40:58 +02:00
  • 9171521752 Integrate ext2 from VFS into Kernel. Andreas Kling 2018-10-17 10:55:43 +02:00
  • aec8ab0a60 Add the basic character devices to kernel. Andreas Kling 2018-10-16 14:33:16 +02:00