From b00cd9562453bc33bb6d865aca33997dedc2c4a1 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Thu, 14 Feb 1991 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1991-02-14 --- gnot/boot.c | 246 ++++++--- gnot/boot.h | 1340 ++++++++++++++++++++++++--------------------- port/devroot.c | 24 +- power/devhotrod.c | 11 + 4 files changed, 918 insertions(+), 703 deletions(-) diff --git a/gnot/boot.c b/gnot/boot.c index e0fe190ef7292b4a2fbccbc98310a607cfb57c5c..f0dd75ff7a1341207dafd99ee238a8351d425f51 100644 --- a/gnot/boot.c +++ b/gnot/boot.c @@ -10,34 +10,92 @@ char bootserver[64]; void error(char*); void sendmsg(int, char*); +void bootparams(void); +void dkconfig(void); +int dkdial(void); +void nop(int); +void session(int); +int cache(int); main(int argc, char *argv[]) { - int cfd, fd, n, fu, f, i; + int fd, f; char buf[256]; - int p[2]; Dir dir; open("#c/cons", OREAD); open("#c/cons", OWRITE); open("#c/cons", OWRITE); - fd = open("#e/bootline", OREAD); - if(fd >= 0){ - read(fd, bootline, sizeof bootline); - close(fd); - } - fd = open("#e/bootdevice", OREAD); - if(fd >= 0){ - read(fd, &bootdevice, 1); - close(fd); - } - fd = open("#e/bootserver", OREAD); - if(fd >= 0){ - read(fd, bootserver, 64); - close(fd); - } else - strcpy(bootserver, "nfs"); + bootparams(); + dkconfig(); + fd = dkdial(); + nop(fd); + session(fd); + fd = cache(fd); + + /* + * make a /srv/boot and a /srv/bootes + */ + print("post..."); + sprint(buf, "#s/%s", "bootes"); + f = create(buf, 1, 0666); + if(f < 0) + error("create"); + sprint(buf, "%d", fd); + if(write(f, buf, strlen(buf)) != strlen(buf)) + error("write"); + close(f); + sprint(buf, "#s/%s", "bootes"); + f = create("#s/boot", 1, 0666); + if(f < 0) + error("create"); + sprint(buf, "%d", fd); + if(write(f, buf, strlen(buf)) != strlen(buf)) + error("write"); + close(f); + + /* + * mount file server root after #/ root + */ + if(bind("/", "/", MREPL) < 0) + error("bind"); + print("mount..."); + if(mount(fd, "/", MAFTER|MCREATE, "", "") < 0) + error("mount"); + + /* + * set the time from the access time of the root of the file server, + * accessible as /.. + */ + print("time..."); + if(stat("/..", buf) < 0) + error("stat"); + convM2D(buf, &dir); + f = open("#c/time", OWRITE); + sprint(buf, "%ld", dir.atime); + write(f, buf, strlen(buf)); + close(f); + + print("success\n"); + + bind("#k", "/net/net", MREPL); + bind("#k", "/net/dk", MREPL); + + if(strchr(bootline, ' ')) + execl("/68020/init", "init", "-m", 0); + else + execl("/68020/init", "init", 0); + error("/68020/init"); +} + +/* + * open the network device, push on the needed multiplexors + */ +void +dkconfig(void) +{ + int cfd; switch(bootdevice){ case 'A': @@ -84,6 +142,7 @@ main(int argc, char *argv[]) /* * fork a process to hold the device channel open + * forever */ switch(fork()){ case -1: @@ -96,11 +155,19 @@ main(int argc, char *argv[]) close(cfd); break; } +} + +/* + * open a datakit channel and call ken, return an fd to the + * connection. + */ +int +dkdial(void) +{ + int fd, cfd; + int i; + long n; - /* - * open a datakit channel and call ken, leave the - * incon ctl channel open - */ for(i = 0; ; i++){ fd = open("#k/2/data", 2); if(fd < 0) @@ -114,16 +181,50 @@ main(int argc, char *argv[]) break; if(i == 5) error("dialing"); - print("error dialing, retrying ...\n"); + print("error dialing %s, retrying ...\n", bootserver); close(fd); close(cfd); } print("connected to %s\n", bootserver); close(cfd); + return fd; +} + +/* + * read arguments passed by kernel as + * environment variables - YECH! + */ +void +bootparams(void) +{ + int f; + + f = open("#e/bootline", OREAD); + if(f >= 0){ + read(f, bootline, sizeof bootline); + close(f); + } + f = open("#e/bootdevice", OREAD); + if(f >= 0){ + read(f, &bootdevice, 1); + close(f); + } + f = open("#e/bootserver", OREAD); + if(f >= 0){ + read(f, bootserver, 64); + close(f); + } else + strcpy(bootserver, "nfs"); +} + +/* + * send nop to file server + */ +void +nop(int fd) +{ + long n; - /* - * talk to the file server - */ print("nop..."); hdr.type = Tnop; hdr.tag = ~0; @@ -142,6 +243,15 @@ main(int argc, char *argv[]) } if(hdr.type != Rnop) error("not Rnop"); +} + +/* + * send nop to file server + */ +void +session(int fd) +{ + long n; print("session..."); hdr.type = Tsession; @@ -160,54 +270,52 @@ main(int argc, char *argv[]) } if(hdr.type != Rsession) error("not Rsession"); +} - print("post..."); - sprint(buf, "#s/%s", "bootes"); - f = create(buf, 1, 0666); - if(f < 0) - error("create"); - sprint(buf, "%d", fd); - if(write(f, buf, strlen(buf)) != strlen(buf)) - error("write"); - close(f); - sprint(buf, "#s/%s", "bootes"); - f = create("#s/boot", 1, 0666); - if(f < 0) - error("create"); - sprint(buf, "%d", fd); - if(write(f, buf, strlen(buf)) != strlen(buf)) - error("write"); - close(f); - - print("mount..."); - if(bind("/", "/", MREPL) < 0) - error("bind"); - if(mount(fd, "/", MAFTER|MCREATE, "", "") < 0) - error("mount"); +/* + * see if we have a cache file system server in the kernel, + * and use it if we do + */ +int +cache(int fd) +{ + int f; + ulong i; + int p[2]; /* - * set the time from the access time of the root of the file server, - * accessible as /.. + * if there's no /cfs, just return the fd to the + * file server */ - print("time..."); - if(stat("/..", buf) < 0) - error("stat"); - convM2D(buf, &dir); - f = open("#c/time", OWRITE); - sprint(buf, "%ld", dir.atime); - write(f, buf, strlen(buf)); - close(f); - - print("success\n"); - - bind("#k", "/net/net", MREPL); - bind("#k", "/net/dk", MREPL); + f = open("/cfs", OREAD); + if(f < 0) + return fd; + print("cfs..."); - if(strchr(bootline, ' ')) - execl("/68020/init", "init", "-m", 0); - else - execl("/68020/init", "init", 0); - error("/68020/init"); + /* + * if we have a cfs, give it the file server as fd 0 + * and requests on fd 1 + */ + if(pipe(p)<0) + error("pipe"); + switch(fork()){ + case -1: + error("fork"); + case 0: + close(p[1]); + dup(fd, 0); + close(fd); + dup(p[0], 1); + close(p[0]); + execl("/cfs", "bootcfs", "-s", 0); + break; + default: + close(p[0]); + close(fd); + fd = p[1]; + break; + } + return fd; } void diff --git a/gnot/boot.h b/gnot/boot.h index 38af7c93c1149012f489353a6f4c666820284f98..a83555ddf3f29973ff81652a307a74b75105e85c 100644 --- a/gnot/boot.h +++ b/gnot/boot.h @@ -1,7 +1,7 @@ ulong bootcode[]={ 0x000000107, - 0x0000025ee, - 0x0000004ac, + 0x000002706, + 0x0000004d4, 0x0000001e4, 0x000000000, 0x000002020, @@ -13,424 +13,491 @@ ulong bootcode[]={ 0x000142f2f, 0x00014610c, 0x02f006100, - 0x0071c4fef, + 0x008284fef, 0x0001c4e75, - 0x04feffe6c, + 0x04feffe84, 0x042a7486e, - 0x080b66100, - 0x008e24878, + 0x081ae6100, + 0x009fa4878, 0x00001486e, - 0x080be6100, - 0x008d64878, + 0x081b66100, + 0x009ee4878, 0x00001486e, - 0x080c66100, - 0x008ca42a7, - 0x0486e80ce, - 0x0610008c0, - 0x04a806d1e, - 0x048780040, - 0x0486e8652, - 0x02f002f40, - 0x001b86100, - 0x008b02f2f, - 0x001b86100, - 0x008844fef, - 0x0001042a7, - 0x0486e80da, - 0x061000894, - 0x04a806d1e, - 0x048780001, - 0x0486e8002, - 0x02f002f40, - 0x001c06100, - 0x008842f2f, - 0x001c06100, - 0x008584fef, - 0x0001042a7, - 0x0486e80e8, - 0x061000868, - 0x04a806d00, - 0x005c64878, - 0x00040486e, - 0x085322f00, - 0x02f4001c8, - 0x061000856, - 0x02f2f01c8, - 0x06100082a, - 0x0102e8002, - 0x049c04fef, - 0x000407241, - 0x0b2006700, - 0x005607261, - 0x0b2006700, - 0x005567273, - 0x0b2006700, - 0x005124878, - 0x00002486e, - 0x0815d6100, - 0x0081a2f40, - 0x001984aaf, - 0x00198508f, - 0x06c0a486e, - 0x081646100, - 0x005ac588f, - 0x0486e8173, + 0x081be6100, + 0x009e26100, + 0x004306100, + 0x0024e6100, + 0x003542f00, + 0x02f400194, + 0x0610004b6, 0x02f2f0194, - 0x06100056e, - 0x0486e817e, - 0x02f2f019c, - 0x061000562, - 0x0610007dc, - 0x04fef0010, - 0x072ffb280, - 0x0670004c4, - 0x04281b280, - 0x0670004ae, - 0x02f2f0190, - 0x0610007ae, - 0x0588f42af, - 0x0017c4878, - 0x00002486e, - 0x081946100, - 0x007ba4a80, - 0x042e72f40, - 0x0019644df, - 0x06c0a486e, - 0x0819e6100, - 0x0054c588f, - 0x048780002, - 0x0486e81b0, - 0x061000798, - 0x04a8042e7, - 0x02f4001a2, - 0x044df6c0a, - 0x0486e81b9, - 0x06100052a, - 0x0588f486e, - 0x08532486e, - 0x081ca486f, - 0x000946100, - 0x006b6486f, - 0x000986100, - 0x007282f00, - 0x02f4001ac, - 0x0486f00a0, - 0x02f2f01b8, - 0x061000770, - 0x0b0af01b4, - 0x0660003f4, - 0x0486e8532, - 0x0486e81fa, - 0x0610005b8, - 0x02f2f01c4, - 0x06100071e, - 0x0486e820b, - 0x0610005a8, - 0x01d7c0032, - 0x085d63d7c, - 0x0ffff85da, - 0x0486f00b8, - 0x0486e85d6, - 0x061000740, - 0x02f002f40, - 0x001d0486f, - 0x000c42f2f, - 0x001d86100, - 0x00722b0af, - 0x001d8670a, - 0x0486e8212, - 0x0610004a2, - 0x0588f4878, - 0x00100486f, - 0x000d02f2f, - 0x001e46100, - 0x006f02400, - 0x07002b082, - 0x0660a0c2f, - 0x0004f00d8, - 0x067000358, - 0x04a8242e7, - 0x02f4201e6, - 0x044df6e0e, - 0x0486e821c, - 0x06100046a, - 0x0242f01e8, - 0x0588f2f02, - 0x0486e85d6, - 0x0486f00e0, - 0x061000e90, - 0x04a806638, - 0x0102f00e7, - 0x049c02f00, - 0x0102f00ea, - 0x049c02f00, - 0x0102f00ed, - 0x049c02f00, - 0x0102f00f0, - 0x049c02f00, - 0x02f2f0200, - 0x0486e8225, - 0x0610004f4, - 0x0486e8248, - 0x06100041e, - 0x04fef001c, - 0x00c2e0033, - 0x085d6670a, - 0x0486e8253, - 0x06100040a, - 0x0588f486e, - 0x0825c6100, - 0x004ce1d7c, - 0x0003485d6, - 0x03d7cffff, - 0x085da486f, - 0x000e8486e, - 0x085d66100, - 0x006662f00, - 0x02f400200, - 0x0486f00f4, - 0x02f2f0208, - 0x061000648, - 0x0b0af0208, - 0x0670a486e, - 0x082676100, - 0x003c8588f, - 0x048780100, - 0x0486f0100, - 0x02f2f0214, - 0x061000616, - 0x02f400214, - 0x04aaf0214, - 0x06e0a486e, - 0x082756100, - 0x003a4588f, - 0x02f2f0214, - 0x0486e85d6, - 0x0486f0110, - 0x061000dcc, - 0x04a80660a, - 0x0486e8282, - 0x061000386, - 0x0588f0c2e, - 0x0003785d6, - 0x06618486e, - 0x085dc486e, - 0x082916100, - 0x0043e486e, - 0x085dc6100, - 0x003684fef, - 0x0000c0c2e, - 0x0003585d6, - 0x0670a486e, - 0x0829b6100, - 0x00354588f, - 0x0486e82a8, - 0x061000418, - 0x0486e82b6, - 0x0486e82b0, - 0x0486f0120, - 0x0610004d8, + 0x0610005b2, + 0x02f2f0198, + 0x061000668, + 0x02f40019c, + 0x0486e81c6, + 0x061000818, + 0x0486e81d4, + 0x0486e81ce, + 0x0486f00a4, + 0x0610008d8, 0x0487801b6, 0x048780001, - 0x0486f012c, - 0x06100056c, + 0x0486f00b0, + 0x061000972, 0x04a8042e7, - 0x02f400236, + 0x02f4001b6, 0x044df6c0a, - 0x0486e82bd, - 0x061000316, + 0x0486e81db, + 0x061000716, 0x0588f2f2f, - 0x00240486e, - 0x082c4486f, - 0x001386100, - 0x004a2486f, - 0x0013c6100, - 0x00514588f, + 0x001b8486e, + 0x081e2486f, + 0x000bc6100, + 0x008a2486f, + 0x000c06100, + 0x00914588f, 0x02f00486f, - 0x001402f2f, - 0x002486100, - 0x0055e2f00, - 0x0486f014c, - 0x0610004fa, + 0x000c42f2f, + 0x001c86100, + 0x0096a2f00, + 0x0486f00d0, + 0x0610008fa, 0x0588f221f, 0x0b280670a, - 0x0486e82c7, - 0x0610002d2, + 0x0486e81e5, + 0x0610006d2, 0x0588f2f2f, - 0x0024c6100, - 0x00504486e, - 0x082d3486e, - 0x082cd486f, - 0x001546100, - 0x004564878, + 0x001cc6100, + 0x0090a486e, + 0x081f1486e, + 0x081eb486f, + 0x000d86100, + 0x008564878, 0x001b64878, 0x00001486e, - 0x082da6100, - 0x004ea4a80, + 0x081f86100, + 0x008f04a80, 0x042e72f40, - 0x0026a44df, + 0x001ea44df, 0x06c0a486e, - 0x082e26100, - 0x00294588f, - 0x02f2f0274, - 0x0486e82e9, - 0x0486f016c, - 0x061000420, - 0x0486f0170, - 0x061000492, + 0x082006100, + 0x00694588f, + 0x02f2f01ec, + 0x0486e8207, + 0x0486f00f0, + 0x061000820, + 0x0486f00f4, + 0x061000892, 0x0588f2f00, - 0x0486f0174, - 0x02f2f027c, - 0x0610004dc, + 0x0486f00f8, + 0x02f2f01fc, + 0x0610008e8, 0x02f00486f, - 0x001806100, - 0x00478588f, + 0x001046100, + 0x00878588f, 0x0221fb280, 0x0670a486e, - 0x082ec6100, - 0x00250588f, - 0x02f2f0280, - 0x061000482, - 0x0486e82f2, - 0x06100030c, + 0x0820a6100, + 0x00650588f, + 0x02f2f0200, + 0x061000888, 0x042a7486e, - 0x082fd486e, - 0x082fb6100, - 0x004604a80, + 0x08212486e, + 0x082106100, + 0x008684a80, 0x06c0a486e, - 0x082ff6100, - 0x00224588f, - 0x0486e8307, - 0x0486e8306, + 0x082146100, + 0x0062c588f, + 0x0486e8219, + 0x0610006f0, + 0x0486e8225, + 0x0486e8224, 0x048780006, - 0x0486e8304, - 0x02f2f02b0, - 0x06100045e, + 0x0486e8222, + 0x02f2f0228, + 0x06100086a, 0x04a806c0a, - 0x0486e8308, - 0x0610001fe, + 0x0486e8226, + 0x0610005fe, 0x0588f486e, - 0x0830e6100, - 0x002c2486f, - 0x001a8486e, - 0x083166100, - 0x004544a80, + 0x0822c6100, + 0x006c2486f, + 0x0012c486e, + 0x082346100, + 0x008604a80, 0x06c0a486e, - 0x0831a6100, - 0x001dc588f, - 0x0486f0134, - 0x0486f01b4, - 0x061001206, + 0x082386100, + 0x005dc588f, + 0x0486f00c0, + 0x0486f0138, + 0x061001612, 0x048780001, - 0x0486e831f, - 0x06100041c, - 0x02f4002c4, - 0x02f2f01a4, - 0x0486e8327, - 0x0486f01c8, - 0x06100034c, - 0x0486f01cc, - 0x0610003be, + 0x0486e823d, + 0x061000828, + 0x02f400244, + 0x02f2f0130, + 0x0486e8245, + 0x0486f014c, + 0x06100074c, + 0x0486f0150, + 0x0610007be, 0x0588f2f00, - 0x0486f01d0, - 0x02f2f02d8, - 0x061000408, - 0x02f2f02dc, - 0x0610003ca, - 0x0486e832b, - 0x061000254, + 0x0486f0154, + 0x02f2f0258, + 0x061000814, + 0x02f2f025c, + 0x0610007d0, + 0x0486e8249, + 0x061000654, 0x042a7486e, - 0x08337486e, - 0x083346100, - 0x003a842a7, - 0x0486e8343, - 0x0486e8340, - 0x06100039a, + 0x08255486e, + 0x082526100, + 0x007a842a7, + 0x0486e8261, + 0x0486e825e, + 0x06100079a, 0x048780020, - 0x0486e8652, - 0x06100033e, + 0x0486e867a, + 0x06100073e, 0x04a806720, 0x042a7486e, - 0x0835c486e, - 0x08357486e, - 0x0834b6100, - 0x00316486e, - 0x083706100, - 0x001404fef, - 0x0032c4e75, + 0x0827a486e, + 0x08275486e, + 0x082696100, + 0x00716486e, + 0x0828e6100, + 0x005404fef, + 0x002a04e75, 0x042a7486e, - 0x0836b486e, - 0x0835f6100, - 0x002fa598f, - 0x060e00c2f, - 0x0004b00d9, - 0x06600fca2, - 0x048780100, - 0x0486f00dc, - 0x02f2f01f0, - 0x06100036e, - 0x024004fef, - 0x0000c6000, - 0x0fc887005, - 0x0b0af01a8, - 0x0660a486e, - 0x081d56100, - 0x000f4588f, - 0x0486e81dd, - 0x0610001b8, - 0x02f2f01bc, - 0x06100031e, - 0x02f2f01c4, - 0x061000316, - 0x052af01b4, - 0x04fef0038, - 0x06000fb64, - 0x048790000, - 0x0ea606100, - 0x0032a588f, - 0x060f26000, - 0x0fb4e4878, + 0x08289486e, + 0x0827d6100, + 0x006fa598f, + 0x060e0598f, + 0x0102e8002, + 0x049c07241, + 0x0b2006700, + 0x000bc7261, + 0x0b2006700, + 0x000b27273, + 0x0b200676a, + 0x048780002, + 0x0486e82fd, + 0x061000764, + 0x02f400008, + 0x04aaf0008, + 0x0508f6c0a, + 0x0486e8304, + 0x0610004ea, + 0x0588f486e, + 0x083132f2f, + 0x000046100, + 0x004ac486e, + 0x0831e2f2f, + 0x0000c6100, + 0x004a06100, + 0x007264fef, + 0x0001072ff, + 0x0b2806720, + 0x04281b280, + 0x0670c2f17, + 0x0610006f8, + 0x0588f588f, + 0x04e754879, + 0x00000ea60, + 0x061000718, + 0x0588f60f2, + 0x060ec4878, 0x00002486e, - 0x0812b6100, - 0x0030a2f40, - 0x001984aaf, - 0x001986c0a, - 0x0486e8137, - 0x06100009e, + 0x082cb6100, + 0x006fa2f40, + 0x000084aaf, + 0x000086c0a, + 0x0486e82d7, + 0x061000482, 0x0588f486e, - 0x0814b2f2f, - 0x0019c6160, - 0x0486e8152, - 0x02f2f01a4, - 0x061564fef, + 0x082eb2f2f, + 0x0000c6100, + 0x00444486e, + 0x082f22f2f, + 0x000146100, + 0x004384fef, 0x000186000, - 0x0fad860c2, + 0x0ff7a60be, 0x048780002, - 0x0486e80fa, - 0x0610002cc, - 0x02f400198, - 0x04aaf0198, - 0x06c08486e, - 0x081066160, - 0x0588f486e, - 0x0811a2f2f, - 0x0019c6124, - 0x0486e8120, - 0x02f2f01a4, - 0x0611a4fef, - 0x000186000, - 0x0fa9c486e, - 0x080f6486e, - 0x085326100, - 0x0023e518f, - 0x06000fa46, + 0x0486e829a, + 0x0610006b8, + 0x02f400008, + 0x04aaf0008, + 0x06c0a486e, + 0x082a66100, + 0x00440588f, + 0x0486e82ba, + 0x02f2f000c, + 0x061000402, + 0x0486e82c0, + 0x02f2f0014, + 0x0610003f6, + 0x04fef0018, + 0x06000ff38, + 0x04feffff0, + 0x042af0004, + 0x048780002, + 0x0486e8334, + 0x061000670, + 0x04a8042e7, + 0x02f400016, + 0x044df6c0a, + 0x0486e833e, + 0x0610003f6, + 0x0588f4878, + 0x00002486e, + 0x083506100, + 0x0064e4a80, + 0x042e72f40, + 0x0001a44df, + 0x06c0a486e, + 0x083596100, + 0x003d4588f, + 0x0486e855a, + 0x0486e836a, + 0x0486e859a, + 0x061000560, + 0x0486e859a, + 0x0610005d2, + 0x02f002f40, + 0x00024486e, + 0x0859a2f2f, + 0x000306100, + 0x00626b0af, + 0x0002c661e, + 0x0486e855a, + 0x0486e839d, + 0x061000464, + 0x02f2f003c, + 0x0610005d0, + 0x0202f0044, + 0x04fef0048, + 0x04e757005, + 0x0b0af0030, + 0x0660a486e, + 0x083756100, + 0x00374588f, + 0x0486e855a, + 0x0486e837d, + 0x061000434, + 0x02f2f0040, + 0x0610005a0, + 0x02f2f0040, + 0x061000598, + 0x052af0040, + 0x04fef003c, + 0x06000ff36, + 0x0598f42a7, + 0x0486e83ae, + 0x0610005a4, + 0x04a806d1e, + 0x048780040, + 0x0486e867a, + 0x02f002f40, + 0x000146100, + 0x005942f2f, + 0x000146100, + 0x005624fef, + 0x0001042a7, + 0x0486e83ba, + 0x061000578, + 0x04a806d1e, + 0x048780001, + 0x0486e8002, + 0x02f002f40, + 0x0001c6100, + 0x005682f2f, + 0x0001c6100, + 0x005364fef, + 0x0001042a7, + 0x0486e83c8, + 0x06100054c, + 0x04a806d20, + 0x048780040, + 0x0486e855a, + 0x02f002f40, + 0x000246100, + 0x0053c2f2f, + 0x000246100, + 0x0050a4fef, + 0x0002c4e75, + 0x0486e83d6, + 0x0486e855a, + 0x0610004bc, + 0x0518f60ea, + 0x0598f486e, + 0x083da6100, + 0x003761d7c, + 0x0003285fe, + 0x03d7cffff, + 0x08602486e, + 0x0859a486e, + 0x085fe6100, + 0x0051a2f00, + 0x02f400010, + 0x0486e859a, + 0x02f2f001c, + 0x0610004fc, + 0x0b0af0018, + 0x0670a486e, + 0x083e16100, + 0x00270588f, + 0x048780064, + 0x0486e859a, + 0x02f2f0028, + 0x0610004ca, + 0x022007002, + 0x0b0816608, + 0x00c2e004f, + 0x0859a677c, + 0x04a8142e7, + 0x02f410026, + 0x044df6e0e, + 0x0486e83eb, + 0x06100023a, + 0x0222f0028, + 0x0588f2f01, + 0x0486e85fe, + 0x0486e859a, + 0x061000c6c, + 0x04a806638, + 0x0102e859d, + 0x049c02f00, + 0x0102e859c, + 0x049c02f00, + 0x0102e859b, + 0x049c02f00, + 0x0102e859a, + 0x049c02f00, + 0x02f2f0040, + 0x0486e83f4, + 0x0610002c4, + 0x0486e8417, + 0x0610001ee, + 0x04fef001c, + 0x00c2e0033, + 0x085fe670a, + 0x0486e8422, + 0x0610001da, + 0x0588f4fef, + 0x000344e75, + 0x00c2e004b, + 0x0859b6600, + 0x0ff7c4878, + 0x00064486e, + 0x0859a2f2f, + 0x000346100, + 0x004242200, + 0x04fef000c, + 0x06000ff62, + 0x0598f486e, + 0x0842b6100, + 0x002721d7c, + 0x0003485fe, + 0x03d7cffff, + 0x08602486e, + 0x0859a486e, + 0x085fe6100, + 0x004162f00, + 0x02f400010, + 0x0486e859a, + 0x02f2f001c, + 0x0610003f8, + 0x0b0af0018, + 0x0670a486e, + 0x084366100, + 0x0016c588f, + 0x048780064, + 0x0486e859a, + 0x02f2f0028, + 0x0610003c6, + 0x02f400024, + 0x04aaf0024, + 0x06e0a486e, + 0x084446100, + 0x00148588f, + 0x02f2f0024, + 0x0486e85fe, + 0x0486e859a, + 0x061000b7c, + 0x04a80660a, + 0x0486e8451, + 0x06100012a, + 0x0588f0c2e, + 0x0003785fe, + 0x06618486e, + 0x08604486e, + 0x084606100, + 0x001e2486e, + 0x086046100, + 0x0010c4fef, + 0x0000c0c2e, + 0x0003585fe, + 0x0670a486e, + 0x0846a6100, + 0x000f8588f, + 0x04fef0034, + 0x04e754fef, + 0x0fff042a7, + 0x0486e8477, + 0x061000348, + 0x04a806c0a, + 0x0202f001c, + 0x04fef0018, + 0x04e75486e, + 0x0847c6100, + 0x0019a486f, + 0x0000c6100, + 0x002fa4a80, + 0x06c0a486e, + 0x084836100, + 0x000b8588f, + 0x06100030c, + 0x04fef0010, + 0x072ffb280, + 0x0676c4281, + 0x0b280671c, + 0x02f176100, + 0x002de2f2f, + 0x000186100, + 0x002d6242f, + 0x0000c508f, + 0x020024fef, + 0x000104e75, + 0x02f2f0004, + 0x0610002c0, + 0x042a72f2f, + 0x0001c6100, + 0x002c22f2f, + 0x000206100, + 0x002ae4878, + 0x000012f2f, + 0x000146100, + 0x002ae2f2f, + 0x000186100, + 0x0029a42a7, + 0x0486e849a, + 0x0486e8492, + 0x0486e848d, + 0x061000214, + 0x0242f0040, + 0x04fef002c, + 0x060ae486e, + 0x084886134, + 0x0588f60ac, 0x0598f2f2f, 0x0000c6100, 0x002402f00, 0x02f400008, 0x02f2f0014, 0x02f2f0014, - 0x061000288, + 0x061000294, 0x0b0af0010, 0x067082f2f, 0x0001c6108, @@ -438,10 +505,10 @@ ulong bootcode[]={ 0x000144e75, 0x04fefffc0, 0x048576100, - 0x00270486f, + 0x0027c486f, 0x000042f2f, 0x0004c486e, - 0x0837c4878, + 0x0849d4878, 0x000026100, 0x0011a42a7, 0x061744fef, @@ -449,10 +516,10 @@ ulong bootcode[]={ 0x0598f4281, 0x07021b081, 0x06f1e4ab6, - 0x01d2084ae, + 0x01d2084d6, 0x0660e2daf, 0x000081d20, - 0x084ae7001, + 0x084d67001, 0x0588f4e75, 0x052817021, 0x0b0816ee2, @@ -462,30 +529,30 @@ ulong bootcode[]={ 0x042827021, 0x0b0826f18, 0x020362d20, - 0x084aeb088, + 0x084d6b088, 0x0660642b6, - 0x02d2084ae, + 0x02d2084d6, 0x052827021, 0x0b0826ee8, 0x0588f4e75, 0x04aaf0004, 0x0660642a7, 0x0610c588f, - 0x0486e8406, + 0x0486e84ae, 0x06104588f, 0x04e75518f, 0x072204a81, 0x06d222eb6, - 0x01d2084ae, + 0x01d2084d6, 0x04a976712, 0x02f410004, 0x042b61d20, - 0x084ae4eb7, + 0x084d64eb7, 0x00151222f, 0x000045381, 0x04a816cde, 0x02f2f000c, - 0x061000170, + 0x061000176, 0x04fef000c, 0x04e754fef, 0x0eff841ef, @@ -496,19 +563,19 @@ ulong bootcode[]={ 0x000001000, 0x02f08486f, 0x000146100, - 0x0111a2200, + 0x011262200, 0x041ef0018, 0x092882f01, 0x0486f001c, 0x048780001, - 0x06100016c, + 0x061000178, 0x0240042e7, 0x02f40001e, 0x044df6c1a, - 0x052ae8016, + 0x052ae8012, 0x0700ab0ae, - 0x080166e0e, - 0x0486e841e, + 0x080126e0e, + 0x0486e84c6, 0x06100ff70, 0x0242f0020, 0x0588f2002, @@ -522,39 +589,39 @@ ulong bootcode[]={ 0x000001000, 0x02f08486f, 0x000146100, - 0x010b22200, + 0x010be2200, 0x041ef0018, 0x092882f01, 0x0486f001c, 0x02f2f1024, - 0x061000104, + 0x061000110, 0x0240042e7, 0x02f40001e, 0x044df6c1a, - 0x052ae8016, + 0x052ae8012, 0x0700ab0ae, - 0x080166e0e, - 0x0486e841e, + 0x080126e0e, + 0x0486e84c6, 0x06100ff08, 0x0242f0020, 0x0588f2002, 0x04fef1024, 0x04e75518f, 0x0226f000c, - 0x02eae801a, + 0x02eae8016, 0x041ef0010, 0x058882f08, 0x02f2f0014, 0x048691000, 0x02f096100, - 0x0104e2d6f, - 0x00010801a, + 0x0105a2d6f, + 0x000108016, 0x090af001c, 0x04fef0018, 0x04e7541ef, 0x000045888, 0x02f082f2f, - 0x00008616c, + 0x000086178, 0x0508f4e75, 0x0206f0004, 0x0142f000b, @@ -577,10 +644,13 @@ ulong bootcode[]={ 0x020094e75, 0x070004e75, 0x070024e40, - 0x04e757008, + 0x04e757015, + 0x04e404e75, + 0x070084e40, + 0x04e757004, 0x04e404e75, - 0x070044e40, - 0x04e757016, + 0x070164e40, + 0x04e757005, 0x04e404e75, 0x070074e40, 0x04e757009, @@ -609,7 +679,7 @@ ulong bootcode[]={ 0x005d4724f, 0x0b0016e00, 0x005cc3036, - 0x00b20832a, + 0x00b2080d2, 0x04efb0000, 0x0200890af, 0x0000c588f, @@ -981,8 +1051,8 @@ ulong bootcode[]={ 0x06000fa42, 0x0101149c0, 0x02f00486e, - 0x080966100, - 0x0f8464280, + 0x081166100, + 0x0f83a4280, 0x04fef000c, 0x04e756000, 0x0fa286000, @@ -1104,7 +1174,7 @@ ulong bootcode[]={ 0x005ae724f, 0x0b0016e00, 0x005a63036, - 0x00b208366, + 0x00b20810e, 0x04efb0000, 0x0202f0008, 0x0d0af0010, @@ -1466,8 +1536,8 @@ ulong bootcode[]={ 0x0000c6000, 0x0fa681011, 0x049c02f00, - 0x0486e80a4, - 0x06100f0b0, + 0x0486e8124, + 0x06100f0a4, 0x042804fef, 0x0000c4e75, 0x06000fa4e, @@ -1578,57 +1648,57 @@ ulong bootcode[]={ 0x0142f0007, 0x0c43c007f, 0x0701eb0ae, - 0x0800e6e04, + 0x0801a6e04, 0x070014e75, - 0x0202e800e, + 0x0202e801a, 0x0120249c1, 0x01d801920, - 0x0842e52ae, - 0x0800e1202, + 0x0801e52ae, + 0x0801a1202, 0x049c11036, - 0x01920842e, + 0x01920801e, 0x049c02daf, 0x000080d20, - 0x0801e4280, + 0x0809e4280, 0x04e754fef, 0x0ffe4282f, 0x0002c246f, 0x000282f6e, - 0x0800a0004, - 0x02eae8006, + 0x080060004, + 0x02eae800a, 0x02d6f0020, - 0x0800a202f, + 0x08006202f, 0x000245380, - 0x02d408006, + 0x02d40800a, 0x0101a49c0, 0x024007025, 0x0b0826768, 0x04a826628, - 0x0202e800a, - 0x0b0ae8006, + 0x0202e8006, + 0x0b0ae800a, 0x0650453ae, - 0x0800a4236, - 0x00161800a, - 0x0202e800a, + 0x080064236, + 0x001618006, + 0x0202e8006, 0x02d6f0004, - 0x0800a2d57, - 0x080064fef, + 0x080062d57, + 0x0800a4fef, 0x0001c4e75, - 0x0202e800a, - 0x0b0ae8006, + 0x0202e8006, + 0x0b0ae800a, 0x0640a1d82, - 0x00161800a, - 0x052ae800a, - 0x052ae801a, + 0x001618006, + 0x052ae8006, + 0x052ae8016, 0x0700ab082, 0x0660642ae, - 0x0801a60a4, + 0x0801660a4, 0x07009b082, 0x0669e7007, - 0x0d0ae801a, + 0x0d0ae8016, 0x0c0bcffff, 0x0fff82d40, - 0x0801a608c, + 0x08016608c, 0x0327cfc18, 0x02f7cffff, 0x0fc180014, @@ -1682,9 +1752,9 @@ ulong bootcode[]={ 0x000282f04, 0x02f440040, 0x010362920, - 0x0842e49c0, + 0x0801e49c0, 0x020760d20, - 0x0801e4e90, + 0x0809e4e90, 0x0282f0040, 0x0246f003c, 0x0226f002c, @@ -1839,12 +1909,12 @@ ulong bootcode[]={ 0x070012640, 0x060d4518f, 0x02f2f000c, - 0x06100ec2a, + 0x06100ec1e, 0x0266f0010, - 0x0246e8006, + 0x0246e800a, 0x0262f0014, 0x0226f0018, - 0x0206e800a, + 0x0206e8006, 0x022000c83, 0x0fffffc18, 0x067064a83, @@ -1856,10 +1926,10 @@ ulong bootcode[]={ 0x000006fec, 0x0b1ca6406, 0x010c22d48, - 0x0800a52ae, - 0x0801a700a, + 0x0800652ae, + 0x08016700a, 0x0b0826642, - 0x042ae801a, + 0x042ae8016, 0x0b2fcfc18, 0x067ce5389, 0x0101b49c0, @@ -1873,21 +1943,21 @@ ulong bootcode[]={ 0x06cf2b1ca, 0x0640810fc, 0x000202d48, - 0x0800a52ae, - 0x0801a5281, + 0x0800652ae, + 0x080165281, 0x060e87009, 0x0b08266bc, 0x07007d0ae, - 0x0801ac0bc, + 0x08016c0bc, 0x0fffffff8, - 0x02d40801a, + 0x02d408016, 0x060aa2001, 0x0b2836c00, 0x0ff78b1ca, 0x0640810fc, 0x000202d48, - 0x0800a52ae, - 0x0801a5281, + 0x0800652ae, + 0x080165281, 0x060e4598f, 0x01ebc002a, 0x0202f0018, @@ -1917,12 +1987,12 @@ ulong bootcode[]={ 0x06100fc94, 0x070044fef, 0x000104e75, - 0x0202e800a, - 0x0b0ae8006, + 0x0202e8006, + 0x0b0ae800a, 0x0640c1dbc, 0x000250161, - 0x0800a52ae, - 0x0800a4280, + 0x0800652ae, + 0x080064280, 0x04e75202f, 0x000147268, 0x0b0816d2a, @@ -2438,17 +2508,49 @@ ulong bootcode[]={ 0x000000000, 0x000000000, 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, 0x000070000, 0x000000000, 0x000000000, 0x000000000, - 0x03d860000, - 0x03e120000, - 0x03aae0000, - 0x03e640000, - 0x03db40000, - 0x03dda0000, - 0x03df80000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000010006, + 0x000000000, + 0x000010001, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000003, + 0x000030000, + 0x000000000, + 0x000000000, + 0x000000000, + 0x000000200, + 0x000000000, + 0x000000000, + 0x000040203, + 0x003030100, + 0x000000100, + 0x000020000, + 0x000050001, + 0x000000200, + 0x000000000, + 0x000000000, + 0x03e9e0000, + 0x03f2a0000, + 0x03bc60000, + 0x03f7c0000, + 0x03ecc0000, + 0x03ef20000, + 0x03f100000, 0x000000000, 0x000000000, 0x000000000, @@ -2479,24 +2581,96 @@ ulong bootcode[]={ 0x074797065, 0x03a202564, 0x00a000000, - 0x000002363, + 0x0000005e4, + 0x005e005dc, + 0x005d805c2, + 0x005a00588, + 0x00584051a, + 0x004ae0482, + 0x0046a0434, + 0x003c803ac, + 0x0034002d8, + 0x0026c0208, + 0x001b8012e, + 0x0010400ec, + 0x000d400bc, + 0x000a4008c, + 0x000560022, + 0x0000c05be, + 0x005ba05b6, + 0x005b2059c, + 0x0057a0562, + 0x0055e04f4, + 0x004840458, + 0x00440040a, + 0x0039a037e, + 0x0030e02a4, + 0x0023401dc, + 0x001a40140, + 0x0011400fc, + 0x000e400cc, + 0x000b4009c, + 0x000660032, + 0x0001c2363, 0x02f636f6e, 0x073002363, 0x02f636f6e, 0x073002363, 0x02f636f6e, - 0x073002365, - 0x02f626f6f, - 0x0746c696e, - 0x065002365, - 0x02f626f6f, - 0x074646576, - 0x069636500, - 0x023652f62, - 0x06f6f7473, - 0x065727665, - 0x072006e66, - 0x073002363, + 0x07300706f, + 0x073742e2e, + 0x02e002373, + 0x02f257300, + 0x0626f6f74, + 0x065730063, + 0x072656174, + 0x065002564, + 0x000777269, + 0x074650023, + 0x0732f2573, + 0x000626f6f, + 0x074657300, + 0x023732f62, + 0x06f6f7400, + 0x063726561, + 0x074650025, + 0x064007772, + 0x069746500, + 0x02f002f00, + 0x062696e64, + 0x0006d6f75, + 0x06e742e2e, + 0x02e002f00, + 0x000006d6f, + 0x0756e7400, + 0x074696d65, + 0x02e2e2e00, + 0x02f2e2e00, + 0x073746174, + 0x00023632f, + 0x074696d65, + 0x000256c64, + 0x000737563, + 0x063657373, + 0x00a00236b, + 0x0002f6e65, + 0x0742f6e65, + 0x07400236b, + 0x0002f6e65, + 0x0742f646b, + 0x0002f3638, + 0x03032302f, + 0x0696e6974, + 0x000696e69, + 0x074002d6d, + 0x0002f3638, + 0x03032302f, + 0x0696e6974, + 0x000696e69, + 0x074002f36, + 0x038303230, + 0x02f696e69, + 0x074002363, 0x02f727332, 0x033326374, 0x06c006f70, @@ -2556,142 +2730,80 @@ ulong bootcode[]={ 0x000657272, 0x06f722064, 0x069616c69, - 0x06e672c20, - 0x072657472, - 0x079696e67, - 0x0202e2e2e, - 0x00a00636f, - 0x06e6e6563, - 0x074656420, - 0x0746f2025, - 0x0730a006e, - 0x06f702e2e, - 0x02e007772, - 0x069746520, + 0x06e672025, + 0x0732c2072, + 0x065747279, + 0x0696e6720, + 0x02e2e2e0a, + 0x000636f6e, + 0x06e656374, + 0x065642074, + 0x06f202573, + 0x00a002365, + 0x02f626f6f, + 0x0746c696e, + 0x065002365, + 0x02f626f6f, + 0x074646576, + 0x069636500, + 0x023652f62, + 0x06f6f7473, + 0x065727665, + 0x072006e66, + 0x073006e6f, + 0x0702e2e2e, + 0x000777269, + 0x07465206e, + 0x06f700072, + 0x065616420, 0x06e6f7000, - 0x072656164, - 0x0206e6f70, - 0x0006e203d, - 0x02025643b, - 0x020627566, - 0x0203d2025, + 0x06e203d20, + 0x025643b20, + 0x062756620, + 0x03d20252e, + 0x032782025, 0x02e327820, 0x0252e3278, 0x020252e32, - 0x07820252e, - 0x032780a00, - 0x0666f726d, - 0x06174206e, - 0x06f70006e, - 0x06f742052, - 0x06e6f7000, + 0x0780a0066, + 0x06f726d61, + 0x074206e6f, + 0x070006e6f, + 0x07420526e, + 0x06f700073, + 0x065737369, + 0x06f6e2e2e, + 0x02e007772, + 0x069746520, 0x073657373, - 0x0696f6e2e, - 0x02e2e0077, - 0x072697465, - 0x020736573, - 0x073696f6e, - 0x000726561, - 0x064207365, - 0x07373696f, - 0x06e00666f, - 0x0726d6174, + 0x0696f6e00, + 0x072656164, 0x020736573, 0x073696f6e, - 0x000657272, - 0x06f722025, - 0x0733b006e, - 0x06f742052, + 0x000666f72, + 0x06d617420, 0x073657373, 0x0696f6e00, - 0x0706f7374, - 0x02e2e2e00, - 0x023732f25, + 0x06572726f, + 0x072202573, + 0x03b006e6f, + 0x074205273, + 0x065737369, + 0x06f6e002f, + 0x063667300, + 0x06366732e, + 0x02e2e0070, + 0x069706500, + 0x0666f726b, + 0x0002f6366, 0x07300626f, - 0x06f746573, - 0x000637265, - 0x061746500, - 0x025640077, - 0x072697465, - 0x00023732f, - 0x025730062, - 0x06f6f7465, - 0x073002373, - 0x02f626f6f, - 0x074006372, - 0x065617465, - 0x000256400, - 0x077726974, - 0x065006d6f, - 0x0756e742e, - 0x02e2e002f, - 0x0002f0062, - 0x0696e6400, - 0x02f000000, - 0x06d6f756e, - 0x074007469, - 0x06d652e2e, - 0x02e002f2e, - 0x02e007374, - 0x061740023, - 0x0632f7469, - 0x06d650025, - 0x06c640073, - 0x075636365, - 0x073730a00, - 0x0236b002f, - 0x06e65742f, - 0x06e657400, - 0x0236b002f, - 0x06e65742f, - 0x0646b002f, - 0x036383032, - 0x0302f696e, - 0x069740069, - 0x06e697400, - 0x02d6d002f, - 0x036383032, - 0x0302f696e, - 0x069740069, - 0x06e697400, - 0x02f363830, - 0x032302f69, - 0x06e697400, - 0x0626f6f74, - 0x03a202573, - 0x03a202573, - 0x00a000000, - 0x0000005e4, - 0x005e005dc, - 0x005d805c2, - 0x005a00588, - 0x00584051a, - 0x004ae0482, - 0x0046a0434, - 0x003c803ac, - 0x0034002d8, - 0x0026c0208, - 0x001b8012e, - 0x0010400ec, - 0x000d400bc, - 0x000a4008c, - 0x000560022, - 0x0000c05be, - 0x005ba05b6, - 0x005b2059c, - 0x0057a0562, - 0x0055e04f4, - 0x004840458, - 0x00440040a, - 0x0039a037e, - 0x0030e02a4, - 0x0023401dc, - 0x001a40140, - 0x0011400fc, - 0x000e400cc, - 0x000b4009c, - 0x000660032, - 0x0001c6e6f, + 0x06f746366, + 0x073002d73, + 0x000626f6f, + 0x0743a2025, + 0x0733a2025, + 0x0730a0000, + 0x000006e6f, 0x06e2d7a65, 0x0726f2065, 0x078697420, @@ -2702,38 +2814,6 @@ ulong bootcode[]={ 0x06572726f, 0x072730000, 0x000000000, - 0x000000000, - 0x000000000, - 0x000000000, - 0x000000000, - 0x000000000, - 0x000000000, - 0x000000000, - 0x000000000, - 0x000010006, - 0x000000000, - 0x000010001, - 0x000000000, - 0x000000000, - 0x000000000, - 0x000000000, - 0x000000000, - 0x000000003, - 0x000030000, - 0x000000000, - 0x000000000, - 0x000000000, - 0x000000200, - 0x000000000, - 0x000000000, - 0x000040203, - 0x003030100, - 0x000000100, - 0x000020000, - 0x000050001, - 0x000000200, - 0x000000000, - 0x000000000, - 0x00002aba, + 0x00002bfa, 0x0, }; diff --git a/port/devroot.c b/port/devroot.c index 7d3ff28c191fef934b926d05e75c548a2b31f356..5d27129003fc6d3d35e2abcb9ffc2bffda1273fc 100644 --- a/port/devroot.c +++ b/port/devroot.c @@ -10,24 +10,32 @@ enum{ Qdir, Qbin, Qboot, + Qcfs, Qdev, Qenv, Qproc, }; +extern long cfslen; +extern ulong *cfscode; + + Dirtab rootdir[]={ "bin", {Qbin|CHDIR}, 0, 0700, "boot", {Qboot}, 0, 0700, "dev", {Qdev|CHDIR}, 0, 0700, "env", {Qenv|CHDIR}, 0, 0700, "proc", {Qproc|CHDIR}, 0, 0700, + "cfs", {Qcfs}, 0, 0700, }; #define NROOT (sizeof rootdir/sizeof(Dirtab)) +int nroot; void rootreset(void) { + nroot = (cfslen > 0) ? NROOT : NROOT-1; } void @@ -50,19 +58,19 @@ rootclone(Chan *c, Chan *nc) int rootwalk(Chan *c, char *name) { - return devwalk(c, name, rootdir, NROOT, devgen); + return devwalk(c, name, rootdir, nroot, devgen); } void rootstat(Chan *c, char *dp) { - devstat(c, dp, rootdir, NROOT, devgen); + devstat(c, dp, rootdir, nroot, devgen); } Chan* rootopen(Chan *c, int omode) { - return devopen(c, omode, rootdir, NROOT, devgen); + return devopen(c, omode, rootdir, nroot, devgen); } void @@ -87,7 +95,7 @@ rootread(Chan *c, void *buf, long n) switch(c->qid.path & ~CHDIR){ case Qdir: - return devdirread(c, buf, n, rootdir, NROOT, devgen); + return devdirread(c, buf, n, rootdir, nroot, devgen); case Qboot: /* boot */ if(c->offset >= sizeof bootcode) @@ -97,6 +105,14 @@ rootread(Chan *c, void *buf, long n) memcpy(buf, ((char*)bootcode)+c->offset, n); return n; + case Qcfs: /* boot */ + if(c->offset >= cfslen) + return 0; + if(c->offset+n > cfslen) + n = cfslen - c->offset; + memcpy(buf, ((char*)cfscode)+c->offset, n); + return n; + case Qdev: return 0; } diff --git a/power/devhotrod.c b/power/devhotrod.c index 07577ecb485874ef405aa5b352bc68a7f957af3a..fc08af9f8d2bbcb40d168ea70de11c5d589731a6 100644 --- a/power/devhotrod.c +++ b/power/devhotrod.c @@ -67,6 +67,7 @@ enum{ REBOOT= 1, /* params: none */ READ= 2, /* params: buffer, count, returned count */ WRITE= 3, /* params: buffer, count */ + TEST= 7, /* params: none */ }; void @@ -185,6 +186,16 @@ hotrodopen(Chan *c, int omode) mp->param[0] = MP2VME(&hp->rq); mp->param[1] = NhotQ; hotsend(hp, &((User*)(u->p->upage->pa|KZERO))->khot); + delay(1000); + print("reset\n"); + /* + * Issue reset + */ + mp->cmd = TEST; + hotsend(hp, &((User*)(u->p->upage->pa|KZERO))->khot); + print("ok1\n"); + delay(1000); + print("ok2\n"); } c->mode = openmode(omode); c->flag |= COPEN;