Commit Graph

281 Commits

Author SHA1 Message Date
Ali Mashtizadeh
2bb2090c93 Remove already fixed comment 2015-02-16 13:11:55 -08:00
Ali Mashtizadeh
473d00e669 Cleanup warnings from all the previous MP changes 2015-02-16 13:04:40 -08:00
Ali Mashtizadeh
e1959cf3f2 Ignore empty lines in kernel debugger 2015-02-16 13:04:22 -08:00
Ali Mashtizadeh
4e4490872e Add missing cleanup code in Process_Destroy 2015-02-16 13:03:57 -08:00
Ali Mashtizadeh
220328dd91 Add MP enhancements for the kernel debugger 2015-02-15 20:17:00 -08:00
Ali Mashtizadeh
d5535ded23 Make spinlock stack per-CPU 2015-02-15 20:05:24 -08:00
Ali Mashtizadeh
4ce2388ef2 Basic multiprocessing seems to be working, but some locking issues may remain 2015-02-15 19:15:18 -08:00
Ali Mashtizadeh
b8c8b1fc7d Improvements for SMP 2015-02-15 18:50:43 -08:00
Ali Mashtizadeh
4808b746f5 Basic MP bootup works 2015-02-15 17:00:55 -08:00
Ali Mashtizadeh
b34f8ed0fd Print backtrace when application faults 2015-02-06 17:08:44 -08:00
Ali Mashtizadeh
251654f2c7 More improvements to support lwip 2015-02-03 14:06:17 -08:00
Ali Mashtizadeh
348a7acc15 Moving some definitions from time.h into sys/time.h 2015-02-02 15:29:12 -08:00
Ali Mashtizadeh
78afc5e47d Header file improvements to enable compiling lwip 2015-02-02 15:10:15 -08:00
Ali Mashtizadeh
73064ffdf6 pthread mutex tests 2015-02-02 13:04:43 -08:00
Ali Mashtizadeh
1ceea3c677 Various bugfixes to Thread_Wait and the pthread library 2015-02-02 11:55:34 -08:00
Ali Mashtizadeh
d729ee868d Fixing compiler warnings 2015-01-30 23:02:18 -08:00
Ali Mashtizadeh
8b45f56bf5 Fix mmap and expose gettid system call 2015-01-30 20:43:28 -08:00
Ali Mashtizadeh
9251a3b7cc ethinject and plumbing for transmitting raw network packets. 2015-01-28 11:35:47 -08:00
Ali Mashtizadeh
8f24dbe6d0 Plumbing for raw packet reading 2015-01-27 10:34:44 -08:00
Ali Mashtizadeh
10bf52f68f A simple ifconfig to show a list of NICs and mac addresses 2015-01-23 13:02:31 -08:00
Ali Mashtizadeh
6f2c8be0ca Removing some excess kprintfs 2015-01-23 12:16:20 -08:00
Ali Mashtizadeh
359d55f53c Removing excess logging and improve semaphore debugging 2015-01-22 15:11:12 -08:00
Ali Mashtizadeh
ccebc2fe60 Finished Process_Wait implementation 2015-01-22 15:00:01 -08:00
Ali Mashtizadeh
9c4761b5f3 Fix thread reference counting leak in Semaphore_Acquire 2015-01-22 14:51:27 -08:00
Ali Mashtizadeh
c80577c5e8 OSWait now waits for child process to exit 2015-01-22 14:11:26 -08:00
Ali Mashtizadeh
534879b0c0 Show lock stack when a spinlock waits too long 2015-01-22 13:52:02 -08:00
Ali Mashtizadeh
ee3874da77 Bug fixes and code cleanup for thread related code 2015-01-22 13:04:43 -08:00
Ali Mashtizadeh
7aaf5cbc5f Adding title to process structure and create default kernel process 2015-01-22 10:08:09 -08:00
Ali Mashtizadeh
fa1b3c9ed2 Fix thread reference counting 2015-01-22 09:46:48 -08:00
Ali Mashtizadeh
63c04f37df Moving to using reference counts for process and thread structures. 2015-01-20 15:30:11 -08:00
Ali Mashtizadeh
2447babe6a Renaming functions and reorganizing functions in thread.c 2015-01-20 15:07:31 -08:00
Ali Mashtizadeh
5808a2564d Implemented CopyStrIn/Out to fix bugginess of using CopyIn/Out wrapping passed a mapped page. 2015-01-19 17:57:20 -08:00
Ali Mashtizadeh
5ed248c8ec Cleanup and fixing warnings 2015-01-19 17:04:14 -08:00
Ali Mashtizadeh
02c0816e41 Adding wait system call 2015-01-18 15:08:12 -08:00
Ali Mashtizadeh
4f15c9fd01 Improvement to ThreadWait 2015-01-18 13:56:15 -08:00
Ali Mashtizadeh
29dd4d3af8 Implement kernel semaphores 2015-01-18 13:48:16 -08:00
Ali Mashtizadeh
4d3eefa3e7 Renaming Timer to KTimer to mach the file names 2015-01-17 13:52:04 -08:00
Ali Mashtizadeh
929784bc52 Adding threadList to process structure. 2015-01-17 13:37:32 -08:00
Ali Mashtizadeh
89ac71a773 Remove unnecessary logging from kern/thread.c 2015-01-16 20:29:45 -08:00
Ali Mashtizadeh
102520ec1b Remove unnecessary logging from kern/thread.c 2015-01-16 20:22:01 -08:00
Ali Mashtizadeh
1160570250 Implemented OSThreadExit and a nonblocking OSThreadWait 2015-01-16 19:41:27 -08:00
Ali Mashtizadeh
db7bb93d56 Adding log message to RTC 2015-01-16 18:48:15 -08:00
Ali Mashtizadeh
5a3d86aa7b Implemented OSThreadCreate system call 2015-01-16 17:57:21 -08:00
Ali Mashtizadeh
114b35bbbc Fix overflow in KTime_GetEpochNS 2015-01-16 17:08:29 -08:00
Ali Mashtizadeh
c408b47966 Keep track of process wait times 2015-01-16 15:25:36 -08:00
Ali Mashtizadeh
6953d03cb3 Fix bug in timer wheel 2015-01-16 15:25:13 -08:00
Ali Mashtizadeh
a01b839b67 Fix bug in KTime_GetEpochNS() 2015-01-16 15:16:44 -08:00
Ali Mashtizadeh
2342aefe9e Support sleep(0) 2015-01-16 14:52:20 -08:00
Ali Mashtizadeh
60799c824e Support thread sleep system call 2015-01-16 14:50:10 -08:00
Ali Mashtizadeh
35b633417f Fix time keeping, TSC ticks per second, and implement generic timer infrastructure. 2015-01-16 14:32:47 -08:00
Ali Mashtizadeh
64f2ca2259 Fix a bug in the scheduler 2015-01-15 21:24:15 -08:00
Ali Mashtizadeh
e1f9737450 Improve slab debugging 2015-01-15 21:24:04 -08:00
Ali Mashtizadeh
858f3cff69 Plumbing thread related system calls into user-level 2015-01-14 14:57:47 -08:00
Ali Mashtizadeh
156e25fcc5 Improving process debugging code and scheduler queues 2015-01-14 14:44:32 -08:00
Ali Mashtizadeh
9d9f301bdd Begin refactoring to support both threads and processes 2015-01-14 14:28:43 -08:00
Ali Mashtizadeh
c74592a3ba Merge branch 'master' of bitbucket.org:/mashtizadeh/castor 2015-01-05 17:06:55 -08:00
Ali Mashtizadeh
408cb2adc0 Cleanup thread and loader code 2015-01-05 17:06:35 -08:00
Ali Mashtizadeh
88f4a73df7 Implemented a simple malloc and a few minor fixes 2015-01-04 22:10:37 -08:00
Ali Mashtizadeh
03061ed968 Fallout from refactoring and readdir wrappers. 2015-01-02 16:13:53 -08:00
Ali Mashtizadeh
9b4e8af58c Basic NIC enumeration and wrapping 2014-12-31 19:31:25 -08:00
Ali Mashtizadeh
907baa75a7 Fix bug that caused a crash if an interrupt was triggered while loading a binary. 2014-12-30 21:13:29 -08:00
Ali Mashtizadeh
9a4ad50d34 Fixing some pmap issues with regards to the loader 2014-12-30 20:40:02 -08:00
Ali Mashtizadeh
266dfcc857 Basic time functions and fix time system call 2014-12-30 17:54:42 -08:00
Ali Mashtizadeh
79a55fc518 Fix bug in E1000 tx initialization 2014-12-30 15:56:18 -08:00
Ali Mashtizadeh
9ea5850518 Test code verified RX interrupt handling works correctly 2014-12-30 12:23:30 -08:00
Ali Mashtizadeh
3773f38565 Basic E1000 configuration seems working 2014-12-29 21:32:00 -08:00
Ali Mashtizadeh
d5bed8e29a Remove debugging printf 2014-12-29 20:15:15 -08:00
Ali Mashtizadeh
28fa88ef3c Implement general VA2PA 2014-12-29 20:14:46 -08:00
Ali Mashtizadeh
989dad3726 Fix comment in palloc 2014-12-08 22:47:57 -08:00
Ali Mashtizadeh
438b073151 Implement reference counting for the page allocator 2014-12-08 22:37:40 -08:00
Ali Mashtizadeh
344d3887c4 Add debugging stats for XMem 2014-12-08 17:44:45 -08:00
Ali Mashtizadeh
6d9ca7f578 Add ls to shell, readdir support, and fix a bug in opening root directory. 2014-12-05 18:05:53 -08:00
Ali Mashtizadeh
645b8f18e0 Basic shell commands and bug fixes 2014-12-05 14:07:28 -08:00
Ali Mashtizadeh
39562233bf Support opening, reading and stating files from userlevel 2014-12-05 00:25:20 -08:00
Ali Mashtizadeh
0e44a1a696 Shell console IO works 2014-11-29 16:48:59 -08:00
Ali Mashtizadeh
4b6006bd9a Basic log level support 2014-11-29 16:39:48 -08:00
Ali Mashtizadeh
44195fd034 Fix TSS kernel stack pointer switching 2014-11-29 15:46:17 -08:00
Ali Mashtizadeh
796a7f0cbb Segment registers and TSS bugfix that caused triple faults. Also includes part of the Spawn system call implementation. 2014-11-26 13:49:17 -08:00
Ali Mashtizadeh
8d9580b273 Basic sysctl infrastructure 2014-11-25 12:07:14 -08:00
Ali Mashtizadeh
287b3bc043 C11 and KTime improvements 2014-11-25 00:22:05 -08:00
Ali Mashtizadeh
a379454139 Connect time syscall 2014-11-24 23:47:58 -08:00
Ali Mashtizadeh
f58694ca12 Implemented from and to epoch 2014-11-24 22:21:37 -08:00
Ali Mashtizadeh
bcc331a3d8 Reorganization of kernel time code 2014-11-24 16:17:17 -08:00
Ali Mashtizadeh
27349da2b1 Fix console issues 2014-11-24 14:31:47 -08:00
Ali Mashtizadeh
d9b68fc462 Basic X86 RTC code 2014-11-22 14:35:18 -08:00
Ali Mashtizadeh
1b82af5c11 Wrappers for mman operations 2014-10-15 15:19:17 -07:00
Ali Mashtizadeh
c39c558da0 C compat issues 2014-10-15 02:10:46 -07:00
Ali Mashtizadeh
3fc2949c5c Basic stdio.h support working 2014-10-14 19:07:19 -07:00
Ali Mashtizadeh
b607141ce1 Fix a warning 2014-10-14 18:02:19 -07:00
Ali Mashtizadeh
ed48a8b1b4 Partial implementation of some of libc's FILE operations 2014-10-14 18:00:14 -07:00
Ali Mashtizadeh
331b8aba6e Implement support for Console IO 2014-10-14 16:24:47 -07:00
Ali Mashtizadeh
5852ce5727 Fixes to CopyIn/CopyOut 2014-10-14 16:23:50 -07:00
Ali Mashtizadeh
a8aeb1a3c5 Implement strncmp 2014-10-14 14:07:55 -07:00
Ali Mashtizadeh
fa86208a82 Add copy.c into build 2014-10-14 13:58:34 -07:00
Ali Mashtizadeh
7c0d1cae67 Posix compat work 2014-10-14 12:39:26 -07:00
Ali Mashtizadeh
4e76a9a922 Improving kernel ELF loader 2014-10-12 20:22:52 -07:00
Ali Mashtizadeh
b2c2b7c45a Implement copyin/copyout 2014-10-12 13:17:18 -07:00
Ali Mashtizadeh
9cdc13e0f5 Improve build portability. 2014-10-09 21:05:02 -07:00
Ali Mashtizadeh
1cb427aa65 Improve console to ignore escape sequences 2014-10-08 14:04:51 -07:00
Ali Mashtizadeh
3610f34c63 Enable more C warnings and fix a few instances of those warnings. 2014-09-29 13:46:38 -07:00
Ali Mashtizadeh
dac51c8166 Improve linker script compatability 2014-09-29 13:24:10 -07:00
Ali Mashtizadeh
0e8b1ecea3 Fixing bugs in the slab allocator and xmem. 2014-09-05 18:34:51 -07:00
Ali Mashtizadeh
79690d03be Fix build error 2014-09-05 18:18:49 -07:00
Ali Mashtizadeh
e5fd27f2f2 Switch to using the slab allocator for common objects. 2014-09-05 18:06:03 -07:00
Ali Mashtizadeh
b84ee76c20 Fix a bug in the slab allocator and improve the debugging output. 2014-09-05 18:04:33 -07:00
Ali Mashtizadeh
b052cc6740 Add backtrace command to debugger 2014-09-05 18:03:52 -07:00
Ali Mashtizadeh
03343a774c Simple slab allocator allocator 2014-09-04 23:26:02 -07:00
Ali Mashtizadeh
3ada1a4fcc Fixing warnings and small fixes. 2014-09-04 18:21:18 -07:00
Ali Mashtizadeh
bad9c2b470 Support PS2 keyboard in debug console 2014-09-03 17:38:34 -07:00
Ali Mashtizadeh
4e0a73c1cd Basic PS2 keyboard driver 2014-08-19 19:05:57 -07:00
Ali Mashtizadeh
244be786c8 Debugging for critical.c 2014-08-19 18:10:53 -07:00
Ali Mashtizadeh
7dfca8cdba Bug fixes and debugging for ioapic 2014-08-19 18:10:09 -07:00
Ali Mashtizadeh
41b659b558 Generic handle infrastructure 2014-08-08 13:55:12 -07:00
Ali Mashtizadeh
2611795d6f Implementing and testing a few system calls 2014-08-07 17:58:41 -07:00
Ali Mashtizadeh
6bddaeffe7 Switch loader to use VFS and a few bug fixes 2014-08-01 15:50:04 -07:00
Ali Mashtizadeh
2a79939b79 Beginning O2FS and VFS code along with superblock and root directory reading. 2014-08-01 14:15:06 -07:00
Ali Mashtizadeh
3e35c771cc Improving IDE driver 2014-08-01 14:13:09 -07:00
Ali Mashtizadeh
008488413a Implement memcmp 2014-07-31 18:16:08 -07:00
Ali Mashtizadeh
e901bdc7ce Implement disk cache and improve other related parts of the kernel. 2014-07-30 17:19:24 -07:00
Ali Mashtizadeh
0d1847269a Placeholder for system calls 2014-07-28 14:35:00 -07:00
Ali Mashtizadeh
3aef9e4cd8 Improving kernel ASSERT messages 2014-07-28 14:25:34 -07:00
Ali Mashtizadeh
0dd593fff2 User space working 2014-07-27 17:09:31 -07:00
Ali Mashtizadeh
b8b91d3e33 Cleanup and locking for the IDE driver. 2014-07-25 01:43:23 -07:00
Ali Mashtizadeh
ff2be2e406 rdtsc and improved spinlock statistics 2014-07-24 20:25:17 -07:00
Ali Mashtizadeh
9c6c3691b1 Fix build of IDE driver 2014-07-24 17:21:24 -07:00
Ali Mashtizadeh
82af1f6801 Disk infrastructure and working read support 2014-07-24 16:38:35 -07:00
Ali Mashtizadeh
bb9f0133fc Reduce kernel size due to linker script alignment 2014-07-23 18:27:20 -07:00
Ali Mashtizadeh
cfa5135302 Cleanup and implement Spinlock_Destroy 2014-07-23 18:14:54 -07:00
Ali Mashtizadeh
c184e7fa0a Implement kernel threads and a round-robin scheduler 2014-07-23 18:07:07 -07:00
Ali Mashtizadeh
a3cf5d9ad9 Spinlock debugging 2014-07-23 18:06:21 -07:00
Ali Mashtizadeh
73359af474 Merge branch 'master' of bitbucket.org:/mashtizadeh/castor 2014-07-21 23:43:43 -07:00
Ali Mashtizadeh
76108674d1 Build improvements 2014-07-21 23:43:01 -07:00
Ali Mashtizadeh
23117cf815 Fix to debugger 2014-07-21 12:49:45 -07:00
Ali Mashtizadeh
32d5f6740a Implement fxsave/xsave assembly 2014-07-20 19:33:02 -07:00
Ali Mashtizadeh
a71418733a Generate array of debug commands in a segment to remove static code. 2014-07-20 13:45:57 -07:00
Ali Mashtizadeh
028450f0a5 Kernel relocated to high memory 2014-07-18 15:09:52 -07:00
Ali Mashtizadeh
ddba3f671a Create linker script 2014-07-18 13:37:46 -07:00
Ali Mashtizadeh
c523345a4a Adding pcidump command to debugger 2014-07-17 01:14:49 -07:00
Ali Mashtizadeh
0d26227290 Fix memory leak and incorrect debugging output in pmap.c 2014-07-17 00:44:13 -07:00
Ali Mashtizadeh
d5b94390f8 Support up to 6GBs of RAM and improve debugging 2014-07-16 17:21:18 -07:00
Ali Mashtizadeh
19e9bbc22b Cleanup multiboot entry code 2014-07-16 01:27:58 -07:00
Ali Mashtizadeh
828b51034e Split SATA definitions out of AHCI driver 2014-07-16 01:25:39 -07:00
Ali Mashtizadeh
77c06d3edd xsave structure definition 2014-07-16 00:09:44 -07:00
Ali Mashtizadeh
95fbcc08b0 Remove some unused variables 2014-07-15 17:25:48 -07:00
Ali Mashtizadeh
12c5b196d9 Various interrupt bug fixes and improvements. 2014-07-15 17:00:16 -07:00
Ali Mashtizadeh
5014c0db2b Cleanup 2014-07-14 20:11:29 -07:00
Ali Mashtizadeh
27c65e8992 Refactoring and improvements 2014-07-13 23:16:54 -07:00
Ali Mashtizadeh
eb6efaa773 Add reboot command to debugger 2014-07-13 17:05:19 -07:00
Ali Mashtizadeh
24cb178868 Import FreeBSD AMD64 disassembler 2014-07-13 16:52:18 -07:00
Ali Mashtizadeh
4cb35eee1c Fix warnings in kern/debug.c 2014-07-13 14:48:41 -07:00