1 |
diff -ruN proll_18.orig/Makefile proll-patch10/Makefile |
diff -ruN proll_18.orig/Makefile proll-patch-15/Makefile |
2 |
--- proll_18.orig/Makefile 2002-09-13 14:16:59.000000000 +0000 |
--- proll_18.orig/Makefile 2002-09-13 14:16:59.000000000 +0000 |
3 |
+++ proll-patch10/Makefile 2004-11-13 15:50:49.000000000 +0000 |
+++ proll-patch-15/Makefile 2005-11-09 18:14:51.000000000 +0000 |
4 |
@@ -4,6 +4,7 @@ |
@@ -4,6 +4,7 @@ |
5 |
make -C krups-ser all |
make -C krups-ser all |
6 |
make -C espresso all |
make -C espresso all |
14 |
make -C espresso clean |
make -C espresso clean |
15 |
make -C espresso-ser clean |
make -C espresso-ser clean |
16 |
+ make -C qemu clean |
+ make -C qemu clean |
17 |
diff -ruN proll_18.orig/qemu/Makefile proll-patch10/qemu/Makefile |
diff -ruN proll_18.orig/qemu/Makefile proll-patch-15/qemu/Makefile |
18 |
--- proll_18.orig/qemu/Makefile 1970-01-01 00:00:00.000000000 +0000 |
--- proll_18.orig/qemu/Makefile 1970-01-01 00:00:00.000000000 +0000 |
19 |
+++ proll-patch10/qemu/Makefile 2005-04-12 14:42:23.000000000 +0000 |
+++ proll-patch-15/qemu/Makefile 2005-08-14 10:25:06.000000000 +0000 |
20 |
@@ -0,0 +1,123 @@ |
@@ -0,0 +1,123 @@ |
21 |
+# |
+# |
22 |
+# proll: |
+# proll: |
55 |
+# Fixed %g6 is for arch/sparc/kernel/head.S, it seems ok w/o -ffixed-g6. |
+# Fixed %g6 is for arch/sparc/kernel/head.S, it seems ok w/o -ffixed-g6. |
56 |
+# Kernel uses -fcall-used-g5 -fcall-used-g7, we probably do not need them. |
+# Kernel uses -fcall-used-g5 -fcall-used-g7, we probably do not need them. |
57 |
+# __ANSI__ is supposed to be on by default but it is not. |
+# __ANSI__ is supposed to be on by default but it is not. |
58 |
+CFLAGS = -O2 -Wall -DPROLBASE=$(PROLBASE) -DPROLDATA=$(PROLDATA) -DPROLRODATA=$(PROLRODATA) -D__ANSI__=1 -I$(SRC) -mcpu=hypersparc -g -DQEMU |
+CFLAGS = -O2 -W -Wall -DPROLBASE=$(PROLBASE) -DPROLDATA=$(PROLDATA) -DPROLRODATA=$(PROLRODATA) -D__ANSI__=1 -I$(SRC) -mcpu=hypersparc -Wa,-xarch=v8 -g -DQEMU -m32 -fno-builtin |
59 |
+ASFLAGS = -D__ASSEMBLY__ -I$(SRC) -DPROLRODATA=$(PROLRODATA) -DPROLDATA=$(PROLDATA) -DPROLSIZE=$(PROLSIZE) -g |
+ASFLAGS = -D__ASSEMBLY__ -I$(SRC) -DPROLRODATA=$(PROLRODATA) -DPROLDATA=$(PROLDATA) -DPROLSIZE=$(PROLSIZE) -g -Wa,-xarch=v8 -Wa,-32 |
60 |
+# Solaris or Linux/i386 cross compilation |
+# Solaris or Linux/i386 cross compilation |
61 |
+#CFLAGS = -Iinclude -O |
+#CFLAGS = -Iinclude -O |
62 |
+ |
+ |
141 |
+ |
+ |
142 |
+proll.aout: $(PROLLEXE) |
+proll.aout: $(PROLLEXE) |
143 |
+ $(ELFTOAOUT) -o proll.aout $(PROLLEXE) |
+ $(ELFTOAOUT) -o proll.aout $(PROLLEXE) |
144 |
diff -ruN proll_18.orig/qemu/head.S proll-patch10/qemu/head.S |
diff -ruN proll_18.orig/qemu/head.S proll-patch-15/qemu/head.S |
145 |
--- proll_18.orig/qemu/head.S 1970-01-01 00:00:00.000000000 +0000 |
--- proll_18.orig/qemu/head.S 1970-01-01 00:00:00.000000000 +0000 |
146 |
+++ proll-patch10/qemu/head.S 2005-03-02 15:30:47.000000000 +0000 |
+++ proll-patch-15/qemu/head.S 2005-07-12 22:24:17.000000000 +0000 |
147 |
@@ -0,0 +1,539 @@ |
@@ -0,0 +1,543 @@ |
148 |
+/** |
+/** |
149 |
+ ** Standalone startup code for Linux PROM emulator. |
+ ** Standalone startup code for Linux PROM emulator. |
150 |
+ ** Copyright 1999 Pete A. Zaitcev |
+ ** Copyright 1999 Pete A. Zaitcev |
443 |
+C_LABEL(bootup_user_stack): .skip 0x2000 |
+C_LABEL(bootup_user_stack): .skip 0x2000 |
444 |
+ |
+ |
445 |
+ .section ".text" |
+ .section ".text" |
446 |
|
+ .register %g2, #scratch |
447 |
|
+ .register %g3, #scratch |
448 |
|
+ .register %g6, #scratch |
449 |
|
+ .register %g7, #scratch |
450 |
+ |
+ |
451 |
+goprol: |
+goprol: |
452 |
+ ! %g1 contains end of memory |
+ ! %g1 contains end of memory |
688 |
+C_LABEL(ldb_bypass): |
+C_LABEL(ldb_bypass): |
689 |
+ retl |
+ retl |
690 |
+ lduba [%o0] ASI_M_BYPASS, %o0 |
+ lduba [%o0] ASI_M_BYPASS, %o0 |
691 |
diff -ruN proll_18.orig/qemu/main.c proll-patch10/qemu/main.c |
diff -ruN proll_18.orig/qemu/main.c proll-patch-15/qemu/main.c |
692 |
--- proll_18.orig/qemu/main.c 1970-01-01 00:00:00.000000000 +0000 |
--- proll_18.orig/qemu/main.c 1970-01-01 00:00:00.000000000 +0000 |
693 |
+++ proll-patch10/qemu/main.c 2005-04-16 18:03:23.000000000 +0000 |
+++ proll-patch-15/qemu/main.c 2005-08-14 10:07:48.000000000 +0000 |
694 |
@@ -0,0 +1,185 @@ |
@@ -0,0 +1,185 @@ |
695 |
+/** |
+/** |
696 |
+ ** Proll (PROM replacement) |
+ ** Proll (PROM replacement) |
856 |
+ |
+ |
857 |
+/* |
+/* |
858 |
+ */ |
+ */ |
859 |
+void udelay(unsigned long usecs) |
+void udelay(__attribute__((unused)) unsigned long usecs) |
860 |
+{ |
+{ |
861 |
+ // Qemu hardware is perfect and does not need any delays! |
+ // Qemu hardware is perfect and does not need any delays! |
862 |
+} |
+} |
877 |
+ hw_idprom = va_prom; |
+ hw_idprom = va_prom; |
878 |
+} |
+} |
879 |
+ |
+ |
880 |
diff -ruN proll_18.orig/qemu/openprom.c proll-patch10/qemu/openprom.c |
diff -ruN proll_18.orig/qemu/openprom.c proll-patch-15/qemu/openprom.c |
881 |
--- proll_18.orig/qemu/openprom.c 1970-01-01 00:00:00.000000000 +0000 |
--- proll_18.orig/qemu/openprom.c 1970-01-01 00:00:00.000000000 +0000 |
882 |
+++ proll-patch10/qemu/openprom.c 2005-04-16 17:30:19.000000000 +0000 |
+++ proll-patch-15/qemu/openprom.c 2005-11-07 20:11:04.000000000 +0000 |
883 |
@@ -0,0 +1,741 @@ |
@@ -0,0 +1,910 @@ |
884 |
+/* |
+/* |
885 |
+ * PROM interface support |
+ * PROM interface support |
886 |
+ * Copyright 1996 The Australian National University. |
+ * Copyright 1996 The Australian National University. |
904 |
+struct property { |
+struct property { |
905 |
+ const char *name; |
+ const char *name; |
906 |
+ const char *value; |
+ const char *value; |
907 |
+ const int length; |
+ int length; |
908 |
+}; |
+}; |
909 |
+ |
+ |
910 |
+struct node { |
+struct node { |
924 |
+static const struct property null_properties = { NULL, NULL, -1 }; |
+static const struct property null_properties = { NULL, NULL, -1 }; |
925 |
+static const int prop_true = -1; |
+static const int prop_true = -1; |
926 |
+ |
+ |
927 |
+static const struct property propv_root[] = { |
+static struct property propv_root[7]; |
928 |
+ {"name", "SUNW,JavaStation-1", sizeof("SUNW,JavaStation-1") }, |
+ |
929 |
|
+static const struct property propv_root_templ[] = { |
930 |
|
+ {"name", "SUNW,SparcStation-5", sizeof("SUNW,SparcStation-5") }, |
931 |
+ {"idprom", obp_idprom, IDPROM_SIZE}, |
+ {"idprom", obp_idprom, IDPROM_SIZE}, |
932 |
+ {"banner-name", "JavaStation", sizeof("JavaStation")}, |
+ {"banner-name", "SparcStation", sizeof("SparcStation")}, |
933 |
+ {"compatible", "sun4m", 6}, |
+ {"compatible", "sun4m", 6}, |
|
+ {NULL, NULL, -1} |
|
934 |
+}; |
+}; |
935 |
+ |
+ |
936 |
+static const int prop_iommu_reg[] = { |
+static const int prop_iommu_reg[] = { |
991 |
+static const int height = 0x300; |
+static const int height = 0x300; |
992 |
+static const int width = 0x400; |
+static const int width = 0x400; |
993 |
+static const int linebytes = 0x400; |
+static const int linebytes = 0x400; |
994 |
+static const int depth = 8; |
+static const int depth = 24; |
995 |
+static const int tcx_intr[] = { 5, 0 }; |
+static const int tcx_intr[] = { 5, 0 }; |
996 |
+static const int tcx_interrupts = 5; |
+static const int tcx_interrupts = 5; |
997 |
+static const struct property propv_sbus_tcx[] = { |
+static const struct property propv_sbus_tcx[] = { |
1009 |
+ {"linebytes", (char*)&linebytes, sizeof(int)}, |
+ {"linebytes", (char*)&linebytes, sizeof(int)}, |
1010 |
+ {"depth", (char*)&depth, sizeof(int)}, |
+ {"depth", (char*)&depth, sizeof(int)}, |
1011 |
+ {"reg", (char*)&prop_tcx_regs[0], sizeof(prop_tcx_regs)}, |
+ {"reg", (char*)&prop_tcx_regs[0], sizeof(prop_tcx_regs)}, |
1012 |
+ {"tcx-8-bit", (char*)&prop_true, 0}, |
+ {"tcx-8-bit", 0, -1}, |
1013 |
+ {"intr", (char*)&tcx_intr[0], sizeof(tcx_intr)}, |
+ {"intr", (char*)&tcx_intr[0], sizeof(tcx_intr)}, |
1014 |
+ {"interrupts", (char*)&tcx_interrupts, sizeof(tcx_interrupts)}, |
+ {"interrupts", (char*)&tcx_interrupts, sizeof(tcx_interrupts)}, |
1015 |
+ {"device_type", "display", sizeof("display")}, |
+ {"device_type", "display", sizeof("display")}, |
1106 |
+static const int prop_zs_reg[] = { |
+static const int prop_zs_reg[] = { |
1107 |
+ 0x0, 0x00000000, 0x00000008, |
+ 0x0, 0x00000000, 0x00000008, |
1108 |
+}; |
+}; |
|
+static const int prop_zs_slave[] = { 1 }; |
|
1109 |
+static void *prop_zs_addr; |
+static void *prop_zs_addr; |
1110 |
|
+static const int prop_zs_slave = 1; |
1111 |
+static const struct property propv_obio_zs[] = { |
+static const struct property propv_obio_zs[] = { |
1112 |
+ {"name", "zs", sizeof("zs")}, |
+ {"name", "zs", sizeof("zs")}, |
1113 |
+ {"reg", (char*)&prop_zs_reg[0], sizeof(prop_zs_reg) }, |
+ {"reg", (char*)&prop_zs_reg[0], sizeof(prop_zs_reg) }, |
1114 |
+ {"slave", (char*)&prop_zs_slave[0], sizeof(prop_zs_slave) }, |
+ {"slave", (char*)&prop_zs_slave, sizeof(prop_zs_slave) }, |
1115 |
+ {"device_type", "serial", sizeof("serial") }, |
+ {"device_type", "serial", sizeof("serial") }, |
1116 |
+ {"intr", (char*)&prop_zs_intr[0], sizeof(prop_zs_intr) }, |
+ {"intr", (char*)&prop_zs_intr[0], sizeof(prop_zs_intr) }, |
1117 |
+ {"address", (char*)&prop_zs_addr, sizeof(prop_zs_addr) }, |
+ {"address", (char*)&prop_zs_addr, sizeof(prop_zs_addr) }, |
1118 |
|
+ {"keyboard", (char*)&prop_true, 0}, |
1119 |
|
+ {"mouse", (char*)&prop_true, 0}, |
1120 |
+ {NULL, NULL, -1} |
+ {NULL, NULL, -1} |
1121 |
+}; |
+}; |
1122 |
+ |
+ |
1125 |
+ 0x0, 0x00100000, 0x00000008, |
+ 0x0, 0x00100000, 0x00000008, |
1126 |
+}; |
+}; |
1127 |
+static void *prop_zs1_addr; |
+static void *prop_zs1_addr; |
1128 |
+static const int prop_zs1_slave[] = { 0 }; |
+static const int prop_zs1_slave = 0; |
1129 |
+static const struct property propv_obio_zs1[] = { |
+static const struct property propv_obio_zs1[] = { |
1130 |
+ {"name", "zs", sizeof("zs")}, |
+ {"name", "zs", sizeof("zs")}, |
1131 |
+ {"reg", (char*)&prop_zs1_reg[0], sizeof(prop_zs1_reg) }, |
+ {"reg", (char*)&prop_zs1_reg[0], sizeof(prop_zs1_reg) }, |
1132 |
+ {"slave", (char*)&prop_zs1_slave[0], sizeof(prop_zs1_slave) }, |
+ {"slave", (char*)&prop_zs1_slave, sizeof(prop_zs1_slave) }, |
1133 |
+ {"device_type", "serial", sizeof("serial") }, |
+ {"device_type", "serial", sizeof("serial") }, |
1134 |
+ {"intr", (char*)&prop_zs1_intr[0], sizeof(prop_zs1_intr) }, |
+ {"intr", (char*)&prop_zs1_intr[0], sizeof(prop_zs1_intr) }, |
1135 |
+ {"address", (char*)&prop_zs1_addr, sizeof(prop_zs1_addr) }, |
+ {"address", (char*)&prop_zs1_addr, sizeof(prop_zs1_addr) }, |
1192 |
+ {NULL, NULL, -1} |
+ {NULL, NULL, -1} |
1193 |
+}; |
+}; |
1194 |
+ |
+ |
1195 |
|
+static const int prop_apc_reg[] = { |
1196 |
|
+ 0x4, 0x0a000000, 0x00000010, |
1197 |
|
+}; |
1198 |
|
+static const struct property propv_sbus_apc[] = { |
1199 |
|
+ {"name", "xxxpower-management", sizeof("xxxpower-management")}, |
1200 |
|
+ {"reg", (char*)&prop_apc_reg[0], sizeof(prop_apc_reg) }, |
1201 |
|
+ {NULL, NULL, -1} |
1202 |
|
+}; |
1203 |
|
+ |
1204 |
+static const int prop_fd_intr[] = { 0x2b, 0x0 }; |
+static const int prop_fd_intr[] = { 0x2b, 0x0 }; |
1205 |
+static const int prop_fd_reg[] = { |
+static const int prop_fd_reg[] = { |
1206 |
+ 0x0, 0x00400000, 0x0000000f, |
+ 0x0, 0x00400000, 0x0000000f, |
1237 |
+ {"name", "options", sizeof("options")}, |
+ {"name", "options", sizeof("options")}, |
1238 |
+ {"screen-#columns", "80", sizeof("80")}, |
+ {"screen-#columns", "80", sizeof("80")}, |
1239 |
+ {"screen-#rows", "25", sizeof("25")}, |
+ {"screen-#rows", "25", sizeof("25")}, |
1240 |
+ {"tpe-link-test?", "true", sizeof("true")}, |
+ {"tpe-link-test?", (char *)&prop_true, 0}, |
1241 |
+ {"ttya-mode", "9600,8,n,1,-", sizeof("9600,8,n,1,-")}, |
+ {"ttya-mode", "9600,8,n,1,-", sizeof("9600,8,n,1,-")}, |
1242 |
+ {"ttya-ignore-cd", "true", sizeof("true")}, |
+ {"ttya-ignore-cd", (char *)&prop_true, 0}, |
1243 |
+ {"ttya-rts-dtr-off", "false", sizeof("false")}, |
+ {"ttya-rts-dtr-off", 0, -1}, |
1244 |
+ {"ttyb-mode", "9600,8,n,1,-", sizeof("9600,8,n,1,-")}, |
+ {"ttyb-mode", "9600,8,n,1,-", sizeof("9600,8,n,1,-")}, |
1245 |
+ {"ttyb-ignore-cd", "true", sizeof("true")}, |
+ {"ttyb-ignore-cd", (char *)&prop_true, 0}, |
1246 |
+ {"ttyb-rts-dtr-off", "false", sizeof("false")}, |
+ {"ttyb-rts-dtr-off", 0, -1}, |
1247 |
|
+ {NULL, NULL, -1} |
1248 |
|
+}; |
1249 |
|
+ |
1250 |
|
+static int prop_mem_reg[3]; |
1251 |
|
+static int prop_mem_avail[3]; |
1252 |
|
+ |
1253 |
|
+static const struct property propv_memory[] = { |
1254 |
|
+ {"name", "memory", sizeof("memory")}, |
1255 |
|
+ {"reg", (char*)&prop_mem_reg[0], sizeof(prop_mem_reg) }, |
1256 |
|
+ {"available", (char*)&prop_mem_avail[0], sizeof(prop_mem_avail) }, |
1257 |
|
+ {NULL, NULL, -1} |
1258 |
|
+}; |
1259 |
|
+ |
1260 |
|
+static int prop_vmem_avail[6]; |
1261 |
|
+ |
1262 |
|
+static const struct property propv_vmemory[] = { |
1263 |
|
+ {"name", "virtual-memory", sizeof("virtual-memory")}, |
1264 |
|
+ {"available", (char*)&prop_vmem_avail[0], sizeof(prop_vmem_avail) }, |
1265 |
+ {NULL, NULL, -1} |
+ {NULL, NULL, -1} |
1266 |
+}; |
+}; |
1267 |
+ |
+ |
1268 |
+static const struct node nodes[] = { |
+static const struct node nodes[] = { |
1269 |
+ { &null_properties, 1, 0 }, /* 0 = big brother of root */ |
+ { &null_properties, 1, 0 }, /* 0 = big brother of root */ |
1270 |
+ { propv_root, 0, 2 }, /* 1 "/" */ |
+ { propv_root, 0, 2 }, /* 1 "/" */ |
1271 |
+ { propv_iommu, 11, 3 }, /* 2 "/iommu" */ |
+ { propv_iommu, 12, 3 }, /* 2 "/iommu" */ |
1272 |
+ { propv_sbus, 0, 4 }, /* 3 "/iommu/sbus" */ |
+ { propv_sbus, 0, 4 }, /* 3 "/iommu/sbus" */ |
1273 |
+ { propv_sbus_tcx, 5, 0 }, /* 4 "/iommu/sbus/SUNW,tcx" */ |
+ { propv_sbus_tcx, 5, 0 }, /* 4 "/iommu/sbus/SUNW,tcx" */ |
1274 |
+ { propv_sbus_ledma, 7, 6 }, /* 5 "/iommu/sbus/ledma" */ |
+ { propv_sbus_ledma, 7, 6 }, /* 5 "/iommu/sbus/ledma" */ |
1275 |
+ { propv_sbus_ledma_le, 0, 0 }, /* 6 "/iommu/sbus/ledma/le" */ |
+ { propv_sbus_ledma_le, 0, 0 }, /* 6 "/iommu/sbus/ledma/le" */ |
1276 |
+ { propv_sbus_cs4231, 8, 0 }, /* 7 "/iommu/sbus/SUNW,CS4231 */ |
+ { propv_sbus_cs4231, 8, 0 }, /* 7 "/iommu/sbus/SUNW,CS4231 */ |
1277 |
+ { propv_sbus_bpp, 9, 0 }, /* 8 "/iommu/sbus/SUNW,bpp */ |
+ { propv_sbus_bpp, 9, 0 }, /* 8 "/iommu/sbus/SUNW,bpp */ |
1278 |
+ { propv_sbus_espdma, 0, 10 }, /* 9 "/iommu/sbus/espdma" */ |
+ { propv_sbus_espdma, 11, 10 }, /* 9 "/iommu/sbus/espdma" */ |
1279 |
+ { propv_sbus_espdma_esp, 0, 0 }, /* 10 "/iommu/sbus/espdma/esp" */ |
+ { propv_sbus_espdma_esp, 0, 0 }, /* 10 "/iommu/sbus/espdma/esp" */ |
1280 |
+ { propv_cpu, 12, 0 }, /* 11 "/STP1012PGA" */ |
+ { propv_sbus_apc, 0, 0 }, /* 11 "/iommu/sbus/power-management */ |
1281 |
+ { propv_obio, 22, 13 }, /* 12 "/obio" */ |
+ { propv_cpu, 13, 0 }, /* 12 "/STP1012PGA" */ |
1282 |
+ { propv_obio_int, 14, 0 }, /* 13 "/obio/interrupt" */ |
+ { propv_obio, 23, 14 }, /* 13 "/obio" */ |
1283 |
+ { propv_obio_cnt, 15, 0 }, /* 14 "/obio/counter" */ |
+ { propv_obio_int, 15, 0 }, /* 14 "/obio/interrupt" */ |
1284 |
+ { propv_obio_eep, 16, 0 }, /* 15 "/obio/eeprom" */ |
+ { propv_obio_cnt, 16, 0 }, /* 15 "/obio/counter" */ |
1285 |
+ { propv_obio_auxio, 17, 0 }, /* 16 "/obio/auxio" */ |
+ { propv_obio_eep, 17, 0 }, /* 16 "/obio/eeprom" */ |
1286 |
+ { propv_obio_zs1, 18, 0 }, /* 17 "/obio/zs@0,100000" |
+ { propv_obio_auxio, 18, 0 }, /* 17 "/obio/auxio" */ |
1287 |
|
+ { propv_obio_zs1, 19, 0 }, /* 18 "/obio/zs@0,100000" |
1288 |
+ Must be before zs@0,0! */ |
+ Must be before zs@0,0! */ |
1289 |
+ { propv_obio_zs, 19, 0 }, /* 18 "/obio/zs@0,0" */ |
+ { propv_obio_zs, 20, 0 }, /* 19 "/obio/zs@0,0" */ |
1290 |
+ { propv_obio_fd, 20, 0 }, /* 19 "/obio/SUNW,fdtwo" */ |
+ { propv_obio_fd, 21, 0 }, /* 20 "/obio/SUNW,fdtwo" */ |
1291 |
+ { propv_obio_pw, 21, 0 }, /* 20 "/obio/power" */ |
+ { propv_obio_pw, 22, 0 }, /* 21 "/obio/power" */ |
1292 |
+ { propv_obio_cf, 0, 0 }, /* 21 "/obio/slavioconfig@0,800000" */ |
+ { propv_obio_cf, 0, 0 }, /* 22 "/obio/slavioconfig@0,800000" */ |
1293 |
+ { propv_options, 0, 0 }, /* 22 "/options" */ |
+ { propv_options, 24, 0 }, /* 23 "/options" */ |
1294 |
|
+ { propv_memory, 25, 0 }, /* 24 "/memory" */ |
1295 |
|
+ { propv_vmemory, 0, 0 }, /* 25 "/virtual-memory" */ |
1296 |
+}; |
+}; |
1297 |
+ |
+ |
1298 |
+static struct linux_mlist_v0 totphys[MAX_BANKS]; |
+static struct linux_mlist_v0 totphys[MAX_BANKS]; |
1318 |
+ |
+ |
1319 |
+static void (*synch_hook)(void); |
+static void (*synch_hook)(void); |
1320 |
+static char obp_stdin, obp_stdout; |
+static char obp_stdin, obp_stdout; |
1321 |
|
+static int obp_fd_stdin, obp_fd_stdout; |
1322 |
+ |
+ |
1323 |
+static int obp_nbgetchar(void); |
+static int obp_nbgetchar(void); |
1324 |
+static int obp_nbputchar(int ch); |
+static int obp_nbputchar(int ch); |
1327 |
+static void obp_halt(void); |
+static void obp_halt(void); |
1328 |
+static int obp_devopen(char *str); |
+static int obp_devopen(char *str); |
1329 |
+static int obp_devclose(int dev_desc); |
+static int obp_devclose(int dev_desc); |
1330 |
|
+static int obp_devread(int dev_desc, char *buf, int nbytes); |
1331 |
|
+static int obp_devwrite(int dev_desc, char *buf, int nbytes); |
1332 |
|
+static int obp_devseek(int dev_desc, int hi, int lo); |
1333 |
+static int obp_rdblkdev(int dev_desc, int num_blks, int blk_st, char *buf); |
+static int obp_rdblkdev(int dev_desc, int num_blks, int blk_st, char *buf); |
1334 |
+static char *obp_dumb_mmap(char *va, int which_io, unsigned int pa, unsigned int size); |
+static char *obp_dumb_mmap(char *va, int which_io, unsigned int pa, unsigned int size); |
1335 |
+static void obp_dumb_munmap(char *va, unsigned int size); |
+static void obp_dumb_munmap(char *va, unsigned int size); |
1336 |
|
+static int obp_inst2pkg(int dev_desc); |
1337 |
+ |
+ |
1338 |
+static void doublewalk(unsigned ptab1, unsigned va) |
+static void doublewalk(unsigned ptab1, unsigned va) |
1339 |
+{ |
+{ |
1346 |
+ |
+ |
1347 |
+static struct linux_romvec romvec0; |
+static struct linux_romvec romvec0; |
1348 |
+ |
+ |
1349 |
|
+struct fd { |
1350 |
|
+ int unit, part; |
1351 |
|
+ int offset; |
1352 |
|
+ int (*pread)(int dev_desc, int offset, char *buf, unsigned int nbytes); |
1353 |
|
+ int (*pwrite)(int dev_desc, int offset, char *buf, unsigned int nbytes); |
1354 |
|
+} fd_table[16]; |
1355 |
|
+ |
1356 |
|
+static int fd_index; |
1357 |
|
+static int con_pread(int dev_desc, int offset, char *buf, unsigned int nbytes); |
1358 |
|
+static int con_pwrite(int dev_desc, int offset, char *buf, unsigned int nbytes); |
1359 |
|
+ |
1360 |
+void * |
+void * |
1361 |
+init_openprom_qemu(int bankc, struct bank *bankv, unsigned hiphybas, |
+init_openprom_qemu(int bankc, struct bank *bankv, unsigned hiphybas, |
1362 |
+ const char *cmdline, char boot_device, int nographic) |
+ const char *cmdline, char boot_device, int nographic) |
1398 |
+ totmap[0].theres_more = 0; |
+ totmap[0].theres_more = 0; |
1399 |
+ totmap[0].start_adr = (char*) PROLBASE; |
+ totmap[0].start_adr = (char*) PROLBASE; |
1400 |
+ totmap[0].num_bytes = PROLSIZE; |
+ totmap[0].num_bytes = PROLSIZE; |
1401 |
|
+ prop_mem_reg[0] = 0; |
1402 |
|
+ prop_mem_reg[1] = 0; |
1403 |
|
+ prop_mem_reg[2] = bankv[0].length; |
1404 |
|
+ prop_mem_avail[0] = 0; |
1405 |
|
+ prop_mem_avail[1] = 0; |
1406 |
|
+ prop_mem_avail[2] = hiphybas; |
1407 |
|
+ prop_vmem_avail[0] = 0; |
1408 |
|
+ prop_vmem_avail[1] = 0; |
1409 |
|
+ prop_vmem_avail[2] = PROLBASE-1; |
1410 |
|
+ prop_vmem_avail[3] = 0; |
1411 |
|
+ prop_vmem_avail[4] = 0xffe00000; |
1412 |
|
+ prop_vmem_avail[5] = 0x00200000; |
1413 |
+ |
+ |
1414 |
+ /* |
+ /* |
1415 |
+ * idprom |
+ * idprom |
1418 |
+ |
+ |
1419 |
+ // Linux wants a R/W romvec table |
+ // Linux wants a R/W romvec table |
1420 |
+ romvec0.pv_magic_cookie = LINUX_OPPROM_MAGIC; |
+ romvec0.pv_magic_cookie = LINUX_OPPROM_MAGIC; |
1421 |
|
+ romvec0.pv_romvers = 3; |
1422 |
+ romvec0.pv_plugin_revision = 77; |
+ romvec0.pv_plugin_revision = 77; |
1423 |
+ romvec0.pv_printrev = 0x10203; |
+ romvec0.pv_printrev = 0x10203; |
1424 |
+ romvec0.pv_v0mem.v0_totphys = &ptphys; |
+ romvec0.pv_v0mem.v0_totphys = &ptphys; |
1441 |
+ romvec0.pv_halt = obp_halt; |
+ romvec0.pv_halt = obp_halt; |
1442 |
+ romvec0.pv_synchook = &synch_hook; |
+ romvec0.pv_synchook = &synch_hook; |
1443 |
+ romvec0.pv_v0bootargs = &obp_argp; |
+ romvec0.pv_v0bootargs = &obp_argp; |
1444 |
|
+ romvec0.pv_v2devops.v2_inst2pkg = obp_inst2pkg; |
1445 |
+ romvec0.pv_v2devops.v2_dumb_mmap = obp_dumb_mmap; |
+ romvec0.pv_v2devops.v2_dumb_mmap = obp_dumb_mmap; |
1446 |
+ romvec0.pv_v2devops.v2_dumb_munmap = obp_dumb_munmap; |
+ romvec0.pv_v2devops.v2_dumb_munmap = obp_dumb_munmap; |
1447 |
|
+ romvec0.pv_v2devops.v2_dev_open = obp_devopen; |
1448 |
|
+ romvec0.pv_v2devops.v2_dev_close = (void (*)(int))obp_devclose; |
1449 |
|
+ romvec0.pv_v2devops.v2_dev_read = obp_devread; |
1450 |
|
+ romvec0.pv_v2devops.v2_dev_write = obp_devwrite; |
1451 |
|
+ romvec0.pv_v2devops.v2_dev_seek = obp_devseek; |
1452 |
+ obp_arg.boot_dev_ctrl = 0; |
+ obp_arg.boot_dev_ctrl = 0; |
1453 |
+ obp_arg.boot_dev_unit = '0'; |
+ obp_arg.boot_dev_unit = '0'; |
1454 |
|
+ obp_arg.argv[0] = "sd(0,0,0):d"; |
1455 |
+ switch(boot_device) { |
+ switch(boot_device) { |
1456 |
+ default: |
+ default: |
1457 |
+ case 'a': |
+ case 'a': |
1461 |
+ break; |
+ break; |
1462 |
+ case 'd': |
+ case 'd': |
1463 |
+ obp_arg.boot_dev_unit = '2'; |
+ obp_arg.boot_dev_unit = '2'; |
1464 |
|
+ obp_arg.argv[0] = "sd(0,2,0):d"; |
1465 |
+ // Fall through |
+ // Fall through |
1466 |
+ case 'c': |
+ case 'c': |
|
+ obp_arg.argv[0] = "sd()"; |
|
1467 |
+ obp_arg.boot_dev[0] = 's'; |
+ obp_arg.boot_dev[0] = 's'; |
1468 |
+ obp_arg.boot_dev[1] = 'd'; |
+ obp_arg.boot_dev[1] = 'd'; |
1469 |
+ break; |
+ break; |
1474 |
+ break; |
+ break; |
1475 |
+ } |
+ } |
1476 |
+ obp_arg.argv[1] = cmdline; |
+ obp_arg.argv[1] = cmdline; |
1477 |
+ |
+ romvec0.pv_v2bootargs.bootpath = &obp_arg.argv[0]; |
1478 |
|
+ romvec0.pv_v2bootargs.bootargs = &cmdline; |
1479 |
|
+ romvec0.pv_v2bootargs.fd_stdin = &obp_fd_stdin; |
1480 |
|
+ romvec0.pv_v2bootargs.fd_stdout = &obp_fd_stdout; |
1481 |
|
+ |
1482 |
|
+ bcopy(propv_root_templ, propv_root, sizeof(propv_root_templ)); |
1483 |
|
+ propv_root[4].name = "stdin-path"; |
1484 |
|
+ propv_root[5].name = "stdout-path"; |
1485 |
|
+ obp_fd_stdin = 0; |
1486 |
|
+ obp_fd_stdout = 1; |
1487 |
|
+ fd_table[0].pread = con_pread; |
1488 |
|
+ fd_table[0].pwrite = con_pwrite; |
1489 |
|
+ fd_table[1].pread = con_pread; |
1490 |
|
+ fd_table[1].pwrite = con_pwrite; |
1491 |
|
+ fd_index = 2; |
1492 |
+ if (nographic) { |
+ if (nographic) { |
1493 |
+ obp_stdin = PROMDEV_TTYA; |
+ obp_stdin = PROMDEV_TTYA; |
1494 |
|
+ propv_root[4].value = "/obio/zs@0,100000:a"; |
1495 |
|
+ propv_root[4].length = sizeof("/obio/zs@0,100000:a"); |
1496 |
|
+ fd_table[0].unit = 18; |
1497 |
+ obp_stdout = PROMDEV_TTYA; |
+ obp_stdout = PROMDEV_TTYA; |
1498 |
|
+ propv_root[5].value = "/obio/zs@0,100000:a"; |
1499 |
|
+ propv_root[5].length = sizeof("/obio/zs@0,100000:a"); |
1500 |
|
+ fd_table[1].unit = 18; |
1501 |
+ } else { |
+ } else { |
1502 |
+ obp_stdin = PROMDEV_KBD; |
+ obp_stdin = PROMDEV_KBD; |
1503 |
|
+ propv_root[4].value = "/obio/zs@0,0"; |
1504 |
|
+ propv_root[4].length = sizeof("/obio/zs@0,0"); |
1505 |
|
+ fd_table[0].unit = 19; |
1506 |
+ obp_stdout = PROMDEV_SCREEN; |
+ obp_stdout = PROMDEV_SCREEN; |
1507 |
|
+ propv_root[5].value = "/iommu/sbus/SUNW,tcx"; |
1508 |
|
+ propv_root[5].length = sizeof("/iommu/sbus/SUNW,tcx"); |
1509 |
|
+ fd_table[1].unit = 4; |
1510 |
+ } |
+ } |
1511 |
+ prop_zs_addr = map_io(0x71000000, 8); |
+ prop_zs_addr = map_io(0x71000000, 8); |
1512 |
+ prop_zs1_addr = map_io(0x71100000, 8); |
+ prop_zs1_addr = map_io(0x71100000, 8); |
1580 |
+ return -1; |
+ return -1; |
1581 |
+} |
+} |
1582 |
+ |
+ |
1583 |
+static int obp_setprop(int node, char *name, char *value, int len) |
+static int obp_setprop(__attribute__((unused)) int node, |
1584 |
|
+ __attribute__((unused)) char *name, |
1585 |
|
+ __attribute__((unused)) char *value, |
1586 |
|
+ __attribute__((unused)) int len) |
1587 |
+{ |
+{ |
1588 |
+#ifdef DEBUG_OBP |
+#ifdef DEBUG_OBP |
1589 |
+ printk("obp_setprop(%d, %s) = %s (%d)\n", node, name, value, len); |
+ printk("obp_setprop(%d, %s) = %s (%d)\n", node, name, value, len); |
1613 |
+#ifdef DEBUG_OBP |
+#ifdef DEBUG_OBP |
1614 |
+ printk("obp_nextprop(%d, %s): not found\n", node, name); |
+ printk("obp_nextprop(%d, %s): not found\n", node, name); |
1615 |
+#endif |
+#endif |
1616 |
+ return (const char *)-1; |
+ return ""; |
1617 |
+} |
+} |
1618 |
+ |
+ |
1619 |
+extern int (*getch_fn)(struct vconterm *v); |
+extern int (*getch_fn)(struct vconterm *v); |
1629 |
+} |
+} |
1630 |
+ |
+ |
1631 |
+static void obp_reboot(char *str) { |
+static void obp_reboot(char *str) { |
1632 |
+ printk("rebooting (%s): not implemented, freezing\n", str); |
+ printk("rebooting (%s)\n", str); |
1633 |
|
+ stb_bypass(0x71f00000, 1); |
1634 |
+ for (;;) {} |
+ for (;;) {} |
1635 |
+} |
+} |
1636 |
+ |
+ |
1637 |
+static void obp_abort() { |
+static void obp_abort() { |
1638 |
+ printk("abort, freezing\n"); |
+ printk("abort, power off\n"); |
1639 |
|
+ stb_bypass(0x71910000, 1); |
1640 |
+ for (;;) {} |
+ for (;;) {} |
1641 |
+} |
+} |
1642 |
+ |
+ |
1643 |
+static void obp_halt() { |
+static void obp_halt() { |
1644 |
+ printk("halt, freezing\n"); |
+ printk("halt, power off\n"); |
1645 |
|
+ stb_bypass(0x71910000, 1); |
1646 |
+ for (;;) {} |
+ for (;;) {} |
1647 |
+} |
+} |
1648 |
|
+ |
1649 |
|
+extern void *esp_read(int unit, int part, int offset, short len); |
1650 |
|
+ |
1651 |
|
+static int esp_pread(int dev_desc, int offset, char *buf, unsigned int nbytes) |
1652 |
|
+{ |
1653 |
|
+ unsigned int i; |
1654 |
|
+ void *src; |
1655 |
|
+ |
1656 |
|
+ for(i = 0; i < nbytes; i += 512) { |
1657 |
|
+ src = esp_read(fd_table[dev_desc].unit, fd_table[dev_desc].part, (offset + i) / 512, 512); |
1658 |
|
+ memcpy(&buf[i], src, 512); |
1659 |
|
+ } |
1660 |
|
+ return nbytes; |
1661 |
|
+} |
1662 |
|
+ |
1663 |
|
+static int con_pread(__attribute__((unused)) int dev_desc, __attribute__((unused)) int offset, char *buf, unsigned int nbytes) |
1664 |
|
+{ |
1665 |
|
+ unsigned int i; |
1666 |
|
+ |
1667 |
|
+ for(i = 0; i < nbytes; i ++) { |
1668 |
|
+ buf[i] = obp_nbgetchar(); |
1669 |
|
+ } |
1670 |
|
+ return nbytes; |
1671 |
|
+} |
1672 |
|
+ |
1673 |
|
+static int con_pwrite(__attribute__((unused)) int dev_desc, __attribute__((unused)) int offset, char *buf, unsigned int nbytes) |
1674 |
|
+{ |
1675 |
|
+ unsigned int i; |
1676 |
|
+ |
1677 |
|
+ for(i = 0; i < nbytes; i ++) { |
1678 |
|
+ obp_nbputchar(buf[i]); |
1679 |
|
+ } |
1680 |
|
+ return nbytes; |
1681 |
|
+} |
1682 |
|
+ |
1683 |
+#define isnum(c) ((c >= '0') && (c < '9')) |
+#define isnum(c) ((c >= '0') && (c < '9')) |
1684 |
+#define ctoi(c) (c - '0') |
+#define ctoi(c) (c - '0') |
1685 |
|
+ |
1686 |
+static int obp_devopen(char *str) { |
+static int obp_devopen(char *str) { |
1687 |
+#ifdef DEBUG_OBP |
+#ifdef DEBUG_OBP |
1688 |
+ printk("obp_devopen(%s)\n", str); |
+ printk("obp_devopen(%s)\n", str); |
1698 |
+ else { |
+ else { |
1699 |
+ target = ctoi(str[5]) & 7; |
+ target = ctoi(str[5]) & 7; |
1700 |
+ } |
+ } |
1701 |
+ return 's' + target; |
+ fd_table[fd_index].unit = target; |
1702 |
|
+ fd_table[fd_index].part = str[10] - 'a'; |
1703 |
|
+ fd_table[fd_index].pread = esp_pread; |
1704 |
|
+ return fd_index++; // XXX |
1705 |
+ } |
+ } |
1706 |
+ return 0; |
+ return 0; |
1707 |
+} |
+} |
1708 |
+ |
+ |
1709 |
+static int obp_devclose(int dev_desc) { |
+static int obp_devclose(__attribute__((unused)) int dev_desc) { |
1710 |
+#ifdef DEBUG_OBP |
+#ifdef DEBUG_OBP |
1711 |
+ printk("obp_devclose %d\n", dev_desc); |
+ printk("obp_devclose %d\n", dev_desc); |
1712 |
+#endif |
+#endif |
1713 |
|
+ fd_index--; // XXX |
1714 |
+ return 0; |
+ return 0; |
1715 |
+} |
+} |
1716 |
+ |
+ |
|
+extern void *esp_read(int unit, int offset, short len); |
|
|
+ |
|
1717 |
+static int obp_rdblkdev(int dev_desc, int num_blks, int offset, char *buf) |
+static int obp_rdblkdev(int dev_desc, int num_blks, int offset, char *buf) |
1718 |
+{ |
+{ |
|
+ unsigned int i; |
|
|
+ void *src; |
|
|
+ |
|
1719 |
+#ifdef DEBUG_OBP |
+#ifdef DEBUG_OBP |
1720 |
+ printk("obp_rdblkdev: fd %d, num_blks %d, offset %d, buf 0x%x\n", dev_desc, num_blks, offset, buf); |
+ printk("obp_rdblkdev: fd %d, num_blks %d, offset %d, buf 0x%x\n", dev_desc, num_blks, offset, buf); |
1721 |
+#endif |
+#endif |
1722 |
+ if (dev_desc >= 's' && dev_desc < 'v') { |
+ return fd_table[dev_desc].pread(dev_desc, offset, buf, num_blks * 512); |
|
+ for(i = 0; i < num_blks; i++) { |
|
|
+ src = esp_read(dev_desc - 's', offset + i, 1); |
|
|
+ memcpy(&buf[i << 9], src, 512); |
|
|
+ } |
|
|
+ return num_blks; |
|
|
+ } |
|
|
+ return -1; |
|
1723 |
+} |
+} |
1724 |
+ |
+ |
1725 |
+static char *obp_dumb_mmap(char *va, int which_io, unsigned int pa, unsigned int size) |
+static char *obp_dumb_mmap(char *va, __attribute__((unused)) int which_io, |
1726 |
|
+ unsigned int pa, unsigned int size) |
1727 |
+{ |
+{ |
1728 |
+ unsigned int npages; |
+ unsigned int npages; |
1729 |
+ unsigned int off; |
+ unsigned int off; |
1745 |
+ return va; |
+ return va; |
1746 |
+} |
+} |
1747 |
+ |
+ |
1748 |
+static void obp_dumb_munmap(char *va, unsigned int size) |
+static void obp_dumb_munmap(__attribute__((unused)) char *va, |
1749 |
|
+ __attribute__((unused)) unsigned int size) |
1750 |
+{ |
+{ |
1751 |
+#ifdef DEBUG_OBP |
+#ifdef DEBUG_OBP |
1752 |
+ printk("obp_dumb_munmap: virta %x, sz %d\n", va, size); |
+ printk("obp_dumb_munmap: virta %x, sz %d\n", va, size); |
1753 |
+#endif |
+#endif |
|
+ |
|
1754 |
+} |
+} |
1755 |
diff -ruN proll_18.orig/qemu/system_qemu.c proll-patch10/qemu/system_qemu.c |
+ |
1756 |
|
+static int obp_devread(int dev_desc, char *buf, int nbytes) |
1757 |
|
+{ |
1758 |
|
+ int ret; |
1759 |
|
+#ifdef DEBUG_OBP |
1760 |
|
+ printk("obp_devread: fd %d, nbytes %d\n", dev_desc, nbytes); |
1761 |
|
+#endif |
1762 |
|
+ ret = fd_table[dev_desc].pread(dev_desc, fd_table[dev_desc].offset, buf, nbytes); |
1763 |
|
+ fd_table[dev_desc].offset += nbytes; |
1764 |
|
+ return ret; |
1765 |
|
+} |
1766 |
|
+ |
1767 |
|
+static int obp_devwrite(int dev_desc, char *buf, int nbytes) |
1768 |
|
+{ |
1769 |
|
+ int ret; |
1770 |
|
+#ifdef DEBUG_OBP |
1771 |
|
+ printk("obp_devwrite: fd %d, buf %s, nbytes %d\n", dev_desc, buf, nbytes); |
1772 |
|
+#endif |
1773 |
|
+ ret = fd_table[dev_desc].pwrite(dev_desc, fd_table[dev_desc].offset, buf, nbytes); |
1774 |
|
+ fd_table[dev_desc].offset += nbytes; |
1775 |
|
+ return ret; |
1776 |
|
+} |
1777 |
|
+ |
1778 |
|
+static int obp_devseek(int dev_desc, __attribute__((unused)) int hi, int lo) |
1779 |
|
+{ |
1780 |
|
+#ifdef DEBUG_OBP |
1781 |
|
+ printk("obp_devseek: fd %d, hi %d, lo %d\n", dev_desc, hi, lo); |
1782 |
|
+#endif |
1783 |
|
+ fd_table[dev_desc].offset = lo; |
1784 |
|
+ return 0; |
1785 |
|
+} |
1786 |
|
+ |
1787 |
|
+static int obp_inst2pkg(int dev_desc) |
1788 |
|
+{ |
1789 |
|
+#ifdef DEBUG_OBP |
1790 |
|
+ printk("obp_inst2pkg: fd %d\n", dev_desc); |
1791 |
|
+#endif |
1792 |
|
+ return fd_table[dev_desc].unit; |
1793 |
|
+} |
1794 |
|
diff -ruN proll_18.orig/qemu/system_qemu.c proll-patch-15/qemu/system_qemu.c |
1795 |
--- proll_18.orig/qemu/system_qemu.c 1970-01-01 00:00:00.000000000 +0000 |
--- proll_18.orig/qemu/system_qemu.c 1970-01-01 00:00:00.000000000 +0000 |
1796 |
+++ proll-patch10/qemu/system_qemu.c 2005-04-16 06:16:20.000000000 +0000 |
+++ proll-patch-15/qemu/system_qemu.c 2005-04-16 06:16:20.000000000 +0000 |
1797 |
@@ -0,0 +1,430 @@ |
@@ -0,0 +1,430 @@ |
1798 |
+/** |
+/** |
1799 |
+ ** Proll (PROM replacement) |
+ ** Proll (PROM replacement) |
2225 |
+ n = (n>>24 & 0xFF) | (n>>8 & 0xFF00) | ((n&0xFF00) << 8) | (n<<24); |
+ n = (n>>24 & 0xFF) | (n>>8 & 0xFF00) | ((n&0xFF00) << 8) | (n<<24); |
2226 |
+ st_bypass(ptr, n); |
+ st_bypass(ptr, n); |
2227 |
+}; |
+}; |
2228 |
diff -ruN proll_18.orig/src/arp.c proll-patch10/src/arp.c |
diff -ruN proll_18.orig/src/arp.c proll-patch-15/src/arp.c |
2229 |
--- proll_18.orig/src/arp.c 2001-12-24 05:12:31.000000000 +0000 |
--- proll_18.orig/src/arp.c 2001-12-24 05:12:31.000000000 +0000 |
2230 |
+++ proll-patch10/src/arp.c 2004-11-13 15:50:49.000000000 +0000 |
+++ proll-patch-15/src/arp.c 2005-08-14 10:10:11.000000000 +0000 |
2231 |
@@ -45,7 +45,7 @@ |
@@ -45,7 +45,7 @@ |
2232 |
#endif |
#endif |
2233 |
static struct arp_cache arp_list[ARPNUM]; /* ARP address cache */ |
static struct arp_cache arp_list[ARPNUM]; /* ARP address cache */ |
2237 |
|
|
2238 |
|
|
2239 |
|
|
2240 |
@@ -144,7 +144,7 @@ |
@@ -100,10 +100,7 @@ |
2241 |
|
* |
2242 |
|
* ARP receiver routine |
2243 |
|
*/ |
2244 |
|
-static int arp_recv(buf, bufsize, addr) |
2245 |
|
-unsigned char *buf; |
2246 |
|
-int bufsize; |
2247 |
|
-unsigned char *addr; |
2248 |
|
+static int arp_recv(unsigned char *buf, unsigned int bufsize, unsigned char *addr) |
2249 |
|
{ |
2250 |
|
register struct arphdr *ahp = (struct arphdr *)buf; |
2251 |
|
|
2252 |
|
@@ -144,7 +141,7 @@ |
2253 |
* |
* |
2254 |
* Resolve IP address and return pointer to hardware address. |
* Resolve IP address and return pointer to hardware address. |
2255 |
*/ |
*/ |
2258 |
t_ipaddr ip; |
t_ipaddr ip; |
2259 |
{ |
{ |
2260 |
int i; |
int i; |
2261 |
@@ -230,14 +230,11 @@ |
@@ -230,14 +227,11 @@ |
2262 |
*/ |
*/ |
2263 |
int init_arp() |
int init_arp() |
2264 |
{ |
{ |
2274 |
+ def_gw = IP_ANY; |
+ def_gw = IP_ANY; |
2275 |
return(TRUE); |
return(TRUE); |
2276 |
} |
} |
2277 |
diff -ruN proll_18.orig/src/arp.h proll-patch10/src/arp.h |
diff -ruN proll_18.orig/src/arp.h proll-patch-15/src/arp.h |
2278 |
--- proll_18.orig/src/arp.h 1999-03-18 03:39:43.000000000 +0000 |
--- proll_18.orig/src/arp.h 1999-03-18 03:39:43.000000000 +0000 |
2279 |
+++ proll-patch10/src/arp.h 2004-11-13 15:50:49.000000000 +0000 |
+++ proll-patch-15/src/arp.h 2004-11-13 15:50:49.000000000 +0000 |
2280 |
@@ -104,7 +104,7 @@ |
@@ -104,7 +104,7 @@ |
2281 |
extern int init_arp __P((void)); |
extern int init_arp __P((void)); |
2282 |
|
|
2286 |
|
|
2287 |
/* Add a new antry to the ARP cache */ |
/* Add a new antry to the ARP cache */ |
2288 |
extern void addcache __P((unsigned char *ha, t_ipaddr ip)); |
extern void addcache __P((unsigned char *ha, t_ipaddr ip)); |
2289 |
diff -ruN proll_18.orig/src/esp.c proll-patch10/src/esp.c |
diff -ruN proll_18.orig/src/bootp.c proll-patch-15/src/bootp.c |
2290 |
|
--- proll_18.orig/src/bootp.c 1999-12-15 17:20:30.000000000 +0000 |
2291 |
|
+++ proll-patch-15/src/bootp.c 2005-08-14 10:16:09.000000000 +0000 |
2292 |
|
@@ -151,7 +151,7 @@ |
2293 |
|
while (TRUE) { |
2294 |
|
boot_xid = get_ticks() + random(); |
2295 |
|
bootp_send(); |
2296 |
|
- i = udp_read((char *)(&boot_rec), BOOTP_REC_SIZE, timeout, CHR_ESC); |
2297 |
|
+ i = udp_read((char *)(&boot_rec), BOOTP_REC_SIZE, timeout); |
2298 |
|
if (i < 0) { /* user pressed ESC */ |
2299 |
|
printf("\nAborted\n"); |
2300 |
|
return(1); |
2301 |
|
diff -ruN proll_18.orig/src/esp.c proll-patch-15/src/esp.c |
2302 |
--- proll_18.orig/src/esp.c 1970-01-01 00:00:00.000000000 +0000 |
--- proll_18.orig/src/esp.c 1970-01-01 00:00:00.000000000 +0000 |
2303 |
+++ proll-patch10/src/esp.c 2005-04-16 06:24:23.000000000 +0000 |
+++ proll-patch-15/src/esp.c 2005-08-15 18:42:46.000000000 +0000 |
2304 |
@@ -0,0 +1,252 @@ |
@@ -0,0 +1,305 @@ |
2305 |
+#include <system.h> /* == <asm/system.h> */ |
+#include <system.h> /* == <asm/system.h> */ |
2306 |
+#include <general.h> /* __P for netpriv.h */ |
+#include <general.h> /* __P for netpriv.h */ |
2307 |
+#include <dma.h> /* dmaga */ |
+#include <dma.h> /* dmaga */ |
2335 |
+ struct esp_dma *espdma; /* If set this points to espdma */ |
+ struct esp_dma *espdma; /* If set this points to espdma */ |
2336 |
+ |
+ |
2337 |
+ unsigned char *buffer; |
+ unsigned char *buffer; |
2338 |
|
+ struct disk_info { |
2339 |
|
+ unsigned int hw_sector; |
2340 |
|
+ unsigned int part_offset[8]; |
2341 |
|
+ } disk[8]; |
2342 |
+}; |
+}; |
2343 |
+ |
+ |
2344 |
+static void esp_interrupt(void *dev_id) |
+static void esp_interrupt(void *dev_id) |
2461 |
+ return; |
+ return; |
2462 |
+} |
+} |
2463 |
+ |
+ |
2464 |
+void *esp_read(int unit, int offset, short len) |
+void esp_read_capacity(int unit) |
2465 |
+{ |
+{ |
2466 |
+ // Set SCSI target |
+ // Set SCSI target |
2467 |
+ stb_bypass(PHYS_JJ_ESP + 4*4, unit & 7); |
+ stb_bypass(PHYS_JJ_ESP + 4*4, unit & 7); |
2472 |
+ stb_bypass(PHYS_JJ_ESP + 1*4, 0); |
+ stb_bypass(PHYS_JJ_ESP + 1*4, 0); |
2473 |
+ // Set DMA direction |
+ // Set DMA direction |
2474 |
+ st_bypass(PHYS_JJ_ESPDMA + 0, 0x000); |
+ st_bypass(PHYS_JJ_ESPDMA + 0, 0x000); |
2475 |
|
+ // Setup command = Read Capacity |
2476 |
|
+ esp.buffer[0] = 0x80; |
2477 |
|
+ esp.buffer[1] = 0x25; |
2478 |
|
+ esp.buffer[2] = 0x00; |
2479 |
|
+ esp.buffer[3] = 0x00; |
2480 |
|
+ esp.buffer[4] = 0x00; |
2481 |
|
+ esp.buffer[5] = 0x00; |
2482 |
|
+ esp.buffer[6] = 0x00; |
2483 |
|
+ esp.buffer[7] = 0x00; |
2484 |
|
+ esp.buffer[8] = 0x00; |
2485 |
|
+ esp.buffer[9] = 0x00; |
2486 |
|
+ esp.buffer[10] = 0x00; |
2487 |
|
+ // Set ATN, issue command |
2488 |
|
+ stb_bypass(PHYS_JJ_ESP + 3*4, 0xc2); |
2489 |
|
+ |
2490 |
|
+ // Set DMA length = 512 * read length |
2491 |
|
+ stb_bypass(PHYS_JJ_ESP + 0*4, 0); |
2492 |
|
+ stb_bypass(PHYS_JJ_ESP + 1*4, 8 & 0xff); |
2493 |
|
+ // Set DMA direction |
2494 |
|
+ st_bypass(PHYS_JJ_ESPDMA + 0, 0x100); |
2495 |
|
+ // Transfer |
2496 |
|
+ stb_bypass(PHYS_JJ_ESP + 3*4, 0x90); |
2497 |
|
+ esp.disk[unit].hw_sector = (esp.buffer[4] << 24) | (esp.buffer[5] << 16) | (esp.buffer[6] << 8) | esp.buffer[7]; |
2498 |
|
+} |
2499 |
|
+ |
2500 |
|
+// offset is multiple of 512, len in bytes |
2501 |
|
+void *esp_read(int unit, int part, int offset, short len) |
2502 |
|
+{ |
2503 |
|
+ int pos, hw_sect, sect_offset, spb; |
2504 |
|
+ |
2505 |
|
+ // Set SCSI target |
2506 |
|
+ stb_bypass(PHYS_JJ_ESP + 4*4, unit & 7); |
2507 |
|
+ // Set DMA address |
2508 |
|
+ st_bypass(PHYS_JJ_ESPDMA + 4, esp.buffer_dvma); |
2509 |
|
+ // Set DMA length |
2510 |
|
+ stb_bypass(PHYS_JJ_ESP + 0*4, 10); |
2511 |
|
+ stb_bypass(PHYS_JJ_ESP + 1*4, 0); |
2512 |
|
+ // Set DMA direction |
2513 |
|
+ st_bypass(PHYS_JJ_ESPDMA + 0, 0x000); |
2514 |
|
+ hw_sect = esp.disk[unit].hw_sector; |
2515 |
|
+ offset += esp.disk[unit].part_offset[part]; |
2516 |
|
+ spb = hw_sect / 512; |
2517 |
|
+ sect_offset = offset / spb; |
2518 |
|
+ pos = (offset - sect_offset * spb) * 512; |
2519 |
|
+ len /= 512; |
2520 |
|
+ //printk("Read unit %d, offset %d -> offset %d, pos %d, hw_sect %d\n", unit, offset, sect_offset, pos, hw_sect); |
2521 |
+ // Setup command = Read(10) |
+ // Setup command = Read(10) |
2522 |
+ esp.buffer[0] = 0x80; |
+ esp.buffer[0] = 0x80; |
2523 |
+ esp.buffer[1] = 0x28; |
+ esp.buffer[1] = 0x28; |
2524 |
+ esp.buffer[2] = 0x00; |
+ esp.buffer[2] = 0x00; |
2525 |
+ esp.buffer[3] = (offset >> 24) & 0xff; |
+ esp.buffer[3] = (sect_offset >> 24) & 0xff; |
2526 |
+ esp.buffer[4] = (offset >> 16) & 0xff; |
+ esp.buffer[4] = (sect_offset >> 16) & 0xff; |
2527 |
+ esp.buffer[5] = (offset >> 8) & 0xff; |
+ esp.buffer[5] = (sect_offset >> 8) & 0xff; |
2528 |
+ esp.buffer[6] = offset & 0xff; |
+ esp.buffer[6] = sect_offset & 0xff; |
2529 |
+ esp.buffer[7] = 0x00; |
+ esp.buffer[7] = 0x00; |
2530 |
+ esp.buffer[8] = (len >> 8) & 0xff; |
+ esp.buffer[8] = (len >> 8) & 0xff; |
2531 |
+ esp.buffer[9] = len & 0xff; |
+ esp.buffer[9] = len & 0xff; |
2532 |
+ // Set ATN, issue command |
+ // Set ATN, issue command |
2533 |
+ stb_bypass(PHYS_JJ_ESP + 3*4, 0x42); |
+ stb_bypass(PHYS_JJ_ESP + 3*4, 0xc2); |
2534 |
+ |
+ |
2535 |
+ // Set DMA length = 512 * read length |
+ // Set DMA length = sector size * read length |
2536 |
+ stb_bypass(PHYS_JJ_ESP + 0*4, 0); |
+ stb_bypass(PHYS_JJ_ESP + 0*4, (len * hw_sect) & 0xff); |
2537 |
+ stb_bypass(PHYS_JJ_ESP + 1*4, (len << 1) & 0xff); |
+ stb_bypass(PHYS_JJ_ESP + 1*4, ((len * hw_sect) >> 8) & 0xff); |
2538 |
+ // Set DMA direction |
+ // Set DMA direction |
2539 |
+ st_bypass(PHYS_JJ_ESPDMA + 0, 0x100); |
+ st_bypass(PHYS_JJ_ESPDMA + 0, 0x100); |
2540 |
+ // Transfer |
+ // Transfer |
2541 |
+ stb_bypass(PHYS_JJ_ESP + 3*4, 0x10); |
+ stb_bypass(PHYS_JJ_ESP + 3*4, 0x90); |
2542 |
+ return esp.buffer; |
+ return esp.buffer + pos; |
2543 |
+} |
+} |
2544 |
+ |
+ |
2545 |
+// Sparc boot sequence can be found in SILO docs, |
+// Sparc boot sequence can be found in SILO docs, |
2581 |
+ stb_bypass(PHYS_JJ_ESP + 3*4, 2); |
+ stb_bypass(PHYS_JJ_ESP + 3*4, 2); |
2582 |
+ |
+ |
2583 |
+ esp_open(&esp); |
+ esp_open(&esp); |
2584 |
|
+ esp_read_capacity(unit); |
2585 |
+ |
+ |
2586 |
+ label = esp_read(unit, 0, 1); |
+ label = esp_read(unit, 0, 0, 512); |
2587 |
+ printk("CHS: %d/%d/%d, partitions:\n", label->ncyl, label->ntrks, label->nsect); |
+ printk("hw sector: %d, CHS: %d/%d/%d, partitions:\n", esp.disk[unit].hw_sector, |
2588 |
|
+ label->ncyl, label->ntrks, label->nsect); |
2589 |
+ for (i = 0; i < 8; i++) { |
+ for (i = 0; i < 8; i++) { |
2590 |
+ printk("%c: %d + %d\n", 'a' + i, label->partitions[i].start_cylinder, |
+ printk("%c: %d + %d, id %x, flags %x\n", 'a' + i, label->partitions[i].start_cylinder, |
2591 |
+ label->partitions[i].num_sectors); |
+ label->partitions[i].num_sectors, label->infos[i].id, label->infos[i].flags); |
2592 |
|
+ esp.disk[unit].part_offset[i] = label->partitions[3].start_cylinder * label->ntrks * label->nsect; |
2593 |
+ } |
+ } |
2594 |
+ offset = label->partitions[4].start_cylinder * label->ntrks * label->nsect + 1; |
+ offset = 1; |
2595 |
+ printk("booting sd(0,%d,0):d (offset %d)\n", unit, offset); |
+ printk("booting sd(0,%d,0):d (offset %d)\n", unit, offset); |
2596 |
+ // Skip a.out header (0x20) |
+ // Skip a.out header (0x20) |
2597 |
+ dst = (void *)0x4000; |
+ dst = (void *)0x4000; |
2598 |
+ src = esp_read(unit, offset, 1); |
+ src = esp_read(unit, 3, offset, 512); |
2599 |
+ src = (void *)((unsigned int) src + 0x20); |
+ src = (void *)((unsigned int) src + 0x20); |
2600 |
+ memcpy(dst, src, 512 - 0x20); |
+ memcpy(dst, src, 512 - 0x20); |
2601 |
+ dst = (void *)0x4000 + 512 - 0x20; |
+ dst = (void *)0x4000 + 512 - 0x20; |
2602 |
+ for (i = 1; i < 7680/512; i++) { |
+ for (i = 1; i < 7680/512; i++) { |
2603 |
+ src = esp_read(unit, offset + i, 1); |
+ src = esp_read(unit, 3, offset + i, 512); |
2604 |
+ memcpy(dst, src, 512); |
+ memcpy(dst, src, 512); |
2605 |
+ dst += 512; |
+ dst += 512; |
2606 |
+ } |
+ } |
2607 |
+ esp_close(&esp); |
+ esp_close(&esp); |
2608 |
+ return 0; |
+ return 0; |
2609 |
+} |
+} |
2610 |
diff -ruN proll_18.orig/src/hconsole.c proll-patch10/src/hconsole.c |
diff -ruN proll_18.orig/src/hconsole.c proll-patch-15/src/hconsole.c |
2611 |
--- proll_18.orig/src/hconsole.c 2002-07-23 05:52:48.000000000 +0000 |
--- proll_18.orig/src/hconsole.c 2002-07-23 05:52:48.000000000 +0000 |
2612 |
+++ proll-patch10/src/hconsole.c 2005-03-02 17:03:09.000000000 +0000 |
+++ proll-patch-15/src/hconsole.c 2005-11-09 18:46:34.000000000 +0000 |
2613 |
@@ -29,6 +29,10 @@ |
@@ -29,6 +29,10 @@ |
2614 |
struct raster r_master; /* For a case of resize, whole fb */ |
struct raster r_master; /* For a case of resize, whole fb */ |
2615 |
struct raster r_0; /* malloc() erzatz */ |
struct raster r_0; /* malloc() erzatz */ |
2633 |
t->r_ = r; |
t->r_ = r; |
2634 |
t->r0_ = q; |
t->r0_ = q; |
2635 |
t->f_ = &f_master; |
t->f_ = &f_master; |
2636 |
diff -ruN proll_18.orig/src/hme.c proll-patch10/src/hme.c |
@@ -67,7 +75,7 @@ |
2637 |
|
return 0; |
2638 |
|
} |
2639 |
|
|
2640 |
|
-void hcon_fini (struct hconsole *t) |
2641 |
|
+void hcon_fini (__attribute((unused)) struct hconsole *t) |
2642 |
|
{ |
2643 |
|
return; |
2644 |
|
} |
2645 |
|
@@ -77,12 +85,12 @@ |
2646 |
|
{ |
2647 |
|
struct rfont *f = t->f_; |
2648 |
|
|
2649 |
|
- if (sy < 0 || sy >= t->ydim_) return -1; |
2650 |
|
- if (sx < 0 || sx >= t->xdim_) return -1; |
2651 |
|
+ if (sy < 0 || (unsigned)sy >= t->ydim_) return -1; |
2652 |
|
+ if (sx < 0 || (unsigned)sx >= t->xdim_) return -1; |
2653 |
|
if (height < 0) return -1; |
2654 |
|
- if (sy + height > t->ydim_) height = t->ydim_ - sy; |
2655 |
|
+ if ((unsigned)sy + (unsigned)height > t->ydim_) height = t->ydim_ - sy; |
2656 |
|
if (width < 0) return -1; |
2657 |
|
- if (sx + width > t->xdim_) width = t->xdim_ - sx; |
2658 |
|
+ if ((unsigned)sx + (unsigned)width > t->xdim_) width = t->xdim_ - sx; |
2659 |
|
|
2660 |
|
/* XXX Clear with correct background color */ |
2661 |
|
(*t->r_->clear_)(t->r_, |
2662 |
|
@@ -107,10 +115,10 @@ |
2663 |
|
char c0 = c; |
2664 |
|
RC_color rfg, rbg; |
2665 |
|
|
2666 |
|
- if (y < 0 || y >= t->ydim_) return -1; |
2667 |
|
- if (x < 0 || x >= t->xdim_) return -1; |
2668 |
|
+ if (y < 0 || (unsigned)y >= t->ydim_) return -1; |
2669 |
|
+ if (x < 0 || (unsigned)x >= t->xdim_) return -1; |
2670 |
|
|
2671 |
|
- if (t->curson_ && t->ypos_ == y && t->xpos_ == x) { |
2672 |
|
+ if (t->curson_ && t->ypos_ == (unsigned)y && t->xpos_ == (unsigned)x) { |
2673 |
|
rfg = t->bg_; rbg = t->fg_; |
2674 |
|
} else { |
2675 |
|
rfg = t->fg_; rbg = t->bg_; |
2676 |
|
@@ -126,9 +134,9 @@ |
2677 |
|
{ |
2678 |
|
struct rfont *f = t->f_; |
2679 |
|
|
2680 |
|
- if (y < 0 || y >= t->ydim_) return -1; |
2681 |
|
- if (x < 0 || x >= t->xdim_) return -1; |
2682 |
|
- if (x + count >= t->xdim_) count = t->xdim_ - x; |
2683 |
|
+ if (y < 0 || (unsigned)y >= t->ydim_) return -1; |
2684 |
|
+ if (x < 0 || (unsigned)x >= t->xdim_) return -1; |
2685 |
|
+ if ((unsigned)x + (unsigned)count >= t->xdim_) count = t->xdim_ - x; |
2686 |
|
|
2687 |
|
(*t->r_->render_)(t->r_, y*f->height_, x*f->width_, |
2688 |
|
s, count, t->bg_, t->fg_, f); |
2689 |
|
@@ -200,8 +208,8 @@ |
2690 |
|
|
2691 |
|
rc = 0; |
2692 |
|
if (dir == SM_UP) { |
2693 |
|
- if (d < 0 || d >= t->ydim_) return -1; |
2694 |
|
- if (b <= d || b > t->ydim_) return -1; |
2695 |
|
+ if (d < 0 || (unsigned)d >= t->ydim_) return -1; |
2696 |
|
+ if (b <= d || (unsigned)b > t->ydim_) return -1; |
2697 |
|
if (d + count >= b) count = b - d; |
2698 |
|
if (d + count >= b) count = b - d; |
2699 |
|
(*t->r_->yscroll_)(t->r_, |
2700 |
|
@@ -213,8 +221,8 @@ |
2701 |
|
count*f->height_, raster_qwidth(t->r_), |
2702 |
|
t->bg_); |
2703 |
|
} else if (dir == SM_DOWN) { |
2704 |
|
- if (d < 0 || d >= t->ydim_) return -1; |
2705 |
|
- if (b <= d || b > t->ydim_) return -1; |
2706 |
|
+ if (d < 0 || (unsigned)d >= t->ydim_) return -1; |
2707 |
|
+ if (b <= d || (unsigned)b > t->ydim_) return -1; |
2708 |
|
if (d + count >= b) count = b - d; |
2709 |
|
(*t->r_->yscroll_)(t->r_, |
2710 |
|
d*f->height_, 0, |
2711 |
|
diff -ruN proll_18.orig/src/hme.c proll-patch-15/src/hme.c |
2712 |
--- proll_18.orig/src/hme.c 2002-07-23 05:52:52.000000000 +0000 |
--- proll_18.orig/src/hme.c 2002-07-23 05:52:52.000000000 +0000 |
2713 |
+++ proll-patch10/src/hme.c 2005-04-16 06:16:20.000000000 +0000 |
+++ proll-patch-15/src/hme.c 2005-04-16 06:16:20.000000000 +0000 |
2714 |
@@ -655,10 +655,10 @@ |
@@ -655,10 +655,10 @@ |
2715 |
unsigned int flags, |
unsigned int flags, |
2716 |
unsigned int addr) |
unsigned int addr) |
2768 |
: "=r" (flags) |
: "=r" (flags) |
2769 |
: "r" (&this->rx_flags), "i" (ASI_PL)); |
: "r" (&this->rx_flags), "i" (ASI_PL)); |
2770 |
#else |
#else |
2771 |
diff -ruN proll_18.orig/src/lat7_2.bm proll-patch10/src/lat7_2.bm |
diff -ruN proll_18.orig/src/iommu.c proll-patch-15/src/iommu.c |
2772 |
|
--- proll_18.orig/src/iommu.c 2002-07-23 05:52:49.000000000 +0000 |
2773 |
|
+++ proll-patch-15/src/iommu.c 2005-08-14 10:08:17.000000000 +0000 |
2774 |
|
@@ -36,7 +36,7 @@ |
2775 |
|
unsigned int pa, ba; |
2776 |
|
unsigned int npages; |
2777 |
|
unsigned int mva, mpa; |
2778 |
|
- int i; |
2779 |
|
+ unsigned int i; |
2780 |
|
unsigned int *iopte; |
2781 |
|
|
2782 |
|
npages = (size + (PAGE_SIZE-1)) / PAGE_SIZE; |
2783 |
|
diff -ruN proll_18.orig/src/lat7_2.bm proll-patch-15/src/lat7_2.bm |
2784 |
--- proll_18.orig/src/lat7_2.bm 1999-02-27 05:48:54.000000000 +0000 |
--- proll_18.orig/src/lat7_2.bm 1999-02-27 05:48:54.000000000 +0000 |
2785 |
+++ proll-patch10/src/lat7_2.bm 2004-11-13 15:50:49.000000000 +0000 |
+++ proll-patch-15/src/lat7_2.bm 2004-11-13 15:50:49.000000000 +0000 |
2786 |
@@ -1,6 +1,6 @@ |
@@ -1,6 +1,6 @@ |
2787 |
#define lat7_2_width 128 |
#define lat7_2_width 128 |
2788 |
#define lat7_2_height 88 |
#define lat7_2_height 88 |
2791 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
2792 |
0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x12, 0x1e, 0x0c, 0x02, 0x70, 0x18, |
0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x12, 0x1e, 0x0c, 0x02, 0x70, 0x18, |
2793 |
0x22, 0x22, 0x18, 0x00, 0x00, 0x18, 0x18, 0xff, 0x18, 0x00, 0x12, 0x02, |
0x22, 0x22, 0x18, 0x00, 0x00, 0x18, 0x18, 0xff, 0x18, 0x00, 0x12, 0x02, |
2794 |
diff -ruN proll_18.orig/src/lat7_2_swapped.bm proll-patch10/src/lat7_2_swapped.bm |
diff -ruN proll_18.orig/src/lat7_2_swapped.bm proll-patch-15/src/lat7_2_swapped.bm |
2795 |
--- proll_18.orig/src/lat7_2_swapped.bm 1970-01-01 00:00:00.000000000 +0000 |
--- proll_18.orig/src/lat7_2_swapped.bm 1970-01-01 00:00:00.000000000 +0000 |
2796 |
+++ proll-patch10/src/lat7_2_swapped.bm 2004-11-13 15:50:49.000000000 +0000 |
+++ proll-patch-15/src/lat7_2_swapped.bm 2004-11-13 15:50:49.000000000 +0000 |
2797 |
@@ -0,0 +1,121 @@ |
@@ -0,0 +1,121 @@ |
2798 |
+#define lat7_2_width 128 |
+#define lat7_2_width 128 |
2799 |
+#define lat7_2_height 88 |
+#define lat7_2_height 88 |
2916 |
+ 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6c, 0x00, 0x00, 0x00, |
+ 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6c, 0x00, 0x00, 0x00, |
2917 |
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x42, 0x00, 0x00, 0x00, 0x00, |
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x42, 0x00, 0x00, 0x00, 0x00, |
2918 |
+ 0x00, 0x00, 0x00, 0x00}; |
+ 0x00, 0x00, 0x00, 0x00}; |
2919 |
diff -ruN proll_18.orig/src/le.c proll-patch10/src/le.c |
diff -ruN proll_18.orig/src/le.c proll-patch-15/src/le.c |
2920 |
--- proll_18.orig/src/le.c 2002-07-23 05:52:49.000000000 +0000 |
--- proll_18.orig/src/le.c 2002-07-23 05:52:49.000000000 +0000 |
2921 |
+++ proll-patch10/src/le.c 2005-04-16 06:16:20.000000000 +0000 |
+++ proll-patch-15/src/le.c 2005-04-16 06:16:20.000000000 +0000 |
2922 |
@@ -185,8 +185,6 @@ |
@@ -185,8 +185,6 @@ |
2923 |
unsigned short rap; /* register address port */ |
unsigned short rap; /* register address port */ |
2924 |
}; |
}; |
2937 |
|
|
2938 |
/* Now, give the packet to the lance */ |
/* Now, give the packet to the lance */ |
2939 |
ib->btx_ring [entry].tmd1_bits = (LE_T1_POK|LE_T1_OWN); |
ib->btx_ring [entry].tmd1_bits = (LE_T1_POK|LE_T1_OWN); |
2940 |
diff -ruN proll_18.orig/src/netinit.c proll-patch10/src/netinit.c |
diff -ruN proll_18.orig/src/net.h proll-patch-15/src/net.h |
2941 |
|
--- proll_18.orig/src/net.h 1999-12-15 17:20:17.000000000 +0000 |
2942 |
|
+++ proll-patch-15/src/net.h 2005-08-14 10:17:02.000000000 +0000 |
2943 |
|
@@ -124,7 +124,7 @@ |
2944 |
|
extern int udp_open __P((t_ipaddr daddr, int source, int dest)); |
2945 |
|
|
2946 |
|
/* Read from a UDP socket */ |
2947 |
|
-extern int udp_read __P((char *buf, int bufsize, int timeout, char abortch)); |
2948 |
|
+extern int udp_read(char *buf, unsigned int bufsize, int timeout); |
2949 |
|
|
2950 |
|
/* Write to a UDP socket */ |
2951 |
|
extern int udp_write __P((char *buf, int writelen)); |
2952 |
|
diff -ruN proll_18.orig/src/netinit.c proll-patch-15/src/netinit.c |
2953 |
--- proll_18.orig/src/netinit.c 2002-09-13 21:53:33.000000000 +0000 |
--- proll_18.orig/src/netinit.c 2002-09-13 21:53:33.000000000 +0000 |
2954 |
+++ proll-patch10/src/netinit.c 2004-11-13 15:50:49.000000000 +0000 |
+++ proll-patch-15/src/netinit.c 2004-11-13 15:50:49.000000000 +0000 |
2955 |
@@ -49,13 +49,20 @@ |
@@ -49,13 +49,20 @@ |
2956 |
unsigned char myhwaddr[ETH_ALEN]; /* my own hardware addr */ |
unsigned char myhwaddr[ETH_ALEN]; /* my own hardware addr */ |
2957 |
t_ipaddr myipaddr; /* my own IP address */ |
t_ipaddr myipaddr; /* my own IP address */ |
2995 |
fatal(); |
fatal(); |
2996 |
} |
} |
2997 |
} |
} |
2998 |
diff -ruN proll_18.orig/src/netpriv.h proll-patch10/src/netpriv.h |
diff -ruN proll_18.orig/src/netpriv.h proll-patch-15/src/netpriv.h |
2999 |
--- proll_18.orig/src/netpriv.h 1999-04-27 05:39:37.000000000 +0000 |
--- proll_18.orig/src/netpriv.h 1999-04-27 05:39:37.000000000 +0000 |
3000 |
+++ proll-patch10/src/netpriv.h 2004-11-13 15:50:49.000000000 +0000 |
+++ proll-patch-15/src/netpriv.h 2005-08-14 10:12:20.000000000 +0000 |
3001 |
|
@@ -83,7 +83,7 @@ |
3002 |
|
*/ |
3003 |
|
struct device *dev; |
3004 |
|
char *data; |
3005 |
|
- int len; |
3006 |
|
+ unsigned int len; |
3007 |
|
int protocol; |
3008 |
|
unsigned char ip_summed; |
3009 |
|
}; |
3010 |
@@ -130,10 +130,9 @@ |
@@ -130,10 +130,9 @@ |
3011 |
* |
* |
3012 |
*/ |
*/ |
3028 |
|
|
3029 |
/* Empty read buffer */ |
/* Empty read buffer */ |
3030 |
extern void empty_buf __P((void)); |
extern void empty_buf __P((void)); |
3031 |
diff -ruN proll_18.orig/src/openprom.h proll-patch10/src/openprom.h |
diff -ruN proll_18.orig/src/openprom.h proll-patch-15/src/openprom.h |
3032 |
--- proll_18.orig/src/openprom.h 2002-07-14 02:26:30.000000000 +0000 |
--- proll_18.orig/src/openprom.h 2002-07-14 02:26:30.000000000 +0000 |
3033 |
+++ proll-patch10/src/openprom.h 2004-11-13 15:50:49.000000000 +0000 |
+++ proll-patch-15/src/openprom.h 2005-05-13 16:23:14.000000000 +0000 |
3034 |
@@ -54,20 +54,20 @@ |
@@ -54,29 +54,29 @@ |
3035 |
}; |
}; |
3036 |
|
|
3037 |
struct linux_mem_v0 { |
struct linux_mem_v0 { |
3057 |
void *aieee1; /* XXX */ |
void *aieee1; /* XXX */ |
3058 |
}; |
}; |
3059 |
|
|
3060 |
|
/* V2 and up boot things. */ |
3061 |
|
struct linux_bootargs_v2 { |
3062 |
|
- char **bootpath; |
3063 |
|
- char **bootargs; |
3064 |
|
- int *fd_stdin; |
3065 |
|
- int *fd_stdout; |
3066 |
|
+ const char **bootpath; |
3067 |
|
+ const char **bootargs; |
3068 |
|
+ const int *fd_stdin; |
3069 |
|
+ const int *fd_stdout; |
3070 |
|
}; |
3071 |
|
|
3072 |
|
/* The top level PROM vector. */ |
3073 |
@@ -91,13 +91,13 @@ |
@@ -91,13 +91,13 @@ |
3074 |
struct linux_mem_v0 pv_v0mem; |
struct linux_mem_v0 pv_v0mem; |
3075 |
|
|
3105 |
}; |
}; |
3106 |
|
|
3107 |
/* More fun PROM structures for device probing. */ |
/* More fun PROM structures for device probing. */ |
3108 |
diff -ruN proll_18.orig/src/packet.c proll-patch10/src/packet.c |
diff -ruN proll_18.orig/src/packet.c proll-patch-15/src/packet.c |
3109 |
--- proll_18.orig/src/packet.c 2000-02-11 04:56:45.000000000 +0000 |
--- proll_18.orig/src/packet.c 2000-02-11 04:56:45.000000000 +0000 |
3110 |
+++ proll-patch10/src/packet.c 2004-11-13 15:50:49.000000000 +0000 |
+++ proll-patch-15/src/packet.c 2005-08-14 10:12:49.000000000 +0000 |
3111 |
@@ -41,7 +41,7 @@ |
@@ -41,7 +41,7 @@ |
3112 |
int aligner; |
int aligner; |
3113 |
} wbuf; |
} wbuf; |
3135 |
{ |
{ |
3136 |
struct sk_buff *skb; |
struct sk_buff *skb; |
3137 |
unsigned char *s; |
unsigned char *s; |
3138 |
diff -ruN proll_18.orig/src/printf.c proll-patch10/src/printf.c |
@@ -209,12 +211,12 @@ |
3139 |
|
/* |
3140 |
|
*/ |
3141 |
|
void |
3142 |
|
-eth_copy_and_sum(struct sk_buff *dest, unsigned char *src, int len, int base) |
3143 |
|
+eth_copy_and_sum(struct sk_buff *dest, unsigned char *src, int len, __attribute__((unused)) int base) |
3144 |
|
{ |
3145 |
|
bcopy(src, dest->data, len); |
3146 |
|
} |
3147 |
|
|
3148 |
|
-unsigned short eth_type_trans(struct sk_buff *skb, struct device *dev) |
3149 |
|
+unsigned short eth_type_trans(struct sk_buff *skb, __attribute__((unused)) struct device *dev) |
3150 |
|
{ |
3151 |
|
unsigned char *s = skb->data + 12; |
3152 |
|
return s[0] << 8 | s[1]; /* Network order word */ |
3153 |
|
diff -ruN proll_18.orig/src/printf.c proll-patch-15/src/printf.c |
3154 |
--- proll_18.orig/src/printf.c 1999-03-19 07:03:59.000000000 +0000 |
--- proll_18.orig/src/printf.c 1999-03-19 07:03:59.000000000 +0000 |
3155 |
+++ proll-patch10/src/printf.c 2004-11-13 15:50:49.000000000 +0000 |
+++ proll-patch-15/src/printf.c 2005-08-14 10:07:26.000000000 +0000 |
3156 |
@@ -19,7 +19,7 @@ |
@@ -19,7 +19,7 @@ |
3157 |
static void printn(struct prf_fp *, unsigned long, unsigned int); |
static void printn(struct prf_fp *, unsigned long, unsigned int); |
3158 |
static void putchar(char, struct prf_fp *); |
static void putchar(char, struct prf_fp *); |
3180 |
putchar(c,filog); |
putchar(c,filog); |
3181 |
} else if (c == 'l' || c == 'O') { |
} else if (c == 'l' || c == 'O') { |
3182 |
printn(filog, (long)va_arg(adx,long), c=='l'?10:8); |
printn(filog, (long)va_arg(adx,long), c=='l'?10:8); |
3183 |
diff -ruN proll_18.orig/src/rconsole.c proll-patch10/src/rconsole.c |
@@ -77,10 +77,6 @@ |
3184 |
|
char prbuf[24]; |
3185 |
|
register char *cp; |
3186 |
|
|
3187 |
|
- if (b == 10 && n < 0) { |
3188 |
|
- putchar('-',filog); |
3189 |
|
- n = (~n) + 1; /* n = -n */ |
3190 |
|
- } |
3191 |
|
cp = prbuf; |
3192 |
|
do |
3193 |
|
*cp++ = hextab[(unsigned int)(n%b)]; |
3194 |
|
diff -ruN proll_18.orig/src/rconsole.c proll-patch-15/src/rconsole.c |
3195 |
--- proll_18.orig/src/rconsole.c 1999-01-16 07:16:55.000000000 +0000 |
--- proll_18.orig/src/rconsole.c 1999-01-16 07:16:55.000000000 +0000 |
3196 |
+++ proll-patch10/src/rconsole.c 2005-04-16 06:16:20.000000000 +0000 |
+++ proll-patch-15/src/rconsole.c 2005-08-14 10:25:53.000000000 +0000 |
3197 |
@@ -28,12 +28,18 @@ |
@@ -28,12 +28,18 @@ |
3198 |
* move to California. Only plain lat7 survived. |
* move to California. Only plain lat7 survived. |
3199 |
* I recreated lat7-1 changes in lat7-2. --zaitcev |
* I recreated lat7-1 changes in lat7-2. --zaitcev |
3279 |
p->nchars_ = LAT7_NCHARS; |
p->nchars_ = LAT7_NCHARS; |
3280 |
p->width_ = LAT7_WIDTH; |
p->width_ = LAT7_WIDTH; |
3281 |
p->height_ = LAT7_HEIGHT; |
p->height_ = LAT7_HEIGHT; |
3282 |
diff -ruN proll_18.orig/src/rconsole.h proll-patch10/src/rconsole.h |
@@ -175,7 +188,7 @@ |
3283 |
|
r->render_ = p->render_; |
3284 |
|
} |
3285 |
|
|
3286 |
|
-void raster_dest(struct raster *r) |
3287 |
|
+void raster_dest(__attribute((unused)) struct raster *r) |
3288 |
|
{ |
3289 |
|
} |
3290 |
|
|
3291 |
|
diff -ruN proll_18.orig/src/rconsole.h proll-patch-15/src/rconsole.h |
3292 |
--- proll_18.orig/src/rconsole.h 1999-01-16 05:00:59.000000000 +0000 |
--- proll_18.orig/src/rconsole.h 1999-01-16 05:00:59.000000000 +0000 |
3293 |
+++ proll-patch10/src/rconsole.h 2004-11-13 15:50:49.000000000 +0000 |
+++ proll-patch-15/src/rconsole.h 2004-11-13 15:50:49.000000000 +0000 |
3294 |
@@ -13,10 +13,10 @@ |
@@ -13,10 +13,10 @@ |
3295 |
*/ |
*/ |
3296 |
|
|
3304 |
int nchars_; /* 128 for ASCII ... 65536 for Unicode */ |
int nchars_; /* 128 for ASCII ... 65536 for Unicode */ |
3305 |
int width_; /* [Pixels]. Maximum size is 16. */ |
int width_; /* [Pixels]. Maximum size is 16. */ |
3306 |
int height_; /* [Pixels == scan lines]. */ |
int height_; /* [Pixels == scan lines]. */ |
3307 |
diff -ruN proll_18.orig/src/romlib.h proll-patch10/src/romlib.h |
diff -ruN proll_18.orig/src/romlib.h proll-patch-15/src/romlib.h |
3308 |
--- proll_18.orig/src/romlib.h 1999-04-20 04:26:45.000000000 +0000 |
--- proll_18.orig/src/romlib.h 1999-04-20 04:26:45.000000000 +0000 |
3309 |
+++ proll-patch10/src/romlib.h 2005-04-16 20:32:49.000000000 +0000 |
+++ proll-patch-15/src/romlib.h 2005-04-16 20:32:49.000000000 +0000 |
3310 |
@@ -72,13 +72,13 @@ |
@@ -72,13 +72,13 @@ |
3311 |
*/ |
*/ |
3312 |
#define memcpy(dst, src, len) bcopy(src, dst, len) |
#define memcpy(dst, src, len) bcopy(src, dst, len) |
3326 |
|
|
3327 |
|
|
3328 |
/* |
/* |
3329 |
diff -ruN proll_18.orig/src/sched_4m.c proll-patch10/src/sched_4m.c |
diff -ruN proll_18.orig/src/sched_4m.c proll-patch-15/src/sched_4m.c |
3330 |
--- proll_18.orig/src/sched_4m.c 1999-04-27 05:48:51.000000000 +0000 |
--- proll_18.orig/src/sched_4m.c 1999-04-27 05:48:51.000000000 +0000 |
3331 |
+++ proll-patch10/src/sched_4m.c 2004-11-13 15:50:49.000000000 +0000 |
+++ proll-patch-15/src/sched_4m.c 2005-08-14 10:18:14.000000000 +0000 |
3332 |
@@ -108,7 +108,7 @@ |
@@ -108,7 +108,7 @@ |
3333 |
static int set_bolt; /* Tick counter limit */ |
static int set_bolt; /* Tick counter limit */ |
3334 |
static struct handsc hndv[16]; |
static struct handsc hndv[16]; |
3338 |
0, 0, 0, 0, 0, 0, SUN4M_INT_ETHERNET, 0, |
0, 0, 0, 0, 0, 0, SUN4M_INT_ETHERNET, 0, |
3339 |
0, 0, 0, 0, 0, 0, 0, 0, |
0, 0, 0, 0, 0, 0, 0, 0, |
3340 |
}; |
}; |
3341 |
diff -ruN proll_18.orig/src/swap.c proll-patch10/src/swap.c |
@@ -130,7 +130,7 @@ |
3342 |
|
int /* 0 - not expired yet; <>0 - timer expired */ |
3343 |
|
chk_timeout() |
3344 |
|
{ |
3345 |
|
- int lim = (((1000000/HZ) + 1) << 10); |
3346 |
|
+ unsigned int lim = (((1000000/HZ) + 1) << 10); |
3347 |
|
unsigned int clear; |
3348 |
|
unsigned int intc; |
3349 |
|
int n; |
3350 |
|
@@ -182,7 +182,7 @@ |
3351 |
|
struct handsc *hndp; |
3352 |
|
unsigned int mask; |
3353 |
|
|
3354 |
|
- if (irq < 0 || irq >= 16) { |
3355 |
|
+ if (irq == 0 || irq >= 16) { |
3356 |
|
printk("request_irq: bad irq %d\n", irq); |
3357 |
|
return -1; |
3358 |
|
} |
3359 |
|
@@ -207,7 +207,7 @@ |
3360 |
|
{ |
3361 |
|
struct handsc *hndp; |
3362 |
|
|
3363 |
|
- if (irq < 0 || irq >= 16) { |
3364 |
|
+ if (irq == 0 || irq >= 16) { |
3365 |
|
printk("free_irq: bad irq %d\n", irq); |
3366 |
|
return; |
3367 |
|
} |
3368 |
|
diff -ruN proll_18.orig/src/swap.c proll-patch-15/src/swap.c |
3369 |
--- proll_18.orig/src/swap.c 1970-01-01 00:00:00.000000000 +0000 |
--- proll_18.orig/src/swap.c 1970-01-01 00:00:00.000000000 +0000 |
3370 |
+++ proll-patch10/src/swap.c 2004-11-13 15:50:49.000000000 +0000 |
+++ proll-patch-15/src/swap.c 2004-11-13 15:50:49.000000000 +0000 |
3371 |
@@ -0,0 +1,21 @@ |
@@ -0,0 +1,21 @@ |
3372 |
+// Convert the lat7 font so that no conversion is needed at runtime. |
+// Convert the lat7 font so that no conversion is needed at runtime. |
3373 |
+#define ORIG |
+#define ORIG |
3390 |
+ } |
+ } |
3391 |
+ printf("\n"); |
+ printf("\n"); |
3392 |
+} |
+} |
3393 |
diff -ruN proll_18.orig/src/system.c proll-patch10/src/system.c |
diff -ruN proll_18.orig/src/system.c proll-patch-15/src/system.c |
3394 |
--- proll_18.orig/src/system.c 2002-07-23 05:52:49.000000000 +0000 |
--- proll_18.orig/src/system.c 2002-07-23 05:52:49.000000000 +0000 |
3395 |
+++ proll-patch10/src/system.c 2005-04-16 06:16:20.000000000 +0000 |
+++ proll-patch-15/src/system.c 2005-04-16 06:16:20.000000000 +0000 |
3396 |
@@ -298,8 +298,8 @@ |
@@ -298,8 +298,8 @@ |
3397 |
} |
} |
3398 |
|
|
3483 |
void fatal() |
void fatal() |
3484 |
{ |
{ |
3485 |
printk("fatal."); |
printk("fatal."); |
3486 |
diff -ruN proll_18.orig/src/system.h proll-patch10/src/system.h |
diff -ruN proll_18.orig/src/system.h proll-patch-15/src/system.h |
3487 |
--- proll_18.orig/src/system.h 2002-09-13 21:53:32.000000000 +0000 |
--- proll_18.orig/src/system.h 2002-09-13 21:53:32.000000000 +0000 |
3488 |
+++ proll-patch10/src/system.h 2005-04-16 06:16:20.000000000 +0000 |
+++ proll-patch-15/src/system.h 2005-04-16 06:16:20.000000000 +0000 |
3489 |
@@ -16,7 +16,7 @@ |
@@ -16,7 +16,7 @@ |
3490 |
#define IOMAPSIZE (1*1024*1024) /* 1 Meg maximum: we do not map framebuffer. */ |
#define IOMAPSIZE (1*1024*1024) /* 1 Meg maximum: we do not map framebuffer. */ |
3491 |
#define NCTX_SWIFT 0x100 |
#define NCTX_SWIFT 0x100 |
3604 |
: "i" (PSR_PIL) |
: "i" (PSR_PIL) |
3605 |
: "g1", "memory"); |
: "g1", "memory"); |
3606 |
|
|
3607 |
diff -ruN proll_18.orig/src/udp.c proll-patch10/src/udp.c |
diff -ruN proll_18.orig/src/tftp.c proll-patch-15/src/tftp.c |
3608 |
|
--- proll_18.orig/src/tftp.c 2002-09-13 21:53:34.000000000 +0000 |
3609 |
|
+++ proll-patch-15/src/tftp.c 2005-08-14 10:16:15.000000000 +0000 |
3610 |
|
@@ -127,7 +127,7 @@ |
3611 |
|
int len; |
3612 |
|
|
3613 |
|
/* Read packet with timeout */ |
3614 |
|
- len = udp_read((char *)(&inpbuf), sizeof(inpbuf), TFTP_TIMEOUT, CHR_ESC); |
3615 |
|
+ len = udp_read((char *)(&inpbuf), sizeof(inpbuf), TFTP_TIMEOUT); |
3616 |
|
if (len == 0) { |
3617 |
|
printf("TFTP: Timeout\n"); |
3618 |
|
return(ERR_TIMEOUT); |
3619 |
|
diff -ruN proll_18.orig/src/udp.c proll-patch-15/src/udp.c |
3620 |
--- proll_18.orig/src/udp.c 2001-12-24 05:12:53.000000000 +0000 |
--- proll_18.orig/src/udp.c 2001-12-24 05:12:53.000000000 +0000 |
3621 |
+++ proll-patch10/src/udp.c 2004-11-13 15:50:49.000000000 +0000 |
+++ proll-patch-15/src/udp.c 2005-08-14 10:17:19.000000000 +0000 |
3622 |
@@ -81,7 +81,7 @@ |
@@ -76,12 +76,9 @@ |
3623 |
int source; |
* |
3624 |
int dest; |
* Open a new UDP socket. |
3625 |
|
*/ |
3626 |
|
-int udp_open(daddr, source, dest) |
3627 |
|
-t_ipaddr daddr; |
3628 |
|
-int source; |
3629 |
|
-int dest; |
3630 |
|
+int udp_open(t_ipaddr daddr, int source, int dest) |
3631 |
{ |
{ |
3632 |
- register unsigned char *addr; |
- register unsigned char *addr; |
3633 |
+ const register unsigned char *addr; |
+ const unsigned char *addr; |
3634 |
|
|
3635 |
/* Set global variables */ |
/* Set global variables */ |
3636 |
usource = source; |
usource = source; |
3637 |
@@ -299,9 +299,6 @@ |
@@ -101,16 +98,13 @@ |
3638 |
|
* |
3639 |
|
* IP receiver routine |
3640 |
|
*/ |
3641 |
|
-static int ip_recv(buf, bufsize, addr) |
3642 |
|
-unsigned char *buf; |
3643 |
|
-int bufsize; |
3644 |
|
-unsigned char *addr; |
3645 |
|
+static int ip_recv(unsigned char *buf, unsigned int bufsize, unsigned char *addr) |
3646 |
|
{ |
3647 |
|
struct iphdr *ipp = ((struct iphdr *)buf); |
3648 |
|
struct udphdr *udpp = ((struct udphdr *)(buf + IP_MIN_HSIZE)); |
3649 |
|
struct udp_pseudo psehdr; |
3650 |
|
|
3651 |
|
- int size; |
3652 |
|
+ unsigned int size; |
3653 |
|
t_ipaddr dadr; |
3654 |
|
|
3655 |
|
#ifdef DEBUG |
3656 |
|
@@ -194,13 +188,9 @@ |
3657 |
|
* |
3658 |
|
* Read one packet from a UDP socket |
3659 |
|
*/ |
3660 |
|
-int udp_read(buf, bufsize, timeout, abortch) |
3661 |
|
-char *buf; |
3662 |
|
-int bufsize; |
3663 |
|
-int timeout; |
3664 |
|
-char abortch; |
3665 |
|
+int udp_read(char *buf, unsigned int bufsize, int timeout) |
3666 |
|
{ |
3667 |
|
- int len; |
3668 |
|
+ unsigned int len; |
3669 |
|
|
3670 |
|
/* Wait until we get something */ |
3671 |
|
set_timeout(timeout); |
3672 |
|
@@ -299,9 +289,6 @@ |
3673 |
*/ |
*/ |
3674 |
int init_udp() |
int init_udp() |
3675 |
{ |
{ |
3679 |
/* Register IP packet type and set write buffer pointer */ |
/* Register IP packet type and set write buffer pointer */ |
3680 |
if ((writebuf = reg_type(htons(ETH_P_IP), ip_recv)) == NULL) |
if ((writebuf = reg_type(htons(ETH_P_IP), ip_recv)) == NULL) |
3681 |
return(FALSE); |
return(FALSE); |
3682 |
diff -ruN proll_18.orig/src/vcons_zs.c proll-patch10/src/vcons_zs.c |
diff -ruN proll_18.orig/src/udp.h proll-patch-15/src/udp.h |
3683 |
|
--- proll_18.orig/src/udp.h 2001-12-24 05:12:34.000000000 +0000 |
3684 |
|
+++ proll-patch-15/src/udp.h 2005-08-14 10:16:40.000000000 +0000 |
3685 |
|
@@ -53,7 +53,7 @@ |
3686 |
|
extern int udp_open __P((t_ipaddr daddr, int source, int dest)); |
3687 |
|
|
3688 |
|
/* Read from a UDP socket */ |
3689 |
|
-extern int udp_read __P((char *buf, int bufsize, int timeout, char abortch)); |
3690 |
|
+extern int udp_read(char *buf, unsigned int bufsize, int timeout); |
3691 |
|
|
3692 |
|
/* Write to a UDP socket */ |
3693 |
|
extern int udp_write __P((char *buf, int writelen)); |
3694 |
|
diff -ruN proll_18.orig/src/vcons_zs.c proll-patch-15/src/vcons_zs.c |
3695 |
--- proll_18.orig/src/vcons_zs.c 1970-01-01 00:00:00.000000000 +0000 |
--- proll_18.orig/src/vcons_zs.c 1970-01-01 00:00:00.000000000 +0000 |
3696 |
+++ proll-patch10/src/vcons_zs.c 2005-04-10 07:01:03.000000000 +0000 |
+++ proll-patch-15/src/vcons_zs.c 2005-08-14 10:25:51.000000000 +0000 |
3697 |
@@ -0,0 +1,68 @@ |
@@ -0,0 +1,68 @@ |
3698 |
+/** |
+/** |
3699 |
+ ** Console over 'zs' (Zilog serial port) |
+ ** Console over 'zs' (Zilog serial port) |
3741 |
+ return leng; |
+ return leng; |
3742 |
+} |
+} |
3743 |
+ |
+ |
3744 |
+int vcon_zs_read(struct vconterm *t, char *data, int leng) |
+int vcon_zs_read(struct vconterm *t, char *data, __attribute((unused)) int leng) |
3745 |
+{ |
+{ |
3746 |
+ unsigned zs_ptr = (unsigned) t->impl; |
+ unsigned zs_ptr = (unsigned) t->impl; |
3747 |
+ |
+ |
3758 |
+ return ldb_bypass(zs_ptr + ZS_DATA) & 0xff; |
+ return ldb_bypass(zs_ptr + ZS_DATA) & 0xff; |
3759 |
+} |
+} |
3760 |
+ |
+ |
3761 |
+void vcon_zs_fini(struct vconterm *t) |
+void vcon_zs_fini(__attribute((unused)) struct vconterm *t) |
3762 |
+{ |
+{ |
3763 |
+ /* violent crash in the end */ |
+ /* violent crash in the end */ |
3764 |
+ ; |
+ ; |
3765 |
+} |
+} |
3766 |
diff -ruN proll_18.orig/src/vconsole.c proll-patch10/src/vconsole.c |
diff -ruN proll_18.orig/src/vconsole.c proll-patch-15/src/vconsole.c |
3767 |
--- proll_18.orig/src/vconsole.c 1999-11-08 03:10:28.000000000 +0000 |
--- proll_18.orig/src/vconsole.c 1999-11-08 03:10:28.000000000 +0000 |
3768 |
+++ proll-patch10/src/vconsole.c 2005-04-17 19:23:21.000000000 +0000 |
+++ proll-patch-15/src/vconsole.c 2005-08-14 10:24:49.000000000 +0000 |
3769 |
@@ -7,12 +7,17 @@ |
@@ -7,12 +7,17 @@ |
3770 |
#include "vconsole.h" |
#include "vconsole.h" |
3771 |
|
|
3834 |
int vcon_write(struct vconterm *t, char *data, int leng) |
int vcon_write(struct vconterm *t, char *data, int leng) |
3835 |
{ |
{ |
3836 |
int l = leng; |
int l = leng; |
3837 |
@@ -40,29 +83,99 @@ |
@@ -40,29 +83,101 @@ |
3838 |
if (l <= 0) break; |
if (l <= 0) break; |
3839 |
c = *data++; --l; |
c = *data++; --l; |
3840 |
|
|
3856 |
+ hcon_scroll(hconp, 0, hcon_qydim(hconp), SM_UP, 1); |
+ hcon_scroll(hconp, 0, hcon_qydim(hconp), SM_UP, 1); |
3857 |
+ break; |
+ break; |
3858 |
+ default: |
+ default: |
3859 |
+ printk("Unhandled escape code '%c'\n", c); |
+ //printk("Unhandled escape code '%c'\n", c); |
3860 |
+ break; |
+ break; |
3861 |
+ } |
+ } |
3862 |
break; |
break; |
3897 |
+ case 'm': |
+ case 'm': |
3898 |
+ break; |
+ break; |
3899 |
+ default: |
+ default: |
3900 |
+ printk("Unhandled escape code '%c', par[%d, %d, %d, %d, %d]\n", |
+#if 0 |
3901 |
|
+ printk("Unhandled escape code '%c', par[%d, %d, %d, %d, %d]\n", |
3902 |
+ c, t->vc_par[0], t->vc_par[1], t->vc_par[2], t->vc_par[3], t->vc_par[4]); |
+ c, t->vc_par[0], t->vc_par[1], t->vc_par[2], t->vc_par[3], t->vc_par[4]); |
3903 |
|
+#endif |
3904 |
+ break; |
+ break; |
3905 |
+ } |
+ } |
3906 |
break; |
break; |
3946 |
+ } else { |
+ } else { |
3947 |
+ t->backc++; |
+ t->backc++; |
3948 |
+ } |
+ } |
3949 |
+ if (t->vc_x + t->backc >= hcon_qxdim(hconp)) { |
+ if ((unsigned int)t->vc_x + t->backc >= hcon_qxdim(hconp)) { |
3950 |
+ vcon_i_backflush(t); |
+ vcon_i_backflush(t); |
3951 |
+ t->vc_x = 0; |
+ t->vc_x = 0; |
3952 |
+ vcon_i_cursfeed(t); |
+ vcon_i_cursfeed(t); |
3954 |
} |
} |
3955 |
} |
} |
3956 |
} |
} |
3957 |
@@ -100,9 +213,62 @@ |
@@ -73,7 +188,7 @@ |
3958 |
|
static void vcon_i_cursfeed(struct vconterm *t) { |
3959 |
|
struct hconsole *hconp = t->impl; |
3960 |
|
|
3961 |
|
- if (++t->vc_y >= hcon_qydim(hconp)) { |
3962 |
|
+ if ((unsigned int)++t->vc_y >= hcon_qydim(hconp)) { |
3963 |
|
t->vc_y = hcon_qydim(hconp)-1; |
3964 |
|
hcon_scroll(hconp, 0, hcon_qydim(hconp), SM_UP, 1); |
3965 |
|
} |
3966 |
|
@@ -90,22 +205,75 @@ |
3967 |
|
t->backp = 0; t->backc = 0; |
3968 |
|
} |
3969 |
|
|
3970 |
|
-int vcon_putch(struct vconterm *t, char c) |
3971 |
|
+int vcon_putch(__attribute__((unused)) struct vconterm *t, __attribute__((unused)) char c) |
3972 |
|
{ |
3973 |
|
return -1; |
3974 |
|
} |
3975 |
|
|
3976 |
|
-int vcon_read(struct vconterm *t, char *data, int leng) |
3977 |
|
+int vcon_read(__attribute__((unused)) struct vconterm *t, __attribute__((unused)) char *data, __attribute__((unused)) int leng) |
3978 |
|
{ |
3979 |
return 0; |
return 0; |
3980 |
} |
} |
3981 |
|
|
3982 |
|
-int vcon_getch(struct vconterm *t) |
3983 |
+static const unsigned char sunkbd_keycode[128] = { |
+static const unsigned char sunkbd_keycode[128] = { |
3984 |
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
3985 |
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
4010 |
+ |
+ |
4011 |
+static int shiftstate; |
+static int shiftstate; |
4012 |
+ |
+ |
4013 |
int vcon_getch(struct vconterm *t) |
+int vcon_getch(__attribute__((unused)) struct vconterm *t) |
4014 |
{ |
{ |
4015 |
- return -1; |
- return -1; |
4016 |
+ int ch; |
+ int ch; |
4039 |
+ return ch; |
+ return ch; |
4040 |
} |
} |
4041 |
|
|
4042 |
void vcon_fini(struct vconterm *t) |
-void vcon_fini(struct vconterm *t) |
4043 |
diff -ruN proll_18.orig/src/vconsole.h proll-patch10/src/vconsole.h |
+void vcon_fini(__attribute__((unused)) struct vconterm *t) |
4044 |
|
{ |
4045 |
|
/* violent crash in the end */ |
4046 |
|
; |
4047 |
|
diff -ruN proll_18.orig/src/vconsole.h proll-patch-15/src/vconsole.h |
4048 |
--- proll_18.orig/src/vconsole.h 1999-11-08 00:58:13.000000000 +0000 |
--- proll_18.orig/src/vconsole.h 1999-11-08 00:58:13.000000000 +0000 |
4049 |
+++ proll-patch10/src/vconsole.h 2005-03-02 12:40:12.000000000 +0000 |
+++ proll-patch-15/src/vconsole.h 2005-03-02 12:40:12.000000000 +0000 |
4050 |
@@ -6,6 +6,8 @@ |
@@ -6,6 +6,8 @@ |
4051 |
#ifndef VCONSOLE_H |
#ifndef VCONSOLE_H |
4052 |
#define VCONSOLE_H |
#define VCONSOLE_H |