diff --git a/src/sys/include/ubixos/tty.h b/src/sys/include/ubixos/tty.h index 5dfe7c6..178a999 100644 --- a/src/sys/include/ubixos/tty.h +++ b/src/sys/include/ubixos/tty.h @@ -32,7 +32,7 @@ #include -#define TTY_MAX_TERMS 5 +#define TTY_MAX_TERMS 12 typedef struct tty_termNode { char *tty_buffer; @@ -47,7 +47,7 @@ int tty_init(); int tty_change(uInt16); -tty_term *tty_find(uInt16); +tty_term *tty_find(u_int16_t tty); int tty_print(char *,tty_term *); extern tty_term *tty_foreground; @@ -55,38 +55,5 @@ #endif /*** - $Log$ - Revision 1.1.1.1 2006/06/01 12:46:14 reddawg - ubix2 - - Revision 1.2 2005/10/12 00:13:37 reddawg - Removed - - Revision 1.1.1.1 2005/09/26 17:23:57 reddawg - no message - - Revision 1.8 2004/09/06 22:11:29 reddawg - tty: now each tty has a stdin.... - - Revision 1.7 2004/08/14 11:23:02 reddawg - Changes - - Revision 1.6 2004/08/09 12:58:05 reddawg - let me know when you got the surce - - Revision 1.5 2004/08/09 05:40:31 reddawg - tty: removed current and made a foreground - - Revision 1.4 2004/08/06 22:32:16 reddawg - Ubix Works Again - - Revision 1.2 2004/08/04 08:17:57 reddawg - tty: we have primative ttys try f1-f5 so it is easier to use and debug - ubixos - - Revision 1.1 2004/08/03 21:44:24 reddawg - ttys - END ***/ - diff --git a/src/sys/isa/atkbd.c b/src/sys/isa/atkbd.c index cc620e0..d65c0ce 100644 --- a/src/sys/isa/atkbd.c +++ b/src/sys/isa/atkbd.c @@ -119,13 +119,13 @@ /* */ { 0x3002, 0, 0, 0x3002, 0, 0, 0, 0}, /* */ { 0x3003, 0, 0, 0x3003, 0, 0, 0, 0}, /* */ { 0x3004, 0, 0, 0x3004, 0, 0, 0, 0}, -/* */ { 0x4000, 0, 0, 0, 0, 0, 0, 0}, -/* */ { 0x4100, 0, 0, 0, 0, 0, 0, 0}, -/* */ { 0x4200, 0, 0, 0, 0, 0, 0, 0}, -/* */ { 0x4300, 0, 0, 0, 0, 0, 0, 0}, -/* */ { 0x4400, 0, 0, 0, 0, 0, 0, 0}, -/* */ { 0, 0, 0, 0, 0, 0, 0, 0}, -/* */ { 0, 0, 0, 0, 0, 0, 0, 0}, +/* */ { 0x4000, 0, 0, 0x3005, 0, 0, 0, 0}, +/* */ { 0x4100, 0, 0, 0x3006, 0, 0, 0, 0}, +/* */ { 0x4200, 0, 0, 0x3007, 0, 0, 0, 0}, +/* */ { 0x4300, 0, 0, 0x3008, 0, 0, 0, 0}, +/* */ { 0x4400, 0, 0, 0x3009, 0, 0, 0, 0}, +/* */ { 0, 0, 0, 0x3010, 0, 0, 0, 0}, +/* */ { 0, 0, 0, 0x3011, 0, 0, 0, 0}, /* */ { 0x4700, 0, 0, 0, 0, 0, 0, 0}, /* */ { 0x4800, 0, 0, 0, 0, 0, 0, 0}, /* */ { 0x4900, 0, 0, 0, 0, 0, 0, 0}, @@ -377,6 +377,9 @@ /*** $Log$ + Revision 1.1.1.1 2007/01/17 03:31:51 reddawg + UbixOS + Revision 1.5 2006/12/05 17:01:15 reddawg Modified kpanic diff --git a/src/sys/kernel/gen_calls.c b/src/sys/kernel/gen_calls.c index 191ee8b..69f28d1 100644 --- a/src/sys/kernel/gen_calls.c +++ b/src/sys/kernel/gen_calls.c @@ -87,7 +87,7 @@ in = (char *)uap->buf; buffer = kmalloc(1024); memcpy(buffer,uap->buf,uap->nbyte); - kprintf("%s",buffer); + kprint(buffer); kfree(buffer); td->td_retval[0] = uap->nbyte; } diff --git a/src/sys/kernel/tty.c b/src/sys/kernel/tty.c index 7db7ce1..7470c34 100644 --- a/src/sys/kernel/tty.c +++ b/src/sys/kernel/tty.c @@ -89,6 +89,8 @@ if (tty > TTY_MAX_TERMS) kpanic("Error: Changing to an invalid tty. File: %s, Line: %i\n",__FILE__,__LINE__); + spinLock(&Master); + /* Copy display buffer to tty buffer */ memcpy(tty_foreground->tty_buffer,(char *)0xB8000,(80*60*2)); @@ -112,6 +114,8 @@ outportByte(0x3D4, 0x0E); outportByte(0x3D5, tty_foreground->tty_y); + spinUnlock(&Master); + return(0x0); } @@ -167,7 +171,7 @@ return(0x0); } -tty_term *tty_find(uInt16 tty) { +tty_term *tty_find(u_int16_t tty) { return(&terms[tty]); } diff --git a/src/sys/lib/memset.c b/src/sys/lib/memset.c index a8d3b06..35deee5 100644 --- a/src/sys/lib/memset.c +++ b/src/sys/lib/memset.c @@ -1,5 +1,5 @@ /***************************************************************************************** - Copyright (c) 2002 The UbixOS Project + Copyright (c) 2002,2007 The UbixOS Project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are @@ -81,19 +81,6 @@ /*** - $Log$ - Revision 1.1.1.1 2006/06/01 12:46:16 reddawg - ubix2 - - Revision 1.2 2005/10/12 00:13:37 reddawg - Removed - - Revision 1.1.1.1 2005/09/26 17:24:12 reddawg - no message - - Revision 1.1 2004/07/28 16:20:10 reddawg - forgot this file - - END +END ***/ diff --git a/src/sys/vmm/paging.c b/src/sys/vmm/paging.c index fd2fd67..593cc8b 100644 --- a/src/sys/vmm/paging.c +++ b/src/sys/vmm/paging.c @@ -450,7 +450,10 @@ spinUnlock(&fkpSpinLock); return (0x0); } - + +/*! + \brief sdf + */ int mmap(struct thread *td,struct mmap_args *uap) { vm_offset_t addr = 0x0; char *tmp = 0x0; @@ -487,9 +490,9 @@ #endif getfd(td,&fd,uap->fd); if (uap->addr == 0x0) - tmp = (char *)vmmGetFreeVirtualPage(_current->id,uap->len/0x1000,VM_TASK); + tmp = (char *)vmmGetFreeVirtualPage(_current->id,(uap->len + 0xFFF)/0x1000,VM_TASK); else { - tmp = (char *)vmmGetFreeVirtualPage_new(_current->id,uap->len/0x1000,VM_TASK,uap->addr); + tmp = (char *)vmmGetFreeVirtualPage_new(_current->id,(uap->len + 0xFFF)/0x1000,VM_TASK,uap->addr); } fd->fd->offset = uap->pos; @@ -528,6 +531,7 @@ for (i = old;i < new;i+= 0x1000) { if (vmm_remapPage(vmmFindFreePage(_current->id),i,PAGE_DEFAULT) == 0x0) K_PANIC("remap Failed"); + /* Clear Page */ } td->vm_dsize += btoc(new - old); } @@ -542,7 +546,7 @@ int munmap(struct thread *td,struct munmap_args *uap) { /* HACK */ - kprintf("munmap"); + //kprintf("munmap: [0x%X:0x%X]",uap->addr,uap->len); return(0x0); }