paul@284 | 1 | -- vim:set ft=lua: |
paul@284 | 2 | |
paul@284 | 3 | local L4 = require("L4"); |
paul@284 | 4 | |
paul@284 | 5 | local l = L4.default_loader; |
paul@284 | 6 | |
paul@284 | 7 | local io_buses = |
paul@284 | 8 | { |
paul@284 | 9 | common = l:new_channel(); |
paul@284 | 10 | }; |
paul@284 | 11 | |
paul@284 | 12 | l:start({ |
paul@284 | 13 | caps = { |
paul@284 | 14 | common = io_buses.common:svr(), |
paul@284 | 15 | icu = L4.Env.icu, |
paul@284 | 16 | sigma0 = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0), |
paul@284 | 17 | }, |
paul@284 | 18 | log = { "IO", "y" }, |
paul@284 | 19 | l4re_dbg = L4.Dbg.Warn, |
paul@284 | 20 | }, |
paul@284 | 21 | "rom/io rom/hw_devices.io rom/mips-jz4780-msc-block.io"); |
paul@284 | 22 | |
paul@284 | 23 | local block_server = l:new_channel(); |
paul@284 | 24 | |
paul@284 | 25 | l:startv({ |
paul@284 | 26 | caps = { |
paul@284 | 27 | fsserver = block_server:svr(), |
paul@284 | 28 | jdb = L4.Env.jdb, -- to set the server name |
paul@284 | 29 | icu = L4.Env.icu, |
paul@284 | 30 | vbus = io_buses.common, |
paul@284 | 31 | }, |
paul@284 | 32 | log = { "server", "r" }, |
paul@284 | 33 | }, |
paul@284 | 34 | -- arguments: machine, MSC channel/device, DMA channel, card index, memory pages |
paul@284 | 35 | "rom/msc_block_server", "jz4780", "0", "0", "0", "10"); |
paul@284 | 36 | |
paul@284 | 37 | local pipe_server = l:new_channel(); |
paul@284 | 38 | |
paul@284 | 39 | l:startv({ |
paul@284 | 40 | caps = { |
paul@284 | 41 | pipeserver = pipe_server:svr(), |
paul@284 | 42 | jdb = L4.Env.jdb, -- to set the server name |
paul@284 | 43 | }, |
paul@284 | 44 | log = { "pipes", "r" }, |
paul@284 | 45 | }, |
paul@284 | 46 | "rom/pipe_server", "10"); |
paul@284 | 47 | |
paul@284 | 48 | local ext2server = l:new_channel(); |
paul@284 | 49 | |
paul@284 | 50 | l:startv({ |
paul@284 | 51 | caps = { |
paul@284 | 52 | blockserver = block_server, |
paul@284 | 53 | pipeserver = pipe_server, |
paul@284 | 54 | fsserver = ext2server:svr(), |
paul@284 | 55 | jdb = L4.Env.jdb, -- to set the server name |
paul@284 | 56 | }, |
paul@284 | 57 | log = { "ext2svr", "y" }, |
paul@284 | 58 | }, |
paul@284 | 59 | "rom/ext2_server", "blockserver", "1", "20", "fsserver"); |
paul@284 | 60 | |
paul@284 | 61 | -- Obtain user filesystems with umask 0022 (18). |
paul@284 | 62 | |
paul@284 | 63 | local open_for_user = 6; |
paul@284 | 64 | local ext2server_paulb = L4.cast(L4.Proto.Factory, ext2server):create(open_for_user, 1000, 1000, 18); |
paul@284 | 65 | |
paul@284 | 66 | local process_server = l:new_channel(); |
paul@284 | 67 | |
paul@284 | 68 | l:startv({ |
paul@284 | 69 | caps = { |
paul@284 | 70 | fsserver = ext2server_paulb, |
paul@284 | 71 | prserver = process_server:svr(), |
paul@284 | 72 | jdb = L4.Env.jdb, -- to set the server name |
paul@284 | 73 | }, |
paul@284 | 74 | log = { "process", "y" }, |
paul@284 | 75 | }, |
paul@284 | 76 | "rom/process_server", "l4/exec_region_mapper"); |
paul@284 | 77 | |
paul@284 | 78 | l:startv({ |
paul@284 | 79 | log = L4.Env.log, |
paul@284 | 80 | caps = { |
paul@284 | 81 | fsserver = ext2server_paulb, |
paul@284 | 82 | pipeserver = pipe_server, |
paul@284 | 83 | prserver = process_server, |
paul@284 | 84 | }, |
paul@284 | 85 | }, |
paul@284 | 86 | -- program, options, operation involving a script file |
paul@284 | 87 | "rom/fsaccess", "-m", "0022", "script", "-"); |