Skip to content

Commit

Permalink
Initial attempt at file system assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Harshit-Shrivastava committed Nov 20, 2016
1 parent 206e0a3 commit 16f0bda
Show file tree
Hide file tree
Showing 20 changed files with 1,045 additions and 4,230 deletions.
4 changes: 2 additions & 2 deletions apps/future_cons.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ uint future_cons(future *fut) {
int status;
status = future_get(fut, &i);
if (status < 1) {
printf("future_get failed\n");
// printf("future_get failed\n");
return -1;
}
printf("it produced %d\n", i);
printf("it consumed %d\n", i);
return OK;
}
1 change: 1 addition & 0 deletions apps/future_prod.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ uint future_prod(future *fut) {
for (i=0; i<1000; i++) {
j += i;
}
printf("it produced %d",j);
future_set(fut, &j);
return OK;
}
Binary file removed compile/xinu
Binary file not shown.
Binary file removed compile/xinu.bin
Binary file not shown.
Binary file removed compile/xinu.boot
Binary file not shown.
142 changes: 142 additions & 0 deletions config/Configuration
Original file line number Diff line number Diff line change
@@ -1,4 +1,146 @@
/************************************************************************/
n nothing
-i ionull -o ionull -c ionull
-r ionull -g ionull -p ionull
-w ionull -s ioerr

/* type of a tty device */
tty:
on uart
-i ttyinit -o ionull -c ionull
-r ttyread -g ttygetc -p ttyputc
-w ttywrite -s ioerr -n ttycontrol
-intr ttyhandler

/* type of a ethernet device */
eth:
on am335x_eth
-i ethinit -o ioerr -c ioerr
-r ethread -g ioerr -p ioerr
-w ethwrite -s ioerr -n ethcontrol
-intr ethhandler

/* type of a remote disk system device */
rds:
on udp
-i rdsinit -o rdsopen -c rdsclose
-r rdsread -g ioerr -p ioerr
-w rdswrite -s ioerr -n rdscontrol
-intr ionull

/* type of ram disk */
ram:
on mem
-i raminit -o ramopen -c ramclose
-r ramread -g ioerr -p ioerr
-w ramwrite -s ioerr -n ioerr
-intr ionull

/* type of a remote file system device */
rfs:
on udp
-i rfsinit -o rfsopen -c ioerr
-r ioerr -g ioerr -p ioerr
-w ioerr -s ioerr -n rfscontrol
-intr ionull

/* type of a remote file pseudo-device */
rfl:
on rfs
-i rflinit -o ioerr -c rflclose
-r rflread -g rflgetc -p rflputc
-w rflwrite -s rflseek -n ioerr
-intr ionull

/* type of a local file system master device */
lfs:
on ram
-i lfsinit -o lfsopen -c ioerr
-r ioerr -g ioerr -p ioerr
-w ioerr -s ioerr -n ioerr
-intr ionull

/* type of a local file pseudo-device */
lfl:
on lfs
-i lflinit -o ioerr -c lflclose
-r lflread -g lflgetc -p lflputc
-w lflwrite -s lflseek -n lflcontrol
-intr ionull

/* type of namespace device */
nam:
on top
-i naminit -o namopen -c ioerr
-r ioerr -g ioerr -p ioerr
-w ioerr -s ioerr -n ioerr
-intr ioerr

%%

/* Actual device declarations that each give the name of a device that */
/* will be present in the system */

/* Define the console device to be a tty and specify CSR*/
CONSOLE is tty on uart csr 0x44E09000 -irq 72

/* Define a null device */
NULLDEV is null on nothing

/* Physical Ethernet (raw packet transfer) */
ETHER0 is eth on am335x_eth csr 0 -irq 0

/* Define a namespace device */
NAMESPACE is nam on top

/* Define a remote disk system device */
RDISK is rds on udp

/* Define a ram disk device */
RAM0 is ram on mem

/* Define the remote file system device */

RFILESYS is rfs on udp

/* Define remote file pseudo-devices */

RFILE0 is rfl on rfs
RFILE1 is rfl on rfs
RFILE2 is rfl on rfs
RFILE3 is rfl on rfs
RFILE4 is rfl on rfs
RFILE5 is rfl on rfs
RFILE6 is rfl on rfs
RFILE7 is rfl on rfs
RFILE8 is rfl on rfs
RFILE9 is rfl on rfs

/* Define the local file system master device (one per system) */

LFILESYS is lfs on ram

/* Define local file pseudo-devices (multiple per system) */

LFILE0 is lfl on lfs
LFILE1 is lfl on lfs
LFILE2 is lfl on lfs
LFILE3 is lfl on lfs
LFILE4 is lfl on lfs
LFILE5 is lfl on lfs

%%

/* Configuration and Size Constants */

#define NPROC 100 /* number of user processes */
#define NSEM 100 /* number of semaphores */
#define IRQBASE 32 /* base ivec for IRQ0 */
#define IRQ_TIMER IRQ_HW5 /* timer IRQ is wired to hardware 5 */
#define IRQ_ATH_MISC IRQ_HW4 /* Misc. IRQ is wired to hardware 4 */
#define CLKFREQ 200000000 /* 200 MHz clock */
#define FS 1
#define LF_DISK_DEV RAM0
/* */
/* Configuration - Xinu device configuration specification file */
/* */
Expand Down
4 changes: 2 additions & 2 deletions config/Configuration.arm-bbb
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,5 @@ nam:
#define IRQ_TIMER IRQ_HW5 /* timer IRQ is wired to hardware 5 */
#define IRQ_ATH_MISC IRQ_HW4 /* Misc. IRQ is wired to hardware 4 */
#define CLKFREQ 200000000 /* 200 MHz clock */

#define LF_DISK_DEV RAM0
#define FS 1
#define LF_DISK_DEV RAM0
Binary file modified config/config
Binary file not shown.
Loading

0 comments on commit 16f0bda

Please sign in to comment.