pintos-anon
20 years agoChange --gstabs+ to --gstabs in ASFLAGS to support older assemblers.
Ben Pfaff [Thu, 2 Sep 2004 22:09:56 +0000 (22:09 +0000)]
Change --gstabs+ to --gstabs in ASFLAGS to support older assemblers.

20 years agoAdd comments.
Ben Pfaff [Thu, 2 Sep 2004 22:04:57 +0000 (22:04 +0000)]
Add comments.

20 years agoMake linking of start.S less brittle.
Ben Pfaff [Thu, 2 Sep 2004 21:50:25 +0000 (21:50 +0000)]
Make linking of start.S less brittle.

20 years agoAdd comments.
Ben Pfaff [Thu, 2 Sep 2004 21:40:16 +0000 (21:40 +0000)]
Add comments.

20 years agoDon't destroy current thread's pagedir before activating a different
Ben Pfaff [Thu, 2 Sep 2004 21:03:03 +0000 (21:03 +0000)]
Don't destroy current thread's pagedir before activating a different
one (!).
thread_wake() needs to run with interrupts off.

20 years agoComments.
Ben Pfaff [Thu, 2 Sep 2004 20:59:49 +0000 (20:59 +0000)]
Comments.

20 years agoActivate the base page directory if pagedir_activate() is passed a
Ben Pfaff [Thu, 2 Sep 2004 20:59:40 +0000 (20:59 +0000)]
Activate the base page directory if pagedir_activate() is passed a
null pointer.

20 years agoRedo and improve thread scheduling startup.
Ben Pfaff [Thu, 2 Sep 2004 08:12:53 +0000 (08:12 +0000)]
Redo and improve thread scheduling startup.
In the process make it possible to use locks before the preemptive
scheduler is turned on.
This lets us add locking to the page allocator.

20 years agoRewrite to suck slightly less.
Ben Pfaff [Thu, 2 Sep 2004 05:54:53 +0000 (05:54 +0000)]
Rewrite to suck slightly less.
Add comments.

20 years agoAdd comments.
Ben Pfaff [Thu, 2 Sep 2004 04:16:24 +0000 (04:16 +0000)]
Add comments.

20 years agoActually initialize IDT in intr_init (!).
Ben Pfaff [Thu, 2 Sep 2004 04:16:12 +0000 (04:16 +0000)]
Actually initialize IDT in intr_init (!).

20 years agoEnable interrupts after reading CR2 in page fault handler.
Ben Pfaff [Thu, 2 Sep 2004 04:03:53 +0000 (04:03 +0000)]
Enable interrupts after reading CR2 in page fault handler.

20 years agoAdd comments.
Ben Pfaff [Thu, 2 Sep 2004 04:01:57 +0000 (04:01 +0000)]
Add comments.

20 years agoRemove unneeded stuff.
Ben Pfaff [Thu, 2 Sep 2004 03:55:21 +0000 (03:55 +0000)]
Remove unneeded stuff.

20 years agoAdd page fault skeleton.
Ben Pfaff [Thu, 2 Sep 2004 03:55:15 +0000 (03:55 +0000)]
Add page fault skeleton.

20 years agoMove user exception support into userprog.
Ben Pfaff [Thu, 2 Sep 2004 03:25:54 +0000 (03:25 +0000)]
Move user exception support into userprog.

20 years agoOnly call addrspace_destroy() if USERPROG.
Ben Pfaff [Wed, 1 Sep 2004 22:55:29 +0000 (22:55 +0000)]
Only call addrspace_destroy() if USERPROG.

20 years agoImprove code.
Ben Pfaff [Wed, 1 Sep 2004 22:52:25 +0000 (22:52 +0000)]
Improve code.

20 years agoSet CR0_WP in CR0.
Ben Pfaff [Wed, 1 Sep 2004 22:52:13 +0000 (22:52 +0000)]
Set CR0_WP in CR0.

20 years agoMisc cleanups in init, thread.
Ben Pfaff [Wed, 1 Sep 2004 22:36:36 +0000 (22:36 +0000)]
Misc cleanups in init, thread.

20 years agoAdd assert.
Ben Pfaff [Wed, 1 Sep 2004 22:36:24 +0000 (22:36 +0000)]
Add assert.

20 years agoBreak TSS out of GDT.
Ben Pfaff [Wed, 1 Sep 2004 22:25:56 +0000 (22:25 +0000)]
Break TSS out of GDT.

20 years agoBreak GDT, TSS out of init.c, mmu.h.
Ben Pfaff [Wed, 1 Sep 2004 22:13:26 +0000 (22:13 +0000)]
Break GDT, TSS out of init.c, mmu.h.

20 years agoRemove lots of unused #define's from mmu.h.
Ben Pfaff [Wed, 1 Sep 2004 21:43:44 +0000 (21:43 +0000)]
Remove lots of unused #define's from mmu.h.

20 years agoClean up interrupts.[ch].
Ben Pfaff [Wed, 1 Sep 2004 21:43:20 +0000 (21:43 +0000)]
Clean up interrupts.[ch].

20 years agoAdd comments.
Ben Pfaff [Wed, 1 Sep 2004 06:14:50 +0000 (06:14 +0000)]
Add comments.

20 years agoMake interrupt.h names more regular.
Ben Pfaff [Wed, 1 Sep 2004 06:00:50 +0000 (06:00 +0000)]
Make interrupt.h names more regular.

20 years agoIntegrate struct addrspace into struct thread.
Ben Pfaff [Wed, 1 Sep 2004 05:52:00 +0000 (05:52 +0000)]
Integrate struct addrspace into struct thread.

20 years agoClean up threads.
Ben Pfaff [Wed, 1 Sep 2004 05:38:55 +0000 (05:38 +0000)]
Clean up threads.

20 years agos/disk_sector_no/disk_sector_t/g
Ben Pfaff [Wed, 1 Sep 2004 04:02:22 +0000 (04:02 +0000)]
s/disk_sector_no/disk_sector_t/g

20 years agoFix PRDSNu.
Ben Pfaff [Wed, 1 Sep 2004 03:58:03 +0000 (03:58 +0000)]
Fix PRDSNu.

20 years agoTweak.
Ben Pfaff [Wed, 1 Sep 2004 03:56:22 +0000 (03:56 +0000)]
Tweak.

20 years agoDump interrupt frame info on user fault.
Ben Pfaff [Wed, 1 Sep 2004 01:16:42 +0000 (01:16 +0000)]
Dump interrupt frame info on user fault.

20 years agoImprove comments.
Ben Pfaff [Wed, 1 Sep 2004 01:16:25 +0000 (01:16 +0000)]
Improve comments.

20 years agoClean up disk layer.
Ben Pfaff [Tue, 31 Aug 2004 23:54:24 +0000 (23:54 +0000)]
Clean up disk layer.

20 years agoUpdate .cvsignore.
Ben Pfaff [Tue, 31 Aug 2004 22:07:49 +0000 (22:07 +0000)]
Update .cvsignore.

20 years agoInitial version.
Ben Pfaff [Tue, 31 Aug 2004 22:07:01 +0000 (22:07 +0000)]
Initial version.

20 years agoAdd fsutil.c.
Ben Pfaff [Tue, 31 Aug 2004 22:05:24 +0000 (22:05 +0000)]
Add fsutil.c.

20 years agoClean up threads.
Ben Pfaff [Tue, 31 Aug 2004 22:05:16 +0000 (22:05 +0000)]
Clean up threads.

20 years agoUse __attribute__ directly.
Ben Pfaff [Tue, 31 Aug 2004 22:04:56 +0000 (22:04 +0000)]
Use __attribute__ directly.

20 years agoAdd LOADER_CMD_LINE_LEN.
Ben Pfaff [Tue, 31 Aug 2004 22:04:45 +0000 (22:04 +0000)]
Add LOADER_CMD_LINE_LEN.

20 years agoImplement command line arguments.
Ben Pfaff [Tue, 31 Aug 2004 22:04:29 +0000 (22:04 +0000)]
Implement command line arguments.

20 years agoAllow user to provide random seed to random_init().
Ben Pfaff [Tue, 31 Aug 2004 22:04:08 +0000 (22:04 +0000)]
Allow user to provide random seed to random_init().

20 years agoAdd atoi().
Ben Pfaff [Tue, 31 Aug 2004 22:03:49 +0000 (22:03 +0000)]
Add atoi().
Add a hex_dump() argument that specifies whether to include ASCII.
Mark vsnprintf(), vprintk() with PRINTF_FORMAT.

20 years agoDebug. Add bitmap_dump().
Ben Pfaff [Tue, 31 Aug 2004 22:01:42 +0000 (22:01 +0000)]
Debug.  Add bitmap_dump().

20 years agoAdd filesys_list(), filesys_dump().
Ben Pfaff [Tue, 31 Aug 2004 22:01:25 +0000 (22:01 +0000)]
Add filesys_list(), filesys_dump().

20 years agoAdd dir_list(), dir_dump().
Ben Pfaff [Tue, 31 Aug 2004 22:01:10 +0000 (22:01 +0000)]
Add dir_list(), dir_dump().

20 years agoAdd DEBUG() macro for debugging that can be turned on and off with a
Ben Pfaff [Tue, 31 Aug 2004 22:00:54 +0000 (22:00 +0000)]
Add DEBUG() macro for debugging that can be turned on and off with a
command line option, and associated support.
Rename panic() to PANIC().  Update references.
Rename backtrace() to debug_backtrace().

20 years agoClean up threads.c.
Ben Pfaff [Tue, 31 Aug 2004 06:39:54 +0000 (06:39 +0000)]
Clean up threads.c.

20 years agoClean up threads.c.
Ben Pfaff [Tue, 31 Aug 2004 05:57:18 +0000 (05:57 +0000)]
Clean up threads.c.

20 years agoClean up a little.
Ben Pfaff [Tue, 31 Aug 2004 05:34:25 +0000 (05:34 +0000)]
Clean up a little.

20 years agoUpdate comment.
Ben Pfaff [Tue, 31 Aug 2004 05:12:57 +0000 (05:12 +0000)]
Update comment.

20 years agoMark thread_start() NO_RETURN.
Ben Pfaff [Tue, 31 Aug 2004 05:12:41 +0000 (05:12 +0000)]
Mark thread_start() NO_RETURN.

20 years agoSmall loader cleanups.
Ben Pfaff [Tue, 31 Aug 2004 04:09:44 +0000 (04:09 +0000)]
Small loader cleanups.

20 years agoCheck all return values.
Ben Pfaff [Tue, 31 Aug 2004 03:42:27 +0000 (03:42 +0000)]
Check all return values.

20 years agoUse Linux kernel trick of giving an .lds file a .S extension to get it
Ben Pfaff [Tue, 31 Aug 2004 03:23:39 +0000 (03:23 +0000)]
Use Linux kernel trick of giving an .lds file a .S extension to get it
preprocessed.

20 years agoDon't include malloc.h.
Ben Pfaff [Tue, 31 Aug 2004 03:22:39 +0000 (03:22 +0000)]
Don't include malloc.h.

20 years agoAdd some missing dependencies.
Ben Pfaff [Tue, 31 Aug 2004 02:55:58 +0000 (02:55 +0000)]
Add some missing dependencies.

20 years agoUpdate comments, put LOADER_PHYS_BASE back at 3 GB.
Ben Pfaff [Tue, 31 Aug 2004 02:55:48 +0000 (02:55 +0000)]
Update comments, put LOADER_PHYS_BASE back at 3 GB.

20 years agoDon't use <string.h>.
Ben Pfaff [Tue, 31 Aug 2004 01:04:27 +0000 (01:04 +0000)]
Don't use <string.h>.

20 years agoGet rid of backdoor.
Ben Pfaff [Tue, 31 Aug 2004 01:04:15 +0000 (01:04 +0000)]
Get rid of backdoor.

20 years agoNo FILESYS_STUB anymore.
Ben Pfaff [Tue, 31 Aug 2004 01:02:34 +0000 (01:02 +0000)]
No FILESYS_STUB anymore.

20 years agoUse lib.h instead of <string.h>.
Ben Pfaff [Tue, 31 Aug 2004 01:02:24 +0000 (01:02 +0000)]
Use lib.h instead of <string.h>.

20 years agoBase on loader.
Ben Pfaff [Tue, 31 Aug 2004 01:02:00 +0000 (01:02 +0000)]
Base on loader.

20 years agoMake loader use constants.
Ben Pfaff [Tue, 31 Aug 2004 01:01:51 +0000 (01:01 +0000)]
Make loader use constants.

20 years agoNow kernel.lds.in is preprocessed to get kernel.lds.
Ben Pfaff [Tue, 31 Aug 2004 01:00:56 +0000 (01:00 +0000)]
Now kernel.lds.in is preprocessed to get kernel.lds.

20 years agoDeclare argc, argv.
Ben Pfaff [Tue, 31 Aug 2004 01:00:37 +0000 (01:00 +0000)]
Declare argc, argv.

20 years agoSplit RAM initialization into function.
Ben Pfaff [Tue, 31 Aug 2004 01:00:19 +0000 (01:00 +0000)]
Split RAM initialization into function.

20 years agoAdd strtok_r().
Ben Pfaff [Tue, 31 Aug 2004 00:59:23 +0000 (00:59 +0000)]
Add strtok_r().

20 years agoProduce kernel.lds from kernel.lds.in.
Ben Pfaff [Tue, 31 Aug 2004 00:59:12 +0000 (00:59 +0000)]
Produce kernel.lds from kernel.lds.in.

20 years agoAdd vm subdirectory.
Ben Pfaff [Tue, 31 Aug 2004 00:59:01 +0000 (00:59 +0000)]
Add vm subdirectory.

20 years agoFilesys stubs no longer wanted.
Ben Pfaff [Mon, 30 Aug 2004 22:58:46 +0000 (22:58 +0000)]
Filesys stubs no longer wanted.

20 years agoAdd new filesys files.
Ben Pfaff [Mon, 30 Aug 2004 22:57:50 +0000 (22:57 +0000)]
Add new filesys files.

20 years agoAdapt to new file interface.
Ben Pfaff [Mon, 30 Aug 2004 22:57:38 +0000 (22:57 +0000)]
Adapt to new file interface.

20 years agoMove filesys_init into main_thread.
Ben Pfaff [Mon, 30 Aug 2004 22:56:34 +0000 (22:56 +0000)]
Move filesys_init into main_thread.

20 years agoAdd strcmp(), asserts.
Ben Pfaff [Mon, 30 Aug 2004 22:56:22 +0000 (22:56 +0000)]
Add strcmp(), asserts.

20 years agoAdd bitmap_read(), bitmap_write().
Ben Pfaff [Mon, 30 Aug 2004 22:55:58 +0000 (22:55 +0000)]
Add bitmap_read(), bitmap_write().

20 years agoWorking filesystem.
Ben Pfaff [Mon, 30 Aug 2004 22:55:39 +0000 (22:55 +0000)]
Working filesystem.

20 years agoFix disk_write(): interrupt fires *after* write complete, not before.
Ben Pfaff [Mon, 30 Aug 2004 22:54:56 +0000 (22:54 +0000)]
Fix disk_write(): interrupt fires *after* write complete, not before.

20 years agoFix bitmap usage.
Ben Pfaff [Mon, 30 Aug 2004 18:07:59 +0000 (18:07 +0000)]
Fix bitmap usage.

20 years agoIgnore generated files.
Ben Pfaff [Mon, 30 Aug 2004 17:48:59 +0000 (17:48 +0000)]
Ignore generated files.

20 years agoInitial version.
Ben Pfaff [Mon, 30 Aug 2004 17:48:16 +0000 (17:48 +0000)]
Initial version.

20 years ago*** empty log message ***
Ben Pfaff [Mon, 30 Aug 2004 17:47:38 +0000 (17:47 +0000)]
*** empty log message ***

20 years agoTest disk code slightly more thoroughly.
Ben Pfaff [Mon, 30 Aug 2004 17:46:07 +0000 (17:46 +0000)]
Test disk code slightly more thoroughly.

20 years agoStart work on filesystem code.
Ben Pfaff [Mon, 30 Aug 2004 04:50:13 +0000 (04:50 +0000)]
Start work on filesystem code.

20 years agoMake user responsible for allocating `struct bitmap's.
Ben Pfaff [Mon, 30 Aug 2004 04:49:44 +0000 (04:49 +0000)]
Make user responsible for allocating `struct bitmap's.

20 years agoImprove error message.
Ben Pfaff [Mon, 30 Aug 2004 04:49:04 +0000 (04:49 +0000)]
Improve error message.

20 years agoFix grouping (sigh).
Ben Pfaff [Sun, 29 Aug 2004 22:11:32 +0000 (22:11 +0000)]
Fix grouping (sigh).

20 years agoBetter ID message. Add per-channel mutual exclusion.
Ben Pfaff [Sun, 29 Aug 2004 22:10:52 +0000 (22:10 +0000)]
Better ID message.  Add per-channel mutual exclusion.

20 years agoAdd idle thread.
Ben Pfaff [Sun, 29 Aug 2004 21:54:04 +0000 (21:54 +0000)]
Add idle thread.

20 years agoBasic disk test code.
Ben Pfaff [Sun, 29 Aug 2004 21:50:07 +0000 (21:50 +0000)]
Basic disk test code.

20 years agoFix pic_eoi() for slave PIC interrupts.
Ben Pfaff [Sun, 29 Aug 2004 21:36:22 +0000 (21:36 +0000)]
Fix pic_eoi() for slave PIC interrupts.

20 years agoPrototype hex_dump().
Ben Pfaff [Sun, 29 Aug 2004 21:35:45 +0000 (21:35 +0000)]
Prototype hex_dump().
Add various is*() functions.

20 years agoFix snprintf() return value.
Ben Pfaff [Sun, 29 Aug 2004 21:35:33 +0000 (21:35 +0000)]
Fix snprintf() return value.
Add grouping support to printf.
Add a function for hex dumps.

20 years agoImplement read/write support.
Ben Pfaff [Sun, 29 Aug 2004 21:34:16 +0000 (21:34 +0000)]
Implement read/write support.

20 years agoMove "include" command to end, so that the first target is "all".
Ben Pfaff [Sun, 29 Aug 2004 21:33:26 +0000 (21:33 +0000)]
Move "include" command to end, so that the first target is "all".

20 years agoBasic disk detection stuff.
Ben Pfaff [Sun, 29 Aug 2004 19:18:25 +0000 (19:18 +0000)]
Basic disk detection stuff.

20 years agoMake thread_root() enable interrupts, otherwise kernel threads will
Ben Pfaff [Sun, 29 Aug 2004 19:18:10 +0000 (19:18 +0000)]
Make thread_root() enable interrupts, otherwise kernel threads will
run with interrupts off, which is really bad...

20 years agoFormatting.
Ben Pfaff [Sun, 29 Aug 2004 19:17:21 +0000 (19:17 +0000)]
Formatting.

20 years agoMake yield_on_return only usable in an external interrupt context: (1)
Ben Pfaff [Sun, 29 Aug 2004 19:17:14 +0000 (19:17 +0000)]
Make yield_on_return only usable in an external interrupt context: (1)
it's a global variable so it must be in use only in one context at
once, which is okay because we don't nest external interrupts and (2)
if we're not in an external interrupt context then we might as well
just call thread_yield() and not screw around with "yield on return".

Also, enforce interrupts being off in external interrupt contexts.